[ 
https://issues.apache.org/jira/browse/GOBBLIN-1344?focusedWorklogId=527358&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-527358
 ]

ASF GitHub Bot logged work on GOBBLIN-1344:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Dec/20 20:49
            Start Date: 22/Dec/20 20:49
    Worklog Time Spent: 10m 
      Work Description: autumnust commented on a change in pull request #3181:
URL: https://github.com/apache/incubator-gobblin/pull/3181#discussion_r547498669



##########
File path: 
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java
##########
@@ -280,8 +291,15 @@ private boolean 
ensureHiveTableExistenceBeforeAlternation(String tableName, Stri
         try (Timer.Context context = 
this.metricContext.timer(GET_HIVE_TABLE).time()) {
           existingTable = 
HiveMetaStoreUtils.getHiveTable(client.getTable(dbName, tableName));
         }
+        HiveTable schemaSourceTable = existingTable;
+        if (state.contains(SCHEMA_SOURCE_DB) || 
state.contains(SCHEMA_SOURCE_TABLE)) {
+          try (Timer.Context context = 
this.metricContext.timer(GET_HIVE_TABLE).time()) {

Review comment:
       timer shouldn't be named after `GET_HIVE_TABLE` here. 

##########
File path: 
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java
##########
@@ -93,6 +93,8 @@
 
   public static final String HIVE_REGISTER_METRICS_PREFIX = "hiveRegister.";
   public static final String ADD_PARTITION_TIMER = 
HIVE_REGISTER_METRICS_PREFIX + "addPartitionTimerTimer";
+  public static final String SCHEMA_SOURCE_DB = HIVE_REGISTER_METRICS_PREFIX + 
"schema.source.dbName";
+  public static final String SCHEMA_SOURCE_TABLE = 
HIVE_REGISTER_METRICS_PREFIX + "schema.source.tableName";

Review comment:
       I would rather we getting rid of source table here for simplicity (and 
add javadoc indicating our assumption that the actual source table will be 
named the same with only database name being different). wdyt ? 

##########
File path: 
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java
##########
@@ -280,8 +291,15 @@ private boolean 
ensureHiveTableExistenceBeforeAlternation(String tableName, Stri
         try (Timer.Context context = 
this.metricContext.timer(GET_HIVE_TABLE).time()) {
           existingTable = 
HiveMetaStoreUtils.getHiveTable(client.getTable(dbName, tableName));
         }
+        HiveTable schemaSourceTable = existingTable;
+        if (state.contains(SCHEMA_SOURCE_DB) || 
state.contains(SCHEMA_SOURCE_TABLE)) {

Review comment:
       Should the information of source DB coming from HiveSpec instead of 
`state`?  IIRC `state` will be applied for all paths' registration here, it is 
more like a global state but not for a specific table/db




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 527358)
    Time Spent: 20m  (was: 10m)

> Enable configurable schema source db and table when registering hive schema
> ---------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1344
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1344
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> We need to set schema.literal for hive table, but in ORC compaction pipeline, 
> there is no context for avro schema. So for de-duped DB which is registered 
> by compaction pipeline, we need to be able to configure the schema source 
> db/table to get the avro schema registered by data ingestion pipeline



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to