org.apache.oozie.util
Class JobUtils

java.lang.Object
  extended by org.apache.oozie.util.JobUtils

public class JobUtils
extends Object

Job utilities.


Constructor Summary
JobUtils()
           
 
Method Summary
static void addFileToClassPath(org.apache.hadoop.fs.Path file, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs)
          This method provides a wrapper around hadoop 0.20/1.x and 0.23/2.x implementations.
static void normalizeAppPath(String user, String group, org.apache.hadoop.conf.Configuration conf)
          Normalize appPath in job conf with the provided user/group - If it's not jobs via proxy submission, after normalization appPath always points to job's Xml definition file.
static Map<String,String> parseChangeValue(String changeValue)
          This Function will parse the value of the changed values in key value manner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobUtils

public JobUtils()
Method Detail

normalizeAppPath

public static void normalizeAppPath(String user,
                                    String group,
                                    org.apache.hadoop.conf.Configuration conf)
                             throws IOException
Normalize appPath in job conf with the provided user/group - If it's not jobs via proxy submission, after normalization appPath always points to job's Xml definition file.

Parameters:
user - user
group - group
conf - job configuration.
Throws:
IOException - thrown if normalization can not be done properly.

parseChangeValue

public static Map<String,String> parseChangeValue(String changeValue)
                                           throws CommandException
This Function will parse the value of the changed values in key value manner. the change value would be key1=value1;key2=value2

Parameters:
changeValue - change value.
Returns:
This returns the hash with hash<[key1,value1],[key2,value2]>
Throws:
CommandException - thrown if changeValue cannot be parsed properly.

addFileToClassPath

public static void addFileToClassPath(org.apache.hadoop.fs.Path file,
                                      org.apache.hadoop.conf.Configuration conf,
                                      org.apache.hadoop.fs.FileSystem fs)
                               throws IOException
This method provides a wrapper around hadoop 0.20/1.x and 0.23/2.x implementations. TODO: Remove the workaround when we drop the support for hadoop 0.20.

Parameters:
file - Path of the file to be added
conf - Configuration that contains the classpath setting
fs - FileSystem with respect to which path should be interpreted (may be null)
Throws:
IOException


Copyright © 2015 Apache Software Foundation. All Rights Reserved.