public class TimeRange extends Object
Modifier and Type | Class and Description |
---|---|
class |
TimeRange.Iterable
Iterable so that foreach is supported
|
static class |
TimeRange.TimeRangeBuilder |
Modifier and Type | Method and Description |
---|---|
static TimeRange.TimeRangeBuilder |
builder() |
TimeRange.TimeRangeBuilder |
cloneAsBuilder() |
boolean |
equals(Object o) |
org.apache.hadoop.hive.ql.parse.ASTNode |
getAstNode() |
int |
getChildIndex() |
Date |
getFromDate() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getParent() |
String |
getPartitionColumn() |
Date |
getToDate() |
int |
hashCode() |
boolean |
isCoverableBy(Set<UpdatePeriod> updatePeriods) |
boolean |
isValid() |
static TimeRange.Iterable |
iterable(Date fromDate,
Date toDate,
UpdatePeriod updatePeriod,
int increment)
iterable from fromDate(including) to toDate(excluding) incrementing increment units of updatePeriod
|
static TimeRange.Iterable |
iterable(Date fromDate,
int numIters,
UpdatePeriod updatePeriod,
int increment)
iterable from fromDate(including) incrementing increment units of updatePeriod.
|
TimeRange.Iterable |
iterable(UpdatePeriod updatePeriod,
int increment) |
long |
milliseconds() |
String |
toString() |
String |
toTimeDimWhereClause(String prefix,
String column) |
TimeRange |
truncate(Date candidateStartTime,
Date candidateEndTime) |
TimeRange |
truncate(UpdatePeriod updatePeriod)
Truncate time range using the update period.
|
void |
validate() |
public boolean isCoverableBy(Set<UpdatePeriod> updatePeriods)
public TimeRange truncate(UpdatePeriod updatePeriod) throws LensException
updatePeriod
- Update period to truncate time range withLensException
- If the truncated time range is invalid.public long milliseconds()
public TimeRange.TimeRangeBuilder cloneAsBuilder()
public boolean isValid()
public void validate() throws LensException
LensException
public static TimeRange.Iterable iterable(Date fromDate, Date toDate, UpdatePeriod updatePeriod, int increment)
public static TimeRange.Iterable iterable(Date fromDate, int numIters, UpdatePeriod updatePeriod, int increment)
public TimeRange.Iterable iterable(UpdatePeriod updatePeriod, int increment)
@Generated(value="lombok") public static TimeRange.TimeRangeBuilder builder()
@Generated(value="lombok") public String getPartitionColumn()
@Generated(value="lombok") public Date getToDate()
@NonNull @Generated(value="lombok") public Date getFromDate()
@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getAstNode()
@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getParent()
@Generated(value="lombok") public int getChildIndex()
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.