Class 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 peers
     
     encodedTimeOfClosure\x00hdfs://localhost:8020/accumulo/wal/tserver+port/WAL
       order:source_table_id [] -> Status Protobuf
     
     
    • Field Detail

      • NAME

        public static final org.apache.hadoop.io.Text NAME
      • ROW_SEPARATOR

        public static final org.apache.hadoop.io.Text ROW_SEPARATOR
    • Constructor Detail

      • OrderSection

        public OrderSection()
    • Method Detail

      • getTableId

        public static void getTableId​(Key k,
                                      org.apache.hadoop.io.Text buff)
        Extract the table ID from the given key
        Parameters:
        k - OrderSection key
        buff - 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 - Filename
        timeInMillis - Time in millis that the file was closed
        Returns:
        Mutation for the Order section
      • add

        public static Mutation add​(Mutation m,
                                   TableId tableId,
                                   Value v)
        Add a column update to the given mutation with the provided tableId and value
        Parameters:
        m - Mutation for OrderSection
        tableId - Source table id
        v - 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)
      • getFile

        public static String getFile​(Key k)
      • getFile

        public static String getFile​(Key k,
                                     org.apache.hadoop.io.Text buff)