public class NumberedShardSpec extends Object implements io.druid.timeline.partition.ShardSpec
| Constructor and Description |
|---|
NumberedShardSpec(io.druid.timeline.partition.NoneShardSpec spec)
Creates numbered shard spec from an unsharded spec.
|
NumberedShardSpec(String type,
int partitionNum,
int partitions)
Creates a numbered shard specification given a type, a partition number and the total number of partitions.
|
| Modifier and Type | Method and Description |
|---|---|
<T> io.druid.timeline.partition.PartitionChunk<T> |
createChunk(T obj) |
io.druid.timeline.partition.ShardSpecLookup |
getLookup(List<io.druid.timeline.partition.ShardSpec> shardSpecs) |
int |
getPartitionNum()
Getter for partition number.
|
int |
getPartitions()
Getter for the number of partitions.
|
String |
getType()
Getter for type.
|
boolean |
isInChunk(long timestamp,
io.druid.data.input.InputRow inputRow) |
public NumberedShardSpec(String type, int partitionNum, int partitions)
type - The type of this shard spec.partitionNum - The partition number of this shard spec.partitions - The total number of partitions of the segment that this shard spec belongs to.public NumberedShardSpec(io.druid.timeline.partition.NoneShardSpec spec)
spec - The spec corresponding to unsharded segment.public String getType()
public <T> io.druid.timeline.partition.PartitionChunk<T> createChunk(T obj)
createChunk in interface io.druid.timeline.partition.ShardSpecpublic boolean isInChunk(long timestamp,
io.druid.data.input.InputRow inputRow)
isInChunk in interface io.druid.timeline.partition.ShardSpecpublic int getPartitionNum()
getPartitionNum in interface io.druid.timeline.partition.ShardSpecpublic io.druid.timeline.partition.ShardSpecLookup getLookup(List<io.druid.timeline.partition.ShardSpec> shardSpecs)
getLookup in interface io.druid.timeline.partition.ShardSpecpublic int getPartitions()
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.