public abstract class PartitionTimeline extends Object implements Iterable<TimePartition>
Constructor and Description |
---|
PartitionTimeline(String storageTableName,
UpdatePeriod updatePeriod,
String partCol) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Collection<TimePartition> partitions)
Add multiple partitions to timeline
|
abstract boolean |
add(TimePartition partition)
Add partition to timeline
|
void |
addForBatchAddition(TimePartition partition)
Add partition to local memory to be sent for batch addition.
|
boolean |
commitBatchAdditions()
Commit all partitions that were added to batch addition queue.
|
abstract boolean |
drop(TimePartition toDrop)
drop partition.
|
boolean |
equals(Object o) |
abstract boolean |
exists(TimePartition partition)
Checks partition existance
|
TreeSet<TimePartition> |
getAll() |
Date |
getLatestDate()
wrapper on latest data
|
String |
getPartCol() |
String |
getStorageTableName() |
UpdatePeriod |
getUpdatePeriod() |
int |
hashCode() |
void |
init(org.apache.hadoop.hive.ql.metadata.Table table)
Extracts timeline implementation class from table params and instantiates it with other arguments, also in table
params.
|
abstract boolean |
initFromProperties(Map<String,String> properties)
deserialize member variables from given map
|
abstract boolean |
isConsistent()
whether timeline is in consistent state
|
abstract boolean |
isEmpty()
Whether No partitions have been registered
|
abstract TimePartition |
latest()
latest partition.
|
void |
setAll(TreeSet<TimePartition> all) |
abstract Map<String,String> |
toProperties()
serialize member objects as map
|
String |
toString() |
void |
updateTableParams(org.apache.hadoop.hive.ql.metadata.Table table)
Sets PartitionTimeline implementation class's name and specific params in table param.
|
forEach, iterator, spliterator
@ConstructorProperties(value={"storageTableName","updatePeriod","partCol"}) @Generated(value="lombok") public PartitionTimeline(String storageTableName, UpdatePeriod updatePeriod, String partCol)
public Date getLatestDate()
public void updateTableParams(org.apache.hadoop.hive.ql.metadata.Table table)
table
- init(org.apache.hadoop.hive.ql.metadata.Table)
public void init(org.apache.hadoop.hive.ql.metadata.Table table) throws LensException
table
- LensException
updateTableParams(org.apache.hadoop.hive.ql.metadata.Table)
public void addForBatchAddition(TimePartition partition)
commitBatchAdditions()
public boolean commitBatchAdditions() throws LensException
LensException
public abstract boolean add(@NonNull TimePartition partition) throws LensException
partition
- LensException
public boolean add(@NonNull Collection<TimePartition> partitions) throws LensException
partitions
- LensException
public abstract boolean drop(@NonNull TimePartition toDrop) throws LensException
toDrop
- LensException
public abstract TimePartition latest()
public abstract Map<String,String> toProperties()
public abstract boolean initFromProperties(Map<String,String> properties) throws LensException
properties
- LensException
isConsistent()
public abstract boolean isEmpty()
public abstract boolean isConsistent()
public abstract boolean exists(TimePartition partition)
partition
- @Generated(value="lombok") public String getStorageTableName()
@Generated(value="lombok") public UpdatePeriod getUpdatePeriod()
@Generated(value="lombok") public String getPartCol()
@Generated(value="lombok") public TreeSet<TimePartition> getAll()
@Generated(value="lombok") public void setAll(TreeSet<TimePartition> all)
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
@Generated(value="lombok") public String toString()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.