Java Job Type

The java job type was widely used in the original Azkaban as a built-in type. It is no longer a built-in type in Azkaban2. The "javaprocess" is still built-in in Azkaban2. The main difference between "java" and "javaprocess" job types are: 1) javaprocess runs user program that has a "main" method, java runs Azkaban provided main method which invokes user program "run" method. 2) Azkaban can do the setup, such as getting Kerberos ticket or requesting hadoop tokens in the provided main in java type, whereas in javaprocess user is responsible for everything.

As a result, most users use java type for running anything that talks to hadoop clusters. That usage should be replaced by hadoopJava type now, which is secure. But we still keep java type in the plugins for backwards compatibility.

How-To-Use

Azkaban spawns a local process for the java job type that runs user programs. It is different from the "javaprocess" job type in that Azkaban already provides a "main" method, called "JavaJobRunnerMain". Inside "JavaJobRunnerMain", it looks for the "run" method which can be specified by "method.run" (default is "run"). User can also specify a cancel method in the case the user wants to gracefully terminate the job in the middle of the run.

For the most part, using java type should be no different from hadoopJava .

Sample Job

Please refer to hadoopJava type.