|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.senseidb.indexing.hadoop.keyvalueformat.Shard
public class Shard
This class represents the metadata of a shard. Version is the version number of the entire index. Directory is the directory where this shard resides in. Generation is the Lucene index's generation. Version and generation are reserved for future use. Note: Currently the version number of the entire index is not used and defaults to -1.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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(org.apache.hadoop.conf.Configuration 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(org.apache.hadoop.conf.Configuration conf,
Shard[] shards)
|
String |
toFlatString()
|
String |
toString()
|
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
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 constructor| Method Detail |
|---|
public static String normalizePath(String path)
public static void setIndexShards(org.apache.hadoop.conf.Configuration conf,
Shard[] shards)
public static Shard[] getIndexShards(org.apache.hadoop.conf.Configuration conf)
public long getVersion()
public String getDirectory()
public long getGeneration()
public String toString()
toString in class Objectpublic String toFlatString()
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
public 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 shard
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||