[
https://issues.apache.org/jira/browse/GOBBLIN-1786?focusedWorklogId=848769&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-848769
]
ASF GitHub Bot logged work on GOBBLIN-1786:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 02/Mar/23 18:00
Start Date: 02/Mar/23 18:00
Worklog Time Spent: 10m
Work Description: meethngala commented on code in PR #3643:
URL: https://github.com/apache/gobblin/pull/3643#discussion_r1123517410
##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergHiveCatalog.java:
##########
@@ -17,25 +17,44 @@
package org.apache.gobblin.data.management.copy.iceberg;
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
+import java.util.Map;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.iceberg.CatalogProperties;
+import org.apache.iceberg.TableOperations;
import org.apache.iceberg.catalog.TableIdentifier;
import org.apache.iceberg.hive.HiveCatalog;
+import lombok.extern.slf4j.Slf4j;
+
/**
* Hive-Metastore-based {@link IcebergCatalog}.
*/
@Slf4j
-@AllArgsConstructor
-public class IcebergHiveCatalog implements IcebergCatalog {
+
+public class IcebergHiveCatalog extends BaseIcebergCatalog {
+ public static final String HIVE_CATALOG_NAME = "HiveCatalog";
// NOTE: specifically necessitates `HiveCatalog`, as
`BaseMetastoreCatalog.newTableOps` is `protected`!
- private final HiveCatalog hc;
+ private HiveCatalog hc;
+
+ public IcebergHiveCatalog() {
+ super(HIVE_CATALOG_NAME, HiveCatalog.class);
+ }
@Override
- public IcebergTable openTable(String dbName, String tableName) {
- TableIdentifier tableId = TableIdentifier.of(dbName, tableName);
- return new IcebergTable(tableId, hc.newTableOps(tableId));
+ public void initialize(Map<String, String> properties, Configuration
configuration) {
+ hc = (HiveCatalog) createCompanionCatalog(properties, configuration);
}
+
+ @Override
+ public String getCatalogUri() {
+ return hc.getConf().get(CatalogProperties.URI, "");
Review Comment:
yeah sure .... updated the default value for catalog uri as suggested above
Issue Time Tracking
-------------------
Worklog Id: (was: 848769)
Time Spent: 6.5h (was: 6h 20m)
> Support Other Catalog Types for Iceberg Distcp
> ----------------------------------------------
>
> Key: GOBBLIN-1786
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1786
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Meeth Gala
> Priority: Major
> Time Spent: 6.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)