Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Add setting for cloudera manager #1335

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,46 +37,49 @@ PXF_HOME/lib/pxf-jdbc.jar
/etc/hbase/conf

# Hadoop Libraries
/usr/lib/hadoop/client/hadoop-hdfs.jar
/usr/lib/hadoop/client/hadoop-mapreduce-client-core.jar
/usr/lib/hadoop/client/hadoop-mapreduce-client-common.jar
/usr/lib/hadoop/client/hadoop-auth.jar
/usr/lib/hadoop/client/hadoop-common.jar
/usr/lib/hadoop/client/avro.jar
/usr/lib/hadoop/client/commons-cli.jar
/usr/lib/hadoop/client/commons-codec.jar
/usr/lib/hadoop/client/commons-collections.jar
/usr/lib/hadoop/client/commons-configuration.jar
/usr/lib/hadoop/client/commons-io.jar
/usr/lib/hadoop/client/commons-lang.jar
/usr/lib/hadoop/client/commons-logging.jar
/usr/lib/hadoop/client/guava.jar
/usr/lib/hadoop/client/htrace-core4.jar
/usr/lib/hadoop/client/jackson-core.jar
/usr/lib/hadoop/client/jackson-mapper-asl.jar
/usr/lib/hadoop/client/jetty-*.jar
/usr/lib/hadoop/client/jersey-core.jar
/usr/lib/hadoop/client/log4j.jar
/usr/lib/hadoop/client/protobuf-java-*[0-9].jar
/usr/lib/hadoop/client/slf4j-api.jar
/usr/lib/hadoop/client/snappy-java.jar
/usr/lib/hadoop/lib/asm-*[0-9].jar
/usr/lib/hadoop/lib/jersey-server-*[0-9].jar
CDH_HADOOP_JAR/client/hadoop-hdfs.jar
CDH_HADOOP_JAR/client/hadoop-mapreduce-client-core.jar
CDH_HADOOP_JAR/client/hadoop-mapreduce-client-common.jar
CDH_HADOOP_JAR/client/hadoop-auth.jar
CDH_HADOOP_JAR/client/hadoop-common.jar
CDH_HADOOP_JAR/client/avro.jar
CDH_HADOOP_JAR/client/commons-cli.jar
CDH_HADOOP_JAR/client/commons-codec.jar
CDH_HADOOP_JAR/client/commons-collections.jar
CDH_HADOOP_JAR/client/commons-configuration.jar
CDH_HADOOP_JAR/client/commons-io.jar
CDH_HADOOP_JAR/client/commons-lang.jar
CDH_HADOOP_JAR/client/commons-logging.jar
CDH_HADOOP_JAR/client/guava.jar
CDH_HADOOP_JAR/client/htrace-core4.jar
CDH_HADOOP_JAR/client/jackson-core.jar
CDH_HADOOP_JAR/client/jackson-mapper-asl.jar
CDH_HADOOP_JAR/client/jetty-*.jar
CDH_HADOOP_JAR/client/jersey-core.jar
CDH_HADOOP_JAR/client/log4j.jar
CDH_HADOOP_JAR/client/protobuf-java-*[0-9].jar
CDH_HADOOP_JAR/client/slf4j-api.jar
CDH_HADOOP_JAR/client/snappy-java.jar
CDH_HADOOP_JAR/lib/asm-*[0-9].jar
CDH_HADOOP_JAR/lib/jersey-server-*[0-9].jar
CDH_YARN_JAR/hadoop-yarn*.jar
CDH_JETTY_JAR/jetty-*.jar


# Hive Libraries
/usr/lib/hive/lib/antlr-runtime-*[0-9].jar
/usr/lib/hive/lib/datanucleus-api-jdo-*[0-9].jar
/usr/lib/hive/lib/datanucleus-core-*[0-9].jar
/usr/lib/hive/lib/hive-exec.jar
/usr/lib/hive/lib/hive-metastore.jar
/usr/lib/hive/lib/jdo-api-*[0-9].jar
/usr/lib/hive/lib/libfb303-*[0-9].jar
CDH_HIVE_JAR/lib/antlr-runtime-*[0-9].jar
CDH_HIVE_JAR/lib/datanucleus-api-jdo-*[0-9].jar
CDH_HIVE_JAR/lib/datanucleus-core-*[0-9].jar
CDH_HIVE_JAR/lib/hive-exec.jar
CDH_HIVE_JAR/lib/hive-metastore.jar
CDH_HIVE_JAR/lib/jdo-api-*[0-9].jar
CDH_HIVE_JAR/lib/libfb303-*[0-9].jar

# HBase Libraries
/usr/lib/hbase/hbase-client.jar
/usr/lib/hbase/hbase-common.jar
/usr/lib/hbase/hbase-protocol.jar
/usr/lib/hbase/lib/htrace-core.jar
/usr/lib/hbase/lib/netty-*[0-9].Final.jar
/usr/lib/hbase/lib/metrics-core*.jar
/usr/lib/zookeeper/zookeeper.jar
CDH_HBASE_JAR/hbase-client.jar
CDH_HBASE_JAR/hbase-common.jar
CDH_HBASE_JAR/hbase-protocol.jar
CDH_HBASE_JAR/lib/htrace-core.jar
CDH_HBASE_JAR/lib/netty-*[0-9].Final.jar
CDH_HBASE_JAR/lib/metrics-core*.jar
CDH_ZOO_JAR/zookeeper.jar
22 changes: 22 additions & 0 deletions pxf/pxf-service/src/scripts/pxf-service
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ function check_hadoop_install()
fi
;;
cdh|CDH)
if [ -d "/opt/cloudera/parcels/CDH/lib/hadoop" ]; then
DISTRO="cdh"
CDHMANAGER="manager"
return 0;
fi
if [ -d "/usr/lib/hadoop/client" ]; then
DISTRO="cdh"
return 0;
Expand Down Expand Up @@ -294,6 +299,7 @@ function check_hadoop_install()
function determineHadoopDistro()
{
DISTRO=""
CDHMANAGER=""
# check if the distro is explicitly specified
if [ -z "${HADOOP_DISTRO}" ]; then
# if distro is not specified, try checking for HDP and then CDH
Expand Down Expand Up @@ -335,6 +341,22 @@ function generatePrivateClasspath()
if [ -n "${HADOOP_ROOT}" ]; then
sed -i -e "s|HADOOP_ROOT|${HADOOP_ROOT}|g" ${PXF_HOME}/conf/pxf-private.classpath
fi

# from clouderamanager
if [ "${DISTRO}" = "cdh" ] && [ "${CDHMANAGER}" = "manager" ]; then
sed -i -e "s|CDH_HADOOP_JAR|/opt/cloudera/parcels/CDH/lib/hadoop|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_YARN_JAR|/opt/cloudera/parcels/CDH/jars|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_JETTY_JAR|/opt/cloudera/parcels/CDH/jars|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_HIVE_JAR|/opt/cloudera/parcels/CDH/lib/hive|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_HBASE_JAR|/opt/cloudera/parcels/CDH/lib/hbase|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_ZOO_JAR|/opt/cloudera/parcels/CDH/lib/zookeeper|g" ${PXF_HOME}/conf/pxf-private.classpath
else
sed -i -e "s|CDH_HADOOP_JAR|/usr/lib/hadoop|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_YARN_JAR|/usr/lib/hadoop-yarn|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_HIVE_JAR|/usr/lib/hive|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_HBASE_JAR|/usr/lib/hbase|g" ${PXF_HOME}/conf/pxf-private.classpath \
-e "s|CDH_ZOO_JAR|/usr/lib/zookeeper|g" ${PXF_HOME}/conf/pxf-private.classpath
fi
}

function printUsage()
Expand Down