java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowActivityRowKey
Direct Known Subclasses:
FlowActivityRowKeyPrefix

public class FlowActivityRowKey extends Object
Represents a rowkey for the flow activity table.
  • Constructor Details

    • FlowActivityRowKey

      public FlowActivityRowKey(String clusterId, Long dayTs, String userId, String flowName)
      Parameters:
      clusterId - identifying the cluster
      dayTs - to be converted to the top of the day timestamp
      userId - identifying user
      flowName - identifying the flow
    • FlowActivityRowKey

      protected FlowActivityRowKey(String clusterId, Long timestamp, String userId, String flowName, boolean convertDayTsToTopOfDay)
      Parameters:
      clusterId - identifying the cluster
      timestamp - when the flow activity happened. May be converted to the top of the day depending on the convertDayTsToTopOfDay argument.
      userId - identifying user
      flowName - identifying the flow
      convertDayTsToTopOfDay - if true and timestamp isn't null, then timestamp will be converted to the top-of-the day timestamp
  • Method Details

    • getClusterId

      public String getClusterId()
    • getDayTimestamp

      public Long getDayTimestamp()
    • getUserId

      public String getUserId()
    • getFlowName

      public String getFlowName()
    • getRowKey

      public byte[] getRowKey()
      Constructs a row key for the flow activity table as follows: clusterId!dayTimestamp!user!flowName.
      Returns:
      byte array for the row key
    • parseRowKey

      public static FlowActivityRowKey parseRowKey(byte[] rowKey)
      Given the raw row key as bytes, returns the row key as an object.
      Parameters:
      rowKey - Byte representation of row key.
      Returns:
      A FlowActivityRowKey object.
    • getRowKeyAsString

      public String getRowKeyAsString()
      Constructs a row key for the flow activity table as follows: clusterId!dayTimestamp!user!flowName.
      Returns:
      String representation of row key
    • parseRowKeyFromString

      public static FlowActivityRowKey parseRowKeyFromString(String encodedRowKey)
      Given the raw row key as string, returns the row key as an object.
      Parameters:
      encodedRowKey - String representation of row key.
      Returns:
      A FlowActivityRowKey object.