impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tarmstr...@apache.org
Subject incubator-impala git commit: IMPALA-5536: Fix TCLIService thrift compilation on Hive 2
Date Wed, 21 Jun 2017 05:30:16 GMT
Repository: incubator-impala
Updated Branches:
  refs/heads/master abd4ddac3 -> 330558e46


IMPALA-5536: Fix TCLIService thrift compilation on Hive 2

This fixes some issues with Impala compilation on Hive 2:

1. It fixes TCLIService.thrift generation by changing
common/thrift/CMakeLists.txt to create the directory
before generating the file and adding a dependency
to generate TCLIService.thrift before compiling the
thrift files.
2. It modifies CatalogOpExecutor::applyAlterTable to
use the MetastoreShim.

With these changes, Impala builds successfully with
Hive 2 in my environment and on automated builds.

Change-Id: I7e1477993ee3ccddd236609efec7bb23f20a7b66
Reviewed-on: http://gerrit.cloudera.org:8080/7231
Tested-by: Impala Public Jenkins
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/330558e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/330558e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/330558e4

Branch: refs/heads/master
Commit: 330558e46ee2a6e2e4d423f21fdb908fa6450d72
Parents: abd4dda
Author: Joe McDonnell <joemcdonnell@cloudera.com>
Authored: Tue Jun 20 09:45:40 2017 -0700
Committer: Tim Armstrong <tarmstrong@cloudera.com>
Committed: Wed Jun 21 05:30:01 2017 +0000

----------------------------------------------------------------------
 common/thrift/CMakeLists.txt                                    | 5 ++++-
 .../main/java/org/apache/impala/service/CatalogOpExecutor.java  | 5 +++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/330558e4/common/thrift/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/common/thrift/CMakeLists.txt b/common/thrift/CMakeLists.txt
index 59684d9..53e5e46 100644
--- a/common/thrift/CMakeLists.txt
+++ b/common/thrift/CMakeLists.txt
@@ -131,6 +131,7 @@ file(MAKE_DIRECTORY ${BE_OUTPUT_DIR})
 file(MAKE_DIRECTORY ${FE_OUTPUT_DIR})
 file(MAKE_DIRECTORY ${EXT_DS_OUTPUT_DIR})
 file(MAKE_DIRECTORY ${PYTHON_OUTPUT_DIR})
+file(MAKE_DIRECTORY ${HIVE_THRIFT_SOURCE_DIR})
 
 # Args passed to thrift for Java gen
 set(JAVA_FE_ARGS ${THRIFT_INCLUDE_DIR_OPTION} --gen java:hashcode -o ${FE_OUTPUT_DIR})
@@ -207,10 +208,12 @@ THRIFT_GEN_DS(THRIFT_DATA_SRC_FILES ${EXT_DATA_SRC_FILES})
 
 add_custom_target(thrift-generated-files-error DEPENDS ErrorCodes.thrift)
 add_custom_target(thrift-generated-files-metrics DEPENDS MetricDefs.thrift)
+add_custom_target(thrift-generated-files-tcli-service DEPENDS ${TCLI_SERVICE_THRIFT})
 
 # Add a custom target that generates all the thrift files
 add_custom_target(thrift-cpp ALL DEPENDS ${THRIFT_ALL_FILES})
-add_dependencies(thrift-cpp thrift-generated-files-metrics thrift-generated-files-error)
+add_dependencies(thrift-cpp thrift-generated-files-metrics thrift-generated-files-error
+  thrift-generated-files-tcli-service)
 
 add_custom_target(thrift-ext-data-src ALL DEPENDS ${THRIFT_DATA_SRC_FILES})
 add_dependencies(thrift-ext-data-src thrift-cpp)

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/330558e4/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java b/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
index e634a65..e800b63 100644
--- a/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
+++ b/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
@@ -2809,8 +2809,9 @@ public class CatalogOpExecutor {
       msTbl.putToParameters("transient_lastDdlTime", Long.toString(lastDdlTime));
       // TODO: Remove this workaround for HIVE-15653 to preserve table stats
       // during table alterations.
-      msTbl.putToParameters(StatsSetupConst.STATS_GENERATED_VIA_STATS_TASK,
-          StatsSetupConst.TRUE);
+      Pair<String, String> statsTaskParam =
+          MetastoreShim.statsGeneratedViaStatsTaskParam();
+      msTbl.putToParameters(statsTaskParam.first, statsTaskParam.second);
       msClient.getHiveClient().alter_table(
           msTbl.getDbName(), msTbl.getTableName(), msTbl);
     } catch (TException e) {


Mime
View raw message