public class Shard extends Object implements org.apache.hadoop.io.WritableComparable
| Constructor and Description |
|---|
Shard()
Constructor.
|
Shard(long version,
String dir,
long gen)
Construct a shard from a versio number, a directory and a generation
number.
|
Shard(Shard shard)
Construct using a shard object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
int |
compareTo(Shard other)
Compare to another shard.
|
boolean |
equals(Object o) |
String |
getDirectory()
Get the directory where this shard resides.
|
long |
getGeneration()
Get the generation of the Lucene instance.
|
static Shard[] |
getIndexShards(IndexUpdateConfiguration conf) |
long |
getVersion()
Get the version number of the entire index.
|
int |
hashCode() |
static String |
normalizePath(String path) |
void |
readFields(DataInput in) |
static void |
setIndexShards(IndexUpdateConfiguration conf,
Shard[] shards) |
String |
toString() |
void |
write(DataOutput out) |
public Shard()
public Shard(long version,
String dir,
long gen)
version - the version number of the entire indexdir - the directory where this shard residesgen - the generation of the Lucene instancepublic Shard(Shard shard)
shard - the shard used by the constructorpublic static void setIndexShards(IndexUpdateConfiguration conf, Shard[] shards)
public static Shard[] getIndexShards(IndexUpdateConfiguration conf)
public long getVersion()
public String getDirectory()
public long getGeneration()
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic int compareTo(Object o)
compareTo in interface Comparablepublic int compareTo(Shard other)
other - another shardCopyright © 2009 The Apache Software Foundation