ExpediaGroup/circus-train

Replication failure due to incompatible Hive versions when replication strategy is "PROPAGATE_DELETES"

Closed this issue · 1 comments

We tried running CT with replication strategy = PROPAGATE_DELETES. The replication failed with the following stack trace

Failed to replicate: mauihdp:dm.ins_trans_fact to apiary-lab-hms-us-west-2:dm.ins_trans_fact.
com.hotels.bdp.circustrain.api.CircusTrainException: org.apache.thrift.TApplicationException: Invalid method name: 'get_table_req'
    at com.hotels.bdp.circustrain.core.DestructiveReplication.replicate(DestructiveReplication.java:64) ~[circus-train-all-latest.jar:?]
    at com.hotels.bdp.circustrain.core.Locomotive.run(Locomotive.java:114) [circus-train-all-latest.jar:?]
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:791) [spring-boot-1.3.8.RELEASE.jar:1.3.8.RELEASE]
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:781) [spring-boot-1.3.8.RELEASE.jar:1.3.8.RELEASE]
    at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:771) [spring-boot-1.3.8.RELEASE.jar:1.3.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.8.RELEASE.jar:1.3.8.RELEASE]
    at com.hotels.bdp.circustrain.CircusTrain.main(CircusTrain.java:104) [circus-train-all-latest.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
    at org.apache.hadoop.util.RunJar.run(RunJar.java:234) [hadoop-common-2.8.4-amzn-0.jar:?]
    at org.apache.hadoop.util.RunJar.main(RunJar.java:148) [hadoop-common-2.8.4-amzn-0.jar:?]
Caused by: org.apache.thrift.TApplicationException: Invalid method name: 'get_table_req'
    at org.apache.thrift.TApplicationException.read(TApplicationException.java:111) ~[hive-exec-2.3.3-amzn-1.jar:2.3.3-amzn-1]
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:79) ~[hive-exec-2.3.3-amzn-1.jar:2.3.3-amzn-1]
    at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_table_req(ThriftHiveMetastore.java:1563) ~[hive-exec-2.3.3-amzn-1.jar:2.3.3-amzn-1]
    at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_table_req(ThriftHiveMetastore.java:1550) ~[hive-exec-2.3.3-amzn-1.jar:2.3.3-amzn-1]
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.tableExists(HiveMetaStoreClient.java:1458) ~[hive-exec-2.3.3-amzn-1.jar:2.3.3-amzn-1]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:169) ~[hive-exec-2.3.3-amzn-1.jar:2.3.3-amzn-1]
    at com.sun.proxy.$Proxy112.tableExists(Unknown Source) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
    at com.hotels.hcommon.hive.metastore.client.closeable.CloseableMetaStoreClientInvocationHandler.invoke(CloseableMetaStoreClientInvocationHandler.java:44) ~[circus-train-all-latest.jar:?]
    at com.sun.proxy.$Proxy113.tableExists(Unknown Source) ~[?:?]
    at com.hotels.bdp.circustrain.core.source.DestructiveSource.tableExists(DestructiveSource.java:44) ~[circus-train-all-latest.jar:?]
    at com.hotels.bdp.circustrain.core.DestructiveReplication.replicate(DestructiveReplication.java:55) ~[circus-train-all-latest.jar:?]
    ... 12 more

The source region for the dataset is on-premise cluster which is running on hive-1.2.1000.2.4.3.3 while the target region for the data set is on a aws cluster running on hive-2.3.3
CT is running on the Hive 2.3.3 cluster .. Its running using the replication strategy - "PROPOGATES_DELETES" which is when it throws the error
When i change the replication strategy to the default UPSERT mode, it runs fine.

Fixed by #124