ATLAS-4846-Source-the-atlas-env-file-in-ATLAS-import.patch
Signed-off-by: Mandar Ambawane <mandar.ambawane@freestoneinfotech.com>
diff --git a/addons/hbase-bridge/src/bin/import-hbase.sh b/addons/hbase-bridge/src/bin/import-hbase.sh
index 8ae7350..aaf92dd 100644
--- a/addons/hbase-bridge/src/bin/import-hbase.sh
+++ b/addons/hbase-bridge/src/bin/import-hbase.sh
@@ -60,6 +60,11 @@
fi
ATLASCPPATH=${ATLASCPPATH}:${ATLAS_CONF_DIR}
+if [ -d "${ATLAS_CONF_DIR}" ] && [ -f "${ATLAS_CONF_DIR}/atlas-env.sh" ]; then
+ #source the atlas-env.sh file, use the exported argument into atlas-jvm
+ source ${ATLAS_CONF_DIR}/atlas-env.sh
+fi
+
# log dir for applications
ATLAS_LOG_DIR="${ATLAS_LOG_DIR:-/var/log/atlas}"
export ATLAS_LOG_DIR
diff --git a/addons/hive-bridge/src/bin/import-hive.sh b/addons/hive-bridge/src/bin/import-hive.sh
index 951be5b..c64f6d1 100755
--- a/addons/hive-bridge/src/bin/import-hive.sh
+++ b/addons/hive-bridge/src/bin/import-hive.sh
@@ -55,6 +55,11 @@
fi
ATLASCPPATH=${ATLASCPPATH}:${ATLAS_CONF_DIR}
+if [ -d "${ATLAS_CONF_DIR}" ] && [ -f "${ATLAS_CONF_DIR}/atlas-env.sh" ]; then
+ #source the atlas-env.sh file, use the exported argument into atlas-jvm
+ source ${ATLAS_CONF_DIR}/atlas-env.sh
+fi
+
# log dir for applications
ATLAS_LOG_DIR="${ATLAS_LOG_DIR:-/var/log/atlas}"
export ATLAS_LOG_DIR
diff --git a/addons/impala-bridge/src/main/resources/import-impala.sh b/addons/impala-bridge/src/main/resources/import-impala.sh
index b440f2d..dc8e93f 100644
--- a/addons/impala-bridge/src/main/resources/import-impala.sh
+++ b/addons/impala-bridge/src/main/resources/import-impala.sh
@@ -86,6 +86,11 @@
fi
ATLASCPPATH=${ATLASCPPATH}:${ATLAS_CONF_DIR}
+if [ -d "${ATLAS_CONF_DIR}" ] && [ -f "${ATLAS_CONF_DIR}/atlas-env.sh" ]; then
+ #source the atlas-env.sh file, use the exported argument into atlas-jvm
+ source ${ATLAS_CONF_DIR}/atlas-env.sh
+fi
+
echo "Logging: ${ATLAS_LOG_DIR}/${ATLAS_LOG_FILE}"
echo "Log config: ${LOG_CONFIG}"
diff --git a/addons/kafka-bridge/src/bin/import-kafka.sh b/addons/kafka-bridge/src/bin/import-kafka.sh
index 8fe2774..9255a81 100644
--- a/addons/kafka-bridge/src/bin/import-kafka.sh
+++ b/addons/kafka-bridge/src/bin/import-kafka.sh
@@ -62,6 +62,11 @@
fi
ATLASCPPATH=${ATLASCPPATH}:${ATLAS_CONF_DIR}
+if [ -d "${ATLAS_CONF_DIR}" ] && [ -f "${ATLAS_CONF_DIR}/atlas-env.sh" ]; then
+ #source the atlas-env.sh file, use the exported argument into atlas-jvm
+ source ${ATLAS_CONF_DIR}/atlas-env.sh
+fi
+
# log dir for applications
ATLAS_LOG_DIR="${ATLAS_LOG_DIR:-/var/log/atlas}"
export ATLAS_LOG_DIR