org.apache.falcon.entity
Class EntityUtil

java.lang.Object
  extended by org.apache.falcon.entity.EntityUtil

public final class EntityUtil
extends Object

Helper to get entity object.


Method Summary
static boolean equals(Entity lhs, Entity rhs)
           
static boolean equals(Entity lhs, Entity rhs, String[] filterProps)
           
static String fromUTCtoURIDate(String utc)
           
static Set<String> getClustersDefined(Entity entity)
           
static Set<String> getClustersDefinedInColos(Entity entity)
           
static
<T extends Entity>
T
getClusterView(T entity, String clusterName)
           
static Date getEndTime(Entity entity, String cluster)
           
static Date getEndTime(org.apache.falcon.entity.v0.feed.Feed feed, String cluster)
           
static Date getEndTime(org.apache.falcon.entity.v0.process.Process process, String cluster)
           
static
<T extends Entity>
T
getEntity(EntityType type, String entityName)
           
static
<T extends Entity>
T
getEntity(String type, String entityName)
           
static Frequency getFrequency(Entity entity)
           
static Frequency getFrequency(org.apache.falcon.entity.v0.feed.Feed feed)
           
static Frequency getFrequency(org.apache.falcon.entity.v0.process.Process process)
           
static int getInstanceSequence(Date startTime, Frequency frequency, TimeZone tz, Date instanceTime)
           
static org.apache.falcon.entity.v0.process.LateProcess getLateProcess(Entity entity)
           
static Path getLogPath(org.apache.falcon.entity.v0.cluster.Cluster cluster, Entity entity)
           
static Date getNextStartTime(Date startTime, Frequency frequency, TimeZone timezone, Date now)
           
static int getParallel(Entity entity)
           
static int getParallel(org.apache.falcon.entity.v0.feed.Feed feed)
           
static int getParallel(org.apache.falcon.entity.v0.process.Process process)
           
static org.apache.falcon.entity.v0.process.Retry getRetry(Entity entity)
           
static Path getStagingPath(org.apache.falcon.entity.v0.cluster.Cluster cluster, Entity entity)
           
static String getStagingPath(Entity entity)
           
static Date getStartTime(Entity entity, String cluster)
           
static Date getStartTime(org.apache.falcon.entity.v0.feed.Feed feed, String cluster)
           
static Date getStartTime(org.apache.falcon.entity.v0.process.Process process, String cluster)
           
static TimeZone getTimeZone(Entity entity)
           
static TimeZone getTimeZone(org.apache.falcon.entity.v0.feed.Feed feed)
           
static TimeZone getTimeZone(org.apache.falcon.entity.v0.process.Process process)
           
static TimeZone getTimeZone(String tzId)
           
static WorkflowNameBuilder.WorkflowName getWorkflowName(Entity entity)
           
static WorkflowNameBuilder.WorkflowName getWorkflowName(Tag tag, Entity entity)
           
static WorkflowNameBuilder.WorkflowName getWorkflowName(Tag tag, List<String> suffixes, Entity entity)
           
static String getWorkflowNameSuffix(String workflowName, Entity entity)
           
static Tag getWorkflowNameTag(String workflowName, Entity entity)
           
static String md5(Entity entity)
           
static Date parseDateUTC(String dateStr)
           
static boolean responsibleFor(String colo)
           
static void setEndTime(Entity entity, String cluster, Date endDate)
           
static void setEndTime(org.apache.falcon.entity.v0.feed.Feed feed, String cluster, Date endDate)
           
static void setEndTime(org.apache.falcon.entity.v0.process.Process process, String cluster, Date endDate)
           
static void setParallel(Entity entity, int parallel)
           
static void setParallel(org.apache.falcon.entity.v0.feed.Feed feed, int parallel)
           
static void setParallel(org.apache.falcon.entity.v0.process.Process process, int parallel)
           
static void setStartDate(Entity entity, String cluster, Date startDate)
           
static void setStartDate(org.apache.falcon.entity.v0.feed.Feed feed, String cluster, Date startDate)
           
static void setStartDate(org.apache.falcon.entity.v0.process.Process process, String cluster, Date startDate)
           
static String stringOf(Entity entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEntity

public static <T extends Entity> T getEntity(EntityType type,
                                             String entityName)
                                  throws FalconException
Throws:
FalconException

getEntity

public static <T extends Entity> T getEntity(String type,
                                             String entityName)
                                  throws FalconException
Throws:
FalconException

getTimeZone

public static TimeZone getTimeZone(String tzId)

getEndTime

public static Date getEndTime(Entity entity,
                              String cluster)

parseDateUTC

public static Date parseDateUTC(String dateStr)
                         throws FalconException
Throws:
FalconException

getStartTime

public static Date getStartTime(Entity entity,
                                String cluster)

getEndTime

public static Date getEndTime(org.apache.falcon.entity.v0.process.Process process,
                              String cluster)

getStartTime

public static Date getStartTime(org.apache.falcon.entity.v0.process.Process process,
                                String cluster)

getEndTime

public static Date getEndTime(org.apache.falcon.entity.v0.feed.Feed feed,
                              String cluster)

getStartTime

public static Date getStartTime(org.apache.falcon.entity.v0.feed.Feed feed,
                                String cluster)

getParallel

public static int getParallel(Entity entity)

setStartDate

public static void setStartDate(Entity entity,
                                String cluster,
                                Date startDate)

setEndTime

public static void setEndTime(Entity entity,
                              String cluster,
                              Date endDate)

setParallel

public static void setParallel(Entity entity,
                               int parallel)

getParallel

public static int getParallel(org.apache.falcon.entity.v0.process.Process process)

setStartDate

public static void setStartDate(org.apache.falcon.entity.v0.process.Process process,
                                String cluster,
                                Date startDate)

setParallel

public static void setParallel(org.apache.falcon.entity.v0.process.Process process,
                               int parallel)

setEndTime

public static void setEndTime(org.apache.falcon.entity.v0.process.Process process,
                              String cluster,
                              Date endDate)

getParallel

public static int getParallel(org.apache.falcon.entity.v0.feed.Feed feed)

setStartDate

public static void setStartDate(org.apache.falcon.entity.v0.feed.Feed feed,
                                String cluster,
                                Date startDate)

setEndTime

public static void setEndTime(org.apache.falcon.entity.v0.feed.Feed feed,
                              String cluster,
                              Date endDate)

setParallel

public static void setParallel(org.apache.falcon.entity.v0.feed.Feed feed,
                               int parallel)

getFrequency

public static Frequency getFrequency(Entity entity)

getFrequency

public static Frequency getFrequency(org.apache.falcon.entity.v0.process.Process process)

getFrequency

public static Frequency getFrequency(org.apache.falcon.entity.v0.feed.Feed feed)

getTimeZone

public static TimeZone getTimeZone(Entity entity)

getTimeZone

public static TimeZone getTimeZone(org.apache.falcon.entity.v0.process.Process process)

getTimeZone

public static TimeZone getTimeZone(org.apache.falcon.entity.v0.feed.Feed feed)

getNextStartTime

public static Date getNextStartTime(Date startTime,
                                    Frequency frequency,
                                    TimeZone timezone,
                                    Date now)

getInstanceSequence

public static int getInstanceSequence(Date startTime,
                                      Frequency frequency,
                                      TimeZone tz,
                                      Date instanceTime)

md5

public static String md5(Entity entity)
                  throws FalconException
Throws:
FalconException

equals

public static boolean equals(Entity lhs,
                             Entity rhs)
                      throws FalconException
Throws:
FalconException

equals

public static boolean equals(Entity lhs,
                             Entity rhs,
                             String[] filterProps)
                      throws FalconException
Throws:
FalconException

stringOf

public static String stringOf(Entity entity)
                       throws FalconException
Throws:
FalconException

getStagingPath

public static String getStagingPath(Entity entity)
                             throws FalconException
Throws:
FalconException

getWorkflowName

public static WorkflowNameBuilder.WorkflowName getWorkflowName(Tag tag,
                                                               List<String> suffixes,
                                                               Entity entity)

getWorkflowName

public static WorkflowNameBuilder.WorkflowName getWorkflowName(Tag tag,
                                                               Entity entity)

getWorkflowName

public static WorkflowNameBuilder.WorkflowName getWorkflowName(Entity entity)

getWorkflowNameSuffix

public static String getWorkflowNameSuffix(String workflowName,
                                           Entity entity)
                                    throws FalconException
Throws:
FalconException

getWorkflowNameTag

public static Tag getWorkflowNameTag(String workflowName,
                                     Entity entity)

getClusterView

public static <T extends Entity> T getClusterView(T entity,
                                                  String clusterName)

getClustersDefined

public static Set<String> getClustersDefined(Entity entity)

getClustersDefinedInColos

public static Set<String> getClustersDefinedInColos(Entity entity)

getRetry

public static org.apache.falcon.entity.v0.process.Retry getRetry(Entity entity)
                                                          throws FalconException
Throws:
FalconException

getStagingPath

public static Path getStagingPath(org.apache.falcon.entity.v0.cluster.Cluster cluster,
                                  Entity entity)
                           throws FalconException
Throws:
FalconException

getLateProcess

public static org.apache.falcon.entity.v0.process.LateProcess getLateProcess(Entity entity)
                                                                      throws FalconException
Throws:
FalconException

getLogPath

public static Path getLogPath(org.apache.falcon.entity.v0.cluster.Cluster cluster,
                              Entity entity)
                       throws FalconException
Throws:
FalconException

fromUTCtoURIDate

public static String fromUTCtoURIDate(String utc)
                               throws FalconException
Throws:
FalconException

responsibleFor

public static boolean responsibleFor(String colo)


Copyright © 2013-2014 Apache Software Foundation. All Rights Reserved.