org.apache.oozie.coord
Class HCatELFunctions

java.lang.Object
  extended by org.apache.oozie.coord.HCatELFunctions

public class HCatELFunctions
extends Object

This class implements the EL function for HCat datasets in coordinator


Constructor Summary
HCatELFunctions()
           
 
Method Summary
static boolean hcat_exists(String uri)
          Return true if partitions exists or false if not.
static String ph1_coord_databaseIn_echo(String dataName)
          Echo the same EL function without evaluating anything
static String ph1_coord_databaseOut_echo(String dataName)
           
static String ph1_coord_dataInPartitionFilter_echo(String dataInName, String type)
           
static String ph1_coord_dataInPartitionMax_echo(String dataInName, String partition)
           
static String ph1_coord_dataInPartitionMin_echo(String dataInName, String partition)
           
static String ph1_coord_dataOutPartitions_echo(String dataOutName)
           
static String ph1_coord_dataOutPartitionValue_echo(String dataOutName, String partition)
           
static String ph1_coord_tableIn_echo(String dataName)
           
static String ph1_coord_tableOut_echo(String dataName)
           
static String ph3_coord_databaseIn(String dataName)
          Extract the hcat DB name from the URI-template associate with 'dataInName'.
static String ph3_coord_databaseOut(String dataName)
          Extract the hcat DB name from the URI-template associate with 'dataOutName'.
static String ph3_coord_dataInPartitionFilter(String dataInName, String type)
          Used to specify the HCat partition filter which is input dependency for workflow job.

Look for two evaluator-level variables

A) .datain. B) .datain..unresolved

A defines the current list of HCat URIs.

static String ph3_coord_dataInPartitionMax(String dataInName, String partitionName)
          Used to specify the MINIMUM value of an HCat partition which is input dependency for workflow job.

Look for two evaluator-level variables

A) .datain. B) .datain..unresolved

A defines the current list of HCat URIs.

static String ph3_coord_dataInPartitionMin(String dataInName, String partitionName)
          Used to specify the MAXIMUM value of an HCat partition which is input dependency for workflow job.

Look for two evaluator-level variables

A) .datain. B) .datain..unresolved

A defines the current list of HCat URIs.

static String ph3_coord_dataOutPartitions(String dataOutName)
          Used to specify the entire HCat partition defining output for workflow job.

Look for two evaluator-level variables

A) .dataout. B) .dataout..unresolved

A defines the data-out HCat URI.

static String ph3_coord_dataOutPartitionValue(String dataOutName, String partitionName)
          Used to specify the HCat partition's value defining output for workflow job.

Look for two evaluator-level variables

A) .dataout. B) .dataout..unresolved

A defines the current list of HCat URIs.

static String ph3_coord_tableIn(String dataName)
          Extract the hcat Table name from the URI-template associate with 'dataInName'.
static String ph3_coord_tableOut(String dataName)
          Extract the hcat Table name from the URI-template associate with 'dataOutName'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HCatELFunctions

public HCatELFunctions()
Method Detail

hcat_exists

public static boolean hcat_exists(String uri)
                           throws Exception
Return true if partitions exists or false if not.

Parameters:
uri - hcatalog partition uri.
Returns:
true if the uri exists, false if it does not.
Throws:
Exception

ph1_coord_databaseIn_echo

public static String ph1_coord_databaseIn_echo(String dataName)
Echo the same EL function without evaluating anything

Parameters:
dataInName -
Returns:
the same EL function

ph1_coord_databaseOut_echo

public static String ph1_coord_databaseOut_echo(String dataName)

ph1_coord_tableIn_echo

public static String ph1_coord_tableIn_echo(String dataName)

ph1_coord_tableOut_echo

public static String ph1_coord_tableOut_echo(String dataName)

ph1_coord_dataInPartitionFilter_echo

public static String ph1_coord_dataInPartitionFilter_echo(String dataInName,
                                                          String type)

ph1_coord_dataInPartitionMin_echo

public static String ph1_coord_dataInPartitionMin_echo(String dataInName,
                                                       String partition)

ph1_coord_dataInPartitionMax_echo

public static String ph1_coord_dataInPartitionMax_echo(String dataInName,
                                                       String partition)

ph1_coord_dataOutPartitions_echo

public static String ph1_coord_dataOutPartitions_echo(String dataOutName)

ph1_coord_dataOutPartitionValue_echo

