Class StatusMaker


  • @Deprecated
    public class StatusMaker
    extends Object
    Deprecated.
    Reads replication records from the metadata table and creates status records in the replication table. Deletes the record from the metadata table when it's closed.
    • Method Detail

      • setSourceTableName

        public void setSourceTableName​(String table)
        Deprecated.
        Not for public use -- visible only for testing

        Used to read records from a table other than 'metadata'

        Parameters:
        table - The table to read from
      • run

        public void run()
        Deprecated.
      • addStatusRecord

        protected boolean addStatusRecord​(org.apache.hadoop.io.Text file,
                                          TableId tableId,
                                          Value v)
        Deprecated.
        Create a status record in the replication table
      • addOrderRecord

        protected boolean addOrderRecord​(org.apache.hadoop.io.Text file,
                                         TableId tableId,
                                         Replication.Status stat,
                                         Value value)
        Deprecated.
        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)
        Parameters:
        file - File being replicated
        tableId - Table ID the file was used by
        stat - Status msg
        value - Serialized version of the Status msg
      • deleteStatusRecord

        protected void deleteStatusRecord​(Key k)
        Deprecated.
        Because there is only one active Manager, 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.

        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.

        Parameters:
        k - The Key to delete