集群 & 服务器操作常用命令

集群 & 服务器操作常用命令:

1、跨服务器操作:

两台机器IP分别为:A.104.238.161.75 \quad B.43.224.34.73
在A服务器上操作,将B服务器上/home/lk/目录下所有的文件全部复制到本地的/root目录下,命令为:

scp -r [email protected]:/home/lk /root

在A服务器上将/root/lk目录下所有的文件传输到B的/home/lk/cpfile目录下,命令为:

scp -r /root/lk [email protected]:/home/lk/cpfile
2、操作集群文件:
hadoop fs -ls /user/hadoop/warehouse
hdfs dfs -ls /user/hadoop/warehouse
3、spark-shell启动参数:
spark-shell --queue queue_6666 --num-executors 2 --executor-cores 2 
            --executor-memory 2g driver-memory 2g
4、查询进程:
ps -aux | grep -v grep | grep 12345
5、记录日志文件(标准输出 + 错误输出)
hadoop fs -ls /apps/hadoop/logs 2>&1 | tee testlog.log 
./bin/logs_etl_byday.sh 20180901 20180911 2>&1 | tee ./log/logs_etl_byday_20180911.log
6、beeline登录
beeline -nUserName -pPassWord -u"jdbc:hive2://20.0.1.99:60010/default"
7、spark运行jar包:
spark-submit --master yarn --queue queue_6666 --driver-memory 2g 
             --executor-memory 10g --executor-cores 4 --num-executors 10 
             --class com.aa.data.user_maven_data_66.jar
8、后台运行:
nohup ./table.sh /home/ETL/Employee create_employee.jar > ./log/run_employee.log 2>&1 &

猜你喜欢

转载自blog.csdn.net/olizxq/article/details/82807408