Class WALEventTrackerTableAccessor
java.lang.Object
org.apache.hadoop.hbase.namequeues.WALEventTrackerTableAccessor
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final long
static final long
static final String
private static final org.slf4j.Logger
static final String
static final String
static final String
static final String
static final String
static final TableName
WAL_EVENT_TRACKER_TABLE_NAME_STR
table name - can be enabled with config - hbase.regionserver.wal.event.tracker.enabledstatic final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addWalEventTrackerRows
(Queue<WALEventTrackerPayload> walEventPayloads, Connection connection) Add wal event tracker rows to hbase:waleventtracker tableprivate static void
doPut
(Connection connection, List<Put> puts) private static RetryCounterFactory
getRetryFactory
(org.apache.hadoop.conf.Configuration conf) static byte[]
getRowKey
(WALEventTrackerPayload payload) Create rowKey: 1.private static void
retryOrThrow
(RetryCounter retryCounter, IOException ioe)
-
Field Details
-
LOG
-
RS_COLUMN
- See Also:
-
WAL_NAME_COLUMN
- See Also:
-
TIMESTAMP_COLUMN
- See Also:
-
WAL_STATE_COLUMN
- See Also:
-
WAL_LENGTH_COLUMN
- See Also:
-
MAX_ATTEMPTS_KEY
- See Also:
-
SLEEP_INTERVAL_KEY
- See Also:
-
MAX_SLEEP_TIME_KEY
- See Also:
-
DEFAULT_MAX_ATTEMPTS
- See Also:
-
DEFAULT_SLEEP_INTERVAL
- See Also:
-
DEFAULT_MAX_SLEEP_TIME
- See Also:
-
WAL_EVENT_TRACKER_TABLE_NAME_STR
- See Also:
-
DELIMITER
- See Also:
-
WAL_EVENT_TRACKER_TABLE_NAME
WAL_EVENT_TRACKER_TABLE_NAME_STR
table name - can be enabled with config - hbase.regionserver.wal.event.tracker.enabled
-
-
Constructor Details
-
WALEventTrackerTableAccessor
private WALEventTrackerTableAccessor()
-
-
Method Details
-
doPut
- Throws:
Exception
-
getRetryFactory
-
retryOrThrow
- Throws:
IOException
-
addWalEventTrackerRows
public static void addWalEventTrackerRows(Queue<WALEventTrackerPayload> walEventPayloads, Connection connection) throws Exception Add wal event tracker rows to hbase:waleventtracker table- Parameters:
walEventPayloads
- List of walevents to processconnection
- Connection to use.- Throws:
Exception
-
getRowKey
Create rowKey: 1. We want RS name to be the leading part of rowkey so that we can query by RS name filter. WAL name contains rs name as a leading part. 2. Timestamp when the event was generated. 3. Add state of the wal. Combination of 1 + 2 + 3 is definitely going to create a unique rowkey.- Parameters:
payload
- payload to process- Returns:
- rowKey byte[]
-