NOT PORTED YET
Authenticate with Kerberos first (if you're not using Kerberos, you really should be otherwise your cluster has zero security).
kinitThis sub-section is for MapR managed Hadoop clusters only.
Centrify does default_ccache_name=KCM:... so you will need to export KRB5CCNAME but this messes up some hadoop commands
so only prefix it to lines like 'maprlogin kerberos' and 'sqlline'
Authenticate mapr using the kerberos ticket from kinit above.
maprlogin kerberosrunning services:
maprcli node list -columns hostname,svcmaprcli node cldbmasterconfigured services:
maprcli node list -columns hostname,csvcmaprcli alarm listhadoop fs -ls /yarn node -list | tee /dev/stderr | grep -c RUNNINGRun a calculate Pi MapReduce job across the cluster nodes:
hadoop jar /opt/mapr/hadoop/hadoop-*/share/hadoop/mapreduce/hadoop-mapreduce-excamples-*-mapr-*.jar pi 10 100Run a calculate Pi Spark job across the cluster nodes:
/opt/mapr/spark/spark-*/bin/spark-submit --master yarn --class org.apache.spark.examples.SparkPi /opt/mapr/spark/spark-*/examples/jars/spark-examples_*-mapr-*.jar 10 100Avoid errors for user accounts writing to query log:
cd /opt/mapr/drill/drill-*/logs/ && touch sqlline{,_queries}.log
chmod -v 0666 /opt/mapr/drill/drill-*/logs/sqlline{,_queries}.log
avoid flexjson classpath error:
ln -sv /opt/mapr/lib/flexjson-*.jar /opt/mapr/drill/drill-*/jars/Should configure Drill with mapr/<cluster_name>@$REALM instead so that ZooKeeper can connect to any of them:
Any spaces in the connection string will results in an IllegalArgumentException
sqlline -u "jdbc:drill:drillbit=$(hostname -f);auth=kerberos;principal=mapr/$(hostname -f)@$REALM" <<< "SELECT * FROM sys.drillbits;"/opt/mapr/oozie/oozie-*/bin/oozie admin -oozie http://$(hostname -f):11000/oozie -statusMapR-DB:
mapr dbshell <<< "list"Ported from private Knowledge Base pages 2010+