File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 324324}
325325
326326function createAppsSparkFolder() {
327- sudo -u ${MAPR_USER} hadoop fs -mkdir -p /apps/spark > /dev/null 2>&1
328- sudo -u ${MAPR_USER} hadoop fs -chmod 777 /apps/spark > /dev/null 2>&1
327+ if [ -z " $MAPR_TICKETFILE_LOCATION " ]; then
328+ isSecured=" false"
329+ if [ -e " ${MAPR_HOME} /conf/mapr-clusters.conf" ]; then
330+ isSecured=$( head -n1 " ${MAPR_HOME} /conf/mapr-clusters.conf" | grep -o ' secure=\w*' | cut -d ' =' -f 2)
331+ fi
332+ if [ " $isSecured " = " true" ] && [ -e " ${MAPR_HOME} /conf/mapruserticket" ]; then
333+ export MAPR_TICKETFILE_LOCATION=" ${MAPR_HOME} /conf/mapruserticket"
334+ fi
335+ fi
336+ hadoop fs -mkdir -p /apps/spark > /dev/null 2>&1
337+ hadoop fs -chmod 777 /apps/spark > /dev/null 2>&1
329338}
330339
331340#
You can’t perform that action at this time.
0 commit comments