public abstract class TableEventHandler extends EventHandler
process()
. The idea is to fail fast rather than
later down in an async invocation of process()
(which currently has
no means of reporting back issues once started).EventHandler.EventHandlerListener, EventHandler.EventType
Modifier and Type | Field and Description |
---|---|
protected boolean |
isEventBeingHandled |
protected MasterServices |
masterServices |
protected byte[] |
tableName |
protected String |
tableNameStr |
eventType, seqids, server, waitingTimeForEvents
Constructor and Description |
---|
TableEventHandler(EventHandler.EventType eventType,
byte[] tableName,
Server server,
MasterServices masterServices) |
Modifier and Type | Method and Description |
---|---|
protected void |
completed(Throwable exception)
Called after that process() is completed.
|
HTableDescriptor |
getTableDescriptor()
Gets a TableDescriptor from the masterServices.
|
protected abstract void |
handleTableOperation(List<HRegionInfo> regions) |
void |
process()
This method is the main processing loop to be implemented by the various
subclasses.
|
boolean |
reOpenAllRegions(List<HRegionInfo> regions) |
void |
waitForEventBeingHandled()
Table modifications are processed asynchronously, but provide an API for you to query their
status.
|
compareTo, getEventType, getInformativeName, getListener, getPriority, getSeqid, run, setListener, toString
protected final MasterServices masterServices
protected final byte[] tableName
protected final String tableNameStr
protected boolean isEventBeingHandled
public TableEventHandler(EventHandler.EventType eventType, byte[] tableName, Server server, MasterServices masterServices) throws IOException
IOException
public void process()
EventHandler
process
in class EventHandler
protected void completed(Throwable exception)
exception
- null if process() is successful or not null if something has failed.public boolean reOpenAllRegions(List<HRegionInfo> regions) throws IOException
IOException
public HTableDescriptor getTableDescriptor() throws FileNotFoundException, IOException
TableExistsException
FileNotFoundException
IOException
protected abstract void handleTableOperation(List<HRegionInfo> regions) throws IOException, org.apache.zookeeper.KeeperException
IOException
org.apache.zookeeper.KeeperException
public void waitForEventBeingHandled() throws IOException
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.