欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Spark-shell批量命令執(zhí)行腳本的方法

 更新時間:2018年06月19日 16:34:58   作者:小蝸牛也有夢想  
今天小編就為大家分享一篇Spark-shell批量命令執(zhí)行腳本的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

批量執(zhí)行spark-shell命令,并指定提交參數(shù)

#!/bin/bash

source /etc/profile

exec $SPARK_HOME/bin/spark-shell --queue tv --name spark-sql-test --executor-cores 8 --executor-memory 8g --num-executors 8 --conf spark.cleaner.ttl=240000 <<!EOF
import org.apache.spark.sql.SaveMode
sql("set hive.exec.dynamic.partition=true")
sql("set hive.exec.dynamic.partition.mode=nonstrict")
sql("use hr")
sql("SELECT * FROM t_abc ").rdd.saveAsTextFile("/tmp/out") 
sql("SELECT * FROM t_abc").rdd.map(_.toString).intersection(sc.textFile("/user/hdfs/t2_abc").map(_.toString).distinct).count
!EOF

以上這篇Spark-shell批量命令執(zhí)行腳本的方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論