【1.saprk 查看队列】
mapred queue -info root.hypers.hypers-sr-showJobs
mapred queue -info root.hypers.hypers-insight -showJobs
mapred queue -info root.hypers.hypers-a -showJobs
【2.移动队列】
yarn application -movetoqueue appId -queue sr
【3.kill application】
yarn application -list | grep hypers.a
yarn application -kill application_1600846321587_5443
【4.command】
command & 让进程在后台运行
【5.jobs 】
jobs –l 查看后台运行的进程
【6.fg bg】
fg %n 让后台运行的进程n到前台来
bg %n 让进程n到后台去;
【7.nohup】后台执行并重定向输出
nohup sh run.sh > res.log 2>&1 &
nohup sh run.sh > res.txt 2>res.log &
【9.hive交互】
hiveconf mapred.job.queue.name=root.hypers.adhoc
【beeline】
beeline -u "jdbc:hive2://dmp-utility02.loreal.com:10000/;principal=hive/dmp-utility02.loreal.com@LOREAL.COM" \
--hiveconf hive.execution.engine=tez \
--hiveconf hive.tez.container.size=3020 \
--hiveconf tez.queue.name=root.hypers.cpo \
--hiveconf hive.exec.dynamic.partition=true \
--hiveconf hive.exec.dynamic.partition.mode=nonstrict \
--hivevar jira=${jira} \
--hivevar start_date=${start_date} \file:/C:/jobs/20_10/realtime2sbl/v3/sbl_copy/hspser_293.txt
--hivevar end_date=${end_date} \
--hivevar id_type=${id_type} \
-f script/process.sql #该选项表示要执行一个文件
【10.impala】
impala-shell -i -r worker05
-h 万能帮助
-r刷新整个元数据
-B 去格式化,查询大数据量时可以提高性能
-v版本
-f 执行查询文件
-i连接到对应的impalad
-o 保存执行结果到文件
-output_file 指定输出文件名
-p 显示执行计划
-k 使用kerberos 安全加密放时运行
-c 忽略错误语句继续执行
-l 使用LDAP协议进行访问
-d database
explain
【11.spark-sql】
spark-sql \
--master yarn \
--deploy-mode client \
--executor-cores 5 \
--executor-memory 20G \
--driver-memory 4G \
--queue root.hypers.adhoc \
--conf spark.dynamicAllocation.enabled=true \
--conf spark.sql.autoBroadcastJoinThreshold=-1 \
--conf spark.sql.shuffle.partitions=1000 \
--hiveconf hive.metastore.execute.setugi=true \
--hiveconf hive.exec.dynamic.partition=true \
--hiveconf hive.exec.dynamic.partition.mode=nonstrict \
--hiveconf hive.exec.max.dynamic.partitions=10000 \
--hiveconf hive.exec.max.dynamic.partitions.pernode=10000 \
--conf spark.dynamicAllocation.maxExecutors=35 \
-f ../script/tmp.sql >../data/app_tables.csv 2>../log/run.log &
【6】ETL上线常用命令
最新推荐文章于 2025-05-01 23:21:54 发布