Package com.mapr.kvstore
Class Operation
- java.lang.Object
-
- com.mapr.kvstore.Operation
-
- All Implemented Interfaces:
KvDatabaseOp
public class Operation extends java.lang.Object implements KvDatabaseOp
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.logging.LogLOG
-
Constructor Summary
Constructors Constructor Description Operation(KvStoreClient clnt)Deprecated.Operation(KvStoreClient clnt, com.mapr.fs.proto.Security.CredentialsMsg creds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intapply()intapply(java.util.List<com.mapr.fs.proto.Fileserver.KvStoreMultiopResponse> multiResp)intbulkCreateContainer(int[] cidList, int volId, java.util.List<java.util.List<com.mapr.fs.proto.Common.Server>> servers, boolean isMirrorVolume, boolean isShuffleVolume, com.mapr.fs.proto.Common.ContainerReplType replType, com.mapr.fs.proto.Common.FSVolumeProperties fsVolProps, long[] cycleIdList, int labelId, boolean isStatsEnabled)voidcleanUpForHashedStringTables()intcreateContainer(int cid, int volId, java.util.List<com.mapr.fs.proto.Common.Server> servers, boolean isNameContainer, boolean isMirrorContainer, boolean isShuffleVolume, com.mapr.fs.proto.Common.ContainerReplType replType, com.mapr.fs.proto.Common.SetattrMsg rootDirAttr, com.mapr.fs.proto.Common.FSVolumeProperties fsVolProps, long cycleId, int labelId, boolean isStatsEnabled)The following function is called to create on new container.intcreateSnapshotContainer(int rwContainerId, int rwVolId, int snapContainerId, int snapId, com.mapr.fs.proto.Common.Server master)intcreateSnapshotRootContainer(int rwContainerId, int rwVolId, int snapContainerId, int snapId, com.mapr.fs.proto.Common.Server master, java.lang.String snapName)intcreateStaleContainer(int cid, int volId, java.util.List<com.mapr.fs.proto.Common.Server> servers, boolean rootOfVolume, boolean isMirrorContainer, com.mapr.fs.proto.Common.ContainerReplType replType, com.mapr.fs.proto.Common.FSVolumeProperties fsVolprops, long cycleId, int labelId, boolean isStatsEnabled)The following function is called to create additional copies of an existing container.intdelete(KvTable<?> kvTable, com.mapr.fs.proto.Fileserver.KvStoreKey key)intdelete(KvTable<com.google.protobuf.ByteString> kvTable, com.google.protobuf.ByteString keyValue)intdelete(KvTable<java.lang.Integer> kvTable, java.lang.Integer keyValue)intdelete(KvTable<java.lang.Long> kvTable, java.lang.Long keyValue)intdelete(KvTable<java.lang.String> kvTable, java.lang.String keyValue)intdeleteSnapshotVolume(int rwRootContainerId, int rwVolId, int snapRootContainerId, int snapId, com.mapr.fs.proto.Common.Server master, java.lang.String snapName)inthashedKeyDelete(KvTable<java.lang.String> kv, java.lang.String key)inthashedKeyInsert(KvTable<java.lang.String> kv, java.lang.String key, int value)inthashedKeyInsert(KvTable<java.lang.String> kv, java.lang.String key, int value, boolean skipCollisionCountUpdate, boolean verifyKey)inthashedKeyInsertCollisionCount(KvTable<java.lang.String> kv)intinsert(KvStore<java.lang.Integer> kv, java.lang.Integer keyValue, com.google.protobuf.MessageLite value)intinsert(KvTable<?> kv, com.mapr.fs.proto.Fileserver.KvStoreKey key, com.google.protobuf.ByteString value)intinsert(KvTable<com.google.protobuf.ByteString> kv, com.google.protobuf.ByteString key, com.google.protobuf.MessageLite value)intinsert(KvTable<java.lang.Integer> kvTable, java.lang.Integer key, com.google.protobuf.MessageLite value, boolean verifyKey)intinsert(KvTable<java.lang.Long> kv, java.lang.Long key, com.google.protobuf.MessageLite value, boolean verifyKey)intinsert(KvTable<java.lang.String> kv, java.lang.String key, com.google.protobuf.MessageLite value)intinsert(KvTable<java.lang.String> kv, java.lang.String key, com.google.protobuf.MessageLite value, boolean verifyKey)intinsert(KvTable<java.lang.String> kv, java.lang.String key, java.lang.String value)intremoveContainer(int cid, int serverIp)voidsetSkipLogFlush(boolean skipLogFlush)
-
-
-
Constructor Detail
-
Operation
@Deprecated public Operation(KvStoreClient clnt)
Deprecated.
-
Operation
public Operation(KvStoreClient clnt, com.mapr.fs.proto.Security.CredentialsMsg creds)
-
-
Method Detail
-
setSkipLogFlush
public void setSkipLogFlush(boolean skipLogFlush)
- Specified by:
setSkipLogFlushin interfaceKvDatabaseOp
-
insert
public int insert(KvTable<java.lang.Integer> kvTable, java.lang.Integer key, com.google.protobuf.MessageLite value, boolean verifyKey)
- Specified by:
insertin interfaceKvDatabaseOp
-
insert
public int insert(KvStore<java.lang.Integer> kv, java.lang.Integer keyValue, com.google.protobuf.MessageLite value)
-
insert
public int insert(KvTable<java.lang.Long> kv, java.lang.Long key, com.google.protobuf.MessageLite value, boolean verifyKey)
- Specified by:
insertin interfaceKvDatabaseOp
-
insert
public int insert(KvTable<java.lang.String> kv, java.lang.String key, com.google.protobuf.MessageLite value)
- Specified by:
insertin interfaceKvDatabaseOp
-
insert
public int insert(KvTable<java.lang.String> kv, java.lang.String key, com.google.protobuf.MessageLite value, boolean verifyKey)
- Specified by:
insertin interfaceKvDatabaseOp
-
insert
public int insert(KvTable<java.lang.String> kv, java.lang.String key, java.lang.String value)
- Specified by:
insertin interfaceKvDatabaseOp
-
insert
public int insert(KvTable<com.google.protobuf.ByteString> kv, com.google.protobuf.ByteString key, com.google.protobuf.MessageLite value)
- Specified by:
insertin interfaceKvDatabaseOp
-
insert
public int insert(KvTable<?> kv, com.mapr.fs.proto.Fileserver.KvStoreKey key, com.google.protobuf.ByteString value)
- Specified by:
insertin interfaceKvDatabaseOp
-
delete
public int delete(KvTable<java.lang.Integer> kvTable, java.lang.Integer keyValue)
- Specified by:
deletein interfaceKvDatabaseOp
-
delete
public int delete(KvTable<java.lang.Long> kvTable, java.lang.Long keyValue)
- Specified by:
deletein interfaceKvDatabaseOp
-
delete
public int delete(KvTable<java.lang.String> kvTable, java.lang.String keyValue)
- Specified by:
deletein interfaceKvDatabaseOp
-
delete
public int delete(KvTable<com.google.protobuf.ByteString> kvTable, com.google.protobuf.ByteString keyValue)
- Specified by:
deletein interfaceKvDatabaseOp
-
delete
public int delete(KvTable<?> kvTable, com.mapr.fs.proto.Fileserver.KvStoreKey key)
- Specified by:
deletein interfaceKvDatabaseOp
-
createContainer
public int createContainer(int cid, int volId, java.util.List<com.mapr.fs.proto.Common.Server> servers, boolean isNameContainer, boolean isMirrorContainer, boolean isShuffleVolume, com.mapr.fs.proto.Common.ContainerReplType replType, com.mapr.fs.proto.Common.SetattrMsg rootDirAttr, com.mapr.fs.proto.Common.FSVolumeProperties fsVolProps, long cycleId, int labelId, boolean isStatsEnabled)The following function is called to create on new container.- Parameters:
cid-volId-servers-isNameContainer-isMirrorContainer-isShuffleVolume-replType-rootDirAttr-volProps-cycleId-lableId-- Returns:
-
bulkCreateContainer
public int bulkCreateContainer(int[] cidList, int volId, java.util.List<java.util.List<com.mapr.fs.proto.Common.Server>> servers, boolean isMirrorVolume, boolean isShuffleVolume, com.mapr.fs.proto.Common.ContainerReplType replType, com.mapr.fs.proto.Common.FSVolumeProperties fsVolProps, long[] cycleIdList, int labelId, boolean isStatsEnabled)
-
createStaleContainer
public int createStaleContainer(int cid, int volId, java.util.List<com.mapr.fs.proto.Common.Server> servers, boolean rootOfVolume, boolean isMirrorContainer, com.mapr.fs.proto.Common.ContainerReplType replType, com.mapr.fs.proto.Common.FSVolumeProperties fsVolprops, long cycleId, int labelId, boolean isStatsEnabled)The following function is called to create additional copies of an existing container.- Parameters:
cid-volId-servers-rootOfVolume-isMirrorContainer-replType-volProps-cycleId-labelId-- Returns:
-
removeContainer
public int removeContainer(int cid, int serverIp)
-
createSnapshotRootContainer
public int createSnapshotRootContainer(int rwContainerId, int rwVolId, int snapContainerId, int snapId, com.mapr.fs.proto.Common.Server master, java.lang.String snapName)
-
createSnapshotContainer
public int createSnapshotContainer(int rwContainerId, int rwVolId, int snapContainerId, int snapId, com.mapr.fs.proto.Common.Server master)
-
deleteSnapshotVolume
public int deleteSnapshotVolume(int rwRootContainerId, int rwVolId, int snapRootContainerId, int snapId, com.mapr.fs.proto.Common.Server master, java.lang.String snapName)
-
apply
public int apply()
- Specified by:
applyin interfaceKvDatabaseOp
-
apply
public int apply(java.util.List<com.mapr.fs.proto.Fileserver.KvStoreMultiopResponse> multiResp)
-
hashedKeyInsert
public int hashedKeyInsert(KvTable<java.lang.String> kv, java.lang.String key, int value)
- Specified by:
hashedKeyInsertin interfaceKvDatabaseOp
-
hashedKeyInsert
public int hashedKeyInsert(KvTable<java.lang.String> kv, java.lang.String key, int value, boolean skipCollisionCountUpdate, boolean verifyKey)
- Specified by:
hashedKeyInsertin interfaceKvDatabaseOp
-
hashedKeyInsertCollisionCount
public int hashedKeyInsertCollisionCount(KvTable<java.lang.String> kv)
- Specified by:
hashedKeyInsertCollisionCountin interfaceKvDatabaseOp
-
hashedKeyDelete
public int hashedKeyDelete(KvTable<java.lang.String> kv, java.lang.String key)
- Specified by:
hashedKeyDeletein interfaceKvDatabaseOp
-
cleanUpForHashedStringTables
public void cleanUpForHashedStringTables()
- Specified by:
cleanUpForHashedStringTablesin interfaceKvDatabaseOp
-
-