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

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

                Author: ASF GitHub Bot
            Created on: 14/Jul/21 18:35
            Start Date: 14/Jul/21 18:35
    Worklog Time Spent: 10m 
      Work Description: sv2000 commented on a change in pull request #3329:
URL: https://github.com/apache/gobblin/pull/3329#discussion_r669858840



##########
File path: 
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/writer/HiveMetadataWriter.java
##########
@@ -262,13 +264,34 @@ private void 
schemaUpdateHelper(GobblinMetadataChangeEvent gmce, HiveSpec spec,
           }
         }
       }
+    } else if 
(gmce.getRegistrationProperties().containsKey(HiveMetaStoreBasedRegister.SCHEMA_SOURCE_DB)
+        && 
!gmce.getRegistrationProperties().get(HiveMetaStoreBasedRegister.SCHEMA_SOURCE_DB).equals(spec.getTable().getDbName()))
 {
+      // If schema source is NONE and schema source db is set, we will 
directly update the schema to source db schema
+      String schemaSourceDb = 
gmce.getRegistrationProperties().get(HiveMetaStoreBasedRegister.SCHEMA_SOURCE_DB);
+      try {
+        String sourceSchema = fetchSchemaFromTable(schemaSourceDb, 
spec.getTable().getTableName());

Review comment:
       Should we cache the sourceSchema to avoid repeated lookups?

##########
File path: 
gobblin-iceberg/src/test/java/org/apache/gobblin/iceberg/writer/HiveMetadataWriterTest.java
##########
@@ -278,9 +297,9 @@ public TestHiveRegistrationPolicy(State props) throws 
IOException {
       }
       return tables;
     }
-    protected Iterable<String> getDatabaseNames(Path path) {
+    /*protected Iterable<String> getDatabaseNames(Path path) {

Review comment:
       Remove the commented out block.




-- 
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: [email protected]

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


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

    Worklog Id:     (was: 622642)
    Time Spent: 1.5h  (was: 1h 20m)

> Make Gobblin metadata writer be able to support schema source DB
> ----------------------------------------------------------------
>
>                 Key: GOBBLIN-1484
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1484
>             Project: Apache Gobblin
>          Issue Type: New Feature
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Sometime we need the avro schema in place even for ORC tables, we have that 
> information in ingestion job but not for compaction job. And it's hard to get 
> the avro schema from orc file itself, so we want to support schema source db, 
> so that we can fetch the schema from source db where ingestion job registers 
> to.



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

Reply via email to