Package org.apache.druid.data.input
Interface Row
- All Superinterfaces:
Comparable<Row>
- All Known Subinterfaces:
InputRow
- All Known Implementing Classes:
ListBasedInputRow,MapBasedInputRow,MapBasedRow,TransformedInputRow
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 TypeMethodDescriptiongetDimension(String dimension) Returns the list of dimension values for the given column name.Returns the metric column value for the given column name.Returns the raw dimension value for the given column name.org.joda.time.DateTimeReturns the timestamp from the epoch as an org.joda.time.DateTime.longReturns 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
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
Returns the raw dimension value for the given column name. This is different fromgetDimension(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
Returns the metric column value for the given column name. This method is different fromgetRaw(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.
-