• hadoop 数据抽取


    #!/bin/bash

    if [ ! -z $2 ]; then
    start_time=$1
    end_time=KaTeX parse error: Got function '\`' with no arguments as argument to '\=' at position 27: … starttime\=\̲`̲date +%Y%m%d%H%…{starttime:0:10}
    startmi=`expr ${starttime:10:2} / 15 * 15`
    if [ KaTeX parse error: Can't use function '\]' in math mode at position 14: startmi != 0 \̲]̲;then …startdayKaTeX parse error: Expected group as argument to '\=' at end of input: … start\_time\=startday"00"
    fi
    #结束时间
    endtime=`date +%Y%m%d%H%M`
    endday=${endtime:0:10}
    endmi=`expr ${endtime:10:2} / 15 * 15`
    if [ KaTeX parse error: Can't use function '\]' in math mode at position 12: endmi != 0 \̲]̲;then …enddayKaTeX parse error: Expected group as argument to '\=' at end of input: … end\_time\=endday"00"
    fi

    fi
    echo “数据时间为: s t a r t _ t i m e − − start\_time-- start_timeend_time”
    #创建目录
    hadoop fs -mkdir cache/O_RE_ST_XDR_PS_GN_HTTP/KaTeX parse error: Expected 'EOF', got '#' at position 13: start\_time #̲上传数据时间段数据 for f…{start_time:0:4}- s t a r t _ t i m e : 4 : 2 − {start\_time:4:2}- start_time:4:2{start_time:6:2}/*${start_time:0:10}*.CHK`
    do
    #351_TM07_PSGnHTTPEvent201410021235_3720202.CHK
    #351_TM07_PSGnHTTPEvent201410021235_3720202.AVL
    basefile=`basename KaTeX parse error: Expected group as argument to '\`' at position 7: file\` ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲date\={basefile:22:12}
    if [ $date -ge $start_time ] && [ $date -lt KaTeX parse error: Can't use function '\]' in math mode at position 11: end\_time \̲]̲;then …{file/%CHK/AVL}
    echo $avlfile
    cp $avlfile /opt8/gz_data_temp/http/
    #hadoop fs -put a v l f i l e c a c h e / O _ R E _ S T _ X D R _ P S _ G N _ H T T P / avlfile cache/O\_RE\_ST\_XDR\_PS\_GN\_HTTP/ avlfilecache/O_RE_ST_XDR_PS_GN_HTTP/{start_time}/
    fi
    done
    #cat /opt8/gz_data_temp/http/*_*.AVL>/opt8/gz_data_temp/http/KaTeX parse error: Expected 'EOF', got '#' at position 17: …tart\_time.AVL #̲split -b 512m /…start_time.AVL /opt8/gz_data_temp/http/KaTeX parse error: Expected 'EOF', got '#' at position 18: …art\_time.AVL. #̲echo \`ls /opt8…start_time.AVL`
    #rm -f /opt8/gz_data_temp/http/*.AVL
    `hadoop fs -put /opt8/gz_data_temp/http/*.AVL cache/O_RE_ST_XDR_PS_GN_HTTP/${start_time}/`
    rm -f /opt8/gz_data_temp/http/*.AVL
    echo “oozie–job-http-start!”
    cd /home/boco/program
    echo `java -cp .:…/oozie/libserver/* com.boco.BSSystem.schedule.OozieRunner job_ods_a_xdr_ps_gn_http ${start_time}`

    转载于:https://www.cnblogs.com/jack-Star/p/4221584.html

  • 相关阅读:
    Spring整合Junit(单元测试)
    R语言计算data.table分组变量下每个分组的计数
    java程序国际化[38]
    如何使用代码来构造HTTP请求?
    密码学与网络安全:量子计算的威胁与解决方案
    Spring框架(缺SM整合)
    Pytorch - 使用torchsummary/torchsummaryX/torchinfo库打印模型结构、输出维度和参数信息
    Google Pay最新版集成步骤
    服务框架-day01-SpringCloud
    精品基于Uniapp+SSM实现的Android的校园新闻管理系统实现的App
  • 原文地址:https://blog.csdn.net/m0_67401382/article/details/126582000