This project has retired. For details please refer to its Attic page.
TimeRange (Lens 2.1.0-beta-incubating API)

org.apache.lens.cube.parse
Class TimeRange

java.lang.Object
  extended by org.apache.lens.cube.parse.TimeRange

public class TimeRange
extends Object

Timerange data structure


Nested Class Summary
 class TimeRange.Iterable
          Iterable so that foreach is supported
static class TimeRange.TimeRangeBuilder
           
 
Method Summary
 org.apache.hadoop.hive.ql.parse.ASTNode getASTNode()
           
static TimeRange.TimeRangeBuilder getBuilder()
           
 int getChildIndex()
           
 Date getFromDate()
           
 org.apache.hadoop.hive.ql.parse.ASTNode getParent()
           
 String getPartitionColumn()
           
 Date getToDate()
           
 boolean isCoverableBy(TreeSet<UpdatePeriod> updatePeriods)
           
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)
           
 String toString()
           
 void validate()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isCoverableBy

public boolean isCoverableBy(TreeSet<UpdatePeriod> updatePeriods)

getBuilder

public static TimeRange.TimeRangeBuilder getBuilder()

getPartitionColumn

public String getPartitionColumn()

getFromDate

public Date getFromDate()

getToDate

public Date getToDate()

getASTNode

public org.apache.hadoop.hive.ql.parse.ASTNode getASTNode()

getParent

public org.apache.hadoop.hive.ql.parse.ASTNode getParent()

getChildIndex

public int getChildIndex()

validate

public void validate()
              throws org.apache.hadoop.hive.ql.parse.SemanticException
Throws:
org.apache.hadoop.hive.ql.parse.SemanticException

toString

public String toString()
Overrides:
toString in class Object

iterable

public static TimeRange.Iterable iterable(Date fromDate,
                                          Date toDate,
                                          UpdatePeriod updatePeriod,
                                          int increment)
iterable from fromDate(including) to toDate(excluding) incrementing increment units of updatePeriod


iterable

public static TimeRange.Iterable iterable(Date fromDate,
                                          int numIters,
                                          UpdatePeriod updatePeriod,
                                          int increment)
iterable from fromDate(including) incrementing increment units of updatePeriod. Do this numIters times


iterable

public TimeRange.Iterable iterable(UpdatePeriod updatePeriod,
                                   int increment)


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.