@InterfaceAudience.Private public class CreateTableHandler extends EventHandler
EventHandler.EventHandlerListener| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
protected MasterFileSystem |
fileSystemManager |
protected HTableDescriptor |
hTableDescriptor |
eventType, seqids, server, waitingTimeForEvents| Constructor and Description |
|---|
CreateTableHandler(Server server,
MasterFileSystem fileSystemManager,
HTableDescriptor hTableDescriptor,
org.apache.hadoop.conf.Configuration conf,
HRegionInfo[] newRegions,
MasterServices masterServices) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRegionsToMeta(CatalogTracker ct,
List<HRegionInfo> regionInfos)
Add the specified set of regions to the hbase:meta table.
|
protected void |
completed(Throwable exception)
Called after that process() is completed.
|
protected List<HRegionInfo> |
handleCreateHdfsRegions(org.apache.hadoop.fs.Path tableRootDir,
TableName tableName)
Create the on-disk structure for the table, and returns the regions info.
|
CreateTableHandler |
prepare()
Event handlers should do all the necessary checks in this method (rather than
in the constructor, or in process()) so that the caller, which is mostly executed
in the ipc context can fail fast.
|
void |
process()
This method is the main processing loop to be implemented by the various
subclasses.
|
String |
toString() |
compareTo, getEventType, getInformativeName, getListener, getPriority, getSeqid, handleException, run, setListenerprotected final MasterFileSystem fileSystemManager
protected final HTableDescriptor hTableDescriptor
protected final org.apache.hadoop.conf.Configuration conf
public CreateTableHandler(Server server, MasterFileSystem fileSystemManager, HTableDescriptor hTableDescriptor, org.apache.hadoop.conf.Configuration conf, HRegionInfo[] newRegions, MasterServices masterServices)
public CreateTableHandler prepare() throws NotAllMetaRegionsOnlineException, TableExistsException, IOException
EventHandlerprepare in class EventHandlerNotAllMetaRegionsOnlineExceptionTableExistsExceptionIOExceptionpublic String toString()
toString in class EventHandlerpublic void process()
EventHandlerprocess in class EventHandlerprotected void completed(Throwable exception)
exception - null if process() is successful or not null if something has failed.protected List<HRegionInfo> handleCreateHdfsRegions(org.apache.hadoop.fs.Path tableRootDir, TableName tableName) throws IOException
tableRootDir - directory where the table is being createdtableName - name of the table under constructionIOExceptionprotected void addRegionsToMeta(CatalogTracker ct, List<HRegionInfo> regionInfos) throws IOException
IOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.