public abstract class PartitionTimeline extends Object implements Iterable<TimePartition>
Constructor and Description |
---|
PartitionTimeline() |
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.
|
abstract boolean |
exists(TimePartition partition)
Checks partition existance
|
Date |
getLatestDate()
wrapper on latest data
|
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.
|
abstract Map<String,String> |
toProperties()
serialize member objects as map
|
void |
updateTableParams(org.apache.hadoop.hive.ql.metadata.Table table)
Sets PartitionTimeline implementation class's name and specific params in table param.
|
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
- Copyright © 2014–2015 Apache Software Foundation. All rights reserved.