zoukankan      html  css  js  c++  java
  • 笔记5

    #!/bin/sh
    
    home=$(cd `dirname $0`; cd ..; pwd)
    . ${home}/bin/common.sh
    
    export HADOOP_HEAPSIZE=20000
    
    fsimage_binary_name=`ls ${fsimage_binary_path} | grep ${cluster} | grep ${day}`
    
    fsimage_binary_file=${fsimage_binary_path}/${fsimage_binary_name}
    
    fsimage_txt_name=${fsimage_binary_name}.txt
    fsimage_txt_file=${fsimage_txt_path}/${fsimage_txt_name}
    
    hdfs oiv -p Delimited -i ${fsimage_binary_file} -o ${fsimage_txt_file}
    
    hdfs dfs -mkdir -p ${fsimage_org_hdfs_path}
    hdfs dfs -rm ${fsimage_org_hdfs_path}/${fsimage_txt_name}
    hdfs dfs -put ${fsimage_txt_file} ${fsimage_org_hdfs_path}
    
    echo -e "==========> load to hive start ==========>"
    hive -e "ALTER TABLE xunshan.dwd_fsimage_org DROP IF EXISTS PARTITION(day=${day},cluster='${cluster}');"
    hive -e "ALTER TABLE xunshan.dwd_fsimage_org ADD PARTITION(day=${day},cluster='${cluster}') LOCATION '${fsimage_org_hdfs_path}';"
    echo -e "==========> load to hive end ==========>"
    ########## 今天的苦逼是为了不这样一直苦逼下去!##########
  • 相关阅读:
    CF1260F
    牛客挑战赛34 A~E
    CSP-S2019游记&拆塔记
    6424. 【NOIP2019模拟2019.11.13】我的订书机之恋
    CF1257E/F
    6423. 【NOIP2019模拟11.11】画
    1222/2516. Kup
    Comet OJ
    浅析CSS定位
    css文字颜色渐变的3种实现
  • 原文地址:https://www.cnblogs.com/ruii/p/14608699.html
Copyright © 2011-2022 走看看