Github user denalex commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1291#discussion_r141526979
--- Diff: pxf/pxf-service/src/scripts/pxf-service ---
@@ -247,13 +255,43 @@ function commandWebapp()
{
command=$1
pushd $instance_root
- su $pxf_user -c "$instance_root/$instance_name/bin/catalina.sh
$command"
+ sudo -u $pxf_user $instance_root/$instance_name/bin/catalina.sh
$command
if [ $? -ne 0 ]; then
return 1
fi
popd
}
+function createLogsDir()
+{
+ mkdir -p $PXF_LOGDIR
+ chown -R $instance_owner $PXF_LOGDIR
+ chmod 700 $PXF_LOGDIR
+ return 0
+}
+
+function createRunDir()
+{
+ mkdir -p $PXF_RUNDIR
+ chown -R $instance_owner $PXF_RUNDIR
+ chmod 700 $PXF_RUNDIR
+ return 0
+}
+
+function generatePrivateClasspath()
+{
+ sed -e "s|PXF_HOME|$PXF_HOME|g"
$PXF_HOME/conf-templates/pxf-private.classpath.template >
$PXF_HOME/conf/pxf-private.classpath
+ sed -i -e "s|HADOOP_HOME|$hadoop_home|g"
$PXF_HOME/conf/pxf-private.classpath
+ sed -i -e "s|HBASE_HOME|$hbase_home|g"
$PXF_HOME/conf/pxf-private.classpath
--- End diff --
what if user did not provide HBASE_HOME and / or HIVE_HOME ? Should we
check the variables are set before substituting ?
---