public class StatusUtil extends Object
Constructor and Description |
---|
StatusUtil() |
Modifier and Type | Method and Description |
---|---|
static Replication.Status |
fileClosed() |
static Value |
fileClosedValue() |
static Replication.Status |
fileCreated(long timeCreated) |
static Value |
fileCreatedValue(long timeCreated) |
static Replication.Status |
fromValue(Value v) |
static Replication.Status |
ingestedUntil(long recordsIngested)
Creates a
Replication.Status for newly-created data that must be replicated |
static Replication.Status |
ingestedUntil(Replication.Status.Builder builder,
long recordsIngested) |
static boolean |
isFullyReplicated(Replication.Status status)
Is the given Status fully replicated but potentially not yet safe for deletion
|
static boolean |
isSafeForRemoval(Replication.Status status)
Is the given Status fully replicated and is its file ready for deletion on the source
|
static boolean |
isWorkRequired(Replication.Status status)
Given the
Replication.Status , is there replication work to be done |
static Replication.Status |
openWithUnknownLength() |
static Value |
openWithUnknownLengthValue() |
static Replication.Status |
replicated(long recordsReplicated) |
static Replication.Status |
replicated(Replication.Status.Builder builder,
long recordsReplicated) |
static Replication.Status |
replicatedAndIngested(long recordsReplicated,
long recordsIngested)
Creates a @{link Status} for a file which has new data and data which has been replicated
|
static Replication.Status |
replicatedAndIngested(Replication.Status.Builder builder,
long recordsReplicated,
long recordsIngested)
Same as
replicatedAndIngested(long, long) but uses the provided Replication.Status.Builder |
public static Replication.Status ingestedUntil(long recordsIngested)
Replication.Status
for newly-created data that must be replicatedrecordsIngested
- Offset of records which need to be replicatedReplication.Status
tracking data that must be replicatedpublic static Replication.Status ingestedUntil(Replication.Status.Builder builder, long recordsIngested)
public static Replication.Status replicated(long recordsReplicated)
recordsReplicated
- Offset of records which have been replicatedReplication.Status
tracking data that must be replicatedpublic static Replication.Status replicated(Replication.Status.Builder builder, long recordsReplicated)
builder
- Existing Replication.Status.Builder
to userecordsReplicated
- Offset of records which have been replicatedReplication.Status
tracking data that must be replicatedpublic static Replication.Status replicatedAndIngested(long recordsReplicated, long recordsIngested)
recordsReplicated
- Offset of records which have been replicatedrecordsIngested
- Offset for records which need to be replicatedReplication.Status
for the given parameterspublic static Replication.Status replicatedAndIngested(Replication.Status.Builder builder, long recordsReplicated, long recordsIngested)
replicatedAndIngested(long, long)
but uses the provided Replication.Status.Builder
builder
- An existing builderrecordsReplicated
- Offset of records which have been replicatedrecordsIngested
- Offset of records which need to be replicatedReplication.Status
for the given parameters using the builderpublic static Replication.Status fileCreated(long timeCreated)
Replication.Status
for a new file that was just createdpublic static Value fileCreatedValue(long timeCreated)
Value
for a new file that was just createdpublic static Replication.Status fileClosed()
public static Value fileClosedValue()
public static Replication.Status openWithUnknownLength()
Replication.Status
for an open file of unspecified length, all of which needs replicating.public static Value openWithUnknownLengthValue()
Value
for an open file of unspecified length, all of which needs replicating.public static Replication.Status fromValue(Value v) throws com.google.protobuf.InvalidProtocolBufferException
v
- Value with serialized Statuscom.google.protobuf.InvalidProtocolBufferException
public static boolean isSafeForRemoval(Replication.Status status)
status
- a Status protobufpublic static boolean isFullyReplicated(Replication.Status status)
status
- a Status protobufpublic static boolean isWorkRequired(Replication.Status status)
Replication.Status
, is there replication work to be donestatus
- Status for a fileCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.