public class StatusMaker extends Object
| Constructor and Description |
|---|
StatusMaker(AccumuloClient client,
VolumeManager fs) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addOrderRecord(org.apache.hadoop.io.Text file,
Table.ID tableId,
Replication.Status stat,
Value value)
Create a record to track when the file was closed to ensure that replication preference is
given to files that have been closed the longest and allow the work assigner to try to
replicate in order that data was ingested (avoid replay in different order)
|
protected boolean |
addStatusRecord(org.apache.hadoop.io.Text file,
Table.ID tableId,
Value v)
Create a status record in the replication table
|
protected void |
deleteStatusRecord(Key k)
Because there is only one active Master, and thus one active StatusMaker, the only safe time
that we can issue the delete for a Status which is closed is immediately after writing it to
the replication table.
|
void |
run() |
void |
setSourceTableName(String table)
Not for public use -- visible only for testing
|
public StatusMaker(AccumuloClient client, VolumeManager fs)
public void setSourceTableName(String table)
Used to read records from a table other than 'metadata'
table - The table to read frompublic void run()
protected boolean addStatusRecord(org.apache.hadoop.io.Text file,
Table.ID tableId,
Value v)
protected boolean addOrderRecord(org.apache.hadoop.io.Text file,
Table.ID tableId,
Replication.Status stat,
Value value)
file - File being replicatedtableId - Table ID the file was used bystat - Status msgvalue - Serialized version of the Status msgprotected void deleteStatusRecord(Key k)
If we try to defer and delete these entries in another thread/process, we will have no assurance that the Status message was propagated to the replication table. It is easiest, in terms of concurrency, to do this all in one step.
k - The Key to deleteCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.