Class ReplicationSchema.OrderSection
- java.lang.Object
-
- org.apache.accumulo.core.replication.ReplicationSchema.OrderSection
-
- Enclosing class:
- ReplicationSchema
public static class ReplicationSchema.OrderSection extends Object
Holds the order in which files needed for replication were closed. The intent is to be able to guarantee that files which were closed earlier were replicated first and we don't replay data in the wrong order on our peersencodedTimeOfClosure\x00hdfs://localhost:8020/accumulo/wal/tserver+port/WAL order:source_table_id [] -> Status Protobuf
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.hadoop.io.Text
NAME
static org.apache.hadoop.io.Text
ROW_SEPARATOR
-
Constructor Summary
Constructors Constructor Description OrderSection()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Mutation
add(Mutation m, String tableId, Value v)
Add a column update to the given mutation with the provided tableId and valuestatic Mutation
createMutation(String file, long timeInMillis)
Creates the Mutation for the Order section for the given file and timestatic String
getFile(Key k)
static String
getFile(Key k, org.apache.hadoop.io.Text buff)
static String
getTableId(Key k)
Extract the table ID from the given key (inefficiently if called repeatedly)static void
getTableId(Key k, org.apache.hadoop.io.Text buff)
Extract the table ID from the given keystatic long
getTimeClosed(Key k)
static long
getTimeClosed(Key k, org.apache.hadoop.io.Text buff)
static void
limit(ScannerBase scanner)
Limit the scanner to only return Order records
-
-
-
Method Detail
-
getTableId
public static String getTableId(Key k)
Extract the table ID from the given key (inefficiently if called repeatedly)- Parameters:
k
- OrderSection Key- Returns:
- source table id
-
getTableId
public static void getTableId(Key k, org.apache.hadoop.io.Text buff)
Extract the table ID from the given key- Parameters:
k
- OrderSection keybuff
- Text to place table ID into
-
limit
public static void limit(ScannerBase scanner)
Limit the scanner to only return Order records
-
createMutation
public static Mutation createMutation(String file, long timeInMillis)
Creates the Mutation for the Order section for the given file and time- Parameters:
file
- FilenametimeInMillis
- Time in millis that the file was closed- Returns:
- Mutation for the Order section
-
add
public static Mutation add(Mutation m, String tableId, Value v)
Add a column update to the given mutation with the provided tableId and value- Parameters:
m
- Mutation for OrderSectiontableId
- Source table idv
- Serialized Status msg- Returns:
- The original Mutation
-
getTimeClosed
public static long getTimeClosed(Key k)
-
getTimeClosed
public static long getTimeClosed(Key k, org.apache.hadoop.io.Text buff)
-
-