Class Operation

java.lang.Object
com.mapr.kvstore.Operation
All Implemented Interfaces:
KvDatabaseOp

public class Operation extends Object implements KvDatabaseOp
  • Field Details

    • LOG

      public static final org.apache.commons.logging.Log LOG
  • Constructor Details

  • Method Details

    • setSkipLogFlush

      public void setSkipLogFlush(boolean skipLogFlush)
      Specified by:
      setSkipLogFlush in interface KvDatabaseOp
    • insert

      public int insert(KvTable<Integer> kvTable, Integer key, com.google.protobuf.MessageLite value, boolean verifyKey)
      Specified by:
      insert in interface KvDatabaseOp
    • insert

      public int insert(KvStore<Integer> kv, Integer keyValue, com.google.protobuf.MessageLite value)
    • insert

      public int insert(KvTable<Long> kv, Long key, com.google.protobuf.MessageLite value, boolean verifyKey)
      Specified by:
      insert in interface KvDatabaseOp
    • insert

      public int insert(KvTable<String> kv, String key, com.google.protobuf.MessageLite value)
      Specified by:
      insert in interface KvDatabaseOp
    • insert

      public int insert(KvTable<String> kv, String key, com.google.protobuf.MessageLite value, boolean verifyKey)
      Specified by:
      insert in interface KvDatabaseOp
    • insert

      public int insert(KvTable<String> kv, String key, String value)
      Specified by:
      insert in interface KvDatabaseOp
    • insert

      public int insert(KvTable<com.google.protobuf.ByteString> kv, com.google.protobuf.ByteString key, com.google.protobuf.MessageLite value)
      Specified by:
      insert in interface KvDatabaseOp
    • insert

      public int insert(KvTable<?> kv, com.mapr.fs.proto.Fileserver.KvStoreKey key, com.google.protobuf.ByteString value)
      Specified by:
      insert in interface KvDatabaseOp
    • delete

      public int delete(KvTable<Integer> kvTable, Integer keyValue)
      Specified by:
      delete in interface KvDatabaseOp
    • delete

      public int delete(KvTable<Long> kvTable, Long keyValue)
      Specified by:
      delete in interface KvDatabaseOp
    • delete

      public int delete(KvTable<String> kvTable, String keyValue)
      Specified by:
      delete in interface KvDatabaseOp
    • delete

      public int delete(KvTable<com.google.protobuf.ByteString> kvTable, com.google.protobuf.ByteString keyValue)
      Specified by:
      delete in interface KvDatabaseOp
    • delete

      public int delete(KvTable<?> kvTable, com.mapr.fs.proto.Fileserver.KvStoreKey key)
      Specified by:
      delete in interface KvDatabaseOp
    • createContainer

      public int createContainer(int cid, int volId, 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, List<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, 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, 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, String snapName)
    • getOpCount

      public int getOpCount()
    • mustApply

      public boolean mustApply()
    • apply

      public int apply()
      Specified by:
      apply in interface KvDatabaseOp
    • apply

      public int apply(List<com.mapr.fs.proto.Fileserver.KvStoreMultiopResponse> multiResp)
    • hashedKeyInsert

      public int hashedKeyInsert(KvTable<String> kv, String key, int value)
      Specified by:
      hashedKeyInsert in interface KvDatabaseOp
    • hashedKeyInsert

      public int hashedKeyInsert(KvTable<String> kv, String key, int value, boolean skipCollisionCountUpdate, boolean verifyKey)
      Specified by:
      hashedKeyInsert in interface KvDatabaseOp
    • hashedKeyInsertCollisionCount

      public int hashedKeyInsertCollisionCount(KvTable<String> kv)
      Specified by:
      hashedKeyInsertCollisionCount in interface KvDatabaseOp
    • hashedKeyDelete

      public int hashedKeyDelete(KvTable<String> kv, String key)
      Specified by:
      hashedKeyDelete in interface KvDatabaseOp
    • cleanUpForHashedStringTables

      public void cleanUpForHashedStringTables()
      Specified by:
      cleanUpForHashedStringTables in interface KvDatabaseOp