Coder Social home page Coder Social logo

bdr-action's Introduction

Introduction

This utility allows for programmatic execution of previously scheduled BDR jobs. It has three basic functions:

1) List BDR job schedule (and history). This is primarily in place to determine the schedule ID of the BDR job.
2) Run BDR job schedules. 
3) Generate an encrypted properties file that contains the CM instance details and password. 
It is of course not 100% secure, but better than storing in clear text. 

Additionally, the utility operates in either local or distributed mode, specified via system property. The default mode is distributed. In distributed mode, every entry point must contain the path as part of the arguments list. The path refers to the HDFS location of the properties file, "bdr.properties". TODO work includes implementation of writing the properties file directly to HDFS. Currently this must be done manually.

.


Usage:

    java -jar -D[option]=[value] target/bdr-action.jar <CMD> <args>

Example:

    java -DlogLevel=debug -Dmode=local -jar target/bdr-action.jar List 
    java -DlogLevel=debug -Dmode=local -jar target/bdr-action.jar GenerateCredentials /path/to/credentials_file/
    
    hadoop jar bdr-action.jar Run 9 true /user/cloudera/

Options:

    logLevel               (default 'info')    The log level to use: debug, info, warn, error.
    mode                   (default 'distributed')    The mode local or distributed.
    filename               (default 'bdr.properties')    The filename to use.
    

Command Arguments:

***In local mode the path argument is optional for all commands, and defaults to $PWD***

   Run scheduleId dryRun /path/to/credentials_file/
   GenerateCredentials /path/to/credentials_file/
   List /path/to/credentials/

Example job.properties and workflow.xml are in the workflow directory.

To build, install Maven and run the following, which creates a jar file with all dependencies included in it:

    mvn clean compile assembly:single

Depending on the version of CM you are running against, you might need to change the cloudera-manager-api version in the pom.xml file. Visit the following URL to see the available versions: - https://repository.cloudera.com/artifactory/cloudera-repos/com/cloudera/api/cloudera-manager-api/ You may also need to change the hadoop-client version.

Additional Note: The encryption key is embedded in the AESEncryption class. This isn't a great practice and you should change this for your implementation.

bdr-action's People

Contributors

jholoman avatar

Watchers

James Cloos avatar

Forkers

meraboxer

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.