[hms] Add Hcatalog jars to the HMS classpath Due to the packaging differences of Hive distributions, the Hcatalog jars may not be loaded into the classpath of mini HMS, which will cause the ClassNotFoundException when using notification log event listener. This patch explicitly adds these jars.
Change-Id: Ifed85fffdabb5af19f22e343843e012b009888a0 Reviewed-on: http://gerrit.cloudera.org:8080/11273 Reviewed-by: Adar Dembo <a...@cloudera.com> Tested-by: Kudu Jenkins Reviewed-by: Dan Burkert <danburk...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/9ad90eeb Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/9ad90eeb Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/9ad90eeb Branch: refs/heads/master Commit: 9ad90eebe6324a30c17deaaf8593d82ba038db49 Parents: 4341445 Author: Hao Hao <hao....@cloudera.com> Authored: Thu Aug 16 12:25:36 2018 -0700 Committer: Hao Hao <hao....@cloudera.com> Committed: Tue Aug 21 21:53:44 2018 +0000 ---------------------------------------------------------------------- src/kudu/hms/mini_hms.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/9ad90eeb/src/kudu/hms/mini_hms.cc ---------------------------------------------------------------------- diff --git a/src/kudu/hms/mini_hms.cc b/src/kudu/hms/mini_hms.cc index 5472580..e52247d 100644 --- a/src/kudu/hms/mini_hms.cc +++ b/src/kudu/hms/mini_hms.cc @@ -116,7 +116,8 @@ Status MiniHms::Start() { RETURN_NOT_OK(CreateCoreSite(tmp_dir)); // Comma-separated list of additional jars to add to the HMS classpath. - string aux_jars = Substitute("$0/hms-plugin.jar", bin_dir); + string aux_jars = Substitute("$0/hms-plugin.jar,$1/hcatalog/share/hcatalog/*", + bin_dir, hive_home); // List of JVM environment options to pass to the HMS. string java_options =