Package org.apache.druid.data.input
Class MapBasedRow
java.lang.Object
org.apache.druid.data.input.MapBasedRow
- All Implemented Interfaces:
Comparable<Row>,Row
- Direct Known Subclasses:
MapBasedInputRow
-
Constructor Summary
ConstructorsConstructorDescriptionMapBasedRow(long timestamp, Map<String, Object> event) MapBasedRow(org.joda.time.DateTime timestamp, Map<String, Object> event) -
Method Summary
Modifier and TypeMethodDescriptionintbooleangetDimension(String dimension) Returns the list of dimension values for the given column name.getEvent()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.inthashCode()toString()
-
Constructor Details
-
MapBasedRow
-
MapBasedRow
-
-
Method Details
-
getTimestampFromEpoch
public long getTimestampFromEpoch()Description copied from interface:RowReturns the timestamp from the epoch in milliseconds. If the event happened _right now_, this would return the same thing as System.currentTimeMillis();- Specified by:
getTimestampFromEpochin interfaceRow- Returns:
- the timestamp from the epoch in milliseconds.
-
getTimestamp
public org.joda.time.DateTime getTimestamp()Description copied from interface:RowReturns 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();- Specified by:
getTimestampin interfaceRow- Returns:
- the timestamp from the epoch as an org.joda.time.DateTime object.
-
getEvent
-
getDimension
Description copied from interface:RowReturns the list of dimension values for the given column name.- Specified by:
getDimensionin interfaceRow- Parameters:
dimension- the column name of the dimension requested- Returns:
- the list of values for the provided column name
-
getRaw
Description copied from interface:RowReturns the raw dimension value for the given column name. This is different fromRow.getDimension(java.lang.String)which converts all values to strings before returning them. -
getMetric
Description copied from interface:RowReturns the metric column value for the given column name. This method is different fromRow.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. -
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<Row>
-