spark 作業提交
kafka-topics.sh --describe --zookeeper xxxxx:2181 --topic test
kafka-run-class.sh kafka.tools.GetOffsetShell --topic test --broker-list xxxxxx:9092 --time -1
SPARK_CLASSPATH=$SPARK_CLASSPATH:/data/lib/*
mvn dependency:copy-dependencies
DEP_JARS=""
for jar in `ls lib/*.jar`
do
DEP_JARS=$jar,$DEP_JARS
done
echo $DEP_JARS
s=`ls ./lib/`
strjar=`echo $s | sed "s/ /,/g"`
spark-submit --jars $DEP_JARS --class xxxxxx xxx.jar
spark-submit --master spark://$(tail -n 1 /etc/hosts |awk '{print $1}'):7077 --jars $DEP_JARS --class xxx xxx.jar
##curl 獲取所有索引
curl -XGET 192.168.152.1:9200/_cat/indices
##查詢某個索引的值列表
curl -XGET localhost:9200/$indexname/_search?pretty
##刪除所有的索引
curl -XDELETE localhost:9200/*
樣例pom,使用了maven-shade外掛
https://www.jianshu.com/p/7a0e20b30401