当前位置: 代码迷 >> 综合 >> 导数执行的语句
  详细解决方案

导数执行的语句

热度:32   发布时间:2023-10-26 20:46:20.0

1。测试取下来(jar包)

cd /tmp/hduser0101                 
hadoop fs -get /apps/hduser0101/an_pafc_safe/lib/spark2phoenix.jar 


2、开发put上去(jar包)

hadoop fs -put -f  /appcom/tmp/spark2phoenix.jar /apps/hduser0101/an_pafc_safe/lib/spark2phoenix.jar


3、进入hive,使用对应的数据集市:

use an_pafc_safe;                               //使用的数据库
set mapred.queue.names=root.queue_0101_01;      //使用队列
set mapreduce.job.queuename=root.queue_0101_01;


//spark执行SQL语句

spark-sql  --master yarn-client  --queue root.queue_0101_01



txt文件导入到hive表中的命令:

load data local inpath '/appcom/tmp/zeb/sx_ela_bp_info.txt' into table an_pafc_safe.sx_ela_bp_info;


#执行第一个脚本所要传入的参数:

./hive_cgi_idld_lcdm_mit_client_group_info.sh -inc_start=20170701 -inc_end=20170801 -jdbc_str=jdbc:oracle:thin:@10.20.131.82:1526:srvp_d0mbi_paeye-mbi-life_1 -db_user=mbidata -db_psw=pa12ic34 -db_sid=LUSH0 -hdp_queue=root.queue_0101_01 -hdfs_host=hdfs://hdp-hdfs01


#第一个脚本存放的目录:

/apps/hduser0101/an_pafc_safe/hive_cgi




#第二个脚本以及之后的脚本的存放=目录:

/apps/hduser0101/sx_360_safe/spark_cgi

#sqoop脚本执行命令:

./sqoop_import_liferpt_agg_mobile_bussiness_dept_all.sh -inc_start=20170206 -inc_end=20170207 -jdbc_str=jdbc:oracle:thin:@d0lifrt.dbdev.paic.com.cn:1526:d0lifrt -db_user=LOLAPDATA -db_psw=patst2012 -db_sid=LUSH0 -hdp_queue=root.queue_0101_01 -hdfs_host=hdfs://hdp-hdfs01

#hive脚本执行命令:

./hive_mbi_epcis_life_plan.sh -hdp_queue=root.queue_0101_01 -hdfs_host=hdfs://hdp-hdfs01

 

  相关解决方案