Package com.mapr.kvstore
Class HashedStringKvStore
java.lang.Object
com.mapr.kvstore.HashedStringKvStore
MapR Filesystem based implementation of Key-Value table interface. Which uses Key as Hash(String)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddDeleteOp(KvDatabaseOp op, String key, HashSet<HashedStringKvStore> pendingUnlockTables) intaddInsertOp(KvDatabaseOp op, String key, int val, boolean skipCollisionCountUpdate, boolean verifyKey, HashSet<HashedStringKvStore> pendingUnlockTables) voidclose()booleanCognate ofKvTable.lookup(Object, boolean), this function checks for the presence of an entry with a specific key.intgetKeyFromKvStoreKey(com.mapr.fs.proto.Fileserver.KvStoreKey key) longcom.mapr.fs.proto.Fileserver.KvMsggetLeftNearValue(String key) com.mapr.fs.proto.Fileserver.KvStoreKeycom.mapr.fs.proto.Fileserver.KvStoreKeycom.mapr.fs.proto.Fileserver.KvMsggetRightNearValue(String key) getScanner(boolean keysOnly) getScanner(String startKey, boolean keysOnly) getScanner(String startKey, String endKey, boolean keysOnly) intinsertCollisionCount(KvDatabaseOp op, HashSet<HashedStringKvStore> pendingUnlockTables) booleanbyte[]byte[]longcom.mapr.fs.proto.Fileserver.KvstoreLookupNearResponselookupNear(String key) intInitializes in-memory state of the table, such as setting key type (where necessary).voidvoidsetType(int type) voidsetVarKeyType(String type)
-
Constructor Details
-
HashedStringKvStore
-
-
Method Details
-
open
Description copied from interface:KvTableInitializes in-memory state of the table, such as setting key type (where necessary). -
getTableName
- Specified by:
getTableNamein interfaceKvTable<String>
-
close
public void close() -
getKvVersion
public long getKvVersion()- Specified by:
getKvVersionin interfaceKvTable<String>
-
setVarKeyType
- Specified by:
setVarKeyTypein interfaceKvTable<String>
-
lookup
-
lookup
-
getLeftNearValue
- Specified by:
getLeftNearValuein interfaceKvTable<String>
-
getRightNearValue
- Specified by:
getRightNearValuein interfaceKvTable<String>
-
lookupNear
public com.mapr.fs.proto.Fileserver.KvstoreLookupNearResponse lookupNear(String key) throws KvStoreException - Specified by:
lookupNearin interfaceKvTable<String>- Throws:
KvStoreException
-
getMinKey
public com.mapr.fs.proto.Fileserver.KvStoreKey getMinKey() -
getMaxKey
public com.mapr.fs.proto.Fileserver.KvStoreKey getMaxKey() -
getKeyCnt
public int getKeyCnt() -
exists
Description copied from interface:KvTableCognate ofKvTable.lookup(Object, boolean), this function checks for the presence of an entry with a specific key. -
getKeyFromKvStoreKey
- Specified by:
getKeyFromKvStoreKeyin interfaceKvTable<String>
-
getScanner
- Specified by:
getScannerin interfaceKvTable<String>
-
getScanner
- Specified by:
getScannerin interfaceKvTable<String>
-
getScanner
- Specified by:
getScannerin interfaceKvTable<String>
-
getHashedStringScanner
- Specified by:
getHashedStringScannerin interfaceKvTable<String>
-
setType
public void setType(int type) -
lookupCollisionNr
public long lookupCollisionNr()- Specified by:
lookupCollisionNrin interfaceKvTable<String>
-
isExistCollisionKey
public boolean isExistCollisionKey()- Specified by:
isExistCollisionKeyin interfaceKvTable<String>
-
addInsertOp
public int addInsertOp(KvDatabaseOp op, String key, int val, boolean skipCollisionCountUpdate, boolean verifyKey, HashSet<HashedStringKvStore> pendingUnlockTables) -
insertCollisionCount
-
addDeleteOp
public int addDeleteOp(KvDatabaseOp op, String key, HashSet<HashedStringKvStore> pendingUnlockTables) -
releaseUpdateLock
public void releaseUpdateLock()
-