You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2022/11/17 04:03:46 UTC
[atlas] 03/04: ATLAS-4241: fix import-hbase errors
This is an automated email from the ASF dual-hosted git repository.
madhan pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
commit da27bb1b497db7f234c66203255a3ded37af3631
Author: Madhan Neethiraj <ma...@apache.org>
AuthorDate: Tue Nov 15 16:46:56 2022 -0800
ATLAS-4241: fix import-hbase errors
---
addons/hbase-bridge/pom.xml | 25 +++++++++++++++++++++++++
addons/hbase-bridge/src/bin/import-hbase.sh | 19 ++++++++++++++-----
2 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/addons/hbase-bridge/pom.xml b/addons/hbase-bridge/pom.xml
index f51a7d6f1..5a0f62fb3 100644
--- a/addons/hbase-bridge/pom.xml
+++ b/addons/hbase-bridge/pom.xml
@@ -344,6 +344,16 @@
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>${commons-collections.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons-logging.version}</version>
+ </artifactItem>
<artifactItem>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
@@ -364,6 +374,16 @@
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ <version>${jackson.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-base</artifactId>
+ <version>${jackson.version}</version>
+ </artifactItem>
<artifactItem>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
@@ -374,6 +394,11 @@
<artifactId>jersey-json</artifactId>
<version>${jersey.version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-bundle</artifactId>
+ <version>${jersey.version}</version>
+ </artifactItem>
<artifactItem>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
diff --git a/addons/hbase-bridge/src/bin/import-hbase.sh b/addons/hbase-bridge/src/bin/import-hbase.sh
index a343036fa..8ae735034 100644
--- a/addons/hbase-bridge/src/bin/import-hbase.sh
+++ b/addons/hbase-bridge/src/bin/import-hbase.sh
@@ -97,8 +97,14 @@ fi
HBASE_CP="${HBASE_CONF}"
-for i in "${HBASE_HOME}/lib/"*.jar; do
- HBASE_CP="${HBASE_CP}:$i"
+# Multiple jars in HBASE_CP_EXCLUDE_LIST can be added using "\|" separator
+# Ex: HBASE_CP_EXCLUDE_LIST="commons-configuration-1."
+HBASE_CP_EXCLUDE_LIST="commons-configuration-1\|jersey-client"
+
+for i in "${HBASE_HOME}/lib/"*.jar "${HBASE_HOME}/lib/client-facing-thirdparty/"*.jar; do
+ if [ "`echo $i | grep -v \"$HBASE_CP_EXCLUDE_LIST\"`" == "$i" ]; then
+ HBASE_CP="${HBASE_CP}:$i"
+ fi
done
#Add hadoop conf in classpath
@@ -110,11 +116,14 @@ elif [ $(command -v hadoop) ]; then
HADOOP_CP=`hadoop classpath`
echo $HADOOP_CP
else
- echo "Environment variable HADOOP_CLASSPATH or HADOOP_HOME need to be set"
- exit 1
+ echo "WARN: Environment variable HADOOP_CLASSPATH or HADOOP_HOME need to be set"
fi
-CP="${HBASE_CP}:${HADOOP_CP}:${ATLASCPPATH}"
+if [ ! -z "$HADOOP_CP" ]; then
+ CP="${HBASE_CP}:${HADOOP_CP}:${ATLASCPPATH}"
+else
+ CP="${HBASE_CP}:${ATLASCPPATH}"
+fi
# If running in cygwin, convert pathnames and classpath to Windows format.
if [ "${CYGWIN}" == "true" ]