[
https://issues.apache.org/jira/browse/GOBBLIN-1484?focusedWorklogId=622751&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-622751
]
ASF GitHub Bot logged work on GOBBLIN-1484:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jul/21 21:51
Start Date: 14/Jul/21 21:51
Worklog Time Spent: 10m
Work Description: ZihanLi58 commented on a change in pull request #3329:
URL: https://github.com/apache/gobblin/pull/3329#discussion_r669979234
##########
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:
Update the code to try to use the existing schema map to get the schema.
But if there is no schema in schema map, which means we don't register the
source table and not maintain the latest schema, we will still fetch from hive
to make sure we can always have the latest schema
##########
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:
fixed.
--
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: 622751)
Time Spent: 1h 50m (was: 1h 40m)
> 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: 1h 50m
> 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)