@InterfaceAudience.Private public class CreateTableHandler extends EventHandler
EventHandler.EventHandlerListener| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
protected MasterFileSystem |
fileSystemManager |
protected HTableDescriptor |
hTableDescriptor |
eventType, seqids, server, waitingTimeForEvents| 构造器和说明 |
|---|
CreateTableHandler(Server server,
MasterFileSystem fileSystemManager,
HTableDescriptor hTableDescriptor,
org.apache.hadoop.conf.Configuration conf,
HRegionInfo[] newRegions,
MasterServices masterServices) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
addRegionsToMeta(List<HRegionInfo> regionInfos,
int regionReplication)
Add the specified set of regions to the hbase:meta table.
|
protected List<HRegionInfo> |
addReplicas(HTableDescriptor hTableDescriptor,
List<HRegionInfo> regions)
Create any replicas for the regions (the default replicas that was
already created is passed to the method)
|
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 在类中 EventHandlerNotAllMetaRegionsOnlineExceptionTableExistsExceptionIOExceptionpublic String toString()
toString 在类中 EventHandlerpublic void process()
EventHandlerprocess 在类中 EventHandlerprotected void completed(Throwable exception)
exception - null if process() is successful or not null if something has failed.protected List<HRegionInfo> addReplicas(HTableDescriptor hTableDescriptor, List<HRegionInfo> regions)
hTableDescriptor - regions - default replicasprotected 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(List<HRegionInfo> regionInfos, int regionReplication) throws IOException
IOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.