You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2020/04/07 21:52:27 UTC

[impala] 01/03: IMPALA-9543 Reduce duplicate code in thrift CMakeLists.txt

This is an automated email from the ASF dual-hosted git repository.

stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 24518467970f29d2a33f56c782ab52a049d9335a
Author: zhaorenhai <zh...@hotmail.com>
AuthorDate: Mon Mar 23 09:09:53 2020 +0000

    IMPALA-9543 Reduce duplicate code in thrift CMakeLists.txt
    
    Reduce duplicate code in thrift CMakeLists.txt.
    And if in future, we change hive to version 4 or higher.
    This can adapt autometically.
    Change-Id: Ie55b89bb689375cbb55c22f6d5543a5422b29a82
    Reviewed-on: http://gerrit.cloudera.org:8080/15527
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 common/thrift/CMakeLists.txt | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/common/thrift/CMakeLists.txt b/common/thrift/CMakeLists.txt
index d5a277c..9e7be77 100644
--- a/common/thrift/CMakeLists.txt
+++ b/common/thrift/CMakeLists.txt
@@ -253,17 +253,10 @@ add_custom_command(OUTPUT MetricDefs.thrift
 # org.apache.hive.service.cli.thrift to org.apache.hive.service.rpc.thrift. Impala calls
 # various Hive methods that have these classes in the interface and if the packages don't
 # match it won't compile.
-add_custom_command(OUTPUT hive-2-api/TCLIService.thrift
+add_custom_command(OUTPUT hive-$ENV{IMPALA_HIVE_MAJOR_VERSION}-api/TCLIService.thrift
   COMMAND sed
       's/namespace java org.apache.hive.service.cli.thrift/namespace java org.apache.hive.service.rpc.thrift/'
-      hive-1-api/TCLIService.thrift > hive-2-api/TCLIService.thrift
-  DEPENDS hive-1-api/TCLIService.thrift
-)
-
-add_custom_command(OUTPUT hive-3-api/TCLIService.thrift
-  COMMAND sed
-      's/namespace java org.apache.hive.service.cli.thrift/namespace java org.apache.hive.service.rpc.thrift/'
-      hive-1-api/TCLIService.thrift > hive-3-api/TCLIService.thrift
+      hive-1-api/TCLIService.thrift > hive-$ENV{IMPALA_HIVE_MAJOR_VERSION}-api/TCLIService.thrift
   DEPENDS hive-1-api/TCLIService.thrift
 )