zoukankan      html  css  js  c++  java
  • DataX

    #!/bin/bash
    [ ! -d /opop ] && mkdir /opop
    cd /opop
    wget http://192.168.1.129/package/DataX/{jdk11.0.2.tar.gz,maven-3.6.tar.gz,datax.tar.gz}
    tar -zxvf jdk11.0.2.tar.gz -C /usr/local/
    echo 'export JAVA_HOME=/usr/local/jdk-11.0.2/' >> /etc/profile
    echo 'export JRE_HOME=$JAVA_HOME/jre' >> /etc/profile
    echo 'export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib' >> /etc/profile
    echo 'export PATH=$JAVA_HOME/bin:$PATH'>> /etc/profile
    tar -zxvf maven-3.6.tar.gz -C /usr/local/
    mv /usr/local/apache-maven-3.6.0/ /usr/local/maven3.6
    echo 'export MAVEN_HOME=/usr/local/maven3.6' >>/etc/profile
    echo 'PATH=$MAVEN_HOME/bin:$PATH' >>/etc/profile
    sleep 2
    source /etc/profile
    tar -zxvf datax.tar.gz -C /usr/local/
    clear
    echo -e "33[35mUsage:33[0m"
    echo -e "33[31mcd {YOUR_DATAX_HOME}/bin33[0m    该脚本中是: /usr/local/datax/bin/"
    echo -e "33[31mpython datax. py {YOUR_JOB.json}33[0m"      该脚本中是: python datax.py ../job/job.json

    echo " "
    echo " "
    echo -e "33[0mmysql数据传输到oracle:33[0m"
    echo -e " python datax.py -r mysqlreader -w oraclewriter"
    echo -e " 把生成的json数据样式写到job目录中的任意一个xxx.json文件中,比如为opop.json"
    echo -e "33[0mpython datax.py ../job/opop.json33[0m"
    echo -e " "

     把python datax.py -r mysqlreader -w oraclewriter执行完后的json样式拿下来放到opop.json中

    示例:


    echo "VIA: https://github.com/alibaba/DataX"

    JDK         Maven         DataX  

  • 相关阅读:
    Fruit HDU
    排列组合 HDU
    XOR and Favorite Number CodeForces
    BZOJ-6-2460: [BeiJing2011]元素-线性基
    CDH 安装与部署
    Apache Hadoop集群搭建
    大数据架构与技术选型
    项目落实方案选择思考(KUDU)
    JAVA 高级篇
    大数据就业岗位
  • 原文地址:https://www.cnblogs.com/smlile-you-me/p/10475430.html
Copyright © 2011-2022 走看看