cxzl25 opened a new pull request #2623:
URL: https://github.com/apache/hive/pull/2623


   ### What changes were proposed in this pull request?
   Use `alter_partition`, `alter_partitions` when `EnvironmentContext` is null.
   
   ### Why are the changes needed?
   [HIVE-12730](https://issues.apache.org/jira/browse/HIVE-12730) uses 
`alter_partition_with_environment_context` and 
`alter_partitions_with_environment_context` instead of `alter_partition` and 
`alter_partitions` when the `EnvironmentContext` is null.
   This causes the client version to be greater than 2.1 to connect to 
server<2.1, and this error will occur.
   
   ```java
   Caused by: org.apache.thrift.TApplicationException: Invalid method name: 
'alter_partitions_with_environment_context'
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:79)
        at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_alter_partitions_with_environment_context(ThriftHiveMetastore.java:2843)
        at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.alter_partitions_with_environment_context(ThriftHiveMetastore.java:2827)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_partitions(HiveMetaStoreClient.java:1524)
   ```
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   exist UT
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to