|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.contrib.index.example.HashingDistributionPolicy
public class HashingDistributionPolicy
Choose a shard for each insert or delete based on document id hashing. Do NOT use this distribution policy when the number of shards changes.
Constructor Summary | |
---|---|
HashingDistributionPolicy()
|
Method Summary | |
---|---|
int |
chooseShardForDelete(DocumentID key)
Choose a shard or all shards to send a delete request. |
int |
chooseShardForInsert(DocumentID key)
Choose a shard to send an insert request. |
void |
init(Shard[] shards)
Initialization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HashingDistributionPolicy()
Method Detail |
---|
public void init(Shard[] shards)
IDistributionPolicy
init
in interface IDistributionPolicy
public int chooseShardForInsert(DocumentID key)
IDistributionPolicy
chooseShardForInsert
in interface IDistributionPolicy
public int chooseShardForDelete(DocumentID key)
IDistributionPolicy
chooseShardForDelete
in interface IDistributionPolicy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |