Skip to content

sponiro/gradle-hadoop-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradle Hadoop plugin

A gradle plugin much like the core application plugin of gradle but tailored for use with hadoop. As of now its only purpose is to create startup scripts with dependencies in the right place.

Usage

To use the plugin, add the bintray repository to your script:

buildscript {
    repositories {
        mavenCentral()
        maven {
            url 'http://dl.bintray.com/sponiro/gradle-plugins'
        }
    }
    dependencies {
        classpath group: 'de.fanero.gradle.plugin.hadoop', name: 'gradle-hadoop-plugin', version: '0.2'
    }
}

apply plugin: 'hadoop'

Tasks

  • hadoopDistTar - Bundles the project as a Hadoop application with libs and Un*x specific scripts.
  • hadoopDistZip - Bundles the project as a Hadoop application with libs and Un*x specific scripts.
  • hadoopInstall - Installs the project as a Hadoop application along with libs and Un*x specific scripts.

Convention properties

The convention block is named hadoop. The properties available are:

  • applicationName The application name. At the moment this property is for cosmetical purposes only. Defaults to project.name.
  • buildSubDir Names a subdirectory to put the application under. We use this to avoid clashes with the gradle application plugin. Defaults to 'hadoop'. This means you can find all built files below project.buildDir/buildSubDir.
  • applicationDistribution A copy spec which defines the files and directories to be created. Works like the same named property in the application plugin.
  • mainClassName Sets the main class to execute. No default.
  • exportHadoopClasspath true or false. If true, exports the application jars in the environment variable HADOOP_CLASSPATH.

Example

hadoop {
    buildSubDir = "myHadoopSubDir"
    mainClassName = 'de.fanero.HadoopMain'
}

About

Simple startup script generation for hadoop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages