Code Monkey home page Code Monkey logo

datamigrationscripts's Introduction

Data Migration Scripts

HDFS data and Hive Database transfer automation between two clusters Primary and DR scenario

Synopsis: For this to work user needs to have

  1. Permission to connect to the hive server using beeline.(both source and target)
  2. Permission to copy data from source cluster to warehouse location of target cluster.

Code location: Checkout the scripts here in both source and target cluster edge nodes and update necessary params. Execution steps: Copy Scripts to location:ย /home/hdfs/scripts/

hadoopsync.sh is the main script,It has three steps

Note:use hftp:// with port 50070 on source cluster url for distcp instead of hdfs:// ,if both clusters are in diff versions.

Step1.execute distcpall.sh (This script need to be run on the target cluster to copy both internal and external table data) Update the DIR paths,PRODNN ,DRNN(Target cluster),QUEUE and kerberos principal

Step2.execute mktablesall.sh (This internally calls showtables.sh and showtableddl.sh scripts) ,this will create ddl scripts and run the final ddls in target cluster. Update the user,password,HIVEJDBCKNOX ENDPOINTS specific to edge node

Step3.msckall.sh (this will call the msck repair on the target hive tables to create necessary partitions) Update the user,password,HIVEJDBCKNOX ENDPOINTS specific to edge node .

datamigrationscripts's People

Contributors

kandula66 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

naswiz whiz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.