kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [kudu] 01/02: [subprocess] copy subprocess JAR to be next to the master binary
Date Tue, 17 Mar 2020 04:51:53 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 867bf8b4257da69a6bb67bb36655a3ffdf947806
Author: Hao Hao <hao.hao@cloudera.com>
AuthorDate: Sat Mar 14 14:41:07 2020 -0700

    [subprocess] copy subprocess JAR to be next to the master binary
    
    This patch copies the subprocess JAR to be next to the master/tserver
    binary instead of linking. It can reduce the coupling from the Java
    build and the C++ build, since the Java build could remove the linked
    jar if running C++ build at the same time. The same for the hms JAR as
    we have similar expectation of the location of the JAR.
    
    Change-Id: I0bab628fa2d1fbb8d9edee32b480c30da2756cdc
    Reviewed-on: http://gerrit.cloudera.org:8080/15438
    Tested-by: Hao Hao <hao.hao@cloudera.com>
    Reviewed-by: Andrew Wong <awong@cloudera.com>
---
 build-support/run_dist_test.py     | 12 ++----------
 src/kudu/hms/CMakeLists.txt        |  2 +-
 src/kudu/subprocess/CMakeLists.txt |  2 +-
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/build-support/run_dist_test.py b/build-support/run_dist_test.py
index 99b3a78..f9b12c7 100755
--- a/build-support/run_dist_test.py
+++ b/build-support/run_dist_test.py
@@ -153,21 +153,13 @@ def main():
   env['SENTRY_HOME'] = glob.glob(os.path.join(ROOT, "thirdparty/src/sentry-*"))[0]
   env['JAVA_HOME'] = glob.glob("/usr/lib/jvm/java-1.8.0-*")[0]
 
-  # Restore the symlinks to the chrony, hms-plugin, and subprocess binaries;
-  # tests expect to find them in same directory as the test binaries themselves.
+  # Restore the symlinks to the chrony binaries; tests expect to find them in
+  # same directory as the test binaries themselves.
   for bin_path in glob.glob(os.path.join(ROOT, "build/*/bin")):
     os.symlink(os.path.join(ROOT, "thirdparty/installed/common/bin/chronyc"),
                os.path.join(bin_path, "chronyc"))
     os.symlink(os.path.join(ROOT, "thirdparty/installed/common/sbin/chronyd"),
                os.path.join(bin_path, "chronyd"))
-    os.symlink(
-        glob.glob(os.path.join(ROOT,
-                               "java/kudu-hive/build/libs/kudu-hive*"))[0],
-        os.path.join(bin_path, "hms-plugin.jar"))
-    os.symlink(
-        glob.glob(os.path.join(ROOT,
-                               "java/kudu-subprocess/build/libs/kudu-subprocess*"))[0],
-        os.path.join(bin_path, "kudu-subprocess.jar"))
 
   env['LD_LIBRARY_PATH'] = ":".join(
     [os.path.join(ROOT, "build/dist-test-system-libs/")] +
diff --git a/src/kudu/hms/CMakeLists.txt b/src/kudu/hms/CMakeLists.txt
index 2815f83..546da94 100644
--- a/src/kudu/hms/CMakeLists.txt
+++ b/src/kudu/hms/CMakeLists.txt
@@ -67,7 +67,7 @@ set(HMS_PLUGIN_JAR ${EXECUTABLE_OUTPUT_PATH}/hms-plugin.jar)
 
 add_custom_command(OUTPUT ${HMS_PLUGIN_JAR}
   COMMAND ./gradlew :kudu-hive:jar ${GRADLE_FLAGS}
-  COMMAND ln -nsf
+  COMMAND cp -f
     "${JAVA_DIR}/kudu-hive/build/libs/kudu-hive-${KUDU_VERSION_NUMBER}.jar"
     "${HMS_PLUGIN_JAR}"
   WORKING_DIRECTORY "${JAVA_DIR}"
diff --git a/src/kudu/subprocess/CMakeLists.txt b/src/kudu/subprocess/CMakeLists.txt
index ceab0ca..a2612db 100644
--- a/src/kudu/subprocess/CMakeLists.txt
+++ b/src/kudu/subprocess/CMakeLists.txt
@@ -39,7 +39,7 @@ set(SUBPROCESS_JAR ${EXECUTABLE_OUTPUT_PATH}/kudu-subprocess.jar)
 
 add_custom_command(OUTPUT ${SUBPROCESS_JAR}
   COMMAND ./gradlew :kudu-subprocess:jar ${GRADLE_FLAGS}
-  COMMAND ln -nsf
+  COMMAND cp -f
     "${JAVA_DIR}/kudu-subprocess/build/libs/kudu-subprocess-${KUDU_VERSION_NUMBER}.jar"
     "${SUBPROCESS_JAR}"
   WORKING_DIRECTORY "${JAVA_DIR}"


Mime
View raw message