Bladeren bron

AMBARI-9821. Need to update HIVE_AUX_JARS_PATH in hive-env.sh (dlysnichenko)

Lisnichenko Dmitro 10 jaren geleden
bovenliggende
commit
f76de13290

+ 7 - 3
ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml

@@ -49,10 +49,14 @@ export HIVE_CONF_DIR={{hive_config_dir}}
 
 # Folder containing extra libraries required for hive compilation/execution can be controlled by:
 if [ "${HIVE_AUX_JARS_PATH}" != "" ]; then
-  export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}
+  if [ -f "${HIVE_AUX_JARS_PATH}" ]; then    
+    export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}
+  elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
+    export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
+  fi
 elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
-  export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog
-fi
+  export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
+fi      
 
 export METASTORE_PORT={{hive_metastore_port}}
     </value>