如何在代码中执行spark
1 回答
12345678_0001
TA贡献1802条经验 获得超5个赞
写Linux脚本
#!/bin/sh
if [ $# -lt 2 ] ;then
echo "Useage:$0 <hdfs_input_file> $1 <hdfs_output_file>"
exit
else
echo "wordcount is starting!"
spark-submit \
--master spark://spark:7077 \
--class WordCount \
--executor-memory 512m \
--total-executor-cores 6 \
~/input/WordCount.jar \
"$1" \
"$2"
echo "wordcount is stopped!"
fi
- 1 回答
- 0 关注
- 872 浏览
添加回答
举报
0/150
提交
取消