Class StatusUtil

java.lang.Object
org.apache.accumulo.server.replication.StatusUtil

@Deprecated public class StatusUtil extends Object
Deprecated.
Helper methods to create Status protobuf messages
  • Constructor Details

    • StatusUtil

      public StatusUtil()
      Deprecated.
  • Method Details

    • ingestedUntil

      public static Replication.Status ingestedUntil(long recordsIngested)
      Deprecated.
      Creates a Replication.Status for newly-created data that must be replicated
      Parameters:
      recordsIngested - Offset of records which need to be replicated
      Returns:
      A Replication.Status tracking data that must be replicated
    • ingestedUntil

      public static Replication.Status ingestedUntil(Replication.Status.Builder builder, long recordsIngested)
      Deprecated.
    • replicated

      public static Replication.Status replicated(long recordsReplicated)
      Deprecated.
      Parameters:
      recordsReplicated - Offset of records which have been replicated
      Returns:
      A Replication.Status tracking data that must be replicated
    • replicated

      public static Replication.Status replicated(Replication.Status.Builder builder, long recordsReplicated)
      Deprecated.
      Parameters:
      builder - Existing Replication.Status.Builder to use
      recordsReplicated - Offset of records which have been replicated
      Returns:
      A Replication.Status tracking data that must be replicated
    • replicatedAndIngested

      public static Replication.Status replicatedAndIngested(long recordsReplicated, long recordsIngested)
      Deprecated.
      Creates a @{link Status} for a file which has new data and data which has been replicated
      Parameters:
      recordsReplicated - Offset of records which have been replicated
      recordsIngested - Offset for records which need to be replicated
      Returns:
      A Replication.Status for the given parameters
    • replicatedAndIngested

      public static Replication.Status replicatedAndIngested(Replication.Status.Builder builder, long recordsReplicated, long recordsIngested)
      Deprecated.
      Parameters:
      builder - An existing builder
      recordsReplicated - Offset of records which have been replicated
      recordsIngested - Offset of records which need to be replicated
      Returns:
      A Replication.Status for the given parameters using the builder
    • fileCreated

      public static Replication.Status fileCreated(long timeCreated)
      Deprecated.
      Returns:
      A Replication.Status for a new file that was just created
    • fileCreatedValue

      public static Value fileCreatedValue(long timeCreated)
      Deprecated.
      Returns:
      A Value for a new file that was just created
    • fileClosed

      public static Replication.Status fileClosed()
      Deprecated.
      Returns:
      A Status representing a closed file
    • fileClosedValue

      public static Value fileClosedValue()
      Deprecated.
      Returns:
      A Value representing a closed file
    • openWithUnknownLength

      public static Replication.Status openWithUnknownLength(long timeCreated)
      Deprecated.
      Returns:
      A Replication.Status for an open file of unspecified length, all of which needs replicating.
    • openWithUnknownLength

      public static Replication.Status openWithUnknownLength()
      Deprecated.
      Returns:
      A Replication.Status for an open file of unspecified length, all of which needs replicating.
    • openWithUnknownLengthValue

      public static Value openWithUnknownLengthValue()
      Deprecated.
      Returns:
      A Value for an open file of unspecified length, all of which needs replicating.
    • fromValue

      public static Replication.Status fromValue(Value v) throws com.google.protobuf.InvalidProtocolBufferException
      Deprecated.
      Parameters:
      v - Value with serialized Status
      Returns:
      A Status created from the Value
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • isSafeForRemoval

      public static boolean isSafeForRemoval(Replication.Status status)
      Deprecated.
      Is the given Status fully replicated and is its file ready for deletion on the source
      Parameters:
      status - a Status protobuf
      Returns:
      True if the file this Status references can be deleted.
    • isFullyReplicated

      public static boolean isFullyReplicated(Replication.Status status)
      Deprecated.
      Is the given Status fully replicated but potentially not yet safe for deletion
      Parameters:
      status - a Status protobuf
      Returns:
      True if the file this Status references is fully replicated so far
    • isWorkRequired

      public static boolean isWorkRequired(Replication.Status status)
      Deprecated.
      Given the Replication.Status, is there replication work to be done
      Parameters:
      status - Status for a file
      Returns:
      true if replication work is required