Package com.mapr.kvstore
Class KvStore<T>
java.lang.Object
com.mapr.kvstore.KvStore<T>
- Type Parameters:
T-
- All Implemented Interfaces:
KvTable<T>
MapR Filesystem based implementation of Key-Value table interface.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKvStore(KvStoreClient clnt) Deprecated.KvStore(KvStoreClient clnt, com.mapr.fs.proto.Security.CredentialsMsg creds) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanCognate ofKvTable.lookup(Object, boolean), this function checks for the presence of an entry with a specific key.com.mapr.fs.proto.Common.FidMsggetFid()intgetKeyFromKvStoreKey(com.mapr.fs.proto.Fileserver.KvStoreKey key) longcom.mapr.fs.proto.Fileserver.KvMsggetLeftNearValue(T key) Get the value corresponding to the key that is either less or equal to the key specified as the argument.com.mapr.fs.proto.Fileserver.KvStoreKeycom.mapr.fs.proto.Fileserver.KvStoreKeylongcom.mapr.fs.proto.Fileserver.KvMsggetRightNearValue(T key) Get the value corresponding to the key that is greater than the key specified as the argument.getScanner(boolean keysOnly) getScanner(com.mapr.fs.proto.Fileserver.KvStoreKey startKey, com.mapr.fs.proto.Fileserver.KvStoreKey endKey, boolean keysOnly) getScanner(T startKey, boolean keysOnly) getScanner(T startKey, T endKey, boolean keysOnly) static com.mapr.fs.proto.Common.FSKeyTypegettype(KvStoreClient clnt, String name) byte[]byte[]com.mapr.fs.proto.Fileserver.KvstoreLookupNearResponselookupNear(T key) Fetch values of keys that are adjacent to a specific key.intInitializes in-memory state of the table, such as setting key type (where necessary).com.mapr.fs.proto.Fileserver.KvStoreKeyparseKvStoreKey(String keyString) voidprintKey(com.mapr.fs.proto.Fileserver.KvStoreKey key) static StringsetThreadName(com.mapr.fs.proto.Fileserver.FSProg prog, com.mapr.fs.proto.Common.FidMsg fid) voidsetType(int type) voidsetVarKeyType(String type) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mapr.kvstore.KvTable
getHashedStringScanner, isExistCollisionKey, lookupCollisionNr
-
Constructor Details
-
KvStore
Deprecated. -
KvStore
-
-
Method Details
-
getFid
public com.mapr.fs.proto.Common.FidMsg getFid() -
open
Description copied from interface:KvTableInitializes in-memory state of the table, such as setting key type (where necessary). -
setVarKeyType
- Specified by:
setVarKeyTypein interfaceKvTable<T>
-
getTableName
- Specified by:
getTableNamein interfaceKvTable<T>
-
close
public void close() -
lookup
-
lookup
-
setThreadName
public static String setThreadName(com.mapr.fs.proto.Fileserver.FSProg prog, com.mapr.fs.proto.Common.FidMsg fid) -
getLeftNearValue
Get the value corresponding to the key that is either less or equal to the key specified as the argument.- Specified by:
getLeftNearValuein interfaceKvTable<T>- Parameters:
key- value of the key being looked up.- Returns:
- the left near value, if present null, if there are no keys that are equal to or lower than the first argument
-
getRightNearValue
Get the value corresponding to the key that is greater than the key specified as the argument.- Specified by:
getRightNearValuein interfaceKvTable<T>- Parameters:
key- value of the key being looked up.- Returns:
- the right near value, if present null, if there are no keys that are greater than the argument
-
lookupNear
public com.mapr.fs.proto.Fileserver.KvstoreLookupNearResponse lookupNear(T key) throws KvStoreException Fetch values of keys that are adjacent to a specific key.- Specified by:
lookupNearin interfaceKvTable<T>- Parameters:
key-- Returns:
- Throws:
KvStoreException
-
getMinKey
public com.mapr.fs.proto.Fileserver.KvStoreKey getMinKey() -
getMaxKey
public com.mapr.fs.proto.Fileserver.KvStoreKey getMaxKey() -
getKeyCnt
public int getKeyCnt() -
getNBlocks
public long getNBlocks() -
getKvVersion
public long getKvVersion()- Specified by:
getKvVersionin interfaceKvTable<T>
-
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<T>
-
parseKvStoreKey
-
getScanner
public Scanner getScanner(com.mapr.fs.proto.Fileserver.KvStoreKey startKey, com.mapr.fs.proto.Fileserver.KvStoreKey endKey, boolean keysOnly) -
getScanner
- Specified by:
getScannerin interfaceKvTable<T>
-
getScanner
- Specified by:
getScannerin interfaceKvTable<T>
-
getScanner
- Specified by:
getScannerin interfaceKvTable<T>
-
printKey
public void printKey(com.mapr.fs.proto.Fileserver.KvStoreKey key) -
gettype
-
setType
public void setType(int type)
-