org.apache.oozie.service
Class WorkflowAppService

java.lang.Object
  extended by org.apache.oozie.service.WorkflowAppService
All Implemented Interfaces:
Service
Direct Known Subclasses:
LiteWorkflowAppService

public abstract class WorkflowAppService
extends Object
implements Service

Service that provides application workflow definition reading from the path and creation of the proto configuration.


Field Summary
static String APP_LIB_PATH_LIST
           
static String CONF_PREFIX
           
static String HADOOP_JT_KERBEROS_NAME
           
static String HADOOP_NN_KERBEROS_NAME
           
static String HADOOP_UGI
           
static String HADOOP_USER
           
static String SYSTEM_LIB_PATH
           
 
Fields inherited from interface org.apache.oozie.service.Service
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
WorkflowAppService()
           
 
Method Summary
 XConfiguration createProtoActionConf(org.apache.hadoop.conf.Configuration jobConf, String authToken, boolean isWorkflowJob)
          Create proto configuration.
 void destroy()
          Destroy the workflow application service.
 Class<? extends Service> getInterface()
          Return the public interface for workflow application service.
 void init(Services services)
          Initialize the workflow application service.
abstract  WorkflowApp parseDef(org.apache.hadoop.conf.Configuration jobConf, String authToken)
          Parse workflow definition.
abstract  WorkflowApp parseDef(String wfXml)
          Parse workflow definition.
protected  String readDefinition(String appPath, String user, String group, String autToken)
          Read workflow definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_PREFIX

public static final String CONF_PREFIX
See Also:
Constant Field Values

SYSTEM_LIB_PATH

public static final String SYSTEM_LIB_PATH
See Also:
Constant Field Values

APP_LIB_PATH_LIST

public static final String APP_LIB_PATH_LIST
See Also:
Constant Field Values

HADOOP_UGI

public static final String HADOOP_UGI
See Also:
Constant Field Values

HADOOP_USER

public static final String HADOOP_USER
See Also:
Constant Field Values

HADOOP_JT_KERBEROS_NAME

public static final String HADOOP_JT_KERBEROS_NAME
See Also:
Constant Field Values

HADOOP_NN_KERBEROS_NAME

public static final String HADOOP_NN_KERBEROS_NAME
See Also:
Constant Field Values
Constructor Detail

WorkflowAppService

public WorkflowAppService()
Method Detail

init

public void init(Services services)
Initialize the workflow application service.

Specified by:
init in interface Service
Parameters:
services - services instance.

destroy

public void destroy()
Destroy the workflow application service.

Specified by:
destroy in interface Service

getInterface

public Class<? extends Service> getInterface()
Return the public interface for workflow application service.

Specified by:
getInterface in interface Service
Returns:
WorkflowAppService.

readDefinition

protected String readDefinition(String appPath,
                                String user,
                                String group,
                                String autToken)
                         throws WorkflowException
Read workflow definition.

Parameters:
appPath - application path.
user - user name.
group - group name.
autToken - authentication token.
Returns:
workflow definition.
Throws:
WorkflowException - thrown if the definition could not be read.

createProtoActionConf

public XConfiguration createProtoActionConf(org.apache.hadoop.conf.Configuration jobConf,
                                            String authToken,
                                            boolean isWorkflowJob)
                                     throws WorkflowException
Create proto configuration.

The proto configuration includes the user,group and the paths which need to be added to distributed cache. These paths include .jar,.so and the resource file paths.

Parameters:
jobConf - job configuration.
authToken - authentication token.
isWorkflowJob - indicates if the job is a workflow job or not.
Returns:
proto configuration.
Throws:
WorkflowException - thrown if the proto action configuration could not be created.

parseDef

public abstract WorkflowApp parseDef(org.apache.hadoop.conf.Configuration jobConf,
                                     String authToken)
                              throws WorkflowException
Parse workflow definition.

Parameters:
jobConf - job configuration.
authToken - authentication token.
Returns:
workflow application.
Throws:
WorkflowException - thrown if the workflow application could not be parsed.

parseDef

public abstract WorkflowApp parseDef(String wfXml)
                              throws WorkflowException
Parse workflow definition.

Parameters:
wfXml - workflow.
Returns:
workflow application.
Throws:
WorkflowException - thrown if the workflow application could not be parsed.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.