You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by le...@apache.org on 2021/06/15 17:15:05 UTC
[gobblin] branch master updated: [GOBBLIN-1469]Fix Issue that hive
registration cannot process when schema.literal is not set (#3309)
This is an automated email from the ASF dual-hosted git repository.
lesun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new 0931e14 [GOBBLIN-1469]Fix Issue that hive registration cannot process when schema.literal is not set (#3309)
0931e14 is described below
commit 0931e14d2ab3a77f26205556d249e3bf2319b1f5
Author: Zihan Li <zi...@linkedin.com>
AuthorDate: Tue Jun 15 10:14:10 2021 -0700
[GOBBLIN-1469]Fix Issue that hive registration cannot process when schema.literal is not set (#3309)
---
.../org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java b/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java
index 06d2ec0..1a8711e 100644
--- a/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java
+++ b/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java
@@ -227,7 +227,8 @@ public class HiveMetaStoreBasedRegister extends HiveRegister {
@VisibleForTesting
protected void updateSchema(HiveSpec spec, Table table, HiveTable existingTable) throws IOException{
- if (this.schemaRegistry.isPresent()) {
+ if (this.schemaRegistry.isPresent() && existingTable.getSerDeProps().getProp(
+ AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName()) != null) {
try (Timer.Context context = this.metricContext.timer(GET_AND_SET_LATEST_SCHEMA).time()) {
Schema existingTableSchema = new Schema.Parser().parse(existingTable.getSerDeProps().getProp(
AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName()));