public class SegmentInputRow extends Object implements InputRow
Constructor and Description |
---|
SegmentInputRow(Row delegate,
List<String> dimensions) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Row row) |
List<String> |
getDimension(String dimension)
Returns the list of dimension values for the given column name.
|
List<String> |
getDimensions()
Returns the dimensions that exist in this row.
|
Number |
getMetric(String metric)
Returns the metric column value for the given column name.
|
Object |
getRaw(String dimension)
Returns the raw dimension value for the given column name.
|
org.joda.time.DateTime |
getTimestamp()
Returns the timestamp from the epoch as an org.joda.time.DateTime.
|
long |
getTimestampFromEpoch()
Returns the timestamp from the epoch in milliseconds.
|
String |
toString() |
public List<String> getDimensions()
InputRow
getDimensions
in interface InputRow
public long getTimestampFromEpoch()
Row
getTimestampFromEpoch
in interface Row
public org.joda.time.DateTime getTimestamp()
Row
getTimestamp
in interface Row
public List<String> getDimension(String dimension)
Row
getDimension
in interface Row
dimension
- the column name of the dimension requestedpublic Object getRaw(String dimension)
Row
Row.getDimension(java.lang.String)
which
all values to strings before returning them.public Number getMetric(String metric)
Row
Row.getRaw(java.lang.String)
in two
aspects:
1. If the column is absent in the row, numeric zero is returned, rather than null.
2. If the column has string value, an attempt is made to parse this value as a number.public int compareTo(Row row)
compareTo
in interface Comparable<Row>
Copyright © 2011–2018. All rights reserved.