Spark hive to ES Elasticsearch
#!/bin/bash date=`date -d "-1 day" +%F` spark-submit \ --class ****** \ --name "*** ***" \ --master yarn \ --deploy-mode client \ --num-executors 30 \ --driver-memory 7g \ --executor-memory 2g \ --executor-cores 2 \ --conf spark.default.parallelism=200 \ --conf spark.sql.shuffle.partitions=200 \ --queue batch \ ossref://***.jar "select * from table where dt = '$date' " 'index name' $date