• 笔记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 ==========>"
    ########## 今天的苦逼是为了不这样一直苦逼下去!##########
  • 相关阅读:
    【转】ON_COMMAND ON_MESSAGE ON_NOTIFY区别与联系
    Eureka
    application.yml-mysql8
    sprigcloud
    springboot
    maven
    排序算法之基数排序
    排序算法之桶排序
    排序算法之计数排序
    排序算法之堆排序
  • 原文地址:https://www.cnblogs.com/ruii/p/14608699.html
Copyright © 2020-2023  润新知