You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2020/03/03 05:30:48 UTC

[kudu] 02/02: [cmake] Fix mini-hms Java build in certain cases

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

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

commit f5a09064f8824faa4be6a5d0edf81d839c8e0740
Author: Michael Percy <mp...@fb.com>
AuthorDate: Mon Mar 2 18:03:39 2020 -0800

    [cmake] Fix mini-hms Java build in certain cases
    
    This change fixes the following error when trying to build Kudu for the
    first time on a fresh install of Ubuntu 18.04:
    
    $ ninja
    [9/482] Building Java objects for hms-plugin.jar
    FAILED: src/kudu/hms/CMakeFiles/hms-plugin.dir/java_compiled_hms-plugin
    cd /home/mpercy/src/kudu/src/kudu/hms && /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/javac -classpath :/home/mpercy/src/kudu/src/kudu/hms:/home/mpercy/src/kudu/build/dynclang/bin -d /home/mpercy/src/kudu/build/dynclang/src/kudu/hms/CMakeFiles/hms-plugin.dir @/home/mpercy/src/kudu/build/dynclang/src/kudu/hms/CMakeFiles/hms-plugin.dir/java_sources && /home/mpercy/src/kudu/thirdparty/installed/common/bin/cmake -E touch /home/mpercy/src/kudu/build/dynclang/src/kudu/hms/CMakeFiles
    /hms-plugin.dir/java_compiled_hms-plugin
    /home/mpercy/src/kudu/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java:23: error: package com.google.common.annotations does not exist
    import com.google.common.annotations.VisibleForTesting;
                                        ^
    /home/mpercy/src/kudu/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java:24: error: package org.apache.hadoop.conf does not exist
    import org.apache.hadoop.conf.Configuration;
                                  ^
    /home/mpercy/src/kudu/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java:25: error: package org.apache.hadoop.hive.metastore does not exist
    import org.apache.hadoop.hive.metastore.MetaStoreEventListener;
                                            ^
    
    Looking at the verbose ninja output, I could see that the globbed jars
    were not being included in the classpath for the javac command.
    
    Change-Id: I736d8da837030c641d6a06c0cc812fffc0854667
    Reviewed-on: http://gerrit.cloudera.org:8080/15343
    Reviewed-by: Grant Henke <gr...@apache.org>
    Tested-by: Mike Percy <mp...@apache.org>
---
 src/kudu/hms/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/hms/CMakeLists.txt b/src/kudu/hms/CMakeLists.txt
index d23ff4b..62a764b 100644
--- a/src/kudu/hms/CMakeLists.txt
+++ b/src/kudu/hms/CMakeLists.txt
@@ -70,7 +70,7 @@ file(GLOB DEPENDENCY_JARS
 
 add_jar(hms-plugin
   "${CMAKE_SOURCE_DIR}/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java"
-  INCLUDE_JARS ${DEPENDENCY_JARS}
+  INCLUDE_JARS "${DEPENDENCY_JARS}"
   OUTPUT_DIR "${EXECUTABLE_OUTPUT_PATH}")
 
 set(MINI_HMS_SRCS