public static String ph1_coord_dataOutPartitionValue_echo(String dataOutName,
                                                          String partition)

ph3_coord_databaseIn

public static String ph3_coord_databaseIn(String dataName)
Extract the hcat DB name from the URI-template associate with 'dataInName'. Caller needs to specify the EL-evaluator level variable 'oozie.coord.el.dataset.bean' with synchronous dataset object (SyncCoordDataset)

Parameters:
dataInName -
Returns:
DB name

ph3_coord_databaseOut

public static String ph3_coord_databaseOut(String dataName)
Extract the hcat DB name from the URI-template associate with 'dataOutName'. Caller needs to specify the EL-evaluator level variable 'oozie.coord.el.dataset.bean' with synchronous dataset object (SyncCoordDataset)

Parameters:
dataOutName -
Returns:
DB name

ph3_coord_tableIn

public static String ph3_coord_tableIn(String dataName)
Extract the hcat Table name from the URI-template associate with 'dataInName'. Caller needs to specify the EL-evaluator level variable 'oozie.coord.el.dataset.bean' with synchronous dataset object (SyncCoordDataset)

Parameters:
dataInName -
Returns:
Table name

ph3_coord_tableOut

public static String ph3_coord_tableOut(String dataName)
Extract the hcat Table name from the URI-template associate with 'dataOutName'. Caller needs to specify the EL-evaluator level variable 'oozie.coord.el.dataset.bean' with synchronous dataset object (SyncCoordDataset)

Parameters:
dataOutName -
Returns:
Table name

ph3_coord_dataInPartitionFilter

public static String ph3_coord_dataInPartitionFilter(String dataInName,
                                                     String type)
Used to specify the HCat partition filter which is input dependency for workflow job.

Look for two evaluator-level variables

A) .datain. B) .datain..unresolved

A defines the current list of HCat URIs.

B defines whether there are any unresolved EL-function (i.e latest)

If there are something unresolved, this function will echo back the original function

otherwise it sends the partition filter.

Parameters:
dataInName - : Datain name
type - : for action type - pig, MR or hive

ph3_coord_dataOutPartitionValue

public static String ph3_coord_dataOutPartitionValue(String dataOutName,
                                                     String partitionName)
Used to specify the HCat partition's value defining output for workflow job.

Look for two evaluator-level variables

A) .dataout. B) .dataout..unresolved

A defines the current list of HCat URIs.

B defines whether there are any unresolved EL-function (i.e latest)

If there are something unresolved, this function will echo back the original function

otherwise it sends the partition value.

Parameters:
dataOutName - : Dataout name
partitionName - : Specific partition name whose value is wanted

ph3_coord_dataOutPartitions

public static String ph3_coord_dataOutPartitions(String dataOutName)
Used to specify the entire HCat partition defining output for workflow job.

Look for two evaluator-level variables

A) .dataout. B) .dataout..unresolved

A defines the data-out HCat URI.

B defines whether there are any unresolved EL-function (i.e latest)

If there are something unresolved, this function will echo back the original function

otherwise it sends the partition.

Parameters:
dataOutName - : DataOut name

ph3_coord_dataInPartitionMin

public static String ph3_coord_dataInPartitionMin(String dataInName,
                                                  String partitionName)
Used to specify the MAXIMUM value of an HCat partition which is input dependency for workflow job.

Look for two evaluator-level variables

A) .datain. B) .datain..unresolved

A defines the current list of HCat URIs.

B defines whether there are any unresolved EL-function (i.e latest)

If there are something unresolved, this function will echo back the original function

otherwise it sends the max partition value.

Parameters:
dataInName - : Datain name
partitionName - : Specific partition name whose MAX value is wanted

ph3_coord_dataInPartitionMax

public static String ph3_coord_dataInPartitionMax(String dataInName,
                                                  String partitionName)
Used to specify the MINIMUM value of an HCat partition which is input dependency for workflow job.

Look for two evaluator-level variables

A) .datain. B) .datain..unresolved

A defines the current list of HCat URIs.

B defines whether there are any unresolved EL-function (i.e latest)

If there are something unresolved, this function will echo back the original function

otherwise it sends the min partition value.

Parameters:
dataInName - : Datain name
partitionName - : Specific partition name whose MIN value is wanted


Copyright © 2013 Apache Software Foundation. All Rights Reserved.