Interface Row

All Superinterfaces:
Comparable<Row>
All Known Subinterfaces:
InputRow
All Known Implementing Classes:
ListBasedInputRow, MapBasedInputRow, MapBasedRow, TransformedInputRow

public interface Row extends Comparable<Row>
A Row of data. This can be used for both input and output into various parts of the system. It assumes that the user already knows the schema of the row and can query for the parts that they care about.
  • Method Summary

    Modifier and Type
    Method
    Description
    getDimension(String dimension)
    Returns the list of dimension values for the given column name.
    getMetric(String metric)
    Returns the metric column value for the given column name.
    getRaw(String dimension)
    Returns the raw dimension value for the given column name.
    org.joda.time.DateTime
    Returns the timestamp from the epoch as an org.joda.time.DateTime.
    long
    Returns the timestamp from the epoch in milliseconds.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • getTimestampFromEpoch

      long getTimestampFromEpoch()
      Returns the timestamp from the epoch in milliseconds. If the event happened _right now_, this would return the same thing as System.currentTimeMillis();
      Returns:
      the timestamp from the epoch in milliseconds.
    • getTimestamp

      org.joda.time.DateTime getTimestamp()
      Returns the timestamp from the epoch as an org.joda.time.DateTime. If the event happened _right now_, this would return the same thing as new DateTime();
      Returns:
      the timestamp from the epoch as an org.joda.time.DateTime object.
    • getDimension

      List<String> getDimension(String dimension)
      Returns the list of dimension values for the given column name.

      Parameters:
      dimension - the column name of the dimension requested
      Returns:
      the list of values for the provided column name
    • getRaw

      @Nullable Object getRaw(String dimension)
      Returns the raw dimension value for the given column name. This is different from getDimension(java.lang.String) which converts all values to strings before returning them.
      Parameters:
      dimension - the column name of the dimension requested
      Returns:
      the value of the provided column name
    • getMetric

      @Nullable Number getMetric(String metric)
      Returns the metric column value for the given column name. This method is different from getRaw(java.lang.String) in two aspects: 1. If the column is absent in the row, null will be returned. 2. If the column has string value, an attempt is made to parse this value as a number.