public class ShardBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
dateFormat
A proper date format should be lexicographically sortable
|
protected String |
delimiter |
protected Integer |
numPartitions |
| Constructor and Description |
|---|
ShardBuilder(Integer numPartitions) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildShard(long timestamp,
int partition) |
String |
buildShard(long timestamp,
String uuid) |
SortedSet<org.apache.hadoop.io.Text> |
buildShardsInRange(Date start,
Date stop) |
String |
getDateFormat() |
String |
getDelimiter() |
Integer |
getNumPartitions() |
String[] |
getRange(Date start,
Date end) |
void |
setDateFormat(String dateFormat) |
void |
setDelimiter(String delimiter) |
protected final Integer numPartitions
protected String delimiter
protected String dateFormat
public ShardBuilder(Integer numPartitions)
public String buildShard(long timestamp, int partition)
public SortedSet<org.apache.hadoop.io.Text> buildShardsInRange(Date start, Date stop)
public Integer getNumPartitions()
public String getDelimiter()
public void setDelimiter(String delimiter)
public String getDateFormat()
public void setDateFormat(String dateFormat)
Copyright © 2014 Calrissian. All Rights Reserved.