You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/19 18:55:29 UTC
[GitHub] [iceberg] singhpk234 commented on a diff in pull request #4585: Core : Strip trailing slash from tableLocation in LocationProvider
singhpk234 commented on code in PR #4585:
URL: https://github.com/apache/iceberg/pull/4585#discussion_r853390812
##########
core/src/main/java/org/apache/iceberg/hadoop/HadoopCatalog.java:
##########
@@ -98,11 +98,8 @@ public HadoopCatalog() {
@Override
public void initialize(String name, Map<String, String> properties) {
- String inputWarehouseLocation = properties.get(CatalogProperties.WAREHOUSE_LOCATION);
- Preconditions.checkArgument(inputWarehouseLocation != null && !inputWarehouseLocation.equals(""),
- "Cannot instantiate hadoop catalog. No location provided for warehouse (Set warehouse config)");
this.catalogName = name;
- this.warehouseLocation = inputWarehouseLocation.replaceAll("/*$", "");
+ this.warehouseLocation = CatalogUtil.cleanWarehousePath(properties.get(CatalogProperties.WAREHOUSE_LOCATION));
Review Comment:
sure, done :) !!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org