Commit f623bddf by Suma Shivaprasad

ATLAS-966 Exit execution of import_hive.sh if HIVE_HOME is not set (svimal2106 via sumasai)

parent 14863225
...@@ -82,6 +82,17 @@ else ...@@ -82,6 +82,17 @@ else
exit 1 exit 1
fi fi
echo Using Hive configuration directory ["$HIVE_CP"]
if [ -z "$HIVE_HOME" ]; then
echo "Please set HIVE_HOME to the root of Hive installation"
exit 1
fi
for i in "${HIVE_HOME}/lib/"*.jar; do
HIVE_CP="${HIVE_CP}:$i"
done
#Add hadoop conf in classpath #Add hadoop conf in classpath
if [ ! -z "$HADOOP_CLASSPATH" ]; then if [ ! -z "$HADOOP_CLASSPATH" ]; then
HADOOP_CP=$HADOOP_CLASSPATH HADOOP_CP=$HADOOP_CLASSPATH
...@@ -95,10 +106,6 @@ else ...@@ -95,10 +106,6 @@ else
exit 1 exit 1
fi fi
for i in "${HIVE_HOME}/lib/"*.jar; do
HIVE_CP="${HIVE_CP}:$i"
done
CP="${ATLASCPPATH}:${HIVE_CP}:${HADOOP_CP}" CP="${ATLASCPPATH}:${HIVE_CP}:${HADOOP_CP}"
# If running in cygwin, convert pathnames and classpath to Windows format. # If running in cygwin, convert pathnames and classpath to Windows format.
...@@ -120,7 +127,6 @@ while [[ ${1} =~ ^\-D ]]; do ...@@ -120,7 +127,6 @@ while [[ ${1} =~ ^\-D ]]; do
shift shift
done done
echo Using Hive configuration directory ["$HIVE_CP"]
echo "Log file for import is $LOGFILE" echo "Log file for import is $LOGFILE"
"${JAVA_BIN}" ${JAVA_PROPERTIES} -cp "${CP}" org.apache.atlas.hive.bridge.HiveMetaStoreBridge "${JAVA_BIN}" ${JAVA_PROPERTIES} -cp "${CP}" org.apache.atlas.hive.bridge.HiveMetaStoreBridge
......
...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES: ALL CHANGES:
ATLAS-966 Exit execution of import_hive.sh if HIVE_HOME is not set (svimal2106 via sumasai)
--Release 0.7-incubating --Release 0.7-incubating
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment