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/*.jar`
strjar=`echo $s | sed "s/ /,/g"`
spark-submit --jars $DEP_JARS --class xxxxxx xxx.jar
#因为在docker里面执行,所以通过下面的方式来获取spark master的ip
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