[18/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws
[16/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.TableWaitForStateCallable.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.TableWaitForStateCallable.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.TableWaitForStateCallable.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.TableWaitForStateCallable.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.TableWaitForStateCallable.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453
[05/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html index 541beed..1100e95 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html @@ -42,1015 +42,1038 @@ 034import java.util.concurrent.ConcurrentHashMap; 035import java.util.concurrent.ConcurrentSkipListMap; 036import java.util.concurrent.atomic.AtomicInteger; -037 -038import org.apache.hadoop.hbase.HConstants; -039import org.apache.hadoop.hbase.ServerName; -040import org.apache.hadoop.hbase.TableName; -041import org.apache.hadoop.hbase.client.RegionInfo; -042import org.apache.hadoop.hbase.exceptions.UnexpectedStateException; -043import org.apache.hadoop.hbase.master.RegionState; -044import org.apache.hadoop.hbase.master.RegionState.State; -045import org.apache.hadoop.hbase.procedure2.ProcedureEvent; -046import org.apache.hadoop.hbase.util.Bytes; -047import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; -048import org.apache.yetus.audience.InterfaceAudience; -049import org.slf4j.Logger; -050import org.slf4j.LoggerFactory; -051import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; -052 -053/** -054 * RegionStates contains a set of Maps that describes the in-memory state of the AM, with -055 * the regions available in the system, the region in transition, the offline regions and -056 * the servers holding regions. -057 */ -058@InterfaceAudience.Private -059public class RegionStates { -060 private static final Logger LOG = LoggerFactory.getLogger(RegionStates.class); -061 -062 protected static final State[] STATES_EXPECTED_ON_OPEN = new State[] { -063State.OPEN, // State may already be OPEN if we died after receiving the OPEN from regionserver -064// but before complete finish of AssignProcedure. HBASE-20100. -065State.OFFLINE, State.CLOSED, // disable/offline -066State.SPLITTING, State.SPLIT, // ServerCrashProcedure -067State.OPENING, State.FAILED_OPEN, // already in-progress (retrying) -068 }; -069 -070 protected static final State[] STATES_EXPECTED_ON_CLOSE = new State[] { -071State.SPLITTING, State.SPLIT, State.MERGING, // ServerCrashProcedure -072State.OPEN, // enabled/open -073State.CLOSING // already in-progress (retrying) -074 }; -075 -076 private static class AssignmentProcedureEvent extends ProcedureEventRegionInfo { -077public AssignmentProcedureEvent(final RegionInfo regionInfo) { -078 super(regionInfo); -079} -080 } -081 -082 private static class ServerReportEvent extends ProcedureEventServerName { -083public ServerReportEvent(final ServerName serverName) { -084 super(serverName); -085} -086 } -087 -088 /** -089 * Current Region State. -090 * In-memory only. Not persisted. -091 */ -092 // Mutable/Immutable? Changes have to be synchronized or not? -093 // Data members are volatile which seems to say multi-threaded access is fine. -094 // In the below we do check and set but the check state could change before -095 // we do the set because no synchronizationwhich seems dodgy. Clear up -096 // understanding here... how many threads accessing? Do locks make it so one -097 // thread at a time working on a single Region's RegionStateNode? Lets presume -098 // so for now. Odd is that elsewhere in this RegionStates, we synchronize on -099 // the RegionStateNode instance. TODO. -100 public static class RegionStateNode implements ComparableRegionStateNode { -101private final RegionInfo regionInfo; -102private final ProcedureEvent? event; -103 -104private volatile RegionTransitionProcedure procedure = null; -105private volatile ServerName regionLocation = null; -106private volatile ServerName lastHost = null; -107/** -108 * A Region-in-Transition (RIT) moves through states. -109 * See {@link State} for complete list. A Region that -110 * is opened moves from OFFLINE = OPENING = OPENED. -111 */ -112private volatile State state = State.OFFLINE; -113 -114/** -115 * Updated whenever a call to {@link #setRegionLocation(ServerName)} -116 * or {@link #setState(State, State...)}. -117 */ -118private volatile long lastUpdate = 0; -119 -120private volatile long openSeqNum = HConstants.NO_SEQNUM; -121 -122public RegionStateNode(final RegionInfo regionInfo) { -123 this.regionInfo =
[46/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html index c19ca2e..d58acf6 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html +++ b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html @@ -122,7 +122,7 @@ var activeTableTab = "activeTableTab"; -private static class HBaseAdmin.AbortProcedureFuture +private static class HBaseAdmin.AbortProcedureFuture extends HBaseAdmin.ProcedureFuturehttps://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true; title="class or interface in java.lang">Boolean @@ -235,7 +235,7 @@ extends isAbortInProgress -privateboolean isAbortInProgress +privateboolean isAbortInProgress @@ -252,7 +252,7 @@ extends AbortProcedureFuture -publicAbortProcedureFuture(HBaseAdminadmin, +publicAbortProcedureFuture(HBaseAdminadmin, https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true; title="class or interface in java.lang">LongprocId, https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true; title="class or interface in java.lang">BooleanabortProcResponse) @@ -271,7 +271,7 @@ extends get -publichttps://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true; title="class or interface in java.lang">Booleanget(longtimeout, +publichttps://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true; title="class or interface in java.lang">Booleanget(longtimeout, https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true; title="class or interface in java.util.concurrent">TimeUnitunit) throws https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true; title="class or interface in java.lang">InterruptedException, https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html?is-external=true; title="class or interface in java.util.concurrent">ExecutionException, http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html index acd9663..7778cf7 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html +++ b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html @@ -132,7 +132,7 @@ var activeTableTab = "activeTableTab"; -private static class HBaseAdmin.AddColumnFamilyFuture +private static class HBaseAdmin.AddColumnFamilyFuture extends HBaseAdmin.ModifyTableFuture @@ -246,7 +246,7 @@ extends AddColumnFamilyFuture -publicAddColumnFamilyFuture(HBaseAdminadmin, +publicAddColumnFamilyFuture(HBaseAdminadmin, TableNametableName, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.AddColumnResponseresponse) @@ -265,7 +265,7 @@ extends getOperationType -publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetOperationType() +publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetOperationType() Overrides: getOperationTypein classHBaseAdmin.ModifyTableFuture http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html index 07ec61b..c909e9b 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html +++ b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html @@ -127,7 +127,7 @@ var activeTableTab = "activeTableTab"; -private static class HBaseAdmin.CreateTableFuture +private static class HBaseAdmin.CreateTableFuture extends HBaseAdmin.TableFuturehttps://docs.oracle.com/javase/8/docs/api/java/lang/Void.html?is-external=true; title="class or interface in java.lang">Void @@ -268,7 +268,7 @@ extends desc -private finalTableDescriptor desc +private
[14/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ThrowableAbortable.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ThrowableAbortable.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ThrowableAbortable.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ThrowableAbortable.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ThrowableAbortable.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException {
[37/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.html b/devapidocs/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.html index 3daf653..ccbd322 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.html +++ b/devapidocs/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.html @@ -18,7 +18,7 @@ catch(err) { } //--> -var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10}; +var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -191,14 +191,10 @@ extends modifiedTableDescriptor -private https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo -regionInfoList - - private https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true; title="class or interface in java.lang">Boolean traceEnabled - + private TableDescriptor unmodifiedTableDescriptor @@ -292,95 +288,103 @@ extends private https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo -getRegionInfoList(MasterProcedureEnvenv) +getOpenRegionInfoList(MasterProcedureEnvenv) +Fetches all open or soon to be open Regions for a table. + +private https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo +getRegionInfoList(MasterProcedureEnvenv) +Fetches all Regions for a table. + + + protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableState getState(intstateId) Convert an ordinal (or state id) to an Enum (or more descriptive) state object. - + protected int getStateId(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableStatestate) Convert the Enum (or more descriptive) state object to an ordinal (or state id). - + TableName getTableName() - + TableProcedureInterface.TableOperationType getTableOperationType() Given an operation type we can take decisions about what to do with pending operations. - + private void initilize() - + protected boolean isRollbackSupported(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableStatestate) Used by the default implementation of abort() to know if the current state can be aborted and rollback can be triggered. - + private https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true; title="class or interface in java.lang">Boolean isTraceEnabled() The procedure could be restarted from a different machine. - + private void postModify(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableStatestate) Action after modifying table. - + private void preModify(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableStatestate) Action before modifying table. - + private void prepareModify(MasterProcedureEnvenv) Check conditions before any real action of modifying a table. - + private void restoreTableDescriptor(MasterProcedureEnvenv) Undo the descriptor change (for rollback) - + protected void rollbackState(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableStatestate) called to perform the rollback of the specified state - + private void runCoprocessorAction(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableStatestate) Coprocessor Action. - + protected void serializeStateData(ProcedureStateSerializerserializer) The user-level code of the procedure may have some state to persist (e.g. - + private void updateReplicaColumnsIfNeeded(MasterProcedureEnvenv, TableDescriptoroldTableDescriptor, @@ -388,7 +392,7 @@ extends update replica column families if necessary. - + private void updateTableDescriptor(MasterProcedureEnvenv) Update descriptor @@ -473,22 +477,13 @@ extends deleteColumnFamilyInModify - - - - - -regionInfoList
[45/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html index 5b49876..1410333 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html +++ b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html @@ -124,7 +124,7 @@ var activeTableTab = "activeTableTab"; @InterfaceAudience.Private @InterfaceStability.Evolving -private static class HBaseAdmin.ReplicationFuture +private static class HBaseAdmin.ReplicationFuture extends HBaseAdmin.ProcedureFuturehttps://docs.oracle.com/javase/8/docs/api/java/lang/Void.html?is-external=true; title="class or interface in java.lang">Void @@ -241,7 +241,7 @@ extends peerId -private finalhttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String peerId +private finalhttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String peerId @@ -250,7 +250,7 @@ extends getOperation -private finalhttps://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true; title="class or interface in java.util.function">Supplierhttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String getOperation +private finalhttps://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true; title="class or interface in java.util.function">Supplierhttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String getOperation @@ -267,7 +267,7 @@ extends ReplicationFuture -publicReplicationFuture(HBaseAdminadmin, +publicReplicationFuture(HBaseAdminadmin, https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringpeerId, https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true; title="class or interface in java.lang">LongprocId, https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true; title="class or interface in java.util.function">Supplierhttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetOperation) @@ -287,7 +287,7 @@ extends toString -publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringtoString() +publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringtoString() Overrides: https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--; title="class or interface in java.lang">toStringin classhttps://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">Object http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html index 1057a03..9732695 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html +++ b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.RestoreSnapshotFuture.html @@ -127,7 +127,7 @@ var activeTableTab = "activeTableTab"; -private static class HBaseAdmin.RestoreSnapshotFuture +private static class HBaseAdmin.RestoreSnapshotFuture extends HBaseAdmin.TableFuturehttps://docs.oracle.com/javase/8/docs/api/java/lang/Void.html?is-external=true; title="class or interface in java.lang">Void @@ -240,7 +240,7 @@ extends RestoreSnapshotFuture -publicRestoreSnapshotFuture(HBaseAdminadmin, +publicRestoreSnapshotFuture(HBaseAdminadmin, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescriptionsnapshot, TableNametableName, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RestoreSnapshotResponseresponse) @@ -252,7 +252,7 @@ extends RestoreSnapshotFuture -publicRestoreSnapshotFuture(HBaseAdminadmin, +publicRestoreSnapshotFuture(HBaseAdminadmin, TableNametableName,
[31/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AddColumnFamilyFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws
[25/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.MergeTableRegionsFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.MergeTableRegionsFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.MergeTableRegionsFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.MergeTableRegionsFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.MergeTableRegionsFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern
[33/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/regionserver/package-tree.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/regionserver/package-tree.html b/devapidocs/org/apache/hadoop/hbase/regionserver/package-tree.html index 116edfa..68c15cd 100644 --- a/devapidocs/org/apache/hadoop/hbase/regionserver/package-tree.html +++ b/devapidocs/org/apache/hadoop/hbase/regionserver/package-tree.html @@ -704,20 +704,20 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true; title="class or interface in java.lang">EnumE (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true; title="class or interface in java.lang">ComparableT, java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) -org.apache.hadoop.hbase.regionserver.CompactingMemStore.IndexType +org.apache.hadoop.hbase.regionserver.SplitLogWorker.TaskExecutor.Status +org.apache.hadoop.hbase.regionserver.ScannerContext.NextState org.apache.hadoop.hbase.regionserver.ScannerContext.LimitScope -org.apache.hadoop.hbase.regionserver.ChunkCreator.ChunkType -org.apache.hadoop.hbase.regionserver.ScanType +org.apache.hadoop.hbase.regionserver.MetricsRegionServerSourceFactoryImpl.FactoryStorage +org.apache.hadoop.hbase.regionserver.TimeRangeTracker.Type org.apache.hadoop.hbase.regionserver.Region.Operation -org.apache.hadoop.hbase.regionserver.FlushType -org.apache.hadoop.hbase.regionserver.SplitLogWorker.TaskExecutor.Status +org.apache.hadoop.hbase.regionserver.CompactingMemStore.IndexType +org.apache.hadoop.hbase.regionserver.ScanType +org.apache.hadoop.hbase.regionserver.MemStoreCompactionStrategy.Action +org.apache.hadoop.hbase.regionserver.ChunkCreator.ChunkType org.apache.hadoop.hbase.regionserver.BloomType -org.apache.hadoop.hbase.regionserver.TimeRangeTracker.Type org.apache.hadoop.hbase.regionserver.HRegion.FlushResult.Result -org.apache.hadoop.hbase.regionserver.MemStoreCompactionStrategy.Action -org.apache.hadoop.hbase.regionserver.ScannerContext.NextState +org.apache.hadoop.hbase.regionserver.FlushType org.apache.hadoop.hbase.regionserver.DefaultHeapMemoryTuner.StepDirection -org.apache.hadoop.hbase.regionserver.MetricsRegionServerSourceFactoryImpl.FactoryStorage http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/regionserver/querymatcher/package-tree.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/regionserver/querymatcher/package-tree.html b/devapidocs/org/apache/hadoop/hbase/regionserver/querymatcher/package-tree.html index 3bd22b5..b377318 100644 --- a/devapidocs/org/apache/hadoop/hbase/regionserver/querymatcher/package-tree.html +++ b/devapidocs/org/apache/hadoop/hbase/regionserver/querymatcher/package-tree.html @@ -130,8 +130,8 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true; title="class or interface in java.lang">EnumE (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true; title="class or interface in java.lang">ComparableT, java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) -org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher.MatchCode org.apache.hadoop.hbase.regionserver.querymatcher.StripeCompactionScanQueryMatcher.DropDeletesInOutput +org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher.MatchCode org.apache.hadoop.hbase.regionserver.querymatcher.DeleteTracker.DeleteResult http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/regionserver/wal/package-tree.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/regionserver/wal/package-tree.html b/devapidocs/org/apache/hadoop/hbase/regionserver/wal/package-tree.html index 3ab1f40..0974d2e 100644 --- a/devapidocs/org/apache/hadoop/hbase/regionserver/wal/package-tree.html +++ b/devapidocs/org/apache/hadoop/hbase/regionserver/wal/package-tree.html @@ -241,9 +241,9 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true; title="class or interface in java.lang">EnumE (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true; title="class or interface in java.lang">ComparableT, java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) -org.apache.hadoop.hbase.regionserver.wal.RingBufferTruck.Type
[04/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html index 541beed..1100e95 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html @@ -42,1015 +42,1038 @@ 034import java.util.concurrent.ConcurrentHashMap; 035import java.util.concurrent.ConcurrentSkipListMap; 036import java.util.concurrent.atomic.AtomicInteger; -037 -038import org.apache.hadoop.hbase.HConstants; -039import org.apache.hadoop.hbase.ServerName; -040import org.apache.hadoop.hbase.TableName; -041import org.apache.hadoop.hbase.client.RegionInfo; -042import org.apache.hadoop.hbase.exceptions.UnexpectedStateException; -043import org.apache.hadoop.hbase.master.RegionState; -044import org.apache.hadoop.hbase.master.RegionState.State; -045import org.apache.hadoop.hbase.procedure2.ProcedureEvent; -046import org.apache.hadoop.hbase.util.Bytes; -047import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; -048import org.apache.yetus.audience.InterfaceAudience; -049import org.slf4j.Logger; -050import org.slf4j.LoggerFactory; -051import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; -052 -053/** -054 * RegionStates contains a set of Maps that describes the in-memory state of the AM, with -055 * the regions available in the system, the region in transition, the offline regions and -056 * the servers holding regions. -057 */ -058@InterfaceAudience.Private -059public class RegionStates { -060 private static final Logger LOG = LoggerFactory.getLogger(RegionStates.class); -061 -062 protected static final State[] STATES_EXPECTED_ON_OPEN = new State[] { -063State.OPEN, // State may already be OPEN if we died after receiving the OPEN from regionserver -064// but before complete finish of AssignProcedure. HBASE-20100. -065State.OFFLINE, State.CLOSED, // disable/offline -066State.SPLITTING, State.SPLIT, // ServerCrashProcedure -067State.OPENING, State.FAILED_OPEN, // already in-progress (retrying) -068 }; -069 -070 protected static final State[] STATES_EXPECTED_ON_CLOSE = new State[] { -071State.SPLITTING, State.SPLIT, State.MERGING, // ServerCrashProcedure -072State.OPEN, // enabled/open -073State.CLOSING // already in-progress (retrying) -074 }; -075 -076 private static class AssignmentProcedureEvent extends ProcedureEventRegionInfo { -077public AssignmentProcedureEvent(final RegionInfo regionInfo) { -078 super(regionInfo); -079} -080 } -081 -082 private static class ServerReportEvent extends ProcedureEventServerName { -083public ServerReportEvent(final ServerName serverName) { -084 super(serverName); -085} -086 } -087 -088 /** -089 * Current Region State. -090 * In-memory only. Not persisted. -091 */ -092 // Mutable/Immutable? Changes have to be synchronized or not? -093 // Data members are volatile which seems to say multi-threaded access is fine. -094 // In the below we do check and set but the check state could change before -095 // we do the set because no synchronizationwhich seems dodgy. Clear up -096 // understanding here... how many threads accessing? Do locks make it so one -097 // thread at a time working on a single Region's RegionStateNode? Lets presume -098 // so for now. Odd is that elsewhere in this RegionStates, we synchronize on -099 // the RegionStateNode instance. TODO. -100 public static class RegionStateNode implements ComparableRegionStateNode { -101private final RegionInfo regionInfo; -102private final ProcedureEvent? event; -103 -104private volatile RegionTransitionProcedure procedure = null; -105private volatile ServerName regionLocation = null; -106private volatile ServerName lastHost = null; -107/** -108 * A Region-in-Transition (RIT) moves through states. -109 * See {@link State} for complete list. A Region that -110 * is opened moves from OFFLINE = OPENING = OPENED. -111 */ -112private volatile State state = State.OFFLINE; -113 -114/** -115 * Updated whenever a call to {@link #setRegionLocation(ServerName)} -116 * or {@link #setState(State, State...)}. -117 */ -118private volatile long lastUpdate = 0; -119 -120private volatile long openSeqNum = HConstants.NO_SEQNUM; -121 -122public RegionStateNode(final RegionInfo regionInfo) { -123 this.regionInfo = regionInfo; -124 this.event = new
[42/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/HMaster.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/HMaster.html b/devapidocs/org/apache/hadoop/hbase/master/HMaster.html index 2405d9a..2758049 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/HMaster.html +++ b/devapidocs/org/apache/hadoop/hbase/master/HMaster.html @@ -18,7 +18,7 @@ catch(err) { } //--> -var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":9,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":9,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":9,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":9,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":10,"i87":10,"i88":10,"i89":10,"i90":10,"i91":10,"i92":10,"i93":10,"i94":10,"i95":10,"i96":10,"i97":10,"i98":10,"i99":10,"i100":10,"i101":10,"i102":10,"i103":10,"i104":10,"i105":10,"i106":10,"i107":10,"i108":10,"i109" :10,"i110":10,"i111":10,"i112":10,"i113":10,"i114":10,"i115":10,"i116":10,"i117":10,"i118":10,"i119":10,"i120":9,"i121":10,"i122":10,"i123":10,"i124":10,"i125":10,"i126":10,"i127":10,"i128":10,"i129":10,"i130":10,"i131":10,"i132":10,"i133":9,"i134":10,"i135":10,"i136":10,"i137":10,"i138":10,"i139":10,"i140":10,"i141":10,"i142":10,"i143":10,"i144":10,"i145":10,"i146":10,"i147":10,"i148":10,"i149":10,"i150":10,"i151":10,"i152":10,"i153":10,"i154":10,"i155":10,"i156":10,"i157":10,"i158":10,"i159":10,"i160":10,"i161":10,"i162":10,"i163":10,"i164":10,"i165":10,"i166":10,"i167":10,"i168":10,"i169":9}; +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":9,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":9,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":9,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":9,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":10,"i87":10,"i88":10,"i89":10,"i90":10,"i91":10,"i92":10,"i93":10,"i94":10,"i95":10,"i96":10,"i97":10,"i98":10,"i99":10,"i100":10,"i101":10,"i102":10,"i103":10,"i104":10,"i105":10,"i106":10,"i107":10,"i108":10,"i109" :10,"i110":10,"i111":10,"i112":10,"i113":10,"i114":10,"i115":10,"i116":10,"i117":10,"i118":10,"i119":10,"i120":9,"i121":10,"i122":10,"i123":10,"i124":10,"i125":10,"i126":10,"i127":10,"i128":10,"i129":10,"i130":10,"i131":10,"i132":10,"i133":9,"i134":10,"i135":10,"i136":10,"i137":10,"i138":10,"i139":10,"i140":10,"i141":10,"i142":10,"i143":10,"i144":10,"i145":10,"i146":10,"i147":10,"i148":10,"i149":10,"i150":10,"i151":10,"i152":10,"i153":10,"i154":10,"i155":10,"i156":10,"i157":10,"i158":10,"i159":10,"i160":10,"i161":10,"i162":10,"i163":10,"i164":10,"i165":10,"i166":10,"i167":10,"i168":10,"i169":10,"i170":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -178,6 +178,12 @@ implements static class HMaster.RedirectServlet + +protected static interface +HMaster.TableDescriptorGetter +Implement to return TableDescriptor after pre-checks + + @@ -1213,6 +1219,13 @@ implements +private long +modifyTable(TableNametableName, + HMaster.TableDescriptorGetternewDescriptorGetter, + longnonceGroup, + longnonce) + + long modifyTable(TableNametableName, TableDescriptornewDescriptor, @@ -1221,22 +1234,22 @@ implements Modify the descriptor of an existing table - + void move(byte[]encodedRegionName, byte[]destServerName) - + boolean normalizeRegions() Perform normalization of cluster (invoked by RegionNormalizerChore). - + private int putUpJettyServer() - + void recommissionRegionServer(ServerNameserver, https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">Listbyte[]encodedRegionNames) @@ -1244,37 +1257,37 @@ implements + boolean
[22/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.NamespaceFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.NamespaceFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.NamespaceFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.NamespaceFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.NamespaceFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455return
[40/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.html b/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.html index 0c73ca5..4d6ae2f 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.html +++ b/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.html @@ -18,7 +18,7 @@ catch(err) { } //--> -var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":9,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10}; +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":9,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -110,7 +110,7 @@ var activeTableTab = "activeTableTab"; @InterfaceAudience.Private -public class RegionStates +public class RegionStates extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">Object RegionStates contains a set of Maps that describes the in-memory state of the AM, with the regions available in the system, the region in transition, the offline regions and @@ -306,208 +306,217 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html getFailedOpen(RegionInforegionInfo) +https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo +getOpenRegionsOfTable(TableNametable) + + protected RegionStates.RegionStateNode getOrCreateRegionStateNode(RegionInforegionInfo) - + RegionStates.ServerStateNode getOrCreateServer(ServerNameserverName) Be judicious calling this method. - + https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">MapRegionInfo,ServerName getRegionAssignments() - + https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">MapRegionState.State,https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo getRegionByStateOfTable(TableNametableName) - + https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionState getRegionFailedOpen() - + ServerName getRegionServerOfRegion(RegionInforegionInfo) - + https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionStates.RegionStateNode getRegionsInTransition() - + int getRegionsInTransitionCount() Get the number of regions in transition. - + https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html?is-external=true; title="class or interface in java.util">SortedSetRegionState getRegionsInTransitionOrderedByTimestamp() - + https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo getRegionsOfTable(TableNametable) - + https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo getRegionsOfTable(TableNametable, booleanoffline) - + +https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo +getRegionsOfTable(TableNametable, + https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true; title="class or interface in java.util.function">PredicateRegionStates.RegionStateNodefilter) + + https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionState getRegionsStateInTransition()
[23/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyTableFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyTableFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyTableFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyTableFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyTableFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455
[49/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/apidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html -- diff --git a/apidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html b/apidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html index b9d323c..ff7fe9a 100644 --- a/apidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html +++ b/apidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html @@ -397,7 +397,7 @@ extends getExhaustiveDescription -publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetExhaustiveDescription() +publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetExhaustiveDescription() @@ -406,7 +406,7 @@ extends classifyExs -public statichttps://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">IntegerclassifyExs(https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">Listhttps://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true; title="class or interface in java.lang">Throwableths) +public statichttps://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">IntegerclassifyExs(https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">Listhttps://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true; title="class or interface in java.lang">Throwableths) @@ -415,7 +415,7 @@ extends getDesc -public statichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetDesc(https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">Integerclassificaton) +public statichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetDesc(https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">Integerclassificaton) http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/apidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html -- diff --git a/apidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html b/apidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html index 205572e..f6a9063 100644 --- a/apidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html +++ b/apidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html @@ -125,75 +125,74 @@ 117String s = getDesc(classifyExs(exceptions)); 118StringBuilder addrs = new StringBuilder(s); 119addrs.append("servers with issues: "); -120SetString uniqAddr = new HashSet(); -121uniqAddr.addAll(hostnamePort); -122 -123for (String addr : uniqAddr) { -124 addrs.append(addr).append(", "); -125} -126return uniqAddr.isEmpty() ? addrs.toString() : addrs.substring(0, addrs.length() - 2); -127 } -128 -129 public String getExhaustiveDescription() { -130StringWriter errorWriter = new StringWriter(); -131PrintWriter pw = new PrintWriter(errorWriter); -132for (int i = 0; i this.exceptions.size(); ++i) { -133 Throwable t = this.exceptions.get(i); -134 Row action = this.actions.get(i); -135 String server =
[09/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html index 74bacd8..546d2b6 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html @@ -2249,1468 +2249,1484 @@ 2241 } 2242 2243 @Override -2244 public long addColumn( -2245 final TableName tableName, -2246 final ColumnFamilyDescriptor column, -2247 final long nonceGroup, -2248 final long nonce) -2249 throws IOException { -2250checkInitialized(); -2251checkTableExists(tableName); -2252 -2253TableDescriptor old = getTableDescriptors().get(tableName); -2254if (old.hasColumnFamily(column.getName())) { -2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() -2256 + "' in table '" + tableName + "' already exists so cannot be added"); -2257} +2244 public long addColumn(final TableName tableName, final ColumnFamilyDescriptor column, +2245 final long nonceGroup, final long nonce) throws IOException { +2246checkInitialized(); +2247checkTableExists(tableName); +2248 +2249return modifyTable(tableName, new TableDescriptorGetter() { +2250 +2251 @Override +2252 public TableDescriptor get() throws IOException { +2253TableDescriptor old = getTableDescriptors().get(tableName); +2254if (old.hasColumnFamily(column.getName())) { +2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() +2256 + "' in table '" + tableName + "' already exists so cannot be added"); +2257} 2258 -2259TableDescriptor newDesc = TableDescriptorBuilder -2260 .newBuilder(old).setColumnFamily(column).build(); -2261return modifyTable(tableName, newDesc, nonceGroup, nonce); +2259return TableDescriptorBuilder.newBuilder(old).setColumnFamily(column).build(); +2260 } +2261}, nonceGroup, nonce); 2262 } 2263 -2264 @Override -2265 public long modifyColumn( -2266 final TableName tableName, -2267 final ColumnFamilyDescriptor descriptor, -2268 final long nonceGroup, -2269 final long nonce) -2270 throws IOException { -2271checkInitialized(); -2272checkTableExists(tableName); -2273 -2274TableDescriptor old = getTableDescriptors().get(tableName); -2275if (! old.hasColumnFamily(descriptor.getName())) { -2276 throw new InvalidFamilyOperationException("Family '" + descriptor.getNameAsString() -2277 + "' does not exist, so it cannot be modified"); -2278} -2279 -2280TableDescriptor td = TableDescriptorBuilder -2281.newBuilder(old) -2282 .modifyColumnFamily(descriptor) -2283.build(); -2284 -2285return modifyTable(tableName, td, nonceGroup, nonce); -2286 } -2287 -2288 @Override -2289 public long deleteColumn( -2290 final TableName tableName, -2291 final byte[] columnName, -2292 final long nonceGroup, -2293 final long nonce) -2294 throws IOException { -2295checkInitialized(); -2296checkTableExists(tableName); -2297 -2298TableDescriptor old = getTableDescriptors().get(tableName); -2299 -2300if (! old.hasColumnFamily(columnName)) { -2301 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2302 + "' does not exist, so it cannot be deleted"); -2303} -2304if (old.getColumnFamilyCount() == 1) { -2305 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2306 + "' is the only column family in the table, so it cannot be deleted"); -2307} -2308 -2309TableDescriptor td = TableDescriptorBuilder -2310 .newBuilder(old).removeColumnFamily(columnName).build(); -2311return modifyTable(tableName, td, nonceGroup, nonce); -2312 } -2313 -2314 @Override -2315 public long enableTable(final TableName tableName, final long nonceGroup, final long nonce) -2316 throws IOException { -2317checkInitialized(); -2318 -2319return MasterProcedureUtil.submitProcedure( -2320new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) { -2321 @Override -2322 protected void run() throws IOException { -2323 getMaster().getMasterCoprocessorHost().preEnableTable(tableName); -2324 -2325// Normally, it would make sense for this authorization check to exist inside -2326// AccessController, but because the authorization check is done based on internal state -2327// (rather than
[12/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455return listTables(pattern, false); -456 } -457 -458 @Override -459 public
[26/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.EnableTableFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.EnableTableFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.EnableTableFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.EnableTableFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.EnableTableFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455
[24/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyColumnFamilyFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyColumnFamilyFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyColumnFamilyFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyColumnFamilyFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ModifyColumnFamilyFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern
[20/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455return
[03/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateNode.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateNode.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateNode.html index 541beed..1100e95 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateNode.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateNode.html @@ -42,1015 +42,1038 @@ 034import java.util.concurrent.ConcurrentHashMap; 035import java.util.concurrent.ConcurrentSkipListMap; 036import java.util.concurrent.atomic.AtomicInteger; -037 -038import org.apache.hadoop.hbase.HConstants; -039import org.apache.hadoop.hbase.ServerName; -040import org.apache.hadoop.hbase.TableName; -041import org.apache.hadoop.hbase.client.RegionInfo; -042import org.apache.hadoop.hbase.exceptions.UnexpectedStateException; -043import org.apache.hadoop.hbase.master.RegionState; -044import org.apache.hadoop.hbase.master.RegionState.State; -045import org.apache.hadoop.hbase.procedure2.ProcedureEvent; -046import org.apache.hadoop.hbase.util.Bytes; -047import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; -048import org.apache.yetus.audience.InterfaceAudience; -049import org.slf4j.Logger; -050import org.slf4j.LoggerFactory; -051import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; -052 -053/** -054 * RegionStates contains a set of Maps that describes the in-memory state of the AM, with -055 * the regions available in the system, the region in transition, the offline regions and -056 * the servers holding regions. -057 */ -058@InterfaceAudience.Private -059public class RegionStates { -060 private static final Logger LOG = LoggerFactory.getLogger(RegionStates.class); -061 -062 protected static final State[] STATES_EXPECTED_ON_OPEN = new State[] { -063State.OPEN, // State may already be OPEN if we died after receiving the OPEN from regionserver -064// but before complete finish of AssignProcedure. HBASE-20100. -065State.OFFLINE, State.CLOSED, // disable/offline -066State.SPLITTING, State.SPLIT, // ServerCrashProcedure -067State.OPENING, State.FAILED_OPEN, // already in-progress (retrying) -068 }; -069 -070 protected static final State[] STATES_EXPECTED_ON_CLOSE = new State[] { -071State.SPLITTING, State.SPLIT, State.MERGING, // ServerCrashProcedure -072State.OPEN, // enabled/open -073State.CLOSING // already in-progress (retrying) -074 }; -075 -076 private static class AssignmentProcedureEvent extends ProcedureEventRegionInfo { -077public AssignmentProcedureEvent(final RegionInfo regionInfo) { -078 super(regionInfo); -079} -080 } -081 -082 private static class ServerReportEvent extends ProcedureEventServerName { -083public ServerReportEvent(final ServerName serverName) { -084 super(serverName); -085} -086 } -087 -088 /** -089 * Current Region State. -090 * In-memory only. Not persisted. -091 */ -092 // Mutable/Immutable? Changes have to be synchronized or not? -093 // Data members are volatile which seems to say multi-threaded access is fine. -094 // In the below we do check and set but the check state could change before -095 // we do the set because no synchronizationwhich seems dodgy. Clear up -096 // understanding here... how many threads accessing? Do locks make it so one -097 // thread at a time working on a single Region's RegionStateNode? Lets presume -098 // so for now. Odd is that elsewhere in this RegionStates, we synchronize on -099 // the RegionStateNode instance. TODO. -100 public static class RegionStateNode implements ComparableRegionStateNode { -101private final RegionInfo regionInfo; -102private final ProcedureEvent? event; -103 -104private volatile RegionTransitionProcedure procedure = null; -105private volatile ServerName regionLocation = null; -106private volatile ServerName lastHost = null; -107/** -108 * A Region-in-Transition (RIT) moves through states. -109 * See {@link State} for complete list. A Region that -110 * is opened moves from OFFLINE = OPENING = OPENED. -111 */ -112private volatile State state = State.OFFLINE; -113 -114/** -115 * Updated whenever a call to {@link #setRegionLocation(ServerName)} -116 * or {@link #setState(State, State...)}. -117 */ -118private volatile long lastUpdate = 0; -119 -120private volatile long openSeqNum = HConstants.NO_SEQNUM; -121 -122public RegionStateNode(final RegionInfo regionInfo) { -123 this.regionInfo = regionInfo; -124 this.event = new
[13/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TruncateTableFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TruncateTableFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TruncateTableFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TruncateTableFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TruncateTableFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws
[50/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/apache_hbase_reference_guide.pdf -- diff --git a/apache_hbase_reference_guide.pdf b/apache_hbase_reference_guide.pdf index e443db0..f22668b 100644 --- a/apache_hbase_reference_guide.pdf +++ b/apache_hbase_reference_guide.pdf @@ -5,8 +5,8 @@ /Author (Apache HBase Team) /Creator (Asciidoctor PDF 1.5.0.alpha.15, based on Prawn 2.2.2) /Producer (Apache HBase Team) -/ModDate (D:20180620040607+00'00') -/CreationDate (D:20180620042140+00'00') +/ModDate (D:20180621050948+00'00') +/CreationDate (D:20180621052600+00'00') >> endobj 2 0 obj @@ -428336,7 +428336,7 @@ endobj >> endobj 2220 0 obj -<< /Length 6817 +<< /Length 3367 >> stream q @@ -428382,85 +428382,10 @@ ET 0.2 0.2 0.2 scn 0.2 0.2 0.2 SCN -2.3091 Tw - BT 48.24 697.346 Td /F1.0 10.5 Tf -[<4a4152732072657175697265642062> 20.0195 <7920796f757220636f64652e2046697273742c207573652074686520666f6c6c6f77696e6720636f6d6d616e64206f6e2061207365727665722072756e6e696e6720746865204842617365>] TJ -ET - - -0.0 Tw -0.0 0.0 0.0 SCN -0.0 0.0 0.0 scn -0.2 0.2 0.2 scn -0.2 0.2 0.2 SCN - -BT -48.24 681.566 Td -/F1.0 10.5 Tf -<526567696f6e5365727665722070726f636573732c20746f20676574204842617365d57320636c617373706174682e> Tj -ET - -0.0 0.0 0.0 SCN -0.0 0.0 0.0 scn -q -0.9608 0.9608 0.9608 scn -52.24 665.75 m -543.04 665.75 l -545.2491 665.75 547.04 663.9591 547.04 661.75 c -547.04 588.79 l -547.04 586.5809 545.2491 584.79 543.04 584.79 c -52.24 584.79 l -50.0309 584.79 48.24 586.5809 48.24 588.79 c -48.24 661.75 l -48.24 663.9591 50.0309 665.75 52.24 665.75 c -h -f -0.8 0.8 0.8 SCN -0.75 w -52.24 665.75 m -543.04 665.75 l -545.2491 665.75 547.04 663.9591 547.04 661.75 c -547.04 588.79 l -547.04 586.5809 545.2491 584.79 543.04 584.79 c -52.24 584.79 l -50.0309 584.79 48.24 586.5809 48.24 588.79 c -48.24 661.75 l -48.24 663.9591 50.0309 665.75 52.24 665.75 c -h -S -Q -0.2 0.2 0.2 scn -0.2 0.2 0.2 SCN - -BT -59.24 642.925 Td -/F4.0 11 Tf -<2420707320617578207c6772657020726567696f6e7365727665727c2061776b202d4620276a6176612e6c6962726172792e706174683d27207b277072696e74202432277d207c2061776b207b277072696e74> Tj -ET - -0.0 0.0 0.0 SCN -0.0 0.0 0.0 scn -0.2 0.2 0.2 scn -0.2 0.2 0.2 SCN - -BT -59.24 628.185 Td -/F4.0 11 Tf -<2431277d> Tj -ET - -0.0 0.0 0.0 SCN -0.0 0.0 0.0 scn -0.2 0.2 0.2 scn -0.2 0.2 0.2 SCN - -BT -59.24 598.705 Td -/F4.0 11 Tf -<2f7573722f6c69622f6861646f6f702f6c69622f6e61746976653a2f7573722f6c69622f68626173652f6c69622f6e61746976652f4c696e75782d616d6436342d3634> Tj +[<4a4152732072657175697265642062> 20.0195 <7920796f757220636f64652e>] TJ ET 0.0 0.0 0.0 SCN @@ -428468,12 +428393,12 @@ ET 0.2 0.2 0.2 scn 0.2 0.2 0.2 SCN -0.03 Tw +0.9408 Tw BT -48.24 560.826 Td +48.24 669.566 Td /F1.0 10.5 Tf -<5365742074686520> Tj +<53657420746865207061746820746f206469726563746f727920636f6e7461696e696e672074686520> Tj ET @@ -428483,12 +428408,12 @@ ET 0.6941 0.1294 0.2745 scn 0.6941 0.1294 0.2745 SCN -0.03 Tw +0.9408 Tw BT -84.7246 560.826 Td +252.8869 669.566 Td /F4.0 10.5 Tf -<24434c41535350415448> Tj +<6a7974686f6e2e6a6172> Tj ET @@ -428498,12 +428423,12 @@ ET 0.2 0.2 0.2 scn 0.2 0.2 0.2 SCN -0.03 Tw +0.9408 Tw BT -137.2246 560.826 Td +305.3869 669.566 Td /F1.0 10.5 Tf -<20656e7669726f6e6d656e74207661726961626c6520746f20696e636c75646520746865207061746820796f7520666f756e6420696e207468652070726576696f757320737465702c20706c757320746865> Tj +<20616e642065616368206164646974696f6e616c204a7974686f6e2d72656c61746564204a4152206e6565646564> Tj ET @@ -428514,59 +428439,37 @@ ET 0.2 0.2 0.2 SCN BT -48.24 545.046 Td -/F1.0 10.5 Tf -<7061746820746f20> Tj -ET - -0.0 0.0 0.0 SCN -0.0 0.0 0.0 scn -0.6941 0.1294 0.2745 scn -0.6941 0.1294 0.2745 SCN - -BT -86.124 545.046 Td -/F4.0 10.5 Tf -<6a7974686f6e2e6a6172> Tj -ET - -0.0 0.0 0.0 SCN -0.0 0.0 0.0 scn -0.2 0.2 0.2 scn -0.2 0.2 0.2 SCN - -BT -138.624 545.046 Td +48.24 653.786 Td /F1.0 10.5 Tf -<20616e642065616368206164646974696f6e616c204a7974686f6e2d72656c61746564204a4152206e656564656420666f7220796f75722070726f6a6563742e> Tj +[<666f7220796f75722070726f6a6563742e205468656e206578706f7274204842> 20.0195 <4153455f434c41535350> 49.8047 <41> 60.0586 <544820706f696e74696e6720746f2074686520244a5954484f4e5f484f4d4520656e76> 69.8242 <2e207661726961626c652e>] TJ ET 0.0 0.0 0.0 SCN 0.0 0.0 0.0 scn q 0.9608 0.9608 0.9608 scn -52.24 529.23 m -543.04 529.23 l -545.2491 529.23 547.04 527.4391 547.04 525.23 c -547.04 467.01 l -547.04 464.8009 545.2491 463.01 543.04 463.01 c -52.24 463.01 l -50.0309 463.01 48.24 464.8009 48.24 467.01 c -48.24 525.23 l -48.24 527.4391 50.0309 529.23 52.24 529.23 c +52.24 637.97 m +543.04 637.97 l +545.2491 637.97 547.04 636.1791 547.04 633.97 c +547.04 605.23 l +547.04 603.0209 545.2491 601.23 543.04 601.23 c +52.24 601.23 l +50.0309 601.23 48.24 603.0209 48.24 605.23 c +48.24 633.97 l +48.24 636.1791 50.0309 637.97 52.24
[43/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html b/devapidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html index aecb193..c09ca5b 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html +++ b/devapidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html @@ -474,7 +474,7 @@ extends getExhaustiveDescription -publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetExhaustiveDescription() +publichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetExhaustiveDescription() @@ -483,7 +483,7 @@ extends classifyExs -public statichttps://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">IntegerclassifyExs(https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">Listhttps://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true; title="class or interface in java.lang">Throwableths) +public statichttps://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">IntegerclassifyExs(https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">Listhttps://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true; title="class or interface in java.lang">Throwableths) @@ -492,7 +492,7 @@ extends getDesc -public statichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetDesc(https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">Integerclassificaton) +public statichttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringgetDesc(https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true; title="class or interface in java.lang">Integerclassificaton) http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/class-use/RegionInfo.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/class-use/RegionInfo.html b/devapidocs/org/apache/hadoop/hbase/client/class-use/RegionInfo.html index 41db305..6cc6d96 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/class-use/RegionInfo.html +++ b/devapidocs/org/apache/hadoop/hbase/client/class-use/RegionInfo.html @@ -2857,26 +2857,35 @@ Input/OutputFormats, a table indexing MapReduce job, and utility methods. AssignmentManager.getMetaRegionSet() +https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo +RegionStates.getOpenRegionsOfTable(TableNametable) + + https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">MapRegionInfo,ServerName RegionStates.getRegionAssignments() - + https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">MapRegionState.State,https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo RegionStates.getRegionByStateOfTable(TableNametableName) - +
[44/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html index d57ab81..5d06422 100644 --- a/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html +++ b/devapidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html @@ -2270,7 +2270,7 @@ implements listTableDescriptorsByNamespace -publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListTableDescriptorlistTableDescriptorsByNamespace(byte[]name) +publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListTableDescriptorlistTableDescriptorsByNamespace(byte[]name) throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Description copied from interface:Admin Get list of table descriptors by namespace. @@ -2292,7 +2292,7 @@ implements listTableDescriptors -publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListTableDescriptorlistTableDescriptors(https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListTableNametableNames) +publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListTableDescriptorlistTableDescriptors(https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListTableNametableNames) throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Description copied from interface:Admin Get tableDescriptors. @@ -2314,7 +2314,7 @@ implements getRegions -publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfogetRegions(ServerNamesn) +publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfogetRegions(ServerNamesn) throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Description copied from interface:Admin Get all the online regions on a region server. @@ -2334,7 +2334,7 @@ implements getRegions -publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfogetRegions(TableNametableName) +publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfogetRegions(TableNametableName) throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Description copied from interface:Admin Get the regions of a given table. @@ -2356,7 +2356,7 @@ implements getConnection -publicConnectiongetConnection() +publicConnectiongetConnection() Specified by: getConnectionin interfaceAdmin @@ -2371,7 +2371,7 @@ implements tableExists -publicbooleantableExists(TableNametableName) +publicbooleantableExists(TableNametableName) throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Specified by: @@ -2391,7 +2391,7 @@ implements listTables -publicHTableDescriptor[]listTables() +publicHTableDescriptor[]listTables() throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Description copied from interface:Admin List all the userspace tables. @@ -2413,7 +2413,7 @@ implements listTables -publicHTableDescriptor[]listTables(https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html?is-external=true; title="class or interface in java.util.regex">Patternpattern) +publicHTableDescriptor[]listTables(https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html?is-external=true; title="class or interface in java.util.regex">Patternpattern) throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Description copied from interface:Admin List all the userspace tables that match the given
[11/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html index 205572e..f6a9063 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html @@ -125,75 +125,74 @@ 117String s = getDesc(classifyExs(exceptions)); 118StringBuilder addrs = new StringBuilder(s); 119addrs.append("servers with issues: "); -120SetString uniqAddr = new HashSet(); -121uniqAddr.addAll(hostnamePort); -122 -123for (String addr : uniqAddr) { -124 addrs.append(addr).append(", "); -125} -126return uniqAddr.isEmpty() ? addrs.toString() : addrs.substring(0, addrs.length() - 2); -127 } -128 -129 public String getExhaustiveDescription() { -130StringWriter errorWriter = new StringWriter(); -131PrintWriter pw = new PrintWriter(errorWriter); -132for (int i = 0; i this.exceptions.size(); ++i) { -133 Throwable t = this.exceptions.get(i); -134 Row action = this.actions.get(i); -135 String server = this.hostnameAndPort.get(i); -136 pw.append("exception"); -137 if (this.exceptions.size() 1) { -138pw.append(" #" + i); -139 } -140 pw.append(" from " + server + " for " -141+ ((action == null) ? "unknown key" : Bytes.toStringBinary(action.getRow(; -142 if (t != null) { -143pw.println(); -144t.printStackTrace(pw); -145 } -146} -147pw.flush(); -148return errorWriter.toString(); -149 } +120SetString uniqAddr = new HashSet(hostnamePort); +121 +122for (String addr : uniqAddr) { +123 addrs.append(addr).append(", "); +124} +125return uniqAddr.isEmpty() ? addrs.toString() : addrs.substring(0, addrs.length() - 2); +126 } +127 +128 public String getExhaustiveDescription() { +129StringWriter errorWriter = new StringWriter(); +130PrintWriter pw = new PrintWriter(errorWriter); +131for (int i = 0; i this.exceptions.size(); ++i) { +132 Throwable t = this.exceptions.get(i); +133 Row action = this.actions.get(i); +134 String server = this.hostnameAndPort.get(i); +135 pw.append("exception"); +136 if (this.exceptions.size() 1) { +137pw.append(" #" + i); +138 } +139 pw.append(" from " + server + " for " +140+ ((action == null) ? "unknown key" : Bytes.toStringBinary(action.getRow(; +141 if (t != null) { +142pw.println(); +143t.printStackTrace(pw); +144 } +145} +146pw.flush(); +147return errorWriter.toString(); +148 } +149 150 -151 -152 public static MapString, Integer classifyExs(ListThrowable ths) { -153MapString, Integer cls = new HashMap(); -154for (Throwable t : ths) { -155 if (t == null) continue; -156 String name = ""; -157 if (t instanceof DoNotRetryIOException || -158 t instanceof RegionTooBusyException) { -159// If RegionTooBusyException, print message since it has Region name in it. -160// RegionTooBusyException message was edited to remove variance. Has regionname, server, -161// and why the exception; no longer has duration it waited on lock nor current memsize. -162name = t.getMessage(); -163 } else { -164name = t.getClass().getSimpleName(); -165 } -166 Integer i = cls.get(name); -167 if (i == null) { -168i = 0; -169 } -170 i += 1; -171 cls.put(name, i); -172} -173return cls; -174 } -175 -176 public static String getDesc(MapString,Integer classificaton) { -177StringBuilder classificatons =new StringBuilder(11); -178for (Map.EntryString, Integer e : classificaton.entrySet()) { -179 classificatons.append(e.getKey()); -180 classificatons.append(": "); -181 classificatons.append(e.getValue()); -182 classificatons.append(" time"); -183 classificatons.append(pluralize(e.getValue())); -184 classificatons.append(", "); -185} -186return classificatons.toString(); -187 } -188} +151 public static MapString, Integer classifyExs(ListThrowable ths) { +152MapString, Integer cls = new HashMap(); +153for (Throwable t : ths) { +154 if (t == null) continue; +155 String name = ""; +156 if (t instanceof DoNotRetryIOException || +157 t instanceof RegionTooBusyException) { +158// If RegionTooBusyException, print message since it has Region name in it. +159// RegionTooBusyException message was edited to remove variance. Has regionname,
[51/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
Published site at 72784c2d836a4b977667449d3adec5e8d15453f5. Project: http://git-wip-us.apache.org/repos/asf/hbase-site/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase-site/commit/2b11656f Tree: http://git-wip-us.apache.org/repos/asf/hbase-site/tree/2b11656f Diff: http://git-wip-us.apache.org/repos/asf/hbase-site/diff/2b11656f Branch: refs/heads/asf-site Commit: 2b11656ff164bae689ab1519ac787f544f8a506d Parents: cb3a62e Author: jenkins Authored: Thu Jun 21 05:28:52 2018 + Committer: jenkins Committed: Thu Jun 21 05:28:52 2018 + -- acid-semantics.html | 4 +- apache_hbase_reference_guide.pdf| 6564 +++--- .../RetriesExhaustedWithDetailsException.html | 6 +- .../RetriesExhaustedWithDetailsException.html | 135 +- book.html | 105 +- bulk-loads.html | 4 +- checkstyle-aggregate.html | 18506 - checkstyle.rss |26 +- coc.html| 4 +- dependencies.html | 4 +- dependency-convergence.html | 4 +- dependency-info.html| 4 +- dependency-management.html | 4 +- devapidocs/allclasses-frame.html| 1 + devapidocs/allclasses-noframe.html | 1 + devapidocs/constant-values.html | 6 +- devapidocs/index-all.html |40 +- .../hadoop/hbase/class-use/ServerName.html |21 +- .../hadoop/hbase/class-use/TableName.html | 116 +- .../client/HBaseAdmin.AbortProcedureFuture.html | 8 +- .../HBaseAdmin.AddColumnFamilyFuture.html | 6 +- .../client/HBaseAdmin.CreateTableFuture.html|14 +- .../HBaseAdmin.DeleteColumnFamilyFuture.html| 6 +- .../client/HBaseAdmin.DeleteTableFuture.html|10 +- .../client/HBaseAdmin.DisableTableFuture.html | 8 +- .../client/HBaseAdmin.EnableTableFuture.html| 8 +- .../HBaseAdmin.MergeTableRegionsFuture.html | 8 +- .../HBaseAdmin.ModifyColumnFamilyFuture.html| 6 +- .../client/HBaseAdmin.ModifyTableFuture.html|10 +- .../client/HBaseAdmin.NamespaceFuture.html |12 +- ...in.ProcedureFuture.WaitForStateCallable.html | 8 +- .../client/HBaseAdmin.ProcedureFuture.html |48 +- .../client/HBaseAdmin.ReplicationFuture.html|10 +- .../HBaseAdmin.RestoreSnapshotFuture.html | 8 +- .../HBaseAdmin.SplitTableRegionFuture.html | 8 +- ...n.TableFuture.TableWaitForStateCallable.html | 8 +- .../hbase/client/HBaseAdmin.TableFuture.html|30 +- .../client/HBaseAdmin.ThrowableAbortable.html | 8 +- .../client/HBaseAdmin.TruncateTableFuture.html |10 +- .../apache/hadoop/hbase/client/HBaseAdmin.html | 446 +- .../RetriesExhaustedWithDetailsException.html | 6 +- .../hbase/client/class-use/RegionInfo.html |43 +- .../hbase/client/class-use/TableDescriptor.html | 6 +- .../hadoop/hbase/client/package-tree.html |22 +- .../hadoop/hbase/executor/package-tree.html | 2 +- .../hadoop/hbase/filter/package-tree.html | 8 +- .../hadoop/hbase/io/hfile/package-tree.html | 6 +- .../apache/hadoop/hbase/ipc/package-tree.html | 4 +- .../hadoop/hbase/mapreduce/package-tree.html| 2 +- .../master/HMaster.MasterStoppedException.html | 4 +- .../hbase/master/HMaster.RedirectServlet.html | 4 +- .../master/HMaster.TableDescriptorGetter.html | 232 + .../org/apache/hadoop/hbase/master/HMaster.html | 300 +- .../master/HMasterCommandLine.LocalHMaster.html | 2 +- .../hadoop/hbase/master/HMasterCommandLine.html | 4 +- .../MasterRpcServices.BalanceSwitchMode.html| 4 +- .../RegionStates.AssignmentProcedureEvent.html | 4 +- .../RegionStates.RegionFailedOpen.html |22 +- .../RegionStates.RegionStateNode.html |78 +- ...RegionStates.RegionStateStampComparator.html | 6 +- .../RegionStates.ServerReportEvent.html | 4 +- .../assignment/RegionStates.ServerState.html|12 +- .../RegionStates.ServerStateNode.html |40 +- .../hbase/master/assignment/RegionStates.html | 266 +- .../class-use/RegionStates.RegionStateNode.html | 5 + .../hbase/master/balancer/package-tree.html | 2 +- .../HMaster.TableDescriptorGetter.html | 168 + .../hadoop/hbase/master/package-frame.html | 1 + .../hadoop/hbase/master/package-summary.html|32 +- .../hadoop/hbase/master/package-tree.html | 7 +- .../apache/hadoop/hbase/master/package-use.html |89 +- .../hbase/master/procedure/FairQueue.html | 4 +-
[17/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.SplitTableRegionFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.SplitTableRegionFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.SplitTableRegionFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.SplitTableRegionFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.SplitTableRegionFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern)
[10/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html index 74bacd8..546d2b6 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html @@ -2249,1468 +2249,1484 @@ 2241 } 2242 2243 @Override -2244 public long addColumn( -2245 final TableName tableName, -2246 final ColumnFamilyDescriptor column, -2247 final long nonceGroup, -2248 final long nonce) -2249 throws IOException { -2250checkInitialized(); -2251checkTableExists(tableName); -2252 -2253TableDescriptor old = getTableDescriptors().get(tableName); -2254if (old.hasColumnFamily(column.getName())) { -2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() -2256 + "' in table '" + tableName + "' already exists so cannot be added"); -2257} +2244 public long addColumn(final TableName tableName, final ColumnFamilyDescriptor column, +2245 final long nonceGroup, final long nonce) throws IOException { +2246checkInitialized(); +2247checkTableExists(tableName); +2248 +2249return modifyTable(tableName, new TableDescriptorGetter() { +2250 +2251 @Override +2252 public TableDescriptor get() throws IOException { +2253TableDescriptor old = getTableDescriptors().get(tableName); +2254if (old.hasColumnFamily(column.getName())) { +2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() +2256 + "' in table '" + tableName + "' already exists so cannot be added"); +2257} 2258 -2259TableDescriptor newDesc = TableDescriptorBuilder -2260 .newBuilder(old).setColumnFamily(column).build(); -2261return modifyTable(tableName, newDesc, nonceGroup, nonce); +2259return TableDescriptorBuilder.newBuilder(old).setColumnFamily(column).build(); +2260 } +2261}, nonceGroup, nonce); 2262 } 2263 -2264 @Override -2265 public long modifyColumn( -2266 final TableName tableName, -2267 final ColumnFamilyDescriptor descriptor, -2268 final long nonceGroup, -2269 final long nonce) -2270 throws IOException { -2271checkInitialized(); -2272checkTableExists(tableName); -2273 -2274TableDescriptor old = getTableDescriptors().get(tableName); -2275if (! old.hasColumnFamily(descriptor.getName())) { -2276 throw new InvalidFamilyOperationException("Family '" + descriptor.getNameAsString() -2277 + "' does not exist, so it cannot be modified"); -2278} -2279 -2280TableDescriptor td = TableDescriptorBuilder -2281.newBuilder(old) -2282 .modifyColumnFamily(descriptor) -2283.build(); -2284 -2285return modifyTable(tableName, td, nonceGroup, nonce); -2286 } -2287 -2288 @Override -2289 public long deleteColumn( -2290 final TableName tableName, -2291 final byte[] columnName, -2292 final long nonceGroup, -2293 final long nonce) -2294 throws IOException { -2295checkInitialized(); -2296checkTableExists(tableName); -2297 -2298TableDescriptor old = getTableDescriptors().get(tableName); -2299 -2300if (! old.hasColumnFamily(columnName)) { -2301 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2302 + "' does not exist, so it cannot be deleted"); -2303} -2304if (old.getColumnFamilyCount() == 1) { -2305 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2306 + "' is the only column family in the table, so it cannot be deleted"); -2307} -2308 -2309TableDescriptor td = TableDescriptorBuilder -2310 .newBuilder(old).removeColumnFamily(columnName).build(); -2311return modifyTable(tableName, td, nonceGroup, nonce); -2312 } -2313 -2314 @Override -2315 public long enableTable(final TableName tableName, final long nonceGroup, final long nonce) -2316 throws IOException { -2317checkInitialized(); -2318 -2319return MasterProcedureUtil.submitProcedure( -2320new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) { -2321 @Override -2322 protected void run() throws IOException { -2323 getMaster().getMasterCoprocessorHost().preEnableTable(tableName); -2324 -2325// Normally, it would make sense for this authorization check to exist inside -2326// AccessController, but because the authorization check is done based on internal state -2327// (rather than
[19/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ReplicationFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455
[08/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.RedirectServlet.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.RedirectServlet.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.RedirectServlet.html index 74bacd8..546d2b6 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.RedirectServlet.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.RedirectServlet.html @@ -2249,1468 +2249,1484 @@ 2241 } 2242 2243 @Override -2244 public long addColumn( -2245 final TableName tableName, -2246 final ColumnFamilyDescriptor column, -2247 final long nonceGroup, -2248 final long nonce) -2249 throws IOException { -2250checkInitialized(); -2251checkTableExists(tableName); -2252 -2253TableDescriptor old = getTableDescriptors().get(tableName); -2254if (old.hasColumnFamily(column.getName())) { -2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() -2256 + "' in table '" + tableName + "' already exists so cannot be added"); -2257} +2244 public long addColumn(final TableName tableName, final ColumnFamilyDescriptor column, +2245 final long nonceGroup, final long nonce) throws IOException { +2246checkInitialized(); +2247checkTableExists(tableName); +2248 +2249return modifyTable(tableName, new TableDescriptorGetter() { +2250 +2251 @Override +2252 public TableDescriptor get() throws IOException { +2253TableDescriptor old = getTableDescriptors().get(tableName); +2254if (old.hasColumnFamily(column.getName())) { +2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() +2256 + "' in table '" + tableName + "' already exists so cannot be added"); +2257} 2258 -2259TableDescriptor newDesc = TableDescriptorBuilder -2260 .newBuilder(old).setColumnFamily(column).build(); -2261return modifyTable(tableName, newDesc, nonceGroup, nonce); +2259return TableDescriptorBuilder.newBuilder(old).setColumnFamily(column).build(); +2260 } +2261}, nonceGroup, nonce); 2262 } 2263 -2264 @Override -2265 public long modifyColumn( -2266 final TableName tableName, -2267 final ColumnFamilyDescriptor descriptor, -2268 final long nonceGroup, -2269 final long nonce) -2270 throws IOException { -2271checkInitialized(); -2272checkTableExists(tableName); -2273 -2274TableDescriptor old = getTableDescriptors().get(tableName); -2275if (! old.hasColumnFamily(descriptor.getName())) { -2276 throw new InvalidFamilyOperationException("Family '" + descriptor.getNameAsString() -2277 + "' does not exist, so it cannot be modified"); -2278} -2279 -2280TableDescriptor td = TableDescriptorBuilder -2281.newBuilder(old) -2282 .modifyColumnFamily(descriptor) -2283.build(); -2284 -2285return modifyTable(tableName, td, nonceGroup, nonce); -2286 } -2287 -2288 @Override -2289 public long deleteColumn( -2290 final TableName tableName, -2291 final byte[] columnName, -2292 final long nonceGroup, -2293 final long nonce) -2294 throws IOException { -2295checkInitialized(); -2296checkTableExists(tableName); -2297 -2298TableDescriptor old = getTableDescriptors().get(tableName); -2299 -2300if (! old.hasColumnFamily(columnName)) { -2301 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2302 + "' does not exist, so it cannot be deleted"); -2303} -2304if (old.getColumnFamilyCount() == 1) { -2305 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2306 + "' is the only column family in the table, so it cannot be deleted"); -2307} -2308 -2309TableDescriptor td = TableDescriptorBuilder -2310 .newBuilder(old).removeColumnFamily(columnName).build(); -2311return modifyTable(tableName, td, nonceGroup, nonce); -2312 } -2313 -2314 @Override -2315 public long enableTable(final TableName tableName, final long nonceGroup, final long nonce) -2316 throws IOException { -2317checkInitialized(); -2318 -2319return MasterProcedureUtil.submitProcedure( -2320new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) { -2321 @Override -2322 protected void run() throws IOException { -2323 getMaster().getMasterCoprocessorHost().preEnableTable(tableName); -2324 -2325// Normally, it would make sense for this authorization check to exist inside -2326// AccessController, but because the authorization check is done based on internal state -2327// (rather than explicit permissions) we'll do
[01/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
Repository: hbase-site Updated Branches: refs/heads/asf-site cb3a62e7c -> 2b11656ff http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.ServerReportEvent.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.ServerReportEvent.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.ServerReportEvent.html index 541beed..1100e95 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.ServerReportEvent.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.ServerReportEvent.html @@ -42,1015 +42,1038 @@ 034import java.util.concurrent.ConcurrentHashMap; 035import java.util.concurrent.ConcurrentSkipListMap; 036import java.util.concurrent.atomic.AtomicInteger; -037 -038import org.apache.hadoop.hbase.HConstants; -039import org.apache.hadoop.hbase.ServerName; -040import org.apache.hadoop.hbase.TableName; -041import org.apache.hadoop.hbase.client.RegionInfo; -042import org.apache.hadoop.hbase.exceptions.UnexpectedStateException; -043import org.apache.hadoop.hbase.master.RegionState; -044import org.apache.hadoop.hbase.master.RegionState.State; -045import org.apache.hadoop.hbase.procedure2.ProcedureEvent; -046import org.apache.hadoop.hbase.util.Bytes; -047import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; -048import org.apache.yetus.audience.InterfaceAudience; -049import org.slf4j.Logger; -050import org.slf4j.LoggerFactory; -051import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; -052 -053/** -054 * RegionStates contains a set of Maps that describes the in-memory state of the AM, with -055 * the regions available in the system, the region in transition, the offline regions and -056 * the servers holding regions. -057 */ -058@InterfaceAudience.Private -059public class RegionStates { -060 private static final Logger LOG = LoggerFactory.getLogger(RegionStates.class); -061 -062 protected static final State[] STATES_EXPECTED_ON_OPEN = new State[] { -063State.OPEN, // State may already be OPEN if we died after receiving the OPEN from regionserver -064// but before complete finish of AssignProcedure. HBASE-20100. -065State.OFFLINE, State.CLOSED, // disable/offline -066State.SPLITTING, State.SPLIT, // ServerCrashProcedure -067State.OPENING, State.FAILED_OPEN, // already in-progress (retrying) -068 }; -069 -070 protected static final State[] STATES_EXPECTED_ON_CLOSE = new State[] { -071State.SPLITTING, State.SPLIT, State.MERGING, // ServerCrashProcedure -072State.OPEN, // enabled/open -073State.CLOSING // already in-progress (retrying) -074 }; -075 -076 private static class AssignmentProcedureEvent extends ProcedureEventRegionInfo { -077public AssignmentProcedureEvent(final RegionInfo regionInfo) { -078 super(regionInfo); -079} -080 } -081 -082 private static class ServerReportEvent extends ProcedureEventServerName { -083public ServerReportEvent(final ServerName serverName) { -084 super(serverName); -085} -086 } -087 -088 /** -089 * Current Region State. -090 * In-memory only. Not persisted. -091 */ -092 // Mutable/Immutable? Changes have to be synchronized or not? -093 // Data members are volatile which seems to say multi-threaded access is fine. -094 // In the below we do check and set but the check state could change before -095 // we do the set because no synchronizationwhich seems dodgy. Clear up -096 // understanding here... how many threads accessing? Do locks make it so one -097 // thread at a time working on a single Region's RegionStateNode? Lets presume -098 // so for now. Odd is that elsewhere in this RegionStates, we synchronize on -099 // the RegionStateNode instance. TODO. -100 public static class RegionStateNode implements ComparableRegionStateNode { -101private final RegionInfo regionInfo; -102private final ProcedureEvent? event; -103 -104private volatile RegionTransitionProcedure procedure = null; -105private volatile ServerName regionLocation = null; -106private volatile ServerName lastHost = null; -107/** -108 * A Region-in-Transition (RIT) moves through states. -109 * See {@link State} for complete list. A Region that -110 * is opened moves from OFFLINE = OPENING = OPENED. -111 */ -112private volatile State state = State.OFFLINE; -113 -114/** -115 * Updated whenever a call to {@link #setRegionLocation(ServerName)} -116 * or {@link #setState(State, State...)}. -117 */ -118private volatile long lastUpdate = 0; -119 -120private volatile long openSeqNum = HConstants.NO_SEQNUM; -121 -122public RegionStateNode(final
[35/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/procedure/package-tree.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/procedure/package-tree.html b/devapidocs/org/apache/hadoop/hbase/master/procedure/package-tree.html index 569f158..c14674a 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/procedure/package-tree.html +++ b/devapidocs/org/apache/hadoop/hbase/master/procedure/package-tree.html @@ -216,10 +216,10 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true; title="class or interface in java.lang">EnumE (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true; title="class or interface in java.lang">ComparableT, java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) -org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface.ServerOperationType -org.apache.hadoop.hbase.master.procedure.PeerProcedureInterface.PeerOperationType org.apache.hadoop.hbase.master.procedure.MetaProcedureInterface.MetaOperationType org.apache.hadoop.hbase.master.procedure.TableProcedureInterface.TableOperationType +org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface.ServerOperationType +org.apache.hadoop.hbase.master.procedure.PeerProcedureInterface.PeerOperationType http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/package-tree.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/package-tree.html b/devapidocs/org/apache/hadoop/hbase/package-tree.html index f9cbc02..ca8b6f4 100644 --- a/devapidocs/org/apache/hadoop/hbase/package-tree.html +++ b/devapidocs/org/apache/hadoop/hbase/package-tree.html @@ -437,19 +437,19 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true; title="class or interface in java.lang">EnumE (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true; title="class or interface in java.lang">ComparableT, java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) -org.apache.hadoop.hbase.KeepDeletedCells -org.apache.hadoop.hbase.CompatibilitySingletonFactory.SingletonStorage -org.apache.hadoop.hbase.Cell.Type -org.apache.hadoop.hbase.Coprocessor.State -org.apache.hadoop.hbase.CompareOperator +org.apache.hadoop.hbase.Size.Unit org.apache.hadoop.hbase.HealthChecker.HealthCheckerExitStatus -org.apache.hadoop.hbase.ClusterMetrics.Option -org.apache.hadoop.hbase.MemoryCompactionPolicy -org.apache.hadoop.hbase.HConstants.OperationStatusCode +org.apache.hadoop.hbase.CellBuilderType +org.apache.hadoop.hbase.CompareOperator org.apache.hadoop.hbase.MetaTableAccessor.QueryType -org.apache.hadoop.hbase.Size.Unit +org.apache.hadoop.hbase.Coprocessor.State +org.apache.hadoop.hbase.MemoryCompactionPolicy +org.apache.hadoop.hbase.ClusterMetrics.Option +org.apache.hadoop.hbase.KeepDeletedCells org.apache.hadoop.hbase.KeyValue.Type -org.apache.hadoop.hbase.CellBuilderType +org.apache.hadoop.hbase.Cell.Type +org.apache.hadoop.hbase.CompatibilitySingletonFactory.SingletonStorage +org.apache.hadoop.hbase.HConstants.OperationStatusCode http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockAndQueue.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockAndQueue.html b/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockAndQueue.html index b390ec2..76e04b9 100644 --- a/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockAndQueue.html +++ b/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockAndQueue.html @@ -188,6 +188,10 @@ (package private) LockAndQueue +SchemaLocking.removeServerLock(ServerNameserverName) + + +(package private) LockAndQueue SchemaLocking.removeTableLock(TableNametableName) http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockStatus.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockStatus.html b/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockStatus.html index edb9eee..6547f3c 100644 --- a/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockStatus.html +++ b/devapidocs/org/apache/hadoop/hbase/procedure2/class-use/LockStatus.html @@ -154,7 +154,8 @@ LockStatuslockStatus) -ServerQueue(ServerNameserverName, +ServerQueue(ServerNameserverName, +
[36/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/procedure/class-use/MasterProcedureEnv.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/procedure/class-use/MasterProcedureEnv.html b/devapidocs/org/apache/hadoop/hbase/master/procedure/class-use/MasterProcedureEnv.html index 15337a1..cf7a1b6 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/procedure/class-use/MasterProcedureEnv.html +++ b/devapidocs/org/apache/hadoop/hbase/master/procedure/class-use/MasterProcedureEnv.html @@ -1302,38 +1302,46 @@ ProcedureSyncWait.getMasterQuotaManager(MasterProcedureEnvenv) +private https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo +ModifyTableProcedure.getOpenRegionInfoList(MasterProcedureEnvenv) +Fetches all open or soon to be open Regions for a table. + + + protected ProcedureMetrics ServerCrashProcedure.getProcedureMetrics(MasterProcedureEnvenv) - + protected org.apache.hadoop.fs.Path AbstractStateMachineTableProcedure.getRegionDir(MasterProcedureEnvenv, RegionInforegion) - + private https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo -ModifyTableProcedure.getRegionInfoList(MasterProcedureEnvenv) +ModifyTableProcedure.getRegionInfoList(MasterProcedureEnvenv) +Fetches all Regions for a table. + - + private TableNamespaceManager ModifyNamespaceProcedure.getTableNamespaceManager(MasterProcedureEnvenv) - + private static TableNamespaceManager CreateNamespaceProcedure.getTableNamespaceManager(MasterProcedureEnvenv) - + private static TableNamespaceManager DeleteNamespaceProcedure.getTableNamespaceManager(MasterProcedureEnvenv) - + private https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo ServerCrashProcedure.handleRIT(MasterProcedureEnvenv, https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInforegions) Handle any outstanding RIT that are up against this.serverName, the crashed server. - + private void RecoverMetaProcedure.handleRIT(MasterProcedureEnvenv, RegionInfori, @@ -1344,28 +1352,28 @@ to carry. - + protected boolean AbstractStateMachineRegionProcedure.hasLock(MasterProcedureEnvenv) - + protected boolean AbstractStateMachineRegionProcedure.holdLock(MasterProcedureEnvenv) - + private void ModifyNamespaceProcedure.insertIntoNSTable(MasterProcedureEnvenv) Insert/update the row into namespace table - + protected static void CreateNamespaceProcedure.insertIntoNSTable(MasterProcedureEnvenv, NamespaceDescriptornsDescriptor) Insert the row into ns table - + protected boolean ServerCrashProcedure.isYieldBeforeExecuteFromState(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ServerCrashStatestate) @@ -1374,444 +1382,444 @@ before we move to the next. - + protected static void CreateTableProcedure.moveTempDirectoryToHBaseRoot(MasterProcedureEnvenv, TableDescriptortableDescriptor, org.apache.hadoop.fs.PathtempTableDir) - + private void CloneSnapshotProcedure.postCloneSnapshot(MasterProcedureEnvenv) Action after cloning from snapshot. - + private void CreateTableProcedure.postCreate(MasterProcedureEnvenv) - + private void DeleteTableProcedure.postDelete(MasterProcedureEnvenv) - + protected void DisableTableProcedure.postDisable(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableStatestate) Action after disabling table. - + private void EnableTableProcedure.postEnable(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.EnableTableStatestate) Action after enabling table. - + private void ModifyTableProcedure.postModify(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyTableStatestate) Action after modifying table. - + private void TruncateTableProcedure.postTruncate(MasterProcedureEnvenv) - + private void CloneSnapshotProcedure.preCloneSnapshot(MasterProcedureEnvenv) Action before cloning from snapshot. - + private void CreateTableProcedure.preCreate(MasterProcedureEnvenv) - + private boolean DeleteTableProcedure.preDelete(MasterProcedureEnvenv) - + protected void DisableTableProcedure.preDisable(MasterProcedureEnvenv, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableStatestate) Action before disabling
[15/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.TableFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455return listTables(pattern,
[06/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html index 74bacd8..546d2b6 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html @@ -2249,1468 +2249,1484 @@ 2241 } 2242 2243 @Override -2244 public long addColumn( -2245 final TableName tableName, -2246 final ColumnFamilyDescriptor column, -2247 final long nonceGroup, -2248 final long nonce) -2249 throws IOException { -2250checkInitialized(); -2251checkTableExists(tableName); -2252 -2253TableDescriptor old = getTableDescriptors().get(tableName); -2254if (old.hasColumnFamily(column.getName())) { -2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() -2256 + "' in table '" + tableName + "' already exists so cannot be added"); -2257} +2244 public long addColumn(final TableName tableName, final ColumnFamilyDescriptor column, +2245 final long nonceGroup, final long nonce) throws IOException { +2246checkInitialized(); +2247checkTableExists(tableName); +2248 +2249return modifyTable(tableName, new TableDescriptorGetter() { +2250 +2251 @Override +2252 public TableDescriptor get() throws IOException { +2253TableDescriptor old = getTableDescriptors().get(tableName); +2254if (old.hasColumnFamily(column.getName())) { +2255 throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString() +2256 + "' in table '" + tableName + "' already exists so cannot be added"); +2257} 2258 -2259TableDescriptor newDesc = TableDescriptorBuilder -2260 .newBuilder(old).setColumnFamily(column).build(); -2261return modifyTable(tableName, newDesc, nonceGroup, nonce); +2259return TableDescriptorBuilder.newBuilder(old).setColumnFamily(column).build(); +2260 } +2261}, nonceGroup, nonce); 2262 } 2263 -2264 @Override -2265 public long modifyColumn( -2266 final TableName tableName, -2267 final ColumnFamilyDescriptor descriptor, -2268 final long nonceGroup, -2269 final long nonce) -2270 throws IOException { -2271checkInitialized(); -2272checkTableExists(tableName); -2273 -2274TableDescriptor old = getTableDescriptors().get(tableName); -2275if (! old.hasColumnFamily(descriptor.getName())) { -2276 throw new InvalidFamilyOperationException("Family '" + descriptor.getNameAsString() -2277 + "' does not exist, so it cannot be modified"); -2278} -2279 -2280TableDescriptor td = TableDescriptorBuilder -2281.newBuilder(old) -2282 .modifyColumnFamily(descriptor) -2283.build(); -2284 -2285return modifyTable(tableName, td, nonceGroup, nonce); -2286 } -2287 -2288 @Override -2289 public long deleteColumn( -2290 final TableName tableName, -2291 final byte[] columnName, -2292 final long nonceGroup, -2293 final long nonce) -2294 throws IOException { -2295checkInitialized(); -2296checkTableExists(tableName); -2297 -2298TableDescriptor old = getTableDescriptors().get(tableName); -2299 -2300if (! old.hasColumnFamily(columnName)) { -2301 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2302 + "' does not exist, so it cannot be deleted"); -2303} -2304if (old.getColumnFamilyCount() == 1) { -2305 throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName) -2306 + "' is the only column family in the table, so it cannot be deleted"); -2307} -2308 -2309TableDescriptor td = TableDescriptorBuilder -2310 .newBuilder(old).removeColumnFamily(columnName).build(); -2311return modifyTable(tableName, td, nonceGroup, nonce); -2312 } -2313 -2314 @Override -2315 public long enableTable(final TableName tableName, final long nonceGroup, final long nonce) -2316 throws IOException { -2317checkInitialized(); -2318 -2319return MasterProcedureUtil.submitProcedure( -2320new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) { -2321 @Override -2322 protected void run() throws IOException { -2323 getMaster().getMasterCoprocessorHost().preEnableTable(tableName); -2324 -2325// Normally, it would make sense for this authorization check to exist inside -2326// AccessController, but because the authorization check is done based on internal state -2327// (rather than explicit permissions) we'll do the check here instead of in the -2328// coprocessor. -2329
[27/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DisableTableFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DisableTableFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DisableTableFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DisableTableFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DisableTableFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException {
[41/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.LocalHMaster.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.LocalHMaster.html b/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.LocalHMaster.html index 75a99c7..79ec538 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.LocalHMaster.html +++ b/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.LocalHMaster.html @@ -151,7 +151,7 @@ extends Nested classes/interfaces inherited from classorg.apache.hadoop.hbase.master.HMaster -HMaster.MasterStoppedException, HMaster.RedirectServlet +HMaster.MasterStoppedException, HMaster.RedirectServlet, HMaster.TableDescriptorGetter http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.html b/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.html index 38f04e5..7a5ac2b 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.html +++ b/devapidocs/org/apache/hadoop/hbase/master/HMasterCommandLine.html @@ -49,7 +49,7 @@ var activeTableTab = "activeTableTab"; -PrevClass +PrevClass NextClass @@ -430,7 +430,7 @@ extends -PrevClass +PrevClass NextClass http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html b/devapidocs/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html index 8875aef..d027c3e 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html +++ b/devapidocs/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html @@ -236,7 +236,7 @@ the order they are declared. values -public staticMasterRpcServices.BalanceSwitchMode[]values() +public staticMasterRpcServices.BalanceSwitchMode[]values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows: @@ -256,7 +256,7 @@ for (MasterRpcServices.BalanceSwitchMode c : MasterRpcServices.BalanceSwitchMode valueOf -public staticMasterRpcServices.BalanceSwitchModevalueOf(https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">Stringname) +public staticMasterRpcServices.BalanceSwitchModevalueOf(https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">Stringname) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html b/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html index dab6c6f..003530c 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html +++ b/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.AssignmentProcedureEvent.html @@ -112,7 +112,7 @@ -private static class RegionStates.AssignmentProcedureEvent +private static class RegionStates.AssignmentProcedureEvent extends ProcedureEventRegionInfo @@ -177,7 +177,7 @@ extends AssignmentProcedureEvent -publicAssignmentProcedureEvent(RegionInforegionInfo) +publicAssignmentProcedureEvent(RegionInforegionInfo) http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html b/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html index 23f08b4..4bc5cd4 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html +++ b/devapidocs/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionFailedOpen.html @@ -113,7 +113,7 @@ var activeTableTab = "activeTableTab"; -public static final class
[39/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/assignment/class-use/RegionStates.RegionStateNode.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/assignment/class-use/RegionStates.RegionStateNode.html b/devapidocs/org/apache/hadoop/hbase/master/assignment/class-use/RegionStates.RegionStateNode.html index f8ead79..f9b3413 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/assignment/class-use/RegionStates.RegionStateNode.html +++ b/devapidocs/org/apache/hadoop/hbase/master/assignment/class-use/RegionStates.RegionStateNode.html @@ -454,6 +454,11 @@ AssignmentManager.createUnassignProcedures(https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true; title="class or interface in java.util">CollectionRegionStates.RegionStateNodenodes) +https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListRegionInfo +RegionStates.getRegionsOfTable(TableNametable, + https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true; title="class or interface in java.util.function">PredicateRegionStates.RegionStateNodefilter) + + private void AssignmentManager.processAssignmentPlans(https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html?is-external=true; title="class or interface in java.util">HashMapRegionInfo,RegionStates.RegionStateNoderegions, https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html?is-external=true; title="class or interface in java.util">HashMapRegionInfo,ServerNameretainMap, http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/balancer/package-tree.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/balancer/package-tree.html b/devapidocs/org/apache/hadoop/hbase/master/balancer/package-tree.html index eb945fb..ad40e69 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/balancer/package-tree.html +++ b/devapidocs/org/apache/hadoop/hbase/master/balancer/package-tree.html @@ -197,8 +197,8 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true; title="class or interface in java.lang">EnumE (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true; title="class or interface in java.lang">ComparableT, java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) -org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.LocalityType +org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/class-use/HMaster.TableDescriptorGetter.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/class-use/HMaster.TableDescriptorGetter.html b/devapidocs/org/apache/hadoop/hbase/master/class-use/HMaster.TableDescriptorGetter.html new file mode 100644 index 000..5926cf5 --- /dev/null +++ b/devapidocs/org/apache/hadoop/hbase/master/class-use/HMaster.TableDescriptorGetter.html @@ -0,0 +1,168 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + + + + +Uses of Interface org.apache.hadoop.hbase.master.HMaster.TableDescriptorGetter (Apache HBase 3.0.0-SNAPSHOT API) + + + + + + + +JavaScript is disabled on your browser. + + + + + +Skip navigation links + + + + +Overview +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +NoFrames + + +AllClasses + + + + + + + + + + +Uses of Interfaceorg.apache.hadoop.hbase.master.HMaster.TableDescriptorGetter + + + + + +Packages that use HMaster.TableDescriptorGetter + +Package +Description + + + +org.apache.hadoop.hbase.master + + + + + + + + + + +Uses of HMaster.TableDescriptorGetter in org.apache.hadoop.hbase.master + +Methods in org.apache.hadoop.hbase.master with parameters of type HMaster.TableDescriptorGetter + +Modifier and Type +Method and Description + + + +private long +HMaster.modifyTable(TableNametableName, +
[38/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.html b/devapidocs/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.html index 15825d6..411adb2 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.html +++ b/devapidocs/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.html @@ -18,7 +18,7 @@ catch(err) { } //--> -var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":9,"i11":10,"i12":10,"i13":10,"i14":9,"i15":10,"i16":9,"i17":10,"i18":9,"i19":10,"i20":9,"i21":9,"i22":9,"i23":9,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":9,"i30":10,"i31":10,"i32":10,"i33":42,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":42,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10}; +var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":9,"i11":10,"i12":10,"i13":10,"i14":9,"i15":10,"i16":9,"i17":10,"i18":9,"i19":10,"i20":9,"i21":9,"i22":9,"i23":9,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":9,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":42,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":42,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -366,7 +366,8 @@ extends private ServerQueue -getServerQueue(ServerNameserverName) +getServerQueue(ServerNameserverName, + ServerProcedureInterfaceproc) private static TableName @@ -433,14 +434,23 @@ extends private void -removeTableQueue(TableNametableName) +removeServerQueue(ServerNameserverName) private void +removeTableQueue(TableNametableName) + + +private void tryCleanupPeerQueue(https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringpeerId, Procedure?procedure) - + +private void +tryCleanupServerQueue(ServerNameserverName, + Procedure?proc) + + boolean waitMetaExclusiveLock(Procedure?procedure) Deprecated. @@ -449,28 +459,28 @@ extends + boolean waitNamespaceExclusiveLock(Procedure?procedure, https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">Stringnamespace) Suspend the procedure if the specified namespace is already locked. - + boolean waitPeerExclusiveLock(Procedure?procedure, https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringpeerId) Try to acquire the exclusive lock on the specified peer. - + boolean waitRegion(Procedure?procedure, RegionInforegionInfo) Suspend the procedure if the specified region is already locked. - + boolean waitRegions(Procedure?procedure, TableNametable, @@ -478,33 +488,33 @@ extends Suspend the procedure if the specified set of regions are already locked. - + boolean waitServerExclusiveLock(Procedure?procedure, ServerNameserverName) Try to acquire the exclusive lock on the specified server. - + boolean waitTableExclusiveLock(Procedure?procedure, TableNametable) Suspend the procedure if the specified table is already locked. - + private TableQueue waitTableQueueSharedLock(Procedure?procedure, TableNametable) - + boolean waitTableSharedLock(Procedure?procedure, TableNametable) Suspend the procedure if the specified table is already locked. - + void wakeMetaExclusiveLock(Procedure?procedure) Deprecated. @@ -513,28 +523,28 @@ extends + void wakeNamespaceExclusiveLock(Procedure?procedure, https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">Stringnamespace) Wake the procedures waiting for the specified namespace - + void wakePeerExclusiveLock(Procedure?procedure, https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">StringpeerId) Wake the procedures waiting for the specified peer - + void wakeRegion(Procedure?procedure, RegionInforegionInfo) Wake the procedures waiting for the specified region - + void wakeRegions(Procedure?procedure, TableNametable, @@
[02/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateStampComparator.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateStampComparator.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateStampComparator.html index 541beed..1100e95 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateStampComparator.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/assignment/RegionStates.RegionStateStampComparator.html @@ -42,1015 +42,1038 @@ 034import java.util.concurrent.ConcurrentHashMap; 035import java.util.concurrent.ConcurrentSkipListMap; 036import java.util.concurrent.atomic.AtomicInteger; -037 -038import org.apache.hadoop.hbase.HConstants; -039import org.apache.hadoop.hbase.ServerName; -040import org.apache.hadoop.hbase.TableName; -041import org.apache.hadoop.hbase.client.RegionInfo; -042import org.apache.hadoop.hbase.exceptions.UnexpectedStateException; -043import org.apache.hadoop.hbase.master.RegionState; -044import org.apache.hadoop.hbase.master.RegionState.State; -045import org.apache.hadoop.hbase.procedure2.ProcedureEvent; -046import org.apache.hadoop.hbase.util.Bytes; -047import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; -048import org.apache.yetus.audience.InterfaceAudience; -049import org.slf4j.Logger; -050import org.slf4j.LoggerFactory; -051import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; -052 -053/** -054 * RegionStates contains a set of Maps that describes the in-memory state of the AM, with -055 * the regions available in the system, the region in transition, the offline regions and -056 * the servers holding regions. -057 */ -058@InterfaceAudience.Private -059public class RegionStates { -060 private static final Logger LOG = LoggerFactory.getLogger(RegionStates.class); -061 -062 protected static final State[] STATES_EXPECTED_ON_OPEN = new State[] { -063State.OPEN, // State may already be OPEN if we died after receiving the OPEN from regionserver -064// but before complete finish of AssignProcedure. HBASE-20100. -065State.OFFLINE, State.CLOSED, // disable/offline -066State.SPLITTING, State.SPLIT, // ServerCrashProcedure -067State.OPENING, State.FAILED_OPEN, // already in-progress (retrying) -068 }; -069 -070 protected static final State[] STATES_EXPECTED_ON_CLOSE = new State[] { -071State.SPLITTING, State.SPLIT, State.MERGING, // ServerCrashProcedure -072State.OPEN, // enabled/open -073State.CLOSING // already in-progress (retrying) -074 }; -075 -076 private static class AssignmentProcedureEvent extends ProcedureEventRegionInfo { -077public AssignmentProcedureEvent(final RegionInfo regionInfo) { -078 super(regionInfo); -079} -080 } -081 -082 private static class ServerReportEvent extends ProcedureEventServerName { -083public ServerReportEvent(final ServerName serverName) { -084 super(serverName); -085} -086 } -087 -088 /** -089 * Current Region State. -090 * In-memory only. Not persisted. -091 */ -092 // Mutable/Immutable? Changes have to be synchronized or not? -093 // Data members are volatile which seems to say multi-threaded access is fine. -094 // In the below we do check and set but the check state could change before -095 // we do the set because no synchronizationwhich seems dodgy. Clear up -096 // understanding here... how many threads accessing? Do locks make it so one -097 // thread at a time working on a single Region's RegionStateNode? Lets presume -098 // so for now. Odd is that elsewhere in this RegionStates, we synchronize on -099 // the RegionStateNode instance. TODO. -100 public static class RegionStateNode implements ComparableRegionStateNode { -101private final RegionInfo regionInfo; -102private final ProcedureEvent? event; -103 -104private volatile RegionTransitionProcedure procedure = null; -105private volatile ServerName regionLocation = null; -106private volatile ServerName lastHost = null; -107/** -108 * A Region-in-Transition (RIT) moves through states. -109 * See {@link State} for complete list. A Region that -110 * is opened moves from OFFLINE = OPENING = OPENED. -111 */ -112private volatile State state = State.OFFLINE; -113 -114/** -115 * Updated whenever a call to {@link #setRegionLocation(ServerName)} -116 * or {@link #setState(State, State...)}. -117 */ -118private volatile long lastUpdate = 0; -119 -120private volatile long openSeqNum = HConstants.NO_SEQNUM; -121 -122public RegionStateNode(final RegionInfo regionInfo) { -123
[30/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.CreateTableFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455
[47/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/checkstyle.rss -- diff --git a/checkstyle.rss b/checkstyle.rss index 21d7a7a..a8132d5 100644 --- a/checkstyle.rss +++ b/checkstyle.rss @@ -25,8 +25,8 @@ under the License. en-us 2007 - 2018 The Apache Software Foundation - File: 3641, - Errors: 16171, + File: 3642, + Errors: 16156, Warnings: 0, Infos: 0 @@ -8306,6 +8306,20 @@ under the License. + http://hbase.apache.org/checkstyle.html#org.apache.hadoop.hbase.regionserver.TestRegionServerCrashDisableWAL.java;>org/apache/hadoop/hbase/regionserver/TestRegionServerCrashDisableWAL.java + + + 0 + + + 0 + + + 0 + + + + http://hbase.apache.org/checkstyle.html#org.apache.hadoop.hbase.rest.RESTServlet.java;>org/apache/hadoop/hbase/rest/RESTServlet.java @@ -8833,7 +8847,7 @@ under the License. 0 - 8 + 7 @@ -29147,7 +29161,7 @@ under the License. 0 - 4 + 5 @@ -40767,7 +40781,7 @@ under the License. 0 - 169 + 155 @@ -42657,7 +42671,7 @@ under the License. 0 - 26 + 25 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/coc.html -- diff --git a/coc.html b/coc.html index 0cbde73..d91b9df 100644 --- a/coc.html +++ b/coc.html @@ -7,7 +7,7 @@ - + Apache HBase Code of Conduct Policy @@ -375,7 +375,7 @@ email to mailto:priv...@hbase.apache.org;>the priv https://www.apache.org/;>The Apache Software Foundation. All rights reserved. - Last Published: 2018-06-20 + Last Published: 2018-06-21 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/dependencies.html -- diff --git a/dependencies.html b/dependencies.html index d7892ca..0072344 100644 --- a/dependencies.html +++ b/dependencies.html @@ -7,7 +7,7 @@ - + Apache HBase Project Dependencies @@ -440,7 +440,7 @@ https://www.apache.org/;>The Apache Software Foundation. All rights reserved. - Last Published: 2018-06-20 + Last Published: 2018-06-21 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/dependency-convergence.html -- diff --git a/dependency-convergence.html b/dependency-convergence.html index 5b0ac2c..42e67ba 100644 --- a/dependency-convergence.html +++ b/dependency-convergence.html @@ -7,7 +7,7 @@ - + Apache HBase Reactor Dependency Convergence @@ -905,7 +905,7 @@ https://www.apache.org/;>The Apache Software Foundation. All rights reserved. - Last Published: 2018-06-20 + Last Published: 2018-06-21 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/dependency-info.html -- diff --git a/dependency-info.html b/dependency-info.html index 09fa88a..cf018a0 100644 --- a/dependency-info.html +++ b/dependency-info.html @@ -7,7 +7,7 @@ - + Apache HBase Dependency Information @@ -313,7 +313,7 @@ https://www.apache.org/;>The Apache Software Foundation. All rights reserved. - Last Published: 2018-06-20 + Last Published: 2018-06-21 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/dependency-management.html
hbase-site git commit: INFRA-10751 Empty commit
Repository: hbase-site Updated Branches: refs/heads/asf-site 2b11656ff -> f41bc57c1 INFRA-10751 Empty commit Project: http://git-wip-us.apache.org/repos/asf/hbase-site/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase-site/commit/f41bc57c Tree: http://git-wip-us.apache.org/repos/asf/hbase-site/tree/f41bc57c Diff: http://git-wip-us.apache.org/repos/asf/hbase-site/diff/f41bc57c Branch: refs/heads/asf-site Commit: f41bc57c1f3812f2fffc15ac51efebd0e83d74b2 Parents: 2b11656 Author: jenkins Authored: Thu Jun 21 05:29:18 2018 + Committer: jenkins Committed: Thu Jun 21 05:29:18 2018 + -- --
[32/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.AbortProcedureFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws
[29/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteColumnFamilyFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteColumnFamilyFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteColumnFamilyFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteColumnFamilyFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteColumnFamilyFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern
[07/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html new file mode 100644 index 000..546d2b6 --- /dev/null +++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html @@ -0,0 +1,3793 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + +Source code + + + + +001/** +002 * Licensed to the Apache Software Foundation (ASF) under one +003 * or more contributor license agreements. See the NOTICE file +004 * distributed with this work for additional information +005 * regarding copyright ownership. The ASF licenses this file +006 * to you under the Apache License, Version 2.0 (the +007 * "License"); you may not use this file except in compliance +008 * with the License. You may obtain a copy of the License at +009 * +010 * http://www.apache.org/licenses/LICENSE-2.0 +011 * +012 * Unless required by applicable law or agreed to in writing, software +013 * distributed under the License is distributed on an "AS IS" BASIS, +014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +015 * See the License for the specific language governing permissions and +016 * limitations under the License. +017 */ +018package org.apache.hadoop.hbase.master; +019 +020import static org.apache.hadoop.hbase.HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS; +021 +022import com.google.protobuf.Descriptors; +023import com.google.protobuf.Service; +024import java.io.IOException; +025import java.io.InterruptedIOException; +026import java.lang.reflect.Constructor; +027import java.lang.reflect.InvocationTargetException; +028import java.net.InetAddress; +029import java.net.InetSocketAddress; +030import java.net.UnknownHostException; +031import java.util.ArrayList; +032import java.util.Arrays; +033import java.util.Collection; +034import java.util.Collections; +035import java.util.Comparator; +036import java.util.EnumSet; +037import java.util.HashMap; +038import java.util.Iterator; +039import java.util.List; +040import java.util.Map; +041import java.util.Map.Entry; +042import java.util.Objects; +043import java.util.Optional; +044import java.util.Set; +045import java.util.concurrent.ExecutionException; +046import java.util.concurrent.Future; +047import java.util.concurrent.TimeUnit; +048import java.util.concurrent.TimeoutException; +049import java.util.concurrent.atomic.AtomicInteger; +050import java.util.concurrent.atomic.AtomicReference; +051import java.util.function.Function; +052import java.util.regex.Pattern; +053import java.util.stream.Collectors; +054import javax.servlet.ServletException; +055import javax.servlet.http.HttpServlet; +056import javax.servlet.http.HttpServletRequest; +057import javax.servlet.http.HttpServletResponse; +058import org.apache.commons.lang3.StringUtils; +059import org.apache.hadoop.conf.Configuration; +060import org.apache.hadoop.fs.Path; +061import org.apache.hadoop.hbase.ClusterId; +062import org.apache.hadoop.hbase.ClusterMetrics; +063import org.apache.hadoop.hbase.ClusterMetrics.Option; +064import org.apache.hadoop.hbase.ClusterMetricsBuilder; +065import org.apache.hadoop.hbase.DoNotRetryIOException; +066import org.apache.hadoop.hbase.HBaseIOException; +067import org.apache.hadoop.hbase.HBaseInterfaceAudience; +068import org.apache.hadoop.hbase.HConstants; +069import org.apache.hadoop.hbase.InvalidFamilyOperationException; +070import org.apache.hadoop.hbase.MasterNotRunningException; +071import org.apache.hadoop.hbase.MetaTableAccessor; +072import org.apache.hadoop.hbase.NamespaceDescriptor; +073import org.apache.hadoop.hbase.PleaseHoldException; +074import org.apache.hadoop.hbase.ReplicationPeerNotFoundException; +075import org.apache.hadoop.hbase.ScheduledChore; +076import org.apache.hadoop.hbase.ServerName; +077import org.apache.hadoop.hbase.TableDescriptors; +078import org.apache.hadoop.hbase.TableName; +079import org.apache.hadoop.hbase.TableNotDisabledException; +080import org.apache.hadoop.hbase.TableNotFoundException; +081import org.apache.hadoop.hbase.UnknownRegionException; +082import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; +083import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; +084import org.apache.hadoop.hbase.client.MasterSwitchType; +085import org.apache.hadoop.hbase.client.RegionInfo; +086import org.apache.hadoop.hbase.client.RegionInfoBuilder; +087import org.apache.hadoop.hbase.client.Result; +088import org.apache.hadoop.hbase.client.TableDescriptor; +089import org.apache.hadoop.hbase.client.TableDescriptorBuilder; +090import org.apache.hadoop.hbase.client.TableState; +091import
[21/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.WaitForStateCallable.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.WaitForStateCallable.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.WaitForStateCallable.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.WaitForStateCallable.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.ProcedureFuture.WaitForStateCallable.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453
[34/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/org/apache/hadoop/hbase/regionserver/HRegionServer.html -- diff --git a/devapidocs/org/apache/hadoop/hbase/regionserver/HRegionServer.html b/devapidocs/org/apache/hadoop/hbase/regionserver/HRegionServer.html index d8857c0..4609108 100644 --- a/devapidocs/org/apache/hadoop/hbase/regionserver/HRegionServer.html +++ b/devapidocs/org/apache/hadoop/hbase/regionserver/HRegionServer.html @@ -2426,7 +2426,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j movedRegions -protectedhttps://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,HRegionServer.MovedRegionInfo movedRegions +protectedhttps://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true; title="class or interface in java.util">Maphttps://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">String,HRegionServer.MovedRegionInfo movedRegions @@ -2435,7 +2435,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j TIMEOUT_REGION_MOVED -private static finalint TIMEOUT_REGION_MOVED +private static finalint TIMEOUT_REGION_MOVED See Also: Constant Field Values @@ -3108,7 +3108,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j startReplicationService -privatevoidstartReplicationService() +privatevoidstartReplicationService() throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Start up replication source and sink handlers. @@ -3123,7 +3123,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j getRegionServerMetrics -publicMetricsRegionServergetRegionServerMetrics() +publicMetricsRegionServergetRegionServerMetrics() @@ -3132,7 +3132,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j getMasterAddressTracker -publicMasterAddressTrackergetMasterAddressTracker() +publicMasterAddressTrackergetMasterAddressTracker() Returns: Master address tracker instance. @@ -3145,7 +3145,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j startServices -privatevoidstartServices() +privatevoidstartServices() throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Throws: @@ -3159,7 +3159,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j initializeThreads -privatevoidinitializeThreads() +privatevoidinitializeThreads() throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Throws: @@ -3173,7 +3173,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j registerConfigurationObservers -privatevoidregisterConfigurationObservers() +privatevoidregisterConfigurationObservers() @@ -3182,7 +3182,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j putUpWebUI -privateintputUpWebUI() +privateintputUpWebUI() throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Puts up the webui. @@ -3199,7 +3199,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j isHealthy -privatebooleanisHealthy() +privatebooleanisHealthy() @@ -3208,7 +3208,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j getWALs -publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListWALgetWALs() +publichttps://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true; title="class or interface in java.util">ListWALgetWALs() throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Specified by: @@ -3227,7 +3227,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j getWAL -publicWALgetWAL(RegionInforegionInfo) +publicWALgetWAL(RegionInforegionInfo) throws https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true; title="class or interface in java.io">IOException Specified by: @@ -3246,7 +3246,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j getWalRoller -publicLogRollergetWalRoller() +publicLogRollergetWalRoller() @@ -3255,7 +3255,7 @@ protected static finalhttps://docs.oracle.com/javase/8/docs/api/j
[28/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteTableFuture.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteTableFuture.html b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteTableFuture.html index b6e7636..592c2cc 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteTableFuture.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/HBaseAdmin.DeleteTableFuture.html @@ -356,3901 +356,3924 @@ 348 public FutureVoid modifyTableAsync(TableDescriptor td) throws IOException { 349ModifyTableResponse response = executeCallable( 350 new MasterCallableModifyTableResponse(getConnection(), getRpcControllerFactory()) { -351@Override -352protected ModifyTableResponse rpcCall() throws Exception { -353 setPriority(td.getTableName()); -354 ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -355td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); -356 return master.modifyTable(getRpcController(), request); -357} -358 }); -359return new ModifyTableFuture(this, td.getTableName(), response); -360 } -361 -362 @Override -363 public ListTableDescriptor listTableDescriptorsByNamespace(byte[] name) throws IOException { -364return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -365getRpcControllerFactory()) { -366 @Override -367 protected ListTableDescriptor rpcCall() throws Exception { -368return master.listTableDescriptorsByNamespace(getRpcController(), -369 ListTableDescriptorsByNamespaceRequest.newBuilder() -370 .setNamespaceName(Bytes.toString(name)).build()) -371.getTableSchemaList() -372.stream() -373 .map(ProtobufUtil::toTableDescriptor) -374 .collect(Collectors.toList()); -375 } -376}); -377 } -378 -379 @Override -380 public ListTableDescriptor listTableDescriptors(ListTableName tableNames) throws IOException { -381return executeCallable(new MasterCallableListTableDescriptor(getConnection(), -382getRpcControllerFactory()) { -383 @Override -384 protected ListTableDescriptor rpcCall() throws Exception { -385GetTableDescriptorsRequest req = -386 RequestConverter.buildGetTableDescriptorsRequest(tableNames); -387 return ProtobufUtil.toTableDescriptorList(master.getTableDescriptors(getRpcController(), -388 req)); -389 } -390}); -391 } -392 -393 @Override -394 public ListRegionInfo getRegions(final ServerName sn) throws IOException { -395AdminService.BlockingInterface admin = this.connection.getAdmin(sn); -396// TODO: There is no timeout on this controller. Set one! -397HBaseRpcController controller = rpcControllerFactory.newController(); -398return ProtobufUtil.getOnlineRegions(controller, admin); -399 } -400 -401 @Override -402 public ListRegionInfo getRegions(TableName tableName) throws IOException { -403if (TableName.isMetaTableName(tableName)) { -404 return Arrays.asList(RegionInfoBuilder.FIRST_META_REGIONINFO); -405} else { -406 return MetaTableAccessor.getTableRegions(connection, tableName, true); -407} -408 } -409 -410 private static class AbortProcedureFuture extends ProcedureFutureBoolean { -411private boolean isAbortInProgress; -412 -413public AbortProcedureFuture( -414final HBaseAdmin admin, -415final Long procId, -416final Boolean abortProcResponse) { -417 super(admin, procId); -418 this.isAbortInProgress = abortProcResponse; -419} -420 -421@Override -422public Boolean get(long timeout, TimeUnit unit) -423throws InterruptedException, ExecutionException, TimeoutException { -424 if (!this.isAbortInProgress) { -425return false; -426 } -427 super.get(timeout, unit); -428 return true; -429} -430 } -431 -432 /** @return Connection used by this object. */ -433 @Override -434 public Connection getConnection() { -435return connection; -436 } -437 -438 @Override -439 public boolean tableExists(final TableName tableName) throws IOException { -440return executeCallable(new RpcRetryingCallableBoolean() { -441 @Override -442 protected Boolean rpcCall(int callTimeout) throws Exception { -443return MetaTableAccessor.tableExists(connection, tableName); -444 } -445}); -446 } -447 -448 @Override -449 public HTableDescriptor[] listTables() throws IOException { -450return listTables((Pattern)null, false); -451 } -452 -453 @Override -454 public HTableDescriptor[] listTables(Pattern pattern) throws IOException { -455
[48/51] [partial] hbase-site git commit: Published site at 72784c2d836a4b977667449d3adec5e8d15453f5.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2b11656f/checkstyle-aggregate.html -- diff --git a/checkstyle-aggregate.html b/checkstyle-aggregate.html index f28ddac..2adf344 100644 --- a/checkstyle-aggregate.html +++ b/checkstyle-aggregate.html @@ -7,7 +7,7 @@ - + Apache HBase Checkstyle Results @@ -281,10 +281,10 @@ Warnings Errors -3641 +3642 0 0 -16171 +16156 Files @@ -4687,7 +4687,7 @@ org/apache/hadoop/hbase/master/HMaster.java 0 0 -169 +155 org/apache/hadoop/hbase/master/HMasterCommandLine.java 0 @@ -4967,7 +4967,7 @@ org/apache/hadoop/hbase/master/assignment/RegionStates.java 0 0 -26 +25 org/apache/hadoop/hbase/master/assignment/RegionTransitionProcedure.java 0 @@ -5262,7 +5262,7 @@ org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java 0 0 -8 +7 org/apache/hadoop/hbase/master/procedure/MasterProcedureSchedulerPerformanceEvaluation.java 0 @@ -5272,7 +5272,7 @@ org/apache/hadoop/hbase/master/procedure/MasterProcedureTestingUtility.java 0 0 -4 +5 org/apache/hadoop/hbase/master/procedure/MasterProcedureUtil.java 0 @@ -,7 +,7 @@ http://checkstyle.sourceforge.net/config_blocks.html#NeedBraces;>NeedBraces -1915 +1913 Error coding @@ -10081,7 +10081,7 @@ caseIndent: 2 basicOffset: 2 lineWrappingIndentation: 2 -5225 +5211 Error javadoc @@ -10093,7 +10093,7 @@ http://checkstyle.sourceforge.net/config_javadoc.html#NonEmptyAtclauseDescription;>NonEmptyAtclauseDescription -3747 +3748 Error misc @@ -24267,541 +24267,541 @@ blocks NeedBraces 'if' construct must use '{}'s. -529 +531 Error indentation Indentation 'method def modifier' has incorrect indentation level 6, expected level should be one of the following: 10, 12. -532 +534 Error indentation Indentation 'method def' child has incorrect indentation level 8, expected level should be one of the following: 12, 14. -534 +536 Error indentation Indentation 'method def' child has incorrect indentation level 8, expected level should be one of the following: 12, 14. -536 +538 Error indentation Indentation 'if' has incorrect indentation level 8, expected level should be one of the following: 12, 14. -537 +539 Error indentation Indentation 'if' child has incorrect indentation level 10, expected level should be one of the following: 14, 16. -538 +540 Error indentation Indentation 'if rcurly' has incorrect indentation level 8, expected level should be one of the following: 12, 14. -539 +541 Error indentation Indentation 'method def' child has incorrect indentation level 8, expected level should be one of the following: 12, 14. -540 +542 Error indentation Indentation 'method def rcurly' has incorrect indentation level 6, expected level should be one of the following: 10, 12. -541 +543 Error indentation Indentation 'object def rcurly' has incorrect indentation level 4, expected level should be one of the following: 8, 10. -542 +544 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -591 +593 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -598 +600 Error javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. -750 +756 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -832 +840 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -895 +905 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -1055 +1068 Error annotation MissingDeprecated Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description. -1133 +1150 Error annotation MissingDeprecated Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description. -1139 +1156 Error annotation MissingDeprecated Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description. -1145 +1162 Error annotation MissingDeprecated Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description. -1153 +1170 Error javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. -1160 +1177 Error javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. -1162 +1179 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -1264 +1281 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -1270 +1287 Error indentation Indentation 'throws' has incorrect indentation level 2, expected level should be 4. -1279 +1296 Error indentation
[44/50] [abbrv] hbase git commit: HBASE-20424 Allow writing WAL to local and remote cluster concurrently
HBASE-20424 Allow writing WAL to local and remote cluster concurrently Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f3d1355f Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f3d1355f Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f3d1355f Branch: refs/heads/HBASE-19064 Commit: f3d1355feb49fddf8ee22834504ea8c7e7a4ed5c Parents: 62dab3b Author: zhangduo Authored: Thu May 24 16:20:28 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../src/main/protobuf/MasterProcedure.proto | 2 +- .../hbase/replication/ReplicationUtils.java | 26 ++- .../asyncfs/FanOutOneBlockAsyncDFSOutput.java | 3 +- .../replication/RecoverStandbyProcedure.java| 10 +- .../master/replication/RemovePeerProcedure.java | 5 +- .../ReplaySyncReplicationWALManager.java| 110 ++- ...ransitPeerSyncReplicationStateProcedure.java | 4 +- .../hbase/regionserver/HRegionServer.java | 3 +- .../regionserver/ReplicationSourceService.java | 6 + .../hbase/regionserver/SplitLogWorker.java | 188 +-- .../regionserver/wal/CombinedAsyncWriter.java | 80 ++-- .../hbase/regionserver/wal/DualAsyncFSWAL.java | 11 +- .../replication/regionserver/Replication.java | 5 + .../regionserver/ReplicationSourceManager.java | 2 +- .../SyncReplicationPeerInfoProviderImpl.java| 3 +- .../org/apache/hadoop/hbase/util/FSUtils.java | 9 + .../hbase/wal/SyncReplicationWALProvider.java | 43 - .../replication/TestReplicationAdmin.java | 2 +- .../wal/TestCombinedAsyncWriter.java| 20 +- .../replication/DualAsyncFSWALForTest.java | 149 +++ .../replication/SyncReplicationTestBase.java| 12 +- .../replication/TestSyncReplicationActive.java | 5 +- ...cReplicationMoreLogsInLocalCopyToRemote.java | 108 +++ ...plicationMoreLogsInLocalGiveUpSplitting.java | 128 + .../TestSyncReplicationRemoveRemoteWAL.java | 7 +- .../replication/TestSyncReplicationStandBy.java | 20 +- .../master/TestRecoverStandbyProcedure.java | 4 +- .../TestReplicationSourceManager.java | 5 +- .../wal/TestSyncReplicationWALProvider.java | 1 - 29 files changed, 733 insertions(+), 238 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/f3d1355f/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto -- diff --git a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto index 8664ddd..da3cbca 100644 --- a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto +++ b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto @@ -485,7 +485,7 @@ enum RecoverStandbyState { RENAME_SYNC_REPLICATION_WALS_DIR = 1; INIT_WORKERS = 2; DISPATCH_TASKS = 3; - REMOVE_SYNC_REPLICATION_WALS_DIR = 4; + SNAPSHOT_SYNC_REPLICATION_WALS_DIR = 4; } message RecoverStandbyStateData { http://git-wip-us.apache.org/repos/asf/hbase/blob/f3d1355f/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java -- diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java index 069db7a..dc4217c 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java @@ -46,6 +46,16 @@ public final class ReplicationUtils { public static final String REMOTE_WAL_DIR_NAME = "remoteWALs"; + public static final String SYNC_WAL_SUFFIX = ".syncrep"; + + public static final String REMOTE_WAL_REPLAY_SUFFIX = "-replay"; + + public static final String REMOTE_WAL_SNAPSHOT_SUFFIX = "-snapshot"; + + // This is used for copying sync replication log from local to remote and overwrite the old one + // since some FileSystem implementation may not support atomic rename. + public static final String RENAME_WAL_SUFFIX = ".ren"; + private ReplicationUtils() { } @@ -187,14 +197,26 @@ public final class ReplicationUtils { return new Path(remoteWALDir).getFileSystem(conf); } - public static Path getRemoteWALDirForPeer(String remoteWALDir, String peerId) { + public static Path getPeerRemoteWALDir(String remoteWALDir, String peerId) { return new Path(remoteWALDir, peerId); } - public static Path getRemoteWALDirForPeer(Path remoteWALDir, String peerId) { + public static Path getPeerRemoteWALDir(Path remoteWALDir, String peerId) {
[12/50] [abbrv] hbase git commit: Revert "HTML formatting changes"
Revert "HTML formatting changes" This reverts commit d3e237d1419c61f85d7309785609399960e4f521. needs jira Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/0d660e30 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0d660e30 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0d660e30 Branch: refs/heads/HBASE-19064 Commit: 0d660e30e53fd12577e1dbf218ab531494d9d744 Parents: d3e237d Author: Sean Busbey Authored: Wed Jun 20 10:40:27 2018 -0500 Committer: Sean Busbey Committed: Wed Jun 20 10:40:27 2018 -0500 -- src/site/xdoc/downloads.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/0d660e30/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index 2fa5559..acd1e59 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -54,10 +54,10 @@ under the License. https://apache.org/dist/hbase/2.0.1/compatibility_report_2.0.0vs2.0.1.html;>2.0.0 vs 2.0.1 -https://apache.org/dist/hbase/2.0.1/CHANGES.md;>Changes +https://apache.org/dist/hbase/2.0.1/CHANGES.md;>2.0.1 Changes -https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>Release Notes +https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>2.0.1 Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe;>987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe @@ -78,10 +78,10 @@ under the License. https://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 -https://apache.org/dist/hbase/2.0.0/CHANGES.md;>Changes +https://apache.org/dist/hbase/2.0.0/CHANGES.md;>2.0.0 Changes -https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>Release Notes +https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=7483b111e4da77adbfc8062b3b22cbe7c2cb91c1;>7483b111e4da77adbfc8062b3b22cbe7c2cb91c1
[04/50] [abbrv] hbase git commit: HBASE-20708 Remove the usage of RecoverMetaProcedure in master startup
HBASE-20708 Remove the usage of RecoverMetaProcedure in master startup Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6dbbd78a Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6dbbd78a Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6dbbd78a Branch: refs/heads/HBASE-19064 Commit: 6dbbd78aa00ed4877292d9cd48621803a175d51a Parents: b336da9 Author: zhangduo Authored: Tue Jun 19 15:02:10 2018 +0800 Committer: zhangduo Committed: Tue Jun 19 15:02:10 2018 +0800 -- .../apache/hadoop/hbase/MetaTableAccessor.java | 10 +- .../hbase/procedure2/ProcedureExecutor.java | 45 +-- .../procedure2/ProcedureTestingUtility.java | 10 +- .../hbase/procedure2/TestChildProcedures.java | 4 +- .../hbase/procedure2/TestProcedureEvents.java | 4 +- .../procedure2/TestProcedureExecution.java | 4 +- .../hbase/procedure2/TestProcedureExecutor.java | 5 +- .../procedure2/TestProcedureInMemoryChore.java | 5 +- .../hbase/procedure2/TestProcedureMetrics.java | 2 +- .../hbase/procedure2/TestProcedureNonce.java| 4 +- .../hbase/procedure2/TestProcedureRecovery.java | 4 +- .../procedure2/TestProcedureReplayOrder.java| 6 +- .../procedure2/TestProcedureSuspended.java | 4 +- .../procedure2/TestStateMachineProcedure.java | 4 +- .../hbase/procedure2/TestYieldProcedures.java | 6 +- .../src/main/protobuf/MasterProcedure.proto | 15 +- .../hadoop/hbase/master/CatalogJanitor.java | 13 +- .../org/apache/hadoop/hbase/master/HMaster.java | 180 ++-- .../hbase/master/MasterMetaBootstrap.java | 41 +-- .../hadoop/hbase/master/MasterServices.java | 12 - .../hadoop/hbase/master/MasterWalManager.java | 28 +- .../hbase/master/RegionServerTracker.java | 30 +- .../hadoop/hbase/master/ServerManager.java | 163 ++- .../master/assignment/AssignmentManager.java| 293 +++ .../assignment/MergeTableRegionsProcedure.java | 2 +- .../master/assignment/RegionStateStore.java | 21 +- .../assignment/RegionTransitionProcedure.java | 11 +- .../assignment/SplitTableRegionProcedure.java | 2 +- .../AbstractStateMachineTableProcedure.java | 6 +- .../master/procedure/InitMetaProcedure.java | 115 .../master/procedure/MasterProcedureEnv.java| 16 +- .../procedure/MasterProcedureScheduler.java | 27 +- .../procedure/MetaProcedureInterface.java | 5 + .../hbase/master/procedure/MetaQueue.java | 5 + .../master/procedure/RecoverMetaProcedure.java | 9 +- .../hbase/master/procedure/SchemaLocking.java | 5 + .../master/procedure/ServerCrashProcedure.java | 61 ++-- .../hadoop/hbase/TestMetaTableAccessor.java | 2 - .../hbase/master/MockNoopMasterServices.java| 19 -- .../hadoop/hbase/master/TestCatalogJanitor.java | 3 +- .../master/assignment/MockMasterServices.java | 25 +- .../assignment/TestAssignmentManager.java | 17 +- .../MasterProcedureTestingUtility.java | 5 - .../procedure/TestMasterProcedureEvents.java| 76 + .../procedure/TestServerCrashProcedure.java | 32 +- 45 files changed, 610 insertions(+), 746 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/6dbbd78a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java index 91f3cf7..60afaca 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java @@ -1346,9 +1346,17 @@ public class MetaTableAccessor { */ public static void putsToMetaTable(final Connection connection, final List ps) throws IOException { +if (ps.isEmpty()) { + return; +} try (Table t = getMetaHTable(connection)) { debugLogMutations(ps); - t.put(ps); + // the implementation for putting a single Put is much simpler so here we do a check first. + if (ps.size() == 1) { +t.put(ps.get(0)); + } else { +t.put(ps); + } } } http://git-wip-us.apache.org/repos/asf/hbase/blob/6dbbd78a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java -- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java index 3a75d33..bd0a191 100644 ---
[49/50] [abbrv] hbase git commit: HBASE-20434 Also remove remote wals when peer is in DA state
HBASE-20434 Also remove remote wals when peer is in DA state Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d2d5f492 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d2d5f492 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d2d5f492 Branch: refs/heads/HBASE-19064 Commit: d2d5f49263bded53f6440eb4f4d4f667ae16c830 Parents: b0bad59 Author: zhangduo Authored: Wed Apr 25 17:12:23 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../hbase/replication/ReplicationUtils.java | 4 + ...ransitPeerSyncReplicationStateProcedure.java | 2 +- .../regionserver/ReplicationSource.java | 7 +- .../regionserver/ReplicationSourceManager.java | 86 ++-- .../hadoop/hbase/wal/AbstractFSWALProvider.java | 19 ++-- .../hbase/wal/SyncReplicationWALProvider.java | 30 +- .../TestSyncReplicationRemoveRemoteWAL.java | 101 +++ .../TestReplicationSourceManager.java | 68 - 8 files changed, 251 insertions(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/d2d5f492/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java -- diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java index 66e9b01..069db7a 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java @@ -191,6 +191,10 @@ public final class ReplicationUtils { return new Path(remoteWALDir, peerId); } + public static Path getRemoteWALDirForPeer(Path remoteWALDir, String peerId) { +return new Path(remoteWALDir, peerId); + } + /** * Do the sleeping logic * @param msg Why we sleep http://git-wip-us.apache.org/repos/asf/hbase/blob/d2d5f492/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java index 5da2b0c..99fd615 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java @@ -211,7 +211,7 @@ public class TransitPeerSyncReplicationStateProcedure case CREATE_DIR_FOR_REMOTE_WAL: MasterFileSystem mfs = env.getMasterFileSystem(); Path remoteWALDir = new Path(mfs.getWALRootDir(), ReplicationUtils.REMOTE_WAL_DIR_NAME); -Path remoteWALDirForPeer = new Path(remoteWALDir, peerId); +Path remoteWALDirForPeer = ReplicationUtils.getRemoteWALDirForPeer(remoteWALDir, peerId); FileSystem walFs = mfs.getWALFileSystem(); try { if (walFs.exists(remoteWALDirForPeer)) { http://git-wip-us.apache.org/repos/asf/hbase/blob/d2d5f492/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index 3bf85d5..c41e6c2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -570,14 +570,17 @@ public class ReplicationSource implements ReplicationSourceInterface { } /** + * * Split a path to get the start time + * + * * For example: 10.20.20.171%3A60020.1277499063250 + * * @param p path to split * @return start time */ private static long getTS(Path p) { - int tsIndex = p.getName().lastIndexOf('.') + 1; - return Long.parseLong(p.getName().substring(tsIndex)); + return AbstractFSWALProvider.getWALStartTimeFromWALName(p.getName()); } } http://git-wip-us.apache.org/repos/asf/hbase/blob/d2d5f492/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
[08/50] [abbrv] hbase git commit: HBASE-20742 Always create WAL directory for region server
HBASE-20742 Always create WAL directory for region server Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c08eff67 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c08eff67 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c08eff67 Branch: refs/heads/HBASE-19064 Commit: c08eff67afd8ac696c45a383077d4a42fed85ba2 Parents: 9101fc2 Author: zhangduo Authored: Fri Jun 15 22:44:44 2018 +0800 Committer: zhangduo Committed: Wed Jun 20 14:21:23 2018 +0800 -- .../hbase/regionserver/HRegionServer.java | 5 + .../TestRegionServerCrashDisableWAL.java| 106 +++ 2 files changed, 111 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c08eff67/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index db7052e..1ca76ed 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -1813,6 +1813,11 @@ public class HRegionServer extends HasThread implements throw new RegionServerRunningException( "Region server has already created directory at " + this.serverName.toString()); } +// Always create wal directory as now we need this when master restarts to find out the live +// region servers. +if (!this.walFs.mkdirs(logDir)) { + throw new IOException("Can not create wal directory " + logDir); +} // Instantiate replication if replication enabled. Pass it the log directories. createNewReplicationInstance(conf, this, this.walFs, logDir, oldLogDir, factory.getWALProvider()); http://git-wip-us.apache.org/repos/asf/hbase/blob/c08eff67/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerCrashDisableWAL.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerCrashDisableWAL.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerCrashDisableWAL.java new file mode 100644 index 000..c4571ac --- /dev/null +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerCrashDisableWAL.java @@ -0,0 +1,106 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.regionserver; + +import static org.junit.Assert.assertEquals; + +import java.io.IOException; +import org.apache.hadoop.hbase.HBaseClassTestRule; +import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Table; +import org.apache.hadoop.hbase.master.HMaster; +import org.apache.hadoop.hbase.master.ServerManager; +import org.apache.hadoop.hbase.testclassification.MediumTests; +import org.apache.hadoop.hbase.testclassification.RegionServerTests; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +/** + * Testcase for HBASE-20742 + */ +@Category({ RegionServerTests.class, MediumTests.class }) +public class TestRegionServerCrashDisableWAL { + + @ClassRule + public static final HBaseClassTestRule CLASS_RULE = +HBaseClassTestRule.forClass(TestRegionServerCrashDisableWAL.class); + + private static final HBaseTestingUtility UTIL = new HBaseTestingUtility(); + + private static TableName TABLE_NAME = TableName.valueOf("test"); + + private static byte[] CF =
[41/50] [abbrv] hbase git commit: HBASE-20426 Give up replicating anything in S state
HBASE-20426 Give up replicating anything in S state Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ffedf0e8 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ffedf0e8 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ffedf0e8 Branch: refs/heads/HBASE-19064 Commit: ffedf0e82166537076e34390f956837843ef0275 Parents: 55de709 Author: zhangduo Authored: Thu May 3 15:51:35 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../src/main/protobuf/MasterProcedure.proto | 13 +- .../replication/AbstractPeerProcedure.java | 4 + .../master/replication/ModifyPeerProcedure.java | 6 - .../replication/ReplicationPeerManager.java | 13 +- ...ransitPeerSyncReplicationStateProcedure.java | 94 +++ .../hadoop/hbase/regionserver/LogRoller.java| 11 +- .../regionserver/PeerProcedureHandlerImpl.java | 63 -- .../regionserver/ReplicationSource.java | 1 + .../regionserver/ReplicationSourceManager.java | 118 --- .../TestDrainReplicationQueuesForStandBy.java | 118 +++ 10 files changed, 379 insertions(+), 62 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/ffedf0e8/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto -- diff --git a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto index 861f2bf..8664ddd 100644 --- a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto +++ b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto @@ -396,11 +396,14 @@ enum PeerSyncReplicationStateTransitionState { SET_PEER_NEW_SYNC_REPLICATION_STATE = 2; REFRESH_PEER_SYNC_REPLICATION_STATE_ON_RS_BEGIN = 3; REPLAY_REMOTE_WAL_IN_PEER = 4; - REOPEN_ALL_REGIONS_IN_PEER = 5; - TRANSIT_PEER_NEW_SYNC_REPLICATION_STATE = 6; - REFRESH_PEER_SYNC_REPLICATION_STATE_ON_RS_END = 7; - CREATE_DIR_FOR_REMOTE_WAL = 8; - POST_PEER_SYNC_REPLICATION_STATE_TRANSITION = 9; + REMOVE_ALL_REPLICATION_QUEUES_IN_PEER = 5; + REOPEN_ALL_REGIONS_IN_PEER = 6; + TRANSIT_PEER_NEW_SYNC_REPLICATION_STATE = 7; + REFRESH_PEER_SYNC_REPLICATION_STATE_ON_RS_END = 8; + SYNC_REPLICATION_SET_PEER_ENABLED = 9; + SYNC_REPLICATION_ENABLE_PEER_REFRESH_PEER_ON_RS = 10; + CREATE_DIR_FOR_REMOTE_WAL = 11; + POST_PEER_SYNC_REPLICATION_STATE_TRANSITION = 12; } message PeerModificationStateData { http://git-wip-us.apache.org/repos/asf/hbase/blob/ffedf0e8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java index 6679d78..458e073 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java @@ -106,4 +106,8 @@ public abstract class AbstractPeerProcedure throw new UnsupportedOperationException(); } + protected final void refreshPeer(MasterProcedureEnv env, PeerOperationType type) { + addChildProcedure(env.getMasterServices().getServerManager().getOnlineServersList().stream() + .map(sn -> new RefreshPeerProcedure(peerId, type, sn)).toArray(RefreshPeerProcedure[]::new)); + } } http://git-wip-us.apache.org/repos/asf/hbase/blob/ffedf0e8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java index fc559b0..ad4df61 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java @@ -109,12 +109,6 @@ public abstract class ModifyPeerProcedure extends AbstractPeerProcedure new RefreshPeerProcedure(peerId, type, sn)) - .toArray(RefreshPeerProcedure[]::new)); - } - protected ReplicationPeerConfig getOldPeerConfig() { return null; } http://git-wip-us.apache.org/repos/asf/hbase/blob/ffedf0e8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java -- diff --git
[48/50] [abbrv] hbase git commit: HBASE-20458 Support removing a WAL from LogRoller
HBASE-20458 Support removing a WAL from LogRoller Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/31e4d1dc Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/31e4d1dc Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/31e4d1dc Branch: refs/heads/HBASE-19064 Commit: 31e4d1dc780f0652ce348e7304a4abc6f3c387e5 Parents: d2d5f49 Author: Guanghao Zhang Authored: Mon Apr 23 16:31:54 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../hadoop/hbase/regionserver/LogRoller.java| 29 +-- .../hbase/regionserver/wal/AbstractFSWAL.java | 7 +- .../regionserver/wal/WALClosedException.java| 47 ++ .../hbase/regionserver/TestLogRoller.java | 90 .../regionserver/wal/AbstractTestFSWAL.java | 9 ++ 5 files changed, 171 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/31e4d1dc/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java index 55c5219..ab0083f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java @@ -20,6 +20,8 @@ package org.apache.hadoop.hbase.regionserver; import java.io.Closeable; import java.io.IOException; +import java.util.Iterator; +import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; @@ -30,6 +32,7 @@ import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL; import org.apache.hadoop.hbase.regionserver.wal.FailedLogCloseException; import org.apache.hadoop.hbase.regionserver.wal.WALActionsListener; +import org.apache.hadoop.hbase.regionserver.wal.WALClosedException; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.HasThread; import org.apache.hadoop.hbase.wal.WAL; @@ -177,17 +180,24 @@ public class LogRoller extends HasThread implements Closeable { rollLock.lock(); // FindBugs UL_UNRELEASED_LOCK_EXCEPTION_PATH try { this.lastrolltime = now; -for (Entry entry : walNeedsRoll.entrySet()) { +for (Iterator> iter = walNeedsRoll.entrySet().iterator(); iter +.hasNext();) { + Entry entry = iter.next(); final WAL wal = entry.getKey(); // Force the roll if the logroll.period is elapsed or if a roll was requested. // The returned value is an array of actual region names. - final byte [][] regionsToFlush = wal.rollWriter(periodic || - entry.getValue().booleanValue()); - walNeedsRoll.put(wal, Boolean.FALSE); - if (regionsToFlush != null) { -for (byte[] r : regionsToFlush) { - scheduleFlush(r); + try { +final byte[][] regionsToFlush = +wal.rollWriter(periodic || entry.getValue().booleanValue()); +walNeedsRoll.put(wal, Boolean.FALSE); +if (regionsToFlush != null) { + for (byte[] r : regionsToFlush) { +scheduleFlush(r); + } } + } catch (WALClosedException e) { +LOG.warn("WAL has been closed. Skipping rolling of writer and just remove it", e); +iter.remove(); } } } catch (FailedLogCloseException e) { @@ -252,4 +262,9 @@ public class LogRoller extends HasThread implements Closeable { running = false; interrupt(); } + + @VisibleForTesting + Map getWalNeedsRoll() { +return this.walNeedsRoll; + } } http://git-wip-us.apache.org/repos/asf/hbase/blob/31e4d1dc/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java index 4255086..72ad8b8 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java @@ -754,15 +754,14 @@ public abstract class AbstractFSWAL implements WAL { public byte[][] rollWriter(boolean force) throws FailedLogCloseException, IOException { rollWriterLock.lock(); try { + if (this.closed) { +throw new
[14/50] [abbrv] hbase git commit: HBASE-20720 Add 2.0.1 to the download page
HBASE-20720 Add 2.0.1 to the download page (cherry picked from commit 9101fc246f86445006bfbcdfda5cc495016dc280) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c7d0567a Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c7d0567a Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c7d0567a Branch: refs/heads/HBASE-19064 Commit: c7d0567ac914b6d39950511e896499cf09327d62 Parents: 3ec3b33 Author: Michael Stack Authored: Tue Jun 19 20:16:28 2018 -0700 Committer: Sean Busbey Committed: Wed Jun 20 10:41:51 2018 -0500 -- src/site/xdoc/downloads.xml | 36 1 file changed, 32 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c7d0567a/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index 25bca02..acd1e59 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -38,29 +38,57 @@ under the License. Version Release Date Compatiblity Report + Changes Release Notes Commit Download +2.0.1 + + +2018/06/19 + + +https://apache.org/dist/hbase/2.0.1/compatibility_report_2.0.0vs2.0.1.html;>2.0.0 vs 2.0.1 + + +https://apache.org/dist/hbase/2.0.1/CHANGES.md;>2.0.1 Changes + + +https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>2.0.1 Release Notes + + +https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe;>987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe + + +https://www.apache.org/dyn/closer.lua/hbase/2.0.1/hbase-2.0.1-src.tar.gz;>src (https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-src.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-src.tar.gz.asc;>asc) +https://www.apache.org/dyn/closer.lua/hbase/2.0.1/hbase-2.0.1-bin.tar.gz;>bin (https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-bin.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.1/hbase-2.0..-bin.tar.gz.asc;>asc) + + + + 2.0.0 2018/04/29 -http://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 +https://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 + + +https://apache.org/dist/hbase/2.0.0/CHANGES.md;>2.0.0 Changes -http://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes +https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=7483b111e4da77adbfc8062b3b22cbe7c2cb91c1;>7483b111e4da77adbfc8062b3b22cbe7c2cb91c1 -http://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-src.tar.gz;>src (http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.sha512;>sha512 http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.asc;>asc) -http://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-bin.tar.gz;>bin (http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.sha512;>sha512 http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.asc;>asc) +https://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-src.tar.gz;>src (https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.asc;>asc) +https://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-bin.tar.gz;>bin (https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.asc;>asc)
[10/50] [abbrv] hbase git commit: HBASE-20739 Add priority for SCP
HBASE-20739 Add priority for SCP Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4cb70ea9 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4cb70ea9 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4cb70ea9 Branch: refs/heads/HBASE-19064 Commit: 4cb70ea9f54c01b38acd5e76f482f8f4350d80bc Parents: d23a517 Author: zhangduo Authored: Tue Jun 19 16:29:01 2018 +0800 Committer: zhangduo Committed: Wed Jun 20 15:17:07 2018 +0800 -- .../hbase/master/procedure/FairQueue.java | 6 +- .../procedure/MasterProcedureScheduler.java | 62 .../master/procedure/MasterProcedureUtil.java | 9 ++- .../hbase/master/procedure/SchemaLocking.java | 4 ++ .../hbase/master/procedure/ServerQueue.java | 4 +- 5 files changed, 66 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/4cb70ea9/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/FairQueue.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/FairQueue.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/FairQueue.java index ac8e577..59a5ef8 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/FairQueue.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/FairQueue.java @@ -38,8 +38,10 @@ public class FairQueue> { return; } // Find the one which priority is less than us -// For now only TableQueue has priority, and there are only a small number of tables which -// have higher priority so this will not be an expensive operation. +// For now only TableQueue and ServerQueue has priority. For TableQueue there are only a small +// number of tables which have higher priority, and for ServerQueue there is only one server +// which could carry meta which leads to a higher priority, so this will not be an expensive +// operation. Queue base = queueHead; do { if (base.getPriority() < queue.getPriority()) { http://git-wip-us.apache.org/repos/asf/hbase/blob/4cb70ea9/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java index 8389961..1420986 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java @@ -127,7 +127,8 @@ public class MasterProcedureScheduler extends AbstractProcedureScheduler { } else if (isTableProcedure(proc)) { doAdd(tableRunQueue, getTableQueue(getTableName(proc)), proc, addFront); } else if (isServerProcedure(proc)) { - doAdd(serverRunQueue, getServerQueue(getServerName(proc)), proc, addFront); + ServerProcedureInterface spi = (ServerProcedureInterface) proc; + doAdd(serverRunQueue, getServerQueue(spi.getServerName(), spi), proc, addFront); } else if (isPeerProcedure(proc)) { doAdd(peerRunQueue, getPeerQueue(getPeerId(proc)), proc, addFront); } else { @@ -316,10 +317,11 @@ public class MasterProcedureScheduler extends AbstractProcedureScheduler { return; } } else if (proc instanceof PeerProcedureInterface) { - PeerProcedureInterface iProcPeer = (PeerProcedureInterface) proc; - tryCleanupPeerQueue(iProcPeer.getPeerId(), proc); + tryCleanupPeerQueue(getPeerId(proc), proc); +} else if (proc instanceof ServerProcedureInterface) { + tryCleanupServerQueue(getServerName(proc), proc); } else { - // No cleanup for ServerProcedureInterface types, yet. + // No cleanup for other procedure types, yet. return; } } @@ -366,16 +368,52 @@ public class MasterProcedureScheduler extends AbstractProcedureScheduler { // // Server Queue Lookup Helpers // - private ServerQueue getServerQueue(ServerName serverName) { + private ServerQueue getServerQueue(ServerName serverName, ServerProcedureInterface proc) { final int index = getBucketIndex(serverBuckets, serverName.hashCode()); ServerQueue node = AvlTree.get(serverBuckets[index], serverName, SERVER_QUEUE_KEY_COMPARATOR); -if (node != null) return node; - -node = new ServerQueue(serverName,
[02/50] [abbrv] hbase git commit: HBASE-20727 Persist FlushedSequenceId to speed up WAL split after cluster restart
HBASE-20727 Persist FlushedSequenceId to speed up WAL split after cluster restart Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b336da92 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b336da92 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b336da92 Branch: refs/heads/HBASE-19064 Commit: b336da925ac5c5ee3565112de4b808fe2eed08a2 Parents: 78da0e3 Author: Allan Yang Authored: Tue Jun 19 09:45:47 2018 +0800 Committer: Allan Yang Committed: Tue Jun 19 09:45:47 2018 +0800 -- .../src/main/protobuf/HBase.proto | 15 ++ .../org/apache/hadoop/hbase/master/HMaster.java | 8 + .../hadoop/hbase/master/ServerManager.java | 213 ++- .../apache/hadoop/hbase/master/TestMaster.java | 33 +++ 4 files changed, 268 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/b336da92/hbase-protocol-shaded/src/main/protobuf/HBase.proto -- diff --git a/hbase-protocol-shaded/src/main/protobuf/HBase.proto b/hbase-protocol-shaded/src/main/protobuf/HBase.proto index 29067f1..0af2ffd 100644 --- a/hbase-protocol-shaded/src/main/protobuf/HBase.proto +++ b/hbase-protocol-shaded/src/main/protobuf/HBase.proto @@ -252,4 +252,19 @@ message CacheEvictionStats { optional int64 bytes_evicted = 2; optional int64 max_cache_size = 3; repeated RegionExceptionMessage exception = 4; +} + +message FlushedStoreSequenceId { + required bytes family = 1; + required uint64 seqId = 2; +} + +message FlushedRegionSequenceId { + required bytes regionEncodedName = 1; + required uint64 seqId = 2; + repeated FlushedStoreSequenceId stores = 3; +} + +message FlushedSequenceId { + repeated FlushedRegionSequenceId regionSequenceId = 1; } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hbase/blob/b336da92/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 883bb4f..38aac50 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -862,6 +862,13 @@ public class HMaster extends HRegionServer implements MasterServices { status.setStatus("Initializing ZK system trackers"); initializeZKBasedSystemTrackers(); +status.setStatus("Loading last flushed sequence id of regions"); +try { + this.serverManager.loadLastFlushedSequenceIds(); +} catch (IOException e) { + LOG.debug("Failed to load last flushed sequence id of regions" + + " from file system", e); +} // Set ourselves as active Master now our claim has succeeded up in zk. this.activeMaster = true; @@ -946,6 +953,7 @@ public class HMaster extends HRegionServer implements MasterServices { getChoreService().scheduleChore(normalizerChore); this.catalogJanitorChore = new CatalogJanitor(this); getChoreService().scheduleChore(catalogJanitorChore); +this.serverManager.startChore(); status.setStatus("Starting cluster schema service"); initClusterSchemaService(); http://git-wip-us.apache.org/repos/asf/hbase/blob/b336da92/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java index c746502..cfbd52f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java @@ -38,10 +38,15 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Predicate; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.ClockOutOfSyncException; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.NotServingRegionException; import org.apache.hadoop.hbase.RegionMetrics; +import org.apache.hadoop.hbase.ScheduledChore; import org.apache.hadoop.hbase.ServerMetrics; import org.apache.hadoop.hbase.ServerMetricsBuilder; import org.apache.hadoop.hbase.ServerName; @@ -51,9 +56,11 @@ import org.apache.hadoop.hbase.client.RegionInfo; import
[34/50] [abbrv] hbase git commit: HBASE-19973 Implement a procedure to replay sync replication wal for standby cluster
HBASE-19973 Implement a procedure to replay sync replication wal for standby cluster Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8ab4f3fd Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8ab4f3fd Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8ab4f3fd Branch: refs/heads/HBASE-19064 Commit: 8ab4f3fdb26cb8868794edca9177bbc05afde59e Parents: 7a3338c Author: Guanghao Zhang Authored: Fri Mar 2 18:43:25 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:20:15 2018 +0800 -- .../src/main/protobuf/MasterProcedure.proto | 22 +++ .../apache/hadoop/hbase/executor/EventType.java | 9 +- .../hadoop/hbase/executor/ExecutorType.java | 3 +- .../org/apache/hadoop/hbase/master/HMaster.java | 9 + .../hadoop/hbase/master/MasterServices.java | 6 + .../procedure/PeerProcedureInterface.java | 3 +- .../hbase/master/procedure/PeerQueue.java | 3 +- .../replication/RecoverStandbyProcedure.java| 114 +++ .../ReplaySyncReplicationWALManager.java| 139 + .../ReplaySyncReplicationWALProcedure.java | 196 +++ .../hbase/regionserver/HRegionServer.java | 9 +- .../ReplaySyncReplicationWALCallable.java | 149 ++ .../SyncReplicationPeerInfoProviderImpl.java| 3 + .../org/apache/hadoop/hbase/util/FSUtils.java | 5 + .../hbase/master/MockNoopMasterServices.java| 8 +- .../master/TestRecoverStandbyProcedure.java | 186 ++ 16 files changed, 857 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/8ab4f3fd/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto -- diff --git a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto index e6a2a27..861f2bf 100644 --- a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto +++ b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto @@ -477,3 +477,25 @@ message TransitPeerSyncReplicationStateStateData { optional SyncReplicationState fromState = 1; required SyncReplicationState toState = 2; } + +enum RecoverStandbyState { + RENAME_SYNC_REPLICATION_WALS_DIR = 1; + INIT_WORKERS = 2; + DISPATCH_TASKS = 3; + REMOVE_SYNC_REPLICATION_WALS_DIR = 4; +} + +message RecoverStandbyStateData { + required string peer_id = 1; +} + +message ReplaySyncReplicationWALStateData { + required string peer_id = 1; + required string wal = 2; + optional ServerName target_server = 3; +} + +message ReplaySyncReplicationWALParameter { + required string peer_id = 1; + required string wal = 2; +} http://git-wip-us.apache.org/repos/asf/hbase/blob/8ab4f3fd/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventType.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventType.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventType.java index 922deb8..ad38d1c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventType.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventType.java @@ -281,7 +281,14 @@ public enum EventType { * * RS_REFRESH_PEER */ - RS_REFRESH_PEER (84, ExecutorType.RS_REFRESH_PEER); + RS_REFRESH_PEER(84, ExecutorType.RS_REFRESH_PEER), + + /** + * RS replay sync replication wal. + * + * RS_REPLAY_SYNC_REPLICATION_WAL + */ + RS_REPLAY_SYNC_REPLICATION_WAL(85, ExecutorType.RS_REPLAY_SYNC_REPLICATION_WAL); private final int code; private final ExecutorType executor; http://git-wip-us.apache.org/repos/asf/hbase/blob/8ab4f3fd/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/ExecutorType.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/ExecutorType.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/ExecutorType.java index 7f130d1..ea97354 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/ExecutorType.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/ExecutorType.java @@ -47,7 +47,8 @@ public enum ExecutorType { RS_REGION_REPLICA_FLUSH_OPS (28), RS_COMPACTED_FILES_DISCHARGER (29), RS_OPEN_PRIORITY_REGION(30), - RS_REFRESH_PEER (31); + RS_REFRESH_PEER(31), + RS_REPLAY_SYNC_REPLICATION_WAL(32); ExecutorType(int value) { } http://git-wip-us.apache.org/repos/asf/hbase/blob/8ab4f3fd/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
[07/50] [abbrv] hbase git commit: Add 2.0.1 to the download page
Add 2.0.1 to the download page Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9101fc24 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9101fc24 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9101fc24 Branch: refs/heads/HBASE-19064 Commit: 9101fc246f86445006bfbcdfda5cc495016dc280 Parents: 21684a3 Author: Michael Stack Authored: Tue Jun 19 20:16:28 2018 -0700 Committer: Michael Stack Committed: Tue Jun 19 20:16:28 2018 -0700 -- src/site/xdoc/downloads.xml | 36 1 file changed, 32 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/9101fc24/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index 25bca02..acd1e59 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -38,29 +38,57 @@ under the License. Version Release Date Compatiblity Report + Changes Release Notes Commit Download +2.0.1 + + +2018/06/19 + + +https://apache.org/dist/hbase/2.0.1/compatibility_report_2.0.0vs2.0.1.html;>2.0.0 vs 2.0.1 + + +https://apache.org/dist/hbase/2.0.1/CHANGES.md;>2.0.1 Changes + + +https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>2.0.1 Release Notes + + +https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe;>987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe + + +https://www.apache.org/dyn/closer.lua/hbase/2.0.1/hbase-2.0.1-src.tar.gz;>src (https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-src.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-src.tar.gz.asc;>asc) +https://www.apache.org/dyn/closer.lua/hbase/2.0.1/hbase-2.0.1-bin.tar.gz;>bin (https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-bin.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.1/hbase-2.0..-bin.tar.gz.asc;>asc) + + + + 2.0.0 2018/04/29 -http://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 +https://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 + + +https://apache.org/dist/hbase/2.0.0/CHANGES.md;>2.0.0 Changes -http://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes +https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=7483b111e4da77adbfc8062b3b22cbe7c2cb91c1;>7483b111e4da77adbfc8062b3b22cbe7c2cb91c1 -http://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-src.tar.gz;>src (http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.sha512;>sha512 http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.asc;>asc) -http://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-bin.tar.gz;>bin (http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.sha512;>sha512 http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.asc;>asc) +https://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-src.tar.gz;>src (https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.asc;>asc) +https://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-bin.tar.gz;>bin (https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.asc;>asc)
[17/50] [abbrv] hbase git commit: HBASE-18269 Jython docs out of date
HBASE-18269 Jython docs out of date Signed-off-by: Mike Drob Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d1cad1a2 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d1cad1a2 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d1cad1a2 Branch: refs/heads/HBASE-19064 Commit: d1cad1a25432ffcd75cd654e9bf68233ca7e1957 Parents: 8341237 Author: Artem Ervits Authored: Wed Jun 20 09:42:38 2018 -0700 Committer: Mike Drob Committed: Wed Jun 20 09:42:38 2018 -0700 -- src/main/asciidoc/_chapters/external_apis.adoc | 101 +--- 1 file changed, 44 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/d1cad1a2/src/main/asciidoc/_chapters/external_apis.adoc -- diff --git a/src/main/asciidoc/_chapters/external_apis.adoc b/src/main/asciidoc/_chapters/external_apis.adoc index c1299a6..8f65c4e 100644 --- a/src/main/asciidoc/_chapters/external_apis.adoc +++ b/src/main/asciidoc/_chapters/external_apis.adoc @@ -851,23 +851,14 @@ println(Bytes.toString(value)) === Setting the Classpath To use Jython with HBase, your CLASSPATH must include HBase's classpath as well as -the Jython JARs required by your code. First, use the following command on a server -running the HBase RegionServer process, to get HBase's classpath. - -[source, bash] - -$ ps aux |grep regionserver| awk -F 'java.library.path=' {'print $2'} | awk {'print $1'} +the Jython JARs required by your code. -/usr/lib/hadoop/lib/native:/usr/lib/hbase/lib/native/Linux-amd64-64 - - -Set the `$CLASSPATH` environment variable to include the path you found in the previous -step, plus the path to `jython.jar` and each additional Jython-related JAR needed for -your project. +Set the path to directory containing the `jython.jar` and each additional Jython-related JAR needed for +your project. Then export HBASE_CLASSPATH pointing to the $JYTHON_HOME env. variable. [source, bash] -$ export CLASSPATH=$CLASSPATH:/usr/lib/hadoop/lib/native:/usr/lib/hbase/lib/native/Linux-amd64-64:/path/to/jython.jar +$ export HBASE_CLASSPATH=/directory/jython.jar Start a Jython shell with HBase and Hadoop JARs in the classpath: @@ -877,55 +868,52 @@ $ bin/hbase org.python.util.jython .Table Creation, Population, Get, and Delete with Jython -The following Jython code example creates a table, populates it with data, fetches -the data, and deletes the table. +The following Jython code example checks for table, +if it exists, deletes it and then creates it. Then it +populates the table with data and fetches the data. [source,jython] import java.lang -from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, HConstants, TableName -from org.apache.hadoop.hbase.client import HBaseAdmin, HTable, Get -from org.apache.hadoop.hbase.io import Cell, RowResult +from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, TableName +from org.apache.hadoop.hbase.client import Admin, Connection, ConnectionFactory, Get, Put, Result, Table +from org.apache.hadoop.conf import Configuration # First get a conf object. This will read in the configuration # that is out in your hbase-*.xml files such as location of the # hbase master node. -conf = HBaseConfiguration() +conf = HBaseConfiguration.create() +connection = ConnectionFactory.createConnection(conf) +admin = connection.getAdmin() -# Create a table named 'test' that has two column families, -# one named 'content, and the other 'anchor'. The colons -# are required for column family names. -tablename = TableName.valueOf("test") +# Create a table named 'test' that has a column family +# named 'content'. +tableName = TableName.valueOf("test") +table = connection.getTable(tableName) -desc = HTableDescriptor(tablename) -desc.addFamily(HColumnDescriptor("content:")) -desc.addFamily(HColumnDescriptor("anchor:")) -admin = HBaseAdmin(conf) +desc = HTableDescriptor(tableName) +desc.addFamily(HColumnDescriptor("content")) # Drop and recreate if it exists -if admin.tableExists(tablename): -admin.disableTable(tablename) -admin.deleteTable(tablename) -admin.createTable(desc) +if admin.tableExists(tableName): +admin.disableTable(tableName) +admin.deleteTable(tableName) -tables = admin.listTables() -table = HTable(conf, tablename) +admin.createTable(desc) # Add content to 'column:' on a row named 'row_x' row = 'row_x' -update = Get(row) -update.put('content:', 'some content') -table.commit(update) +put = Put(row) +put.addColumn("content", "qual", "some content") +table.put(put) # Now fetch the content just added, returns a byte[] -data_row = table.get(row, "content:") -data =
[21/50] [abbrv] hbase git commit: HBASE-19078 Add a remote peer cluster wal directory config for synchronous replication
HBASE-19078 Add a remote peer cluster wal directory config for synchronous replication Signed-off-by: zhangduo Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/15583068 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/15583068 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/15583068 Branch: refs/heads/HBASE-19064 Commit: 1558306856ab8d30b35b38c657b58c8b2cce546e Parents: e58eb92 Author: Guanghao Zhang Authored: Sat Jan 13 18:55:28 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:16:55 2018 +0800 -- .../replication/ReplicationPeerConfigUtil.java | 6 ++ .../replication/ReplicationPeerConfig.java | 20 - .../ReplicationPeerConfigBuilder.java | 7 ++ .../src/main/protobuf/Replication.proto | 1 + .../replication/ReplicationPeerManager.java | 15 .../replication/TestReplicationAdmin.java | 77 .../src/main/ruby/hbase/replication_admin.rb| 14 ++-- hbase-shell/src/main/ruby/hbase_constants.rb| 1 + .../src/main/ruby/shell/commands/add_peer.rb| 21 +- .../src/main/ruby/shell/commands/list_peers.rb | 19 - .../test/ruby/hbase/replication_admin_test.rb | 16 11 files changed, 186 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/15583068/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java index b1c1713..474ded3 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java @@ -319,6 +319,9 @@ public final class ReplicationPeerConfigUtil { excludeNamespacesList.stream().map(ByteString::toStringUtf8).collect(Collectors.toSet())); } +if (peer.hasRemoteWALDir()) { + builder.setRemoteWALDir(peer.getRemoteWALDir()); +} return builder.build(); } @@ -376,6 +379,9 @@ public final class ReplicationPeerConfigUtil { } } +if (peerConfig.getRemoteWALDir() != null) { + builder.setRemoteWALDir(peerConfig.getRemoteWALDir()); +} return builder.build(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/15583068/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java index e0d9a4c..97abc74 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java @@ -47,6 +47,8 @@ public class ReplicationPeerConfig { private Set excludeNamespaces = null; private long bandwidth = 0; private final boolean serial; + // Used by synchronous replication + private String remoteWALDir; private ReplicationPeerConfig(ReplicationPeerConfigBuilderImpl builder) { this.clusterKey = builder.clusterKey; @@ -66,6 +68,7 @@ public class ReplicationPeerConfig { : null; this.bandwidth = builder.bandwidth; this.serial = builder.serial; +this.remoteWALDir = builder.remoteWALDir; } private Map> @@ -213,6 +216,10 @@ public class ReplicationPeerConfig { return this; } + public String getRemoteWALDir() { +return this.remoteWALDir; + } + public static ReplicationPeerConfigBuilder newBuilder() { return new ReplicationPeerConfigBuilderImpl(); } @@ -230,7 +237,8 @@ public class ReplicationPeerConfig { .setReplicateAllUserTables(peerConfig.replicateAllUserTables()) .setExcludeTableCFsMap(peerConfig.getExcludeTableCFsMap()) .setExcludeNamespaces(peerConfig.getExcludeNamespaces()) - .setBandwidth(peerConfig.getBandwidth()).setSerial(peerConfig.isSerial()); + .setBandwidth(peerConfig.getBandwidth()).setSerial(peerConfig.isSerial()) + .setRemoteWALDir(peerConfig.getRemoteWALDir()); return builder; } @@ -259,6 +267,8 @@ public class ReplicationPeerConfig { private boolean serial = false; +private String remoteWALDir = null; + @Override public ReplicationPeerConfigBuilder setClusterKey(String clusterKey) { this.clusterKey = clusterKey; @@ -327,6 +337,11 @@
[18/50] [abbrv] hbase git commit: HBASE-20706 Prevent MTP from trying to reopen non-OPEN regions
HBASE-20706 Prevent MTP from trying to reopen non-OPEN regions ModifyTableProcedure is using MoveRegionProcedure in a way that was unintended from the original implementation. As such, we have to guard against certain usages of it. We know we can re-open OPEN regions, but regions in OPENING will similarly soon be OPEN (thus, we want to reopen those regions too). Signed-off-by: Michael Stack Signed-off-by: zhangduo Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e989a992 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e989a992 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e989a992 Branch: refs/heads/HBASE-19064 Commit: e989a9927e4938ab64be9d82324e8a00a5768032 Parents: d1cad1a Author: Josh Elser Authored: Wed Jun 13 16:30:33 2018 -0400 Committer: Josh Elser Committed: Wed Jun 20 14:19:28 2018 -0700 -- .../hbase/master/assignment/RegionStates.java | 27 ++-- .../master/procedure/ModifyTableProcedure.java | 23 +++-- .../procedure/TestModifyTableProcedure.java | 24 + 3 files changed, 54 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/e989a992/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java index 26b340f..d4951f7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java @@ -34,6 +34,7 @@ import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Predicate; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.ServerName; @@ -570,6 +571,18 @@ public class RegionStates { } /** + * @return Returns regions for a table which are open or about to be open (OPEN or OPENING) + */ + public List getOpenRegionsOfTable(final TableName table) { +// We want to get regions which are already open on the cluster or are about to be open. +// The use-case is for identifying regions which need to be re-opened to ensure they see some +// new configuration. Regions in OPENING now are presently being opened by a RS, so we can +// assume that they will imminently be OPEN but may not see our configuration change +return getRegionsOfTable( +table, (state) -> state.isInState(State.OPEN) || state.isInState(State.OPENING)); + } + + /** * @return Return online regions of table; does not include OFFLINE or SPLITTING regions. */ public List getRegionsOfTable(final TableName table) { @@ -577,15 +590,25 @@ public class RegionStates { } /** + * @return Return online regions of table; does not include OFFLINE or SPLITTING regions. + */ + public List getRegionsOfTable(final TableName table, boolean offline) { +return getRegionsOfTable(table, (state) -> include(state, offline)); + } + + /** * @return Return the regions of the table; does not include OFFLINE unless you set * offline to true. Does not include regions that are in the * {@link State#SPLIT} state. */ - public List getRegionsOfTable(final TableName table, final boolean offline) { + public List getRegionsOfTable( + final TableName table, Predicate filter) { final ArrayList nodes = getTableRegionStateNodes(table); final ArrayList hris = new ArrayList(nodes.size()); for (RegionStateNode node: nodes) { - if (include(node, offline)) hris.add(node.getRegionInfo()); + if (filter.test(node)) { +hris.add(node.getRegionInfo()); + } } return hris; } http://git-wip-us.apache.org/repos/asf/hbase/blob/e989a992/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java index 6fb9caa..bcf41ac 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java @@ -56,7 +56,6 @@ public class ModifyTableProcedure private TableDescriptor modifiedTableDescriptor; private boolean
[43/50] [abbrv] hbase git commit: HBASE-19865 Add UT for sync replication peer in DA state
HBASE-19865 Add UT for sync replication peer in DA state Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3e229294 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3e229294 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3e229294 Branch: refs/heads/HBASE-19064 Commit: 3e22929462ed7930c243665dff31a14777b8578b Parents: ffedf0e Author: zhangduo Authored: Tue May 8 20:33:22 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../hbase/replication/TestReplicationBase.java | 28 +++--- ...estReplicationChangingPeerRegionservers.java | 20 ++ .../TestReplicationSmallTestsSync.java | 40 3 files changed, 76 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/3e229294/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java index f96dbe5..cd84293 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java @@ -1,5 +1,4 @@ -/* - * +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -28,6 +27,8 @@ import java.util.List; import java.util.NavigableMap; import java.util.TreeMap; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; @@ -58,6 +59,9 @@ import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableList; +import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap; + /** * This class is only a base for other integration-level replication tests. * Do not add tests here. @@ -99,6 +103,10 @@ public class TestReplicationBase { return false; } + protected boolean isSyncPeer() { +return false; + } + protected final void cleanUp() throws IOException, InterruptedException { // Starting and stopping replication can make us miss new logs, // rolling like this makes sure the most recent one gets added to the queue @@ -245,9 +253,19 @@ public class TestReplicationBase { @Before public void setUpBase() throws Exception { if (!peerExist(PEER_ID2)) { - ReplicationPeerConfig rpc = ReplicationPeerConfig.newBuilder() - .setClusterKey(utility2.getClusterKey()).setSerial(isSerialPeer()).build(); - hbaseAdmin.addReplicationPeer(PEER_ID2, rpc); + ReplicationPeerConfigBuilder builder = ReplicationPeerConfig.newBuilder() +.setClusterKey(utility2.getClusterKey()).setSerial(isSerialPeer()); + if (isSyncPeer()) { +FileSystem fs2 = utility2.getTestFileSystem(); +// The remote wal dir is not important as we do not use it in DA state, here we only need to +// confirm that a sync peer in DA state can still replicate data to remote cluster +// asynchronously. +builder.setReplicateAllUserTables(false) + .setTableCFsMap(ImmutableMap.of(tableName, ImmutableList.of())) + .setRemoteWALDir(new Path("/RemoteWAL") +.makeQualified(fs2.getUri(), fs2.getWorkingDirectory()).toUri().toString()); + } + hbaseAdmin.addReplicationPeer(PEER_ID2, builder.build()); } } http://git-wip-us.apache.org/repos/asf/hbase/blob/3e229294/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java index b94b443..5c96742 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationChangingPeerRegionservers.java @@ -62,22 +62,28 @@ public class TestReplicationChangingPeerRegionservers extends TestReplicationBas private static final Logger LOG =
[11/50] [abbrv] hbase git commit: HTML formatting changes
HTML formatting changes Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d3e237d1 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d3e237d1 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d3e237d1 Branch: refs/heads/HBASE-19064 Commit: d3e237d1419c61f85d7309785609399960e4f521 Parents: 4cb70ea Author: Michael Stack Authored: Wed Jun 20 07:30:50 2018 -0700 Committer: Michael Stack Committed: Wed Jun 20 07:30:50 2018 -0700 -- src/site/xdoc/downloads.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/d3e237d1/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index acd1e59..2fa5559 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -54,10 +54,10 @@ under the License. https://apache.org/dist/hbase/2.0.1/compatibility_report_2.0.0vs2.0.1.html;>2.0.0 vs 2.0.1 -https://apache.org/dist/hbase/2.0.1/CHANGES.md;>2.0.1 Changes +https://apache.org/dist/hbase/2.0.1/CHANGES.md;>Changes -https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>2.0.1 Release Notes +https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe;>987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe @@ -78,10 +78,10 @@ under the License. https://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 -https://apache.org/dist/hbase/2.0.0/CHANGES.md;>2.0.0 Changes +https://apache.org/dist/hbase/2.0.0/CHANGES.md;>Changes -https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes +https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=7483b111e4da77adbfc8062b3b22cbe7c2cb91c1;>7483b111e4da77adbfc8062b3b22cbe7c2cb91c1
[33/50] [abbrv] hbase git commit: HBASE-19943 Only allow removing sync replication peer which is in DA state
HBASE-19943 Only allow removing sync replication peer which is in DA state Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7a3338c8 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7a3338c8 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7a3338c8 Branch: refs/heads/HBASE-19064 Commit: 7a3338c85741354fc0408d80c7ec56e60c3dcaa7 Parents: 4838aba Author: huzheng Authored: Thu Mar 1 18:34:02 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:20:15 2018 +0800 -- .../replication/ReplicationPeerManager.java | 14 - .../hbase/wal/SyncReplicationWALProvider.java | 2 +- .../replication/TestReplicationAdmin.java | 63 .../hbase/replication/TestSyncReplication.java | 2 +- 4 files changed, 78 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/7a3338c8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java index 0dc922d..41dd6e3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java @@ -120,8 +120,20 @@ public class ReplicationPeerManager { return desc; } + private void checkPeerInDAStateIfSyncReplication(String peerId) throws DoNotRetryIOException { +ReplicationPeerDescription desc = peers.get(peerId); +if (desc != null && desc.getPeerConfig().isSyncReplication() +&& !SyncReplicationState.DOWNGRADE_ACTIVE.equals(desc.getSyncReplicationState())) { + throw new DoNotRetryIOException("Couldn't remove synchronous replication peer with state=" + + desc.getSyncReplicationState() + + ", Transit the synchronous replication state to be DOWNGRADE_ACTIVE firstly."); +} + } + ReplicationPeerConfig preRemovePeer(String peerId) throws DoNotRetryIOException { -return checkPeerExists(peerId).getPeerConfig(); +ReplicationPeerDescription pd = checkPeerExists(peerId); +checkPeerInDAStateIfSyncReplication(peerId); +return pd.getPeerConfig(); } void preEnablePeer(String peerId) throws DoNotRetryIOException { http://git-wip-us.apache.org/repos/asf/hbase/blob/7a3338c8/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java index ac4b4cd..282aa21 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java @@ -142,7 +142,7 @@ public class SyncReplicationWALProvider implements WALProvider, PeerActionListen @Override public WAL getWAL(RegionInfo region) throws IOException { if (region == null) { - return provider.getWAL(region); + return provider.getWAL(null); } Optional> peerIdAndRemoteWALDir = peerInfoProvider.getPeerIdAndRemoteWALDir(region); http://git-wip-us.apache.org/repos/asf/hbase/blob/7a3338c8/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java index 0ad476f..486ab51 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java @@ -254,6 +254,62 @@ public class TestReplicationAdmin { } @Test + public void testRemovePeerWithNonDAState() throws Exception { +TableName tableName = TableName.valueOf(name.getMethodName()); +TEST_UTIL.createTable(tableName, Bytes.toBytes("family")); +ReplicationPeerConfigBuilder builder = ReplicationPeerConfig.newBuilder(); + +String rootDir = "hdfs://srv1:/hbase"; +builder.setClusterKey(KEY_ONE); +builder.setRemoteWALDir(rootDir); +builder.setReplicateAllUserTables(false); +Map> tableCfs = new HashMap<>(); +tableCfs.put(tableName, new ArrayList<>()); +
[50/50] [abbrv] hbase git commit: HBASE-20569 NPE in RecoverStandbyProcedure.execute
HBASE-20569 NPE in RecoverStandbyProcedure.execute Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5afb9f67 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5afb9f67 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5afb9f67 Branch: refs/heads/HBASE-19064 Commit: 5afb9f673f5b56fa6dbfa9fd2fb7f16ee43efe34 Parents: 3671407 Author: Guanghao Zhang Authored: Thu May 31 20:54:59 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:55 2018 +0800 -- .../src/main/protobuf/MasterProcedure.proto | 26 ++- .../org/apache/hadoop/hbase/master/HMaster.java | 10 +- .../hadoop/hbase/master/MasterServices.java | 6 +- .../procedure/MasterProcedureScheduler.java | 3 +- .../procedure/PeerProcedureInterface.java | 2 +- .../hbase/master/procedure/PeerQueue.java | 3 +- .../replication/RecoverStandbyProcedure.java| 68 -- .../master/replication/RemovePeerProcedure.java | 5 +- .../ReplaySyncReplicationWALManager.java| 169 -- .../ReplaySyncReplicationWALProcedure.java | 196 - .../SyncReplicationReplayWALManager.java| 218 +++ .../SyncReplicationReplayWALProcedure.java | 164 ++ ...SyncReplicationReplayWALRemoteProcedure.java | 213 ++ ...ransitPeerSyncReplicationStateProcedure.java | 6 +- ...ZKSyncReplicationReplayWALWorkerStorage.java | 108 + .../ReplaySyncReplicationWALCallable.java | 46 ++-- .../hbase/master/MockNoopMasterServices.java| 4 +- .../replication/SyncReplicationTestBase.java| 6 +- .../TestSyncReplicationStandbyKillMaster.java | 88 .../TestSyncReplicationStandbyKillRS.java | 119 ++ .../master/TestRecoverStandbyProcedure.java | 10 +- 21 files changed, 1040 insertions(+), 430 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/5afb9f67/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto -- diff --git a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto index da3cbca..7a42da2 100644 --- a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto +++ b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto @@ -483,22 +483,34 @@ message TransitPeerSyncReplicationStateStateData { enum RecoverStandbyState { RENAME_SYNC_REPLICATION_WALS_DIR = 1; - INIT_WORKERS = 2; - DISPATCH_TASKS = 3; - SNAPSHOT_SYNC_REPLICATION_WALS_DIR = 4; + REGISTER_PEER_TO_WORKER_STORAGE = 2; + DISPATCH_WALS = 3; + UNREGISTER_PEER_FROM_WORKER_STORAGE = 4; + SNAPSHOT_SYNC_REPLICATION_WALS_DIR = 5; +} + +enum SyncReplicationReplayWALState { + ASSIGN_WORKER = 1; + DISPATCH_WALS_TO_WORKER = 2; + RELEASE_WORKER = 3; } message RecoverStandbyStateData { + required bool serial = 1; +} + +message SyncReplicationReplayWALStateData { required string peer_id = 1; + repeated string wal = 2; } -message ReplaySyncReplicationWALStateData { +message SyncReplicationReplayWALRemoteStateData { required string peer_id = 1; - required string wal = 2; - optional ServerName target_server = 3; + repeated string wal = 2; + required ServerName target_server = 3; } message ReplaySyncReplicationWALParameter { required string peer_id = 1; - required string wal = 2; + repeated string wal = 2; } http://git-wip-us.apache.org/repos/asf/hbase/blob/5afb9f67/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 9a0cbf9..e55ee06 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -138,8 +138,8 @@ import org.apache.hadoop.hbase.master.replication.AddPeerProcedure; import org.apache.hadoop.hbase.master.replication.DisablePeerProcedure; import org.apache.hadoop.hbase.master.replication.EnablePeerProcedure; import org.apache.hadoop.hbase.master.replication.RemovePeerProcedure; -import org.apache.hadoop.hbase.master.replication.ReplaySyncReplicationWALManager; import org.apache.hadoop.hbase.master.replication.ReplicationPeerManager; +import org.apache.hadoop.hbase.master.replication.SyncReplicationReplayWALManager; import org.apache.hadoop.hbase.master.replication.TransitPeerSyncReplicationStateProcedure; import org.apache.hadoop.hbase.master.replication.UpdatePeerConfigProcedure; import org.apache.hadoop.hbase.master.snapshot.SnapshotManager; @@ -342,7 +342,7
[31/50] [abbrv] hbase git commit: HBASE-19079 Support setting up two clusters with A and S stat
HBASE-19079 Support setting up two clusters with A and S stat Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c79f0e7b Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c79f0e7b Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c79f0e7b Branch: refs/heads/HBASE-19064 Commit: c79f0e7bf5a0b1b648e45d7ea2886646980320a8 Parents: 9dd7f17 Author: zhangduo Authored: Tue Apr 10 22:35:19 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:20:15 2018 +0800 -- .../replication/ReplicationPeerManager.java | 5 +- ...ransitPeerSyncReplicationStateProcedure.java | 2 +- .../hbase/regionserver/wal/DualAsyncFSWAL.java | 14 ++ .../hadoop/hbase/regionserver/wal/WALUtil.java | 25 ++- .../hbase/replication/ChainWALEntryFilter.java | 28 +-- .../ReplaySyncReplicationWALCallable.java | 27 ++- .../SyncReplicationPeerInfoProviderImpl.java| 6 +- .../hadoop/hbase/wal/AbstractFSWALProvider.java | 10 +- .../hbase/wal/SyncReplicationWALProvider.java | 94 ++--- .../org/apache/hadoop/hbase/wal/WALEdit.java| 8 +- .../org/apache/hadoop/hbase/wal/WALFactory.java | 2 +- .../replication/TestReplicationAdmin.java | 33 +-- .../regionserver/wal/TestWALDurability.java | 2 + .../replication/SyncReplicationTestBase.java| 185 + .../hbase/replication/TestSyncReplication.java | 207 --- .../replication/TestSyncReplicationActive.java | 64 ++ .../replication/TestSyncReplicationStandBy.java | 96 + 17 files changed, 521 insertions(+), 287 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c79f0e7b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java index 41dd6e3..229549e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java @@ -68,8 +68,9 @@ public class ReplicationPeerManager { private final ImmutableMap> allowedTransition = Maps.immutableEnumMap(ImmutableMap.of(SyncReplicationState.ACTIVE, - EnumSet.of(SyncReplicationState.DOWNGRADE_ACTIVE), SyncReplicationState.STANDBY, - EnumSet.of(SyncReplicationState.DOWNGRADE_ACTIVE), SyncReplicationState.DOWNGRADE_ACTIVE, + EnumSet.of(SyncReplicationState.DOWNGRADE_ACTIVE, SyncReplicationState.STANDBY), + SyncReplicationState.STANDBY, EnumSet.of(SyncReplicationState.DOWNGRADE_ACTIVE), + SyncReplicationState.DOWNGRADE_ACTIVE, EnumSet.of(SyncReplicationState.STANDBY, SyncReplicationState.ACTIVE))); ReplicationPeerManager(ReplicationPeerStorage peerStorage, ReplicationQueueStorage queueStorage, http://git-wip-us.apache.org/repos/asf/hbase/blob/c79f0e7b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java index cc51890..5da2b0c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java @@ -171,7 +171,7 @@ public class TransitPeerSyncReplicationStateProcedure } return Flow.HAS_MORE_STATE; case REPLAY_REMOTE_WAL_IN_PEER: -// TODO: replay remote wal when transiting from S to DA. +addChildProcedure(new RecoverStandbyProcedure(peerId)); setNextState(PeerSyncReplicationStateTransitionState.REOPEN_ALL_REGIONS_IN_PEER); return Flow.HAS_MORE_STATE; case REOPEN_ALL_REGIONS_IN_PEER: http://git-wip-us.apache.org/repos/asf/hbase/blob/c79f0e7b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/DualAsyncFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/DualAsyncFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/DualAsyncFSWAL.java index 0495337..a98567a 100644 ---
[30/50] [abbrv] hbase git commit: HBASE-19990 Create remote wal directory when transitting to state S
HBASE-19990 Create remote wal directory when transitting to state S Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4838abae Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4838abae Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4838abae Branch: refs/heads/HBASE-19064 Commit: 4838abae0bf063d23c0a9e0704d30f4e9a6edaa2 Parents: ba46605 Author: zhangduo Authored: Wed Feb 14 16:01:16 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:20:15 2018 +0800 -- .../procedure2/ProcedureYieldException.java | 9 -- .../hbase/replication/ReplicationUtils.java | 2 ++ .../hadoop/hbase/master/MasterFileSystem.java | 19 ++--- .../master/procedure/MasterProcedureEnv.java| 5 ...ransitPeerSyncReplicationStateProcedure.java | 29 .../hbase/replication/TestSyncReplication.java | 8 ++ 6 files changed, 55 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/4838abae/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureYieldException.java -- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureYieldException.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureYieldException.java index 0487ac5b..dbb9981 100644 --- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureYieldException.java +++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureYieldException.java @@ -15,16 +15,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.procedure2; import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceStability; -// TODO: Not used yet +/** + * Indicate that a procedure wants to be rescheduled. Usually because there are something wrong but + * we do not want to fail the procedure. + * + * TODO: need to support scheduling after a delay. + */ @InterfaceAudience.Private @InterfaceStability.Stable public class ProcedureYieldException extends ProcedureException { + /** default constructor */ public ProcedureYieldException() { super(); http://git-wip-us.apache.org/repos/asf/hbase/blob/4838abae/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java -- diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java index d94cb00..e402d0f 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java @@ -41,6 +41,8 @@ public final class ReplicationUtils { public static final String REPLICATION_ATTR_NAME = "__rep__"; + public static final String REMOTE_WAL_DIR_NAME = "remoteWALs"; + private ReplicationUtils() { } http://git-wip-us.apache.org/repos/asf/hbase/blob/4838abae/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java index 864be02..7ccbd71 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java @@ -41,6 +41,7 @@ import org.apache.hadoop.hbase.log.HBaseMarkers; import org.apache.hadoop.hbase.mob.MobConstants; import org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore; import org.apache.hadoop.hbase.regionserver.HRegion; +import org.apache.hadoop.hbase.replication.ReplicationUtils; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.FSTableDescriptors; import org.apache.hadoop.hbase.util.FSUtils; @@ -133,7 +134,6 @@ public class MasterFileSystem { * Idempotent. */ private void createInitialFileSystemLayout() throws IOException { - final String[] protectedSubDirs = new String[] { HConstants.BASE_NAMESPACE_DIR, HConstants.HFILE_ARCHIVE_DIRECTORY, @@ -145,7 +145,8 @@ public class MasterFileSystem { HConstants.HREGION_LOGDIR_NAME, HConstants.HREGION_OLDLOGDIR_NAME, HConstants.CORRUPT_DIR_NAME, - WALProcedureStore.MASTER_PROCEDURE_LOGDIR + WALProcedureStore.MASTER_PROCEDURE_LOGDIR, +
[36/50] [abbrv] hbase git commit: HBASE-19999 Remove the SYNC_REPLICATION_ENABLED flag
HBASE-1 Remove the SYNC_REPLICATION_ENABLED flag Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9dd7f17d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9dd7f17d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9dd7f17d Branch: refs/heads/HBASE-19064 Commit: 9dd7f17d9757a8b1a1fae5e9a289e91f68b07659 Parents: 8ab4f3f Author: Guanghao Zhang Authored: Fri Mar 9 11:30:25 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:20:15 2018 +0800 -- .../hbase/replication/ReplicationUtils.java | 2 -- .../hadoop/hbase/regionserver/HRegionServer.java | 13 - .../hbase/wal/SyncReplicationWALProvider.java| 19 ++- .../org/apache/hadoop/hbase/wal/WALFactory.java | 18 -- .../hbase/replication/TestSyncReplication.java | 1 - .../master/TestRecoverStandbyProcedure.java | 2 -- .../wal/TestSyncReplicationWALProvider.java | 2 -- 7 files changed, 38 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/9dd7f17d/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java -- diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java index e402d0f..cb22f57 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java @@ -37,8 +37,6 @@ import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public final class ReplicationUtils { - public static final String SYNC_REPLICATION_ENABLED = "hbase.replication.sync.enabled"; - public static final String REPLICATION_ATTR_NAME = "__rep__"; public static final String REMOTE_WAL_DIR_NAME = "remoteWALs"; http://git-wip-us.apache.org/repos/asf/hbase/blob/9dd7f17d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 5efbfd3..97e88ef 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -1803,10 +1803,8 @@ public class HRegionServer extends HasThread implements private void setupWALAndReplication() throws IOException { boolean isMasterNoTableOrSystemTableOnly = this instanceof HMaster && (!LoadBalancer.isTablesOnMaster(conf) || LoadBalancer.isSystemTablesOnlyOnMaster(conf)); -if (isMasterNoTableOrSystemTableOnly) { - conf.setBoolean(ReplicationUtils.SYNC_REPLICATION_ENABLED, false); -} -WALFactory factory = new WALFactory(conf, serverName.toString()); +WALFactory factory = +new WALFactory(conf, serverName.toString(), !isMasterNoTableOrSystemTableOnly); if (!isMasterNoTableOrSystemTableOnly) { // TODO Replication make assumptions here based on the default filesystem impl Path oldLogDir = new Path(walRootDir, HConstants.HREGION_OLDLOGDIR_NAME); @@ -1930,11 +1928,8 @@ public class HRegionServer extends HasThread implements } this.executorService.startExecutorService(ExecutorType.RS_REFRESH_PEER, conf.getInt("hbase.regionserver.executor.refresh.peer.threads", 2)); - -if (conf.getBoolean(ReplicationUtils.SYNC_REPLICATION_ENABLED, false)) { - this.executorService.startExecutorService(ExecutorType.RS_REPLAY_SYNC_REPLICATION_WAL, - conf.getInt("hbase.regionserver.executor.replay.sync.replication.wal.threads", 2)); -} + this.executorService.startExecutorService(ExecutorType.RS_REPLAY_SYNC_REPLICATION_WAL, + conf.getInt("hbase.regionserver.executor.replay.sync.replication.wal.threads", 1)); Threads.setDaemonThreadRunning(this.walRoller.getThread(), getName() + ".logRoller", uncaughtExceptionHandler); http://git-wip-us.apache.org/repos/asf/hbase/blob/9dd7f17d/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/SyncReplicationWALProvider.java index 282aa21..54287fe 100644 ---
[25/50] [abbrv] hbase git commit: HBASE-19781 Add a new cluster state flag for synchronous replication
http://git-wip-us.apache.org/repos/asf/hbase/blob/da14ac38/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckReplication.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckReplication.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckReplication.java index 8911982..f5eca39 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckReplication.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckReplication.java @@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; import org.apache.hadoop.hbase.replication.ReplicationPeerStorage; import org.apache.hadoop.hbase.replication.ReplicationQueueStorage; import org.apache.hadoop.hbase.replication.ReplicationStorageFactory; +import org.apache.hadoop.hbase.replication.SyncReplicationState; import org.apache.hadoop.hbase.testclassification.MediumTests; import org.apache.hadoop.hbase.testclassification.ReplicationTests; import org.apache.hadoop.hbase.util.HBaseFsck.ErrorReporter.ERROR_CODE; @@ -67,9 +68,9 @@ public class TestHBaseFsckReplication { String peerId1 = "1"; String peerId2 = "2"; peerStorage.addPeer(peerId1, ReplicationPeerConfig.newBuilder().setClusterKey("key").build(), - true); + true, SyncReplicationState.NONE); peerStorage.addPeer(peerId2, ReplicationPeerConfig.newBuilder().setClusterKey("key").build(), - true); + true, SyncReplicationState.NONE); for (int i = 0; i < 10; i++) { queueStorage.addWAL(ServerName.valueOf("localhost", 1 + i, 10 + i), peerId1, "file-" + i); http://git-wip-us.apache.org/repos/asf/hbase/blob/da14ac38/hbase-shell/src/main/ruby/hbase/replication_admin.rb -- diff --git a/hbase-shell/src/main/ruby/hbase/replication_admin.rb b/hbase-shell/src/main/ruby/hbase/replication_admin.rb index d1f1344..5f86365 100644 --- a/hbase-shell/src/main/ruby/hbase/replication_admin.rb +++ b/hbase-shell/src/main/ruby/hbase/replication_admin.rb @@ -20,6 +20,7 @@ include Java java_import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil +java_import org.apache.hadoop.hbase.replication.SyncReplicationState java_import org.apache.hadoop.hbase.replication.ReplicationPeerConfig java_import org.apache.hadoop.hbase.util.Bytes java_import org.apache.hadoop.hbase.zookeeper.ZKConfig @@ -338,6 +339,20 @@ module Hbase '!' + ReplicationPeerConfigUtil.convertToString(tableCFs) end +# Transit current cluster to a new state in the specified synchronous +# replication peer +def transit_peer_sync_replication_state(id, state) + if 'ACTIVE'.eql?(state) +@admin.transitReplicationPeerSyncReplicationState(id, SyncReplicationState::ACTIVE) + elsif 'DOWNGRADE_ACTIVE'.eql?(state) +@admin.transitReplicationPeerSyncReplicationState(id, SyncReplicationState::DOWNGRADE_ACTIVE) + elsif 'STANDBY'.eql?(state) +@admin.transitReplicationPeerSyncReplicationState(id, SyncReplicationState::STANDBY) + else +raise(ArgumentError, 'synchronous replication state must be ACTIVE, DOWNGRADE_ACTIVE or STANDBY') + end +end + #-- # Enables a table's replication switch def enable_tablerep(table_name) http://git-wip-us.apache.org/repos/asf/hbase/blob/da14ac38/hbase-shell/src/main/ruby/shell.rb -- diff --git a/hbase-shell/src/main/ruby/shell.rb b/hbase-shell/src/main/ruby/shell.rb index 9a79658..934fa11 100644 --- a/hbase-shell/src/main/ruby/shell.rb +++ b/hbase-shell/src/main/ruby/shell.rb @@ -393,6 +393,7 @@ Shell.load_command_group( get_peer_config list_peer_configs update_peer_config +transit_peer_sync_replication_state ] ) http://git-wip-us.apache.org/repos/asf/hbase/blob/da14ac38/hbase-shell/src/main/ruby/shell/commands/list_peers.rb -- diff --git a/hbase-shell/src/main/ruby/shell/commands/list_peers.rb b/hbase-shell/src/main/ruby/shell/commands/list_peers.rb index f3ab749..f2ec014 100644 --- a/hbase-shell/src/main/ruby/shell/commands/list_peers.rb +++ b/hbase-shell/src/main/ruby/shell/commands/list_peers.rb @@ -39,8 +39,8 @@ EOF peers = replication_admin.list_peers formatter.header(%w[PEER_ID CLUSTER_KEY ENDPOINT_CLASSNAME -REMOTE_ROOT_DIR STATE REPLICATE_ALL -NAMESPACES TABLE_CFS BANDWIDTH +REMOTE_ROOT_DIR SYNC_REPLICATION_STATE STATE +REPLICATE_ALL NAMESPACES TABLE_CFS BANDWIDTH
[47/50] [abbrv] hbase git commit: HBASE-20576 Check remote WAL directory when creating peer and transiting peer to A
HBASE-20576 Check remote WAL directory when creating peer and transiting peer to A Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/62dab3b2 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/62dab3b2 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/62dab3b2 Branch: refs/heads/HBASE-19064 Commit: 62dab3b2291d6d0ebf38aa1c9337f0f4bad30f9a Parents: 3e22929 Author: zhangduo Authored: Tue May 15 15:07:40 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../replication/ReplicationPeerManager.java | 19 +++-- ...ransitPeerSyncReplicationStateProcedure.java | 73 +--- .../replication/TestReplicationAdmin.java | 57 --- 3 files changed, 110 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/62dab3b2/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java index e1d8b51..8e49137 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; +import java.net.URI; import java.util.ArrayList; import java.util.Collection; import java.util.EnumSet; @@ -31,6 +32,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; @@ -45,7 +47,6 @@ import org.apache.hadoop.hbase.replication.ReplicationQueueStorage; import org.apache.hadoop.hbase.replication.ReplicationStorageFactory; import org.apache.hadoop.hbase.replication.ReplicationUtils; import org.apache.hadoop.hbase.replication.SyncReplicationState; -import org.apache.hadoop.hbase.util.Pair; import org.apache.hadoop.hbase.zookeeper.ZKConfig; import org.apache.hadoop.hbase.zookeeper.ZKWatcher; import org.apache.yetus.audience.InterfaceAudience; @@ -193,9 +194,9 @@ public class ReplicationPeerManager { } /** - * @return the old state, and whether the peer is enabled. + * @return the old desciption of the peer */ - Pair preTransitPeerSyncReplicationState(String peerId, + ReplicationPeerDescription preTransitPeerSyncReplicationState(String peerId, SyncReplicationState state) throws DoNotRetryIOException { ReplicationPeerDescription desc = checkPeerExists(peerId); SyncReplicationState fromState = desc.getSyncReplicationState(); @@ -204,7 +205,7 @@ public class ReplicationPeerManager { throw new DoNotRetryIOException("Can not transit current cluster state from " + fromState + " to " + state + " for peer id=" + peerId); } -return Pair.newPair(fromState, desc.isEnabled()); +return desc; } public void addPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) @@ -384,6 +385,16 @@ public class ReplicationPeerManager { "Only support replicated table config for sync replication peer"); } } +Path remoteWALDir = new Path(peerConfig.getRemoteWALDir()); +if (!remoteWALDir.isAbsolute()) { + throw new DoNotRetryIOException( +"The remote WAL directory " + peerConfig.getRemoteWALDir() + " is not absolute"); +} +URI remoteWALDirUri = remoteWALDir.toUri(); +if (remoteWALDirUri.getScheme() == null || remoteWALDirUri.getAuthority() == null) { + throw new DoNotRetryIOException("The remote WAL directory " + peerConfig.getRemoteWALDir() + +" is not qualified, you must provide scheme and authority"); +} } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/62dab3b2/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java index 0175296..ebe7a93 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java +++
[19/50] [abbrv] hbase git commit: HBASE-20642 Clients should re-use the same nonce across DDL operations
HBASE-20642 Clients should re-use the same nonce across DDL operations Also changes modify table operations to help the case where a MTP spans two master, avoiding the sanity-checks propagating back to the client unnecessarily. Signed-off-by: Josh Elser Signed-off-by: Michael Stack Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/72784c2d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/72784c2d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/72784c2d Branch: refs/heads/HBASE-19064 Commit: 72784c2d836a4b977667449d3adec5e8d15453f5 Parents: e989a99 Author: Ankit Singhal Authored: Wed Jun 20 14:52:26 2018 -0700 Committer: Josh Elser Committed: Wed Jun 20 14:56:10 2018 -0700 -- .../apache/hadoop/hbase/client/HBaseAdmin.java | 53 -- .../org/apache/hadoop/hbase/master/HMaster.java | 168 ++- .../MasterProcedureTestingUtility.java | 24 ++- .../procedure/TestModifyTableProcedure.java | 71 4 files changed, 224 insertions(+), 92 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/72784c2d/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index 172db5b..07e1be4 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -348,11 +348,13 @@ public class HBaseAdmin implements Admin { public Future modifyTableAsync(TableDescriptor td) throws IOException { ModifyTableResponse response = executeCallable( new MasterCallable(getConnection(), getRpcControllerFactory()) { +Long nonceGroup = ng.getNonceGroup(); +Long nonce = ng.newNonce(); @Override protected ModifyTableResponse rpcCall() throws Exception { setPriority(td.getTableName()); ModifyTableRequest request = RequestConverter.buildModifyTableRequest( -td.getTableName(), td, ng.getNonceGroup(), ng.newNonce()); +td.getTableName(), td, nonceGroup, nonce); return master.modifyTable(getRpcController(), request); } }); @@ -644,11 +646,13 @@ public class HBaseAdmin implements Admin { CreateTableResponse response = executeCallable( new MasterCallable(getConnection(), getRpcControllerFactory()) { +Long nonceGroup = ng.getNonceGroup(); +Long nonce = ng.newNonce(); @Override protected CreateTableResponse rpcCall() throws Exception { setPriority(desc.getTableName()); CreateTableRequest request = RequestConverter.buildCreateTableRequest( -desc, splitKeys, ng.getNonceGroup(), ng.newNonce()); +desc, splitKeys, nonceGroup, nonce); return master.createTable(getRpcController(), request); } }); @@ -694,11 +698,13 @@ public class HBaseAdmin implements Admin { public Future deleteTableAsync(final TableName tableName) throws IOException { DeleteTableResponse response = executeCallable( new MasterCallable(getConnection(), getRpcControllerFactory()) { +Long nonceGroup = ng.getNonceGroup(); +Long nonce = ng.newNonce(); @Override protected DeleteTableResponse rpcCall() throws Exception { setPriority(tableName); DeleteTableRequest req = - RequestConverter.buildDeleteTableRequest(tableName, ng.getNonceGroup(),ng.newNonce()); + RequestConverter.buildDeleteTableRequest(tableName, nonceGroup,nonce); return master.deleteTable(getRpcController(), req); } }); @@ -775,12 +781,14 @@ public class HBaseAdmin implements Admin { TruncateTableResponse response = executeCallable(new MasterCallable(getConnection(), getRpcControllerFactory()) { + Long nonceGroup = ng.getNonceGroup(); + Long nonce = ng.newNonce(); @Override protected TruncateTableResponse rpcCall() throws Exception { setPriority(tableName); LOG.info("Started truncating " + tableName); TruncateTableRequest req = RequestConverter.buildTruncateTableRequest( - tableName, preserveSplits, ng.getNonceGroup(), ng.newNonce()); + tableName, preserveSplits, nonceGroup, nonce); return master.truncateTable(getRpcController(), req); } }); @@ -838,12 +846,14 @@ public class HBaseAdmin implements Admin { TableName.isLegalFullyQualifiedTableName(tableName.getName());
[13/50] [abbrv] hbase git commit: Revert "Add 2.0.1 to the download page"
Revert "Add 2.0.1 to the download page" This reverts commit 9101fc246f86445006bfbcdfda5cc495016dc280. needs a jira Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3ec3b333 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3ec3b333 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3ec3b333 Branch: refs/heads/HBASE-19064 Commit: 3ec3b333758fb7ca0180fc680bc68939dd22f780 Parents: 0d660e3 Author: Sean Busbey Authored: Wed Jun 20 10:40:43 2018 -0500 Committer: Sean Busbey Committed: Wed Jun 20 10:40:43 2018 -0500 -- src/site/xdoc/downloads.xml | 36 1 file changed, 4 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/3ec3b333/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index acd1e59..25bca02 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -38,57 +38,29 @@ under the License. Version Release Date Compatiblity Report - Changes Release Notes Commit Download -2.0.1 - - -2018/06/19 - - -https://apache.org/dist/hbase/2.0.1/compatibility_report_2.0.0vs2.0.1.html;>2.0.0 vs 2.0.1 - - -https://apache.org/dist/hbase/2.0.1/CHANGES.md;>2.0.1 Changes - - -https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>2.0.1 Release Notes - - -https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe;>987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe - - -https://www.apache.org/dyn/closer.lua/hbase/2.0.1/hbase-2.0.1-src.tar.gz;>src (https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-src.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-src.tar.gz.asc;>asc) -https://www.apache.org/dyn/closer.lua/hbase/2.0.1/hbase-2.0.1-bin.tar.gz;>bin (https://apache.org/dist/hbase/2.0.1/hbase-2.0.1-bin.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.1/hbase-2.0..-bin.tar.gz.asc;>asc) - - - - 2.0.0 2018/04/29 -https://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 - - -https://apache.org/dist/hbase/2.0.0/CHANGES.md;>2.0.0 Changes +http://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 -https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes +http://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=7483b111e4da77adbfc8062b3b22cbe7c2cb91c1;>7483b111e4da77adbfc8062b3b22cbe7c2cb91c1 -https://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-src.tar.gz;>src (https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.asc;>asc) -https://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-bin.tar.gz;>bin (https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.sha512;>sha512 https://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.asc;>asc) +http://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-src.tar.gz;>src (http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.sha512;>sha512 http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.asc;>asc) +http://www.apache.org/dyn/closer.lua/hbase/2.0.0/hbase-2.0.0-bin.tar.gz;>bin (http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.sha512;>sha512 http://apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.asc;>asc)
[46/50] [abbrv] hbase git commit: HBASE-20432 Cleanup related resources when remove a sync replication peer
HBASE-20432 Cleanup related resources when remove a sync replication peer Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/55de709e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/55de709e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/55de709e Branch: refs/heads/HBASE-19064 Commit: 55de709e95c4fa5c4a239438000ed66243c79778 Parents: 31e4d1d Author: huzheng Authored: Wed Apr 18 20:38:33 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../master/replication/RemovePeerProcedure.java | 10 + .../ReplaySyncReplicationWALManager.java| 8 .../replication/SyncReplicationTestBase.java| 45 +--- .../replication/TestSyncReplicationActive.java | 9 ++-- .../replication/TestSyncReplicationStandBy.java | 31 -- 5 files changed, 89 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/55de709e/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java index 82dc07e..7335fe0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java @@ -66,9 +66,19 @@ public class RemovePeerProcedure extends ModifyPeerProcedure { env.getReplicationPeerManager().removePeer(peerId); } + private void removeRemoteWALs(MasterProcedureEnv env) throws IOException { +ReplaySyncReplicationWALManager remoteWALManager = +env.getMasterServices().getReplaySyncReplicationWALManager(); +remoteWALManager.removePeerRemoteWALs(peerId); +remoteWALManager.removePeerReplayWALDir(peerId); + } + @Override protected void postPeerModification(MasterProcedureEnv env) throws IOException, ReplicationException { +if (peerConfig.isSyncReplication()) { + removeRemoteWALs(env); +} env.getReplicationPeerManager().removeAllQueuesAndHFileRefs(peerId); if (peerConfig.isSerial()) { env.getReplicationPeerManager().removeAllLastPushedSeqIds(peerId); http://git-wip-us.apache.org/repos/asf/hbase/blob/55de709e/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplaySyncReplicationWALManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplaySyncReplicationWALManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplaySyncReplicationWALManager.java index 72f5c37..eac5aa4 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplaySyncReplicationWALManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplaySyncReplicationWALManager.java @@ -115,6 +115,14 @@ public class ReplaySyncReplicationWALManager { } } + public void removePeerRemoteWALs(String peerId) throws IOException { +Path remoteWALDir = getPeerRemoteWALDir(peerId); +if (fs.exists(remoteWALDir) && !fs.delete(remoteWALDir, true)) { + throw new IOException( + "Failed to remove remote WALs dir " + remoteWALDir + " for peer id=" + peerId); +} + } + public void initPeerWorkers(String peerId) { BlockingQueue servers = new LinkedBlockingQueue<>(); services.getServerManager().getOnlineServers().keySet() http://git-wip-us.apache.org/repos/asf/hbase/blob/55de709e/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/SyncReplicationTestBase.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/SyncReplicationTestBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/SyncReplicationTestBase.java index 0d5fce8..de679be 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/SyncReplicationTestBase.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/SyncReplicationTestBase.java @@ -19,6 +19,7 @@ package org.apache.hadoop.hbase.replication; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.io.IOException; import java.util.ArrayList; @@ -71,6 +72,10 @@ public class SyncReplicationTestBase { protected static String PEER_ID = "1"; + protected static Path remoteWALDir1; + + protected static Path remoteWALDir2; +
[15/50] [abbrv] hbase git commit: HBASE-20720 addendum HTML formatting changes
HBASE-20720 addendum HTML formatting changes (cherry picked from commit d3e237d1419c61f85d7309785609399960e4f521) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7c924f75 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7c924f75 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7c924f75 Branch: refs/heads/HBASE-19064 Commit: 7c924f75acfd491ff354a6cf54b63849cdc9c374 Parents: c7d0567 Author: Michael Stack Authored: Wed Jun 20 07:30:50 2018 -0700 Committer: Sean Busbey Committed: Wed Jun 20 10:41:55 2018 -0500 -- src/site/xdoc/downloads.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/7c924f75/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index acd1e59..2fa5559 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -54,10 +54,10 @@ under the License. https://apache.org/dist/hbase/2.0.1/compatibility_report_2.0.0vs2.0.1.html;>2.0.0 vs 2.0.1 -https://apache.org/dist/hbase/2.0.1/CHANGES.md;>2.0.1 Changes +https://apache.org/dist/hbase/2.0.1/CHANGES.md;>Changes -https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>2.0.1 Release Notes +https://apache.org/dist/hbase/2.0.1/RELEASENOTES.md;>Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe;>987f7b6d37c2fcacc942cc66e5c5122aba8fdfbe @@ -78,10 +78,10 @@ under the License. https://apache.org/dist/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html;>1.2.6 vs 2.0.0 -https://apache.org/dist/hbase/2.0.0/CHANGES.md;>2.0.0 Changes +https://apache.org/dist/hbase/2.0.0/CHANGES.md;>Changes -https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>2.0.0 Release Notes +https://apache.org/dist/hbase/2.0.0/RELEASENOTES.md;>Release Notes https://git-wip-us.apache.org/repos/asf?p=hbase.git;a=commit;h=7483b111e4da77adbfc8062b3b22cbe7c2cb91c1;>7483b111e4da77adbfc8062b3b22cbe7c2cb91c1
[29/50] [abbrv] hbase git commit: HBASE-19957 General framework to transit sync replication state
HBASE-19957 General framework to transit sync replication state Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/93c7dd08 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/93c7dd08 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/93c7dd08 Branch: refs/heads/HBASE-19064 Commit: 93c7dd088d9a5dae48353509e41a2a9819625a35 Parents: db0a566 Author: zhangduo Authored: Fri Feb 9 18:33:28 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:20:15 2018 +0800 -- .../replication/ReplicationPeerConfig.java | 2 - .../replication/ReplicationPeerDescription.java | 5 +- .../hbase/replication/SyncReplicationState.java | 19 +- .../org/apache/hadoop/hbase/HConstants.java | 3 + .../src/main/protobuf/MasterProcedure.proto | 20 +- .../hbase/replication/ReplicationPeerImpl.java | 45 - .../replication/ReplicationPeerStorage.java | 25 ++- .../hbase/replication/ReplicationPeers.java | 27 ++- .../replication/ZKReplicationPeerStorage.java | 63 +-- .../hbase/coprocessor/MasterObserver.java | 7 +- .../org/apache/hadoop/hbase/master/HMaster.java | 4 +- .../hbase/master/MasterCoprocessorHost.java | 12 +- .../replication/AbstractPeerProcedure.java | 14 +- .../master/replication/ModifyPeerProcedure.java | 11 -- .../replication/RefreshPeerProcedure.java | 18 +- .../replication/ReplicationPeerManager.java | 89 + ...ransitPeerSyncReplicationStateProcedure.java | 181 --- .../hbase/regionserver/HRegionServer.java | 47 ++--- .../regionserver/ReplicationSourceService.java | 11 +- .../regionserver/PeerActionListener.java| 4 +- .../regionserver/PeerProcedureHandler.java | 16 +- .../regionserver/PeerProcedureHandlerImpl.java | 52 +- .../regionserver/RefreshPeerCallable.java | 7 + .../replication/regionserver/Replication.java | 22 ++- .../regionserver/ReplicationSourceManager.java | 41 +++-- .../SyncReplicationPeerInfoProvider.java| 43 + .../SyncReplicationPeerInfoProviderImpl.java| 71 .../SyncReplicationPeerMappingManager.java | 48 + .../SyncReplicationPeerProvider.java| 35 .../hbase/wal/SyncReplicationWALProvider.java | 35 ++-- .../org/apache/hadoop/hbase/wal/WALFactory.java | 47 ++--- .../replication/TestReplicationAdmin.java | 3 +- .../TestReplicationSourceManager.java | 5 +- .../wal/TestSyncReplicationWALProvider.java | 36 ++-- 34 files changed, 749 insertions(+), 319 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/93c7dd08/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java index 997a155..cc7b4bc 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.replication; import java.util.Collection; @@ -25,7 +24,6 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; - import org.apache.commons.lang3.StringUtils; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.Bytes; http://git-wip-us.apache.org/repos/asf/hbase/blob/93c7dd08/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerDescription.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerDescription.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerDescription.java index 2d077c5..b0c27bb 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerDescription.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerDescription.java @@ -20,7 +20,10 @@ package org.apache.hadoop.hbase.replication; import org.apache.yetus.audience.InterfaceAudience; /** - * The POJO equivalent of ReplicationProtos.ReplicationPeerDescription + * The POJO equivalent of ReplicationProtos.ReplicationPeerDescription. + * + * To developer, here we do not store the new sync replication state since it is just an + * intermediate state and this class is public. */ @InterfaceAudience.Public
[40/50] [abbrv] hbase git commit: HBASE-19782 Reject the replication request when peer is DA or A state
HBASE-19782 Reject the replication request when peer is DA or A state Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7a8af5de Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7a8af5de Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7a8af5de Branch: refs/heads/HBASE-19064 Commit: 7a8af5deb5ee2e481a1bbdce3467da3500f265c3 Parents: 399827d Author: huzheng Authored: Fri Mar 2 18:05:29 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:22:22 2018 +0800 -- .../hbase/protobuf/ReplicationProtbufUtil.java | 15 +++ .../hadoop/hbase/regionserver/HRegion.java | 2 +- .../hbase/regionserver/HRegionServer.java | 5 +-- .../hbase/regionserver/RSRpcServices.java | 25 +-- .../RejectReplicationRequestStateChecker.java | 45 .../ReplaySyncReplicationWALCallable.java | 24 ++- .../replication/regionserver/Replication.java | 2 +- .../regionserver/ReplicationSink.java | 16 +++ .../SyncReplicationPeerInfoProvider.java| 11 ++--- .../SyncReplicationPeerInfoProviderImpl.java| 13 +++--- .../SyncReplicationPeerMappingManager.java | 5 +-- .../hbase/wal/SyncReplicationWALProvider.java | 7 +-- .../replication/SyncReplicationTestBase.java| 32 ++ .../replication/TestSyncReplicationActive.java | 13 +- .../regionserver/TestReplicationSink.java | 5 +-- .../regionserver/TestWALEntrySinkFilter.java| 3 +- .../wal/TestSyncReplicationWALProvider.java | 6 +-- 17 files changed, 169 insertions(+), 60 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/7a8af5de/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java index 157ad1b..c1b3911 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java @@ -16,7 +16,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.protobuf; @@ -24,25 +23,25 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; - import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.PrivateCellUtil; -import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec; -import org.apache.yetus.audience.InterfaceAudience; import org.apache.hadoop.hbase.io.SizedCellScanner; import org.apache.hadoop.hbase.ipc.HBaseRpcController; import org.apache.hadoop.hbase.ipc.HBaseRpcControllerImpl; -import org.apache.hadoop.hbase.wal.WALEdit; -import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos; -import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService; -import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos; +import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec; import org.apache.hadoop.hbase.util.Pair; import org.apache.hadoop.hbase.wal.WAL.Entry; +import org.apache.hadoop.hbase.wal.WALEdit; +import org.apache.yetus.audience.InterfaceAudience; import org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations; +import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos; +import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService; +import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos; + @InterfaceAudience.Private public class ReplicationProtbufUtil { /** http://git-wip-us.apache.org/repos/asf/hbase/blob/7a8af5de/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 42a86c4..8dbccc5 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -1990,7 +1990,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi private boolean shouldForbidMajorCompaction() { if (rsServices != null && rsServices.getReplicationSourceService() != null) { return rsServices.getReplicationSourceService().getSyncReplicationPeerInfoProvider() -
[39/50] [abbrv] hbase git commit: HBASE-20456 Support removing a ReplicationSourceShipper for a special wal group
HBASE-20456 Support removing a ReplicationSourceShipper for a special wal group Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b0bad59a Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b0bad59a Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b0bad59a Branch: refs/heads/HBASE-19064 Commit: b0bad59a90e61047d4a124b1520597da01f07f08 Parents: 411c619 Author: zhangduo Authored: Tue Apr 24 22:01:21 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:22:22 2018 +0800 -- .../hbase/regionserver/wal/AsyncFSWAL.java | 1 + .../RecoveredReplicationSource.java | 13 +--- .../RecoveredReplicationSourceShipper.java | 7 -- .../regionserver/ReplicationSource.java | 13 +++- .../regionserver/ReplicationSourceManager.java | 19 - .../regionserver/ReplicationSourceShipper.java | 20 +++-- .../ReplicationSourceWALReader.java | 9 ++- .../regionserver/WALEntryStream.java| 3 +- .../hadoop/hbase/wal/AbstractFSWALProvider.java | 28 --- .../hbase/wal/SyncReplicationWALProvider.java | 10 ++- .../TestReplicationSourceManager.java | 5 +- .../TestSyncReplicationShipperQuit.java | 81 .../regionserver/TestWALEntryStream.java| 4 +- 13 files changed, 163 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/b0bad59a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java index d98ab75..9b4ce9c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java @@ -682,6 +682,7 @@ public class AsyncFSWAL extends AbstractFSWAL { protected void doShutdown() throws IOException { waitForSafePoint(); closeWriter(this.writer); +this.writer = null; closeExecutor.shutdown(); try { if (!closeExecutor.awaitTermination(waitOnShutdownInSeconds, TimeUnit.SECONDS)) { http://git-wip-us.apache.org/repos/asf/hbase/blob/b0bad59a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java index a21ca44..f1bb538 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java @@ -30,7 +30,6 @@ import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.replication.ReplicationPeer; import org.apache.hadoop.hbase.replication.ReplicationQueueStorage; import org.apache.hadoop.hbase.util.FSUtils; -import org.apache.hadoop.hbase.util.Threads; import org.apache.hadoop.hbase.wal.AbstractFSWALProvider; import org.apache.yetus.audience.InterfaceAudience; import org.slf4j.Logger; @@ -144,15 +143,9 @@ public class RecoveredReplicationSource extends ReplicationSource { } void tryFinish() { -// use synchronize to make sure one last thread will clean the queue -synchronized (workerThreads) { - Threads.sleep(100);// wait a short while for other worker thread to fully exit - boolean allTasksDone = workerThreads.values().stream().allMatch(w -> w.isFinished()); - if (allTasksDone) { -this.getSourceMetrics().clear(); -manager.removeRecoveredSource(this); -LOG.info("Finished recovering queue {} with the following stats: {}", queueId, getStats()); - } +if (workerThreads.isEmpty()) { + this.getSourceMetrics().clear(); + manager.finishRecoveredSource(this); } } http://git-wip-us.apache.org/repos/asf/hbase/blob/b0bad59a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java index 91109cf..b0d4db0 100644 ---
[35/50] [abbrv] hbase git commit: HBASE-20163 Forbid major compaction when standby cluster replay the remote wals
HBASE-20163 Forbid major compaction when standby cluster replay the remote wals Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a3e950a4 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a3e950a4 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a3e950a4 Branch: refs/heads/HBASE-19064 Commit: a3e950a4b237e91972a6d4daee1c3b90953f02b7 Parents: c79f0e7 Author: Guanghao Zhang Authored: Thu Apr 12 14:44:25 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:20:15 2018 +0800 -- .../hadoop/hbase/regionserver/HRegion.java | 18 .../hbase/regionserver/HRegionServer.java | 2 +- .../regionserver/RegionServerServices.java | 5 +++ .../ForbidMajorCompactionChecker.java | 44 .../hadoop/hbase/MockRegionServerServices.java | 6 +++ .../hadoop/hbase/master/MockRegionServer.java | 6 +++ 6 files changed, 80 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/a3e950a4/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 05fb036..42a86c4 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -144,6 +144,7 @@ import org.apache.hadoop.hbase.regionserver.ScannerContext.LimitScope; import org.apache.hadoop.hbase.regionserver.ScannerContext.NextState; import org.apache.hadoop.hbase.regionserver.compactions.CompactionContext; import org.apache.hadoop.hbase.regionserver.compactions.CompactionLifeCycleTracker; +import org.apache.hadoop.hbase.regionserver.compactions.ForbidMajorCompactionChecker; import org.apache.hadoop.hbase.regionserver.throttle.CompactionThroughputControllerFactory; import org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController; import org.apache.hadoop.hbase.regionserver.throttle.StoreHotnessProtector; @@ -1986,6 +1987,14 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi return compact(compaction, store, throughputController, null); } + private boolean shouldForbidMajorCompaction() { +if (rsServices != null && rsServices.getReplicationSourceService() != null) { + return rsServices.getReplicationSourceService().getSyncReplicationPeerInfoProvider() + .checkState(getRegionInfo(), ForbidMajorCompactionChecker.get()); +} +return false; + } + public boolean compact(CompactionContext compaction, HStore store, ThroughputController throughputController, User user) throws IOException { assert compaction != null && compaction.hasSelection(); @@ -1995,6 +2004,15 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi store.cancelRequestedCompaction(compaction); return false; } + +if (compaction.getRequest().isAllFiles() && shouldForbidMajorCompaction()) { + LOG.warn("Skipping major compaction on " + this + + " because this cluster is transiting sync replication state" + + " from STANDBY to DOWNGRADE_ACTIVE"); + store.cancelRequestedCompaction(compaction); + return false; +} + MonitoredTask status = null; boolean requestNeedsCancellation = true; /* http://git-wip-us.apache.org/repos/asf/hbase/blob/a3e950a4/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 97e88ef..d93ea50 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2474,7 +2474,7 @@ public class HRegionServer extends HasThread implements * @return Return the object that implements the replication * source executorService. */ - @VisibleForTesting + @Override public ReplicationSourceService getReplicationSourceService() { return replicationSourceHandler; } http://git-wip-us.apache.org/repos/asf/hbase/blob/a3e950a4/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerServices.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerServices.java
[06/50] [abbrv] hbase git commit: HBASE-20745 Log when master proc wal rolls
HBASE-20745 Log when master proc wal rolls Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/21684a32 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/21684a32 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/21684a32 Branch: refs/heads/HBASE-19064 Commit: 21684a32fa65fcd1f64612a0b1e0cb4dd952d44e Parents: 9bd9852 Author: Michael Stack Authored: Sat Jun 16 13:23:31 2018 -0700 Committer: Michael Stack Committed: Tue Jun 19 19:53:51 2018 -0700 -- .../org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java| 2 +- .../hadoop/hbase/procedure2/store/wal/WALProcedureStore.java | 4 +--- .../apache/hadoop/hbase/master/assignment/AssignmentManager.java | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/21684a32/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java -- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java index bd0a191..db7c118 100644 --- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java +++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java @@ -1861,7 +1861,7 @@ public class ProcedureExecutor { // WARN the worker is stuck stuckCount++; -LOG.warn("Worker stuck {} run time {}", worker, +LOG.warn("Worker stuck {}, run time {}", worker, StringUtils.humanTimeDiff(worker.getCurrentRunTime())); } return stuckCount; http://git-wip-us.apache.org/repos/asf/hbase/blob/21684a32/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java -- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java index f2931fc..977921f 100644 --- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java +++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java @@ -1074,9 +1074,7 @@ public class WALProcedureStore extends ProcedureStoreBase { ". check running procedures to see if something is stuck."); } -if (LOG.isDebugEnabled()) { - LOG.debug("Roll new state log: " + logId); -} +LOG.info("Rolled new Procedure Store WAL, id={}", logId); return true; } http://git-wip-us.apache.org/repos/asf/hbase/blob/21684a32/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java index 0d1fc16..0736435 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java @@ -135,7 +135,7 @@ public class AssignmentManager implements ServerListener { public static final String RIT_CHORE_INTERVAL_MSEC_CONF_KEY = "hbase.assignment.rit.chore.interval.msec"; - private static final int DEFAULT_RIT_CHORE_INTERVAL_MSEC = 5 * 1000; + private static final int DEFAULT_RIT_CHORE_INTERVAL_MSEC = 60 * 1000; public static final String ASSIGN_MAX_ATTEMPTS = "hbase.assignment.maximum.attempts";
[45/50] [abbrv] hbase git commit: HBASE-20660 Reopen regions using ReopenTableRegionsProcedure
HBASE-20660 Reopen regions using ReopenTableRegionsProcedure Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/36714072 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/36714072 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/36714072 Branch: refs/heads/HBASE-19064 Commit: 36714072e019aef0d15a03861b0f5de17a8e6766 Parents: cec0140 Author: zhangduo Authored: Thu May 31 09:53:44 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- ...ransitPeerSyncReplicationStateProcedure.java | 24 ++-- 1 file changed, 7 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/36714072/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java index 81ee6b6..66f67dd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/TransitPeerSyncReplicationStateProcedure.java @@ -18,16 +18,14 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import java.util.List; -import java.util.stream.Collectors; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.DoNotRetryIOException; -import org.apache.hadoop.hbase.client.RegionInfo; import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil; import org.apache.hadoop.hbase.master.MasterCoprocessorHost; import org.apache.hadoop.hbase.master.MasterFileSystem; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; +import org.apache.hadoop.hbase.master.procedure.ReopenTableRegionsProcedure; import org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer; import org.apache.hadoop.hbase.procedure2.ProcedureSuspendedException; import org.apache.hadoop.hbase.procedure2.ProcedureYieldException; @@ -141,11 +139,10 @@ public class TransitPeerSyncReplicationStateProcedure } } - private List getRegionsToReopen(MasterProcedureEnv env) { -return env.getReplicationPeerManager().getPeerConfig(peerId).get().getTableCFsMap().keySet() - .stream() - .flatMap(tn -> env.getAssignmentManager().getRegionStates().getRegionsOfTable(tn).stream()) - .collect(Collectors.toList()); + private void reopenRegions(MasterProcedureEnv env) { +addChildProcedure( + env.getReplicationPeerManager().getPeerConfig(peerId).get().getTableCFsMap().keySet().stream() + .map(ReopenTableRegionsProcedure::new).toArray(ReopenTableRegionsProcedure[]::new)); } private void createDirForRemoteWAL(MasterProcedureEnv env) @@ -190,7 +187,7 @@ public class TransitPeerSyncReplicationStateProcedure } private void replayRemoteWAL() { -addChildProcedure(new RecoverStandbyProcedure[] { new RecoverStandbyProcedure(peerId) }); +addChildProcedure(new RecoverStandbyProcedure(peerId)); } @Override @@ -252,14 +249,7 @@ public class TransitPeerSyncReplicationStateProcedure : PeerSyncReplicationStateTransitionState.TRANSIT_PEER_NEW_SYNC_REPLICATION_STATE); return Flow.HAS_MORE_STATE; case REOPEN_ALL_REGIONS_IN_PEER: -try { - addChildProcedure( - env.getAssignmentManager().createReopenProcedures(getRegionsToReopen(env))); -} catch (IOException e) { - LOG.warn("Failed to schedule region reopen for peer {} when starting transiting sync " + -"replication peer state from {} to {}, retry", peerId, fromState, toState, e); - throw new ProcedureYieldException(); -} +reopenRegions(env); setNextState( PeerSyncReplicationStateTransitionState.TRANSIT_PEER_NEW_SYNC_REPLICATION_STATE); return Flow.HAS_MORE_STATE;
[16/50] [abbrv] hbase git commit: HBASE-20759 Use HTTPS for KEYS
HBASE-20759 Use HTTPS for KEYS Signed-off-by: Sean Busbey Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8341237d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8341237d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8341237d Branch: refs/heads/HBASE-19064 Commit: 8341237ddd54297b2a4b8e227359505cb05dff58 Parents: 7c924f7 Author: Mike Drob Authored: Wed Jun 20 08:38:12 2018 -0700 Committer: Mike Drob Committed: Wed Jun 20 08:58:47 2018 -0700 -- src/site/xdoc/downloads.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/8341237d/src/site/xdoc/downloads.xml -- diff --git a/src/site/xdoc/downloads.xml b/src/site/xdoc/downloads.xml index 2fa5559..a112528 100644 --- a/src/site/xdoc/downloads.xml +++ b/src/site/xdoc/downloads.xml @@ -28,7 +28,7 @@ under the License. The below table lists mirrored release artifacts and their associated hashes and signatures available ONLY at apache.org. The keys used to sign releases can be found in our published - http://www.apache.org/dist/hbase/KEYS;>KEYS file. See + https://www.apache.org/dist/hbase/KEYS;>KEYS file. See https://www.apache.org/dyn/closer.cgi#verify;>Verify The Integrity Of The Files for how to verify your mirrored downloads.
[23/50] [abbrv] hbase git commit: HBASE-19935 Only allow table replication for sync replication for now
HBASE-19935 Only allow table replication for sync replication for now Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/db0a5667 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/db0a5667 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/db0a5667 Branch: refs/heads/HBASE-19064 Commit: db0a56673b5b92ed97353b9ab953a5400e6f449a Parents: ed3be23 Author: Guanghao Zhang Authored: Tue Feb 6 16:00:59 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:17:53 2018 +0800 -- .../replication/ReplicationPeerConfig.java | 9 +++ .../replication/ReplicationPeerManager.java | 34 - .../replication/TestReplicationAdmin.java | 73 ++-- .../wal/TestCombinedAsyncWriter.java| 6 ++ .../wal/TestSyncReplicationWALProvider.java | 6 ++ 5 files changed, 102 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/db0a5667/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java index 97abc74..997a155 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerConfig.java @@ -25,6 +25,8 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; + +import org.apache.commons.lang3.StringUtils; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.Bytes; import org.apache.yetus.audience.InterfaceAudience; @@ -220,6 +222,13 @@ public class ReplicationPeerConfig { return this.remoteWALDir; } + /** + * Use remote wal dir to decide whether a peer is sync replication peer + */ + public boolean isSyncReplication() { +return !StringUtils.isBlank(this.remoteWALDir); + } + public static ReplicationPeerConfigBuilder newBuilder() { return new ReplicationPeerConfigBuilderImpl(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/db0a5667/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java index f07a0d8..ff778a8 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java @@ -170,7 +170,7 @@ public class ReplicationPeerManager { " does not match new remote wal dir '" + peerConfig.getRemoteWALDir() + "'"); } -if (oldPeerConfig.getRemoteWALDir() != null) { +if (oldPeerConfig.isSyncReplication()) { if (!ReplicationUtils.isNamespacesAndTableCFsEqual(oldPeerConfig, peerConfig)) { throw new DoNotRetryIOException( "Changing the replicated namespace/table config on a synchronous replication " + @@ -199,8 +199,8 @@ public class ReplicationPeerManager { } ReplicationPeerConfig copiedPeerConfig = ReplicationPeerConfig.newBuilder(peerConfig).build(); SyncReplicationState syncReplicationState = -StringUtils.isBlank(peerConfig.getRemoteWALDir()) ? SyncReplicationState.NONE -: SyncReplicationState.DOWNGRADE_ACTIVE; +copiedPeerConfig.isSyncReplication() ? SyncReplicationState.DOWNGRADE_ACTIVE +: SyncReplicationState.NONE; peerStorage.addPeer(peerId, copiedPeerConfig, enabled, syncReplicationState); peers.put(peerId, new ReplicationPeerDescription(peerId, enabled, copiedPeerConfig, syncReplicationState)); @@ -324,9 +324,37 @@ public class ReplicationPeerManager { peerConfig.getTableCFsMap()); } +if (peerConfig.isSyncReplication()) { + checkPeerConfigForSyncReplication(peerConfig); +} + checkConfiguredWALEntryFilters(peerConfig); } + private void checkPeerConfigForSyncReplication(ReplicationPeerConfig peerConfig) + throws DoNotRetryIOException { +// This is used to reduce the difficulty for implementing the sync replication state transition +// as we need to reopen all the related regions. +// TODO: Add namespace, replicat_all flag back +if (peerConfig.replicateAllUserTables()) { + throw new DoNotRetryIOException( + "Only support replicated table
[22/50] [abbrv] hbase git commit: HBASE-19083 Introduce a new log writer which can write to two HDFSes
HBASE-19083 Introduce a new log writer which can write to two HDFSes Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e58eb927 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e58eb927 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e58eb927 Branch: refs/heads/HBASE-19064 Commit: e58eb9275afd201dcd92119a34c0e8ba5b8e6f86 Parents: 72784c2 Author: zhangduo Authored: Thu Jan 11 21:08:02 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:16:55 2018 +0800 -- .../hbase/regionserver/wal/AsyncFSWAL.java | 21 +-- .../regionserver/wal/CombinedAsyncWriter.java | 134 ++ .../hbase/regionserver/wal/DualAsyncFSWAL.java | 67 + .../wal/AbstractTestProtobufLog.java| 110 +++ .../regionserver/wal/ProtobufLogTestHelper.java | 99 ++ .../regionserver/wal/TestAsyncProtobufLog.java | 32 + .../wal/TestCombinedAsyncWriter.java| 136 +++ .../hbase/regionserver/wal/TestProtobufLog.java | 14 +- .../regionserver/wal/WriterOverAsyncWriter.java | 63 + 9 files changed, 533 insertions(+), 143 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/e58eb927/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java index d032d83..4732f41 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java @@ -607,10 +607,14 @@ public class AsyncFSWAL extends AbstractFSWAL { } } + protected final AsyncWriter createAsyncWriter(FileSystem fs, Path path) throws IOException { +return AsyncFSWALProvider.createAsyncWriter(conf, fs, path, false, this.blocksize, + eventLoopGroup, channelClass); + } + @Override protected AsyncWriter createWriterInstance(Path path) throws IOException { -return AsyncFSWALProvider.createAsyncWriter(conf, fs, path, false, -this.blocksize, eventLoopGroup, channelClass); +return createAsyncWriter(fs, path); } private void waitForSafePoint() { @@ -632,13 +636,12 @@ public class AsyncFSWAL extends AbstractFSWAL { } } - private long closeWriter() { -AsyncWriter oldWriter = this.writer; -if (oldWriter != null) { - long fileLength = oldWriter.getLength(); + protected final long closeWriter(AsyncWriter writer) { +if (writer != null) { + long fileLength = writer.getLength(); closeExecutor.execute(() -> { try { - oldWriter.close(); + writer.close(); } catch (IOException e) { LOG.warn("close old writer failed", e); } @@ -654,7 +657,7 @@ public class AsyncFSWAL extends AbstractFSWAL { throws IOException { Preconditions.checkNotNull(nextWriter); waitForSafePoint(); -long oldFileLen = closeWriter(); +long oldFileLen = closeWriter(this.writer); logRollAndSetupWalProps(oldPath, newPath, oldFileLen); this.writer = nextWriter; if (nextWriter instanceof AsyncProtobufLogWriter) { @@ -679,7 +682,7 @@ public class AsyncFSWAL extends AbstractFSWAL { @Override protected void doShutdown() throws IOException { waitForSafePoint(); -closeWriter(); +closeWriter(this.writer); closeExecutor.shutdown(); try { if (!closeExecutor.awaitTermination(waitOnShutdownInSeconds, TimeUnit.SECONDS)) { http://git-wip-us.apache.org/repos/asf/hbase/blob/e58eb927/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/CombinedAsyncWriter.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/CombinedAsyncWriter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/CombinedAsyncWriter.java new file mode 100644 index 000..8ecfede --- /dev/null +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/CombinedAsyncWriter.java @@ -0,0 +1,134 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *
[42/50] [abbrv] hbase git commit: HBASE-20637 Polish the WAL switching when transiting from A to S
HBASE-20637 Polish the WAL switching when transiting from A to S Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cec01407 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cec01407 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cec01407 Branch: refs/heads/HBASE-19064 Commit: cec014075b71ab6c7e1561eb349f28518031ad59 Parents: f3d1355 Author: zhangduo Authored: Tue May 29 20:38:20 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:23:07 2018 +0800 -- .../hbase/regionserver/wal/AsyncFSWAL.java | 52 +- .../hbase/regionserver/wal/DualAsyncFSWAL.java | 71 ++-- .../apache/hadoop/hbase/util/FSHDFSUtils.java | 16 +++-- .../hbase/wal/SyncReplicationWALProvider.java | 2 +- .../replication/DualAsyncFSWALForTest.java | 4 +- .../replication/SyncReplicationTestBase.java| 26 +-- .../replication/TestSyncReplicationActive.java | 42 ++-- 7 files changed, 176 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/cec01407/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java index 9b4ce9c..7f3e30b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java @@ -52,12 +52,12 @@ import org.apache.hadoop.hbase.wal.WALEdit; import org.apache.hadoop.hbase.wal.WALKeyImpl; import org.apache.hadoop.hbase.wal.WALProvider.AsyncWriter; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; -import org.apache.hbase.thirdparty.com.google.common.base.Preconditions; import org.apache.htrace.core.TraceScope; import org.apache.yetus.audience.InterfaceAudience; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.apache.hbase.thirdparty.com.google.common.base.Preconditions; import org.apache.hbase.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hbase.thirdparty.io.netty.channel.Channel; import org.apache.hbase.thirdparty.io.netty.channel.EventLoop; @@ -470,6 +470,44 @@ public class AsyncFSWAL extends AbstractFSWAL { // whether to issue a sync in the caller method. } + private void drainNonMarkerEditsAndFailSyncs() { +if (toWriteAppends.isEmpty()) { + return; +} +boolean hasNonMarkerEdits = false; +Iterator iter = toWriteAppends.descendingIterator(); +while (iter.hasNext()) { + FSWALEntry entry = iter.next(); + if (!entry.getEdit().isMetaEdit()) { +hasNonMarkerEdits = true; +break; + } +} +if (hasNonMarkerEdits) { + for (;;) { +iter.remove(); +if (!iter.hasNext()) { + break; +} +iter.next(); + } + unackedAppends.clear(); + // fail the sync futures which are under the txid of the first remaining edit, if none, fail + // all the sync futures. + long txid = toWriteAppends.isEmpty() ? Long.MAX_VALUE : toWriteAppends.peek().getTxid(); + IOException error = new IOException("WAL is closing, only marker edit is allowed"); + for (Iterator syncIter = syncFutures.iterator(); syncIter.hasNext();) { +SyncFuture future = syncIter.next(); +if (future.getTxid() < txid) { + future.done(future.getTxid(), error); + syncIter.remove(); +} else { + break; +} + } +} + } + private void consume() { consumeLock.lock(); try { @@ -512,6 +550,9 @@ public class AsyncFSWAL extends AbstractFSWAL { } waitingConsumePayloadsGatingSequence.set(nextCursor); } +if (markerEditOnly()) { + drainNonMarkerEditsAndFailSyncs(); +} appendAndSync(); if (hasConsumerTask.get()) { return; @@ -553,9 +594,18 @@ public class AsyncFSWAL extends AbstractFSWAL { return consumerScheduled.compareAndSet(false, true); } + // This is used by sync replication, where we are going to close the wal soon after we reopen all + // the regions. Will be overridden by sub classes. + protected boolean markerEditOnly() { +return false; + } + @Override public long append(RegionInfo hri, WALKeyImpl key, WALEdit edits, boolean inMemstore) throws IOException { +if (markerEditOnly() && !edits.isMetaEdit()) { + throw new IOException("WAL is closing, only marker edit is allowed"); +} long txid = stampSequenceIdAndPublishToRingBuffer(hri, key, edits, inMemstore,
[28/50] [abbrv] hbase git commit: HBASE-19957 General framework to transit sync replication state
http://git-wip-us.apache.org/repos/asf/hbase/blob/93c7dd08/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProvider.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProvider.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProvider.java new file mode 100644 index 000..92f2c52 --- /dev/null +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProvider.java @@ -0,0 +1,43 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.replication.regionserver; + +import java.util.Optional; +import org.apache.hadoop.hbase.client.RegionInfo; +import org.apache.hadoop.hbase.replication.SyncReplicationState; +import org.apache.hadoop.hbase.util.Pair; +import org.apache.yetus.audience.InterfaceAudience; + +/** + * Get the information for a sync replication peer. + */ +@InterfaceAudience.Private +public interface SyncReplicationPeerInfoProvider { + + /** + * Return the peer id and remote WAL directory if the region is synchronously replicated and the + * state is {@link SyncReplicationState#ACTIVE}. + */ + Optional> getPeerIdAndRemoteWALDir(RegionInfo info); + + /** + * Check whether the give region is contained in a sync replication peer which is in the given + * state. + */ + boolean isInState(RegionInfo info, SyncReplicationState state); +} http://git-wip-us.apache.org/repos/asf/hbase/blob/93c7dd08/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProviderImpl.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProviderImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProviderImpl.java new file mode 100644 index 000..32159e6 --- /dev/null +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SyncReplicationPeerInfoProviderImpl.java @@ -0,0 +1,71 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.replication.regionserver; + +import java.util.Optional; +import org.apache.hadoop.hbase.client.RegionInfo; +import org.apache.hadoop.hbase.replication.ReplicationPeer; +import org.apache.hadoop.hbase.replication.ReplicationPeers; +import org.apache.hadoop.hbase.replication.SyncReplicationState; +import org.apache.hadoop.hbase.util.Pair; +import org.apache.yetus.audience.InterfaceAudience; + +@InterfaceAudience.Private +class SyncReplicationPeerInfoProviderImpl implements SyncReplicationPeerInfoProvider { + + private final ReplicationPeers replicationPeers; + + private final SyncReplicationPeerMappingManager mapping; + + SyncReplicationPeerInfoProviderImpl(ReplicationPeers replicationPeers, + SyncReplicationPeerMappingManager mapping) { +this.replicationPeers = replicationPeers; +this.mapping = mapping; + } + + @Override + public Optional> getPeerIdAndRemoteWALDir(RegionInfo info) { +String peerId = mapping.getPeerId(info); +if (peerId == null) { + return Optional.empty(); +} +ReplicationPeer peer =
[38/50] [abbrv] hbase git commit: HBASE-20425 Do not write the cluster id of the current active cluster when writing remote WAL
HBASE-20425 Do not write the cluster id of the current active cluster when writing remote WAL Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/411c619d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/411c619d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/411c619d Branch: refs/heads/HBASE-19064 Commit: 411c619daf253486344c33c621952869c9fc244b Parents: 7a8af5d Author: huzheng Authored: Mon Apr 23 17:20:55 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:22:22 2018 +0800 -- .../replication/TestSyncReplicationActive.java | 32 1 file changed, 32 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/411c619d/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestSyncReplicationActive.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestSyncReplicationActive.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestSyncReplicationActive.java index bff4572..f9020a0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestSyncReplicationActive.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestSyncReplicationActive.java @@ -17,9 +17,17 @@ */ package org.apache.hadoop.hbase.replication; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HBaseClassTestRule; +import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.testclassification.LargeTests; import org.apache.hadoop.hbase.testclassification.ReplicationTests; +import org.apache.hadoop.hbase.wal.WAL.Entry; +import org.apache.hadoop.hbase.wal.WAL.Reader; +import org.apache.hadoop.hbase.wal.WALFactory; +import org.junit.Assert; import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -49,6 +57,9 @@ public class TestSyncReplicationActive extends SyncReplicationTestBase { // peer is disabled so no data have been replicated verifyNotReplicatedThroughRegion(UTIL2, 0, 100); +// Ensure that there's no cluster id in remote log entries. +verifyNoClusterIdInRemoteLog(UTIL2, PEER_ID); + UTIL2.getAdmin().transitReplicationPeerSyncReplicationState(PEER_ID, SyncReplicationState.DOWNGRADE_ACTIVE); // confirm that peer with state DA will reject replication request. @@ -72,4 +83,25 @@ public class TestSyncReplicationActive extends SyncReplicationTestBase { verifyReplicationRequestRejection(UTIL2, true); write(UTIL2, 200, 300); } + + private void verifyNoClusterIdInRemoteLog(HBaseTestingUtility utility, String peerId) + throws Exception { +FileSystem fs2 = utility.getTestFileSystem(); +Path remoteDir = +new Path(utility.getMiniHBaseCluster().getMaster().getMasterFileSystem().getRootDir(), +"remoteWALs").makeQualified(fs2.getUri(), fs2.getWorkingDirectory()); +FileStatus[] files = fs2.listStatus(new Path(remoteDir, peerId)); +Assert.assertTrue(files.length > 0); +for (FileStatus file : files) { + try (Reader reader = + WALFactory.createReader(fs2, file.getPath(), utility.getConfiguration())) { +Entry entry = reader.next(); +Assert.assertTrue(entry != null); +while (entry != null) { + Assert.assertEquals(entry.getKey().getClusterIds().size(), 0); + entry = reader.next(); +} + } +} + } }
[37/50] [abbrv] hbase git commit: HBASE-20370 Also remove the wal file in remote cluster when we finish replicating a file
HBASE-20370 Also remove the wal file in remote cluster when we finish replicating a file Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/399827dd Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/399827dd Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/399827dd Branch: refs/heads/HBASE-19064 Commit: 399827ddceb416f4aaad7cc4aa1e1a9b872030b0 Parents: a3e950a Author: zhangduo Authored: Tue Apr 17 09:04:56 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:21:27 2018 +0800 -- .../hbase/replication/ReplicationUtils.java | 36 +- .../regionserver/ReplicationSource.java | 38 +++ .../ReplicationSourceInterface.java | 21 +++- .../regionserver/ReplicationSourceManager.java | 110 ++- .../regionserver/ReplicationSourceShipper.java | 27 + .../hbase/wal/SyncReplicationWALProvider.java | 11 +- .../replication/ReplicationSourceDummy.java | 20 ++-- .../TestReplicationSourceManager.java | 101 - 8 files changed, 247 insertions(+), 117 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/399827dd/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java -- diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java index cb22f57..66e9b01 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java @@ -22,14 +22,17 @@ import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; - import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CompoundConfiguration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Helper class for replication. @@ -37,6 +40,8 @@ import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public final class ReplicationUtils { + private static final Logger LOG = LoggerFactory.getLogger(ReplicationUtils.class); + public static final String REPLICATION_ATTR_NAME = "__rep__"; public static final String REMOTE_WAL_DIR_NAME = "remoteWALs"; @@ -176,4 +181,33 @@ public final class ReplicationUtils { return tableCFs != null && tableCFs.containsKey(tableName); } } + + public static FileSystem getRemoteWALFileSystem(Configuration conf, String remoteWALDir) + throws IOException { +return new Path(remoteWALDir).getFileSystem(conf); + } + + public static Path getRemoteWALDirForPeer(String remoteWALDir, String peerId) { +return new Path(remoteWALDir, peerId); + } + + /** + * Do the sleeping logic + * @param msg Why we sleep + * @param sleepForRetries the base sleep time. + * @param sleepMultiplier by how many times the default sleeping time is augmented + * @param maxRetriesMultiplier the max retry multiplier + * @return True if sleepMultiplier is maxRetriesMultiplier + */ + public static boolean sleepForRetries(String msg, long sleepForRetries, int sleepMultiplier, + int maxRetriesMultiplier) { +try { + LOG.trace("{}, sleeping {} times {}", msg, sleepForRetries, sleepMultiplier); + Thread.sleep(sleepForRetries * sleepMultiplier); +} catch (InterruptedException e) { + LOG.debug("Interrupted while sleeping between retries"); + Thread.currentThread().interrupt(); +} +return sleepMultiplier < maxRetriesMultiplier; + } } http://git-wip-us.apache.org/repos/asf/hbase/blob/399827dd/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index b63712b..ddb6f93 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -89,8 +89,6 @@ public class ReplicationSource implements ReplicationSourceInterface {
[05/50] [abbrv] hbase git commit: HBASE-20369 Document incompatibilities between HBase 1.x and HBase 2.0
HBASE-20369 Document incompatibilities between HBase 1.x and HBase 2.0 Signed-off-by: Josh Elser Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9bd98522 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9bd98522 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9bd98522 Branch: refs/heads/HBASE-19064 Commit: 9bd98522f6a7e2423f26b0cf04962b3f7a213810 Parents: 6dbbd78 Author: Thiriguna Bharat Rao Authored: Fri Apr 20 19:14:39 2018 +0530 Committer: Josh Elser Committed: Tue Jun 19 13:17:43 2018 -0700 -- .../appendix_hbase_incompatibilities.adoc | 714 +++ src/main/asciidoc/book.adoc | 1 + 2 files changed, 715 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/9bd98522/src/main/asciidoc/_chapters/appendix_hbase_incompatibilities.adoc -- diff --git a/src/main/asciidoc/_chapters/appendix_hbase_incompatibilities.adoc b/src/main/asciidoc/_chapters/appendix_hbase_incompatibilities.adoc new file mode 100644 index 000..d450f04 --- /dev/null +++ b/src/main/asciidoc/_chapters/appendix_hbase_incompatibilities.adoc @@ -0,0 +1,714 @@ + +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +[appendix] +== Known Incompatibilities Among HBase Versions +:doctype: book +:numbered: +:toc: left +:icons: font +:experimental: +:toc: left +:source-language: java + +== HBase 2.0 Incompatible Changes + +This appendix describes incompatible changes from earlier versions of HBase against HBase 2.0. +This list is not meant to be wholly encompassing of all possible incompatibilities. +Instead, this content is intended to give insight into some obvious incompatibilities which most +users will face coming from HBase 1.x releases. + +=== List of Major Changes for HBase 2.0 +* HBASE-1912- HBCK is a HBase database checking tool for capturing the inconsistency. As an HBase administrator, you should not use HBase version 1.0 hbck tool to check the HBase 2.0 database. Doing so will break the database and throw an exception error. +* HBASE-16189 and HBASE-18945- You cannot open the HBase 2.0 hfiles through HBase 1.0 version. If you are an admin or an HBase user who is using HBase version 1.x, you must first do a rolling upgrade to the latest version of HBase 1.x and then upgrade to HBase 2.0. +* HBASE-18240 - Changed the ReplicationEndpoint Interface. It also introduces a new hbase-third party 1.0 that packages all the third party utilities, which are expected to run in the hbase cluster. + +=== Coprocessor API changes + +* HBASE-16769 - Deprecated PB references from MasterObserver and RegionServerObserver. +* HBASE-17312 - [JDK8] Use default method for Observer Coprocessors. The interface classes of BaseMasterAndRegionObserver, BaseMasterObserver, BaseRegionObserver, BaseRegionServerObserver and BaseWALObserver uses JDK8's 'default' keyword to provide empty and no-op implementations. +* Interface HTableInterface + HBase 2.0 introduces following changes to the methods listed below: + + [â] interface CoprocessorEnvironment changes (2) + +[cols="1,1", frame="all"] +|=== +| Change | Result +| Abstract method getTable ( TableName ) has been removed. | A client program may be interrupted by NoSuchMethodError exception. +| Abstract method getTable ( TableName, ExecutorService ) has been removed. | A client program may be interrupted by NoSuchMethodError exception. +|=== + +* Public Audience + +The following tables describes the coprocessor changes. + += [â] class CoprocessorRpcChannel (1) +[cols="1,1", frame="all"] +|=== +| Change | Result +| This class has become interface.| A client program may be interrupted by IncompatibleClassChangeError or InstantiationError exception depending on the usage of this class. +|=== + += Class CoprocessorHost +Classes that were Audience Private but were removed. +[cols="1,1", frame="all"] +|=== +| Change | Result +| Type of field coprocessors has been
[09/50] [abbrv] hbase git commit: HBASE-20737 (addendum) put collection into ArrayList instead of addAll function -- RetriesExhaustedWithDetailsException.java
HBASE-20737 (addendum) put collection into ArrayList instead of addAll function -- RetriesExhaustedWithDetailsException.java Signed-off-by: Chia-Ping Tsai Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d23a517b Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d23a517b Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d23a517b Branch: refs/heads/HBASE-19064 Commit: d23a517b6129a90f69062b7558bc777a4b76bf8f Parents: c08eff6 Author: taiynlee Authored: Tue Jun 19 08:42:47 2018 + Committer: Chia-Ping Tsai Committed: Wed Jun 20 14:41:36 2018 +0800 -- .../hadoop/hbase/client/RetriesExhaustedWithDetailsException.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/d23a517b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java index 0cce728..ecbada9 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java @@ -117,8 +117,7 @@ extends RetriesExhaustedException { String s = getDesc(classifyExs(exceptions)); StringBuilder addrs = new StringBuilder(s); addrs.append("servers with issues: "); -Set uniqAddr = new HashSet<>(); -uniqAddr.addAll(hostnamePort); +Set uniqAddr = new HashSet<>(hostnamePort); for (String addr : uniqAddr) { addrs.append(addr).append(", ");
[03/50] [abbrv] hbase git commit: HBASE-20708 Remove the usage of RecoverMetaProcedure in master startup
http://git-wip-us.apache.org/repos/asf/hbase/blob/6dbbd78a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java index 3412c82..0d1fc16 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.master.assignment; import java.io.IOException; @@ -24,7 +23,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -40,7 +38,6 @@ import org.apache.hadoop.hbase.HBaseIOException; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.PleaseHoldException; import org.apache.hadoop.hbase.RegionException; -import org.apache.hadoop.hbase.RegionStateListener; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.YouAreDeadException; @@ -66,7 +63,6 @@ import org.apache.hadoop.hbase.master.assignment.RegionStates.RegionStateNode; import org.apache.hadoop.hbase.master.assignment.RegionStates.ServerState; import org.apache.hadoop.hbase.master.assignment.RegionStates.ServerStateNode; import org.apache.hadoop.hbase.master.balancer.FavoredStochasticBalancer; -import org.apache.hadoop.hbase.master.normalizer.RegionNormalizer; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.hadoop.hbase.master.procedure.MasterProcedureScheduler; import org.apache.hadoop.hbase.master.procedure.ProcedureSyncWait; @@ -84,7 +80,10 @@ import org.apache.hadoop.hbase.util.HasThread; import org.apache.hadoop.hbase.util.Pair; import org.apache.hadoop.hbase.util.Threads; import org.apache.hadoop.hbase.util.VersionInfo; +import org.apache.hadoop.hbase.zookeeper.MetaTableLocator; +import org.apache.hadoop.hbase.zookeeper.ZKWatcher; import org.apache.yetus.audience.InterfaceAudience; +import org.apache.zookeeper.KeeperException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -147,26 +146,13 @@ public class AssignmentManager implements ServerListener { "hbase.metrics.rit.stuck.warning.threshold"; private static final int DEFAULT_RIT_STUCK_WARNING_THRESHOLD = 60 * 1000; - private final ProcedureEvent metaInitializedEvent = new ProcedureEvent<>("meta initialized"); + private final ProcedureEvent metaAssignEvent = new ProcedureEvent<>("meta assign"); private final ProcedureEvent metaLoadEvent = new ProcedureEvent<>("meta load"); - /** - * Indicator that AssignmentManager has recovered the region states so - * that ServerCrashProcedure can be fully enabled and re-assign regions - * of dead servers. So that when re-assignment happens, AssignmentManager - * has proper region states. - */ - private final ProcedureEvent failoverCleanupDone = new ProcedureEvent<>("failover cleanup"); - /** Listeners that are called on assignment events. */ private final CopyOnWriteArrayList listeners = new CopyOnWriteArrayList(); - // TODO: why is this different from the listeners (carried over from the old AM) - private RegionStateListener regionStateListener; - - private RegionNormalizer regionNormalizer; - private final MetricsAssignmentManager metrics; private final RegionInTransitionChore ritChore; private final MasterServices master; @@ -210,12 +196,9 @@ public class AssignmentManager implements ServerListener { int ritChoreInterval = conf.getInt(RIT_CHORE_INTERVAL_MSEC_CONF_KEY, DEFAULT_RIT_CHORE_INTERVAL_MSEC); this.ritChore = new RegionInTransitionChore(ritChoreInterval); - -// Used for region related procedure. -setRegionNormalizer(master.getRegionNormalizer()); } - public void start() throws IOException { + public void start() throws IOException, KeeperException { if (!running.compareAndSet(false, true)) { return; } @@ -227,6 +210,20 @@ public class AssignmentManager implements ServerListener { // Start the Assignment Thread startAssignmentThread(); + +// load meta region state +ZKWatcher zkw = master.getZooKeeper(); +// it could be null in some tests +if (zkw != null) { + RegionState regionState =
[27/50] [abbrv] hbase git commit: HBASE-19864 Use protobuf instead of enum.ordinal to store SyncReplicationState
HBASE-19864 Use protobuf instead of enum.ordinal to store SyncReplicationState Signed-off-by: zhangduo Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ed3be230 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ed3be230 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ed3be230 Branch: refs/heads/HBASE-19064 Commit: ed3be2305c56d14c368d30e48a9f7cc738fc8a87 Parents: 720ffcd Author: Guanghao Zhang Authored: Fri Jan 26 16:50:48 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:17:53 2018 +0800 -- .../replication/ReplicationPeerConfigUtil.java | 22 +++--- .../hbase/replication/SyncReplicationState.java | 17 ++ .../hbase/shaded/protobuf/RequestConverter.java | 7 +++--- .../src/main/protobuf/Replication.proto | 13 +++ .../replication/ZKReplicationPeerStorage.java | 24 +--- .../hadoop/hbase/master/MasterRpcServices.java | 9 ...ransitPeerSyncReplicationStateProcedure.java | 9 .../TestReplicationSourceManager.java | 2 +- 8 files changed, 67 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/ed3be230/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java index 6cbe05b..331795c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java @@ -403,7 +403,7 @@ public final class ReplicationPeerConfigUtil { ReplicationProtos.ReplicationState.State.ENABLED == desc.getState().getState(); ReplicationPeerConfig config = convert(desc.getConfig()); return new ReplicationPeerDescription(desc.getId(), enabled, config, - SyncReplicationState.valueOf(desc.getSyncReplicationState().getNumber())); + toSyncReplicationState(desc.getSyncReplicationState())); } public static ReplicationProtos.ReplicationPeerDescription @@ -411,17 +411,33 @@ public final class ReplicationPeerConfigUtil { ReplicationProtos.ReplicationPeerDescription.Builder builder = ReplicationProtos.ReplicationPeerDescription.newBuilder(); builder.setId(desc.getPeerId()); + ReplicationProtos.ReplicationState.Builder stateBuilder = ReplicationProtos.ReplicationState.newBuilder(); stateBuilder.setState(desc.isEnabled() ? ReplicationProtos.ReplicationState.State.ENABLED : ReplicationProtos.ReplicationState.State.DISABLED); builder.setState(stateBuilder.build()); + builder.setConfig(convert(desc.getPeerConfig())); -builder.setSyncReplicationState( - ReplicationProtos.SyncReplicationState.forNumber(desc.getSyncReplicationState().ordinal())); + builder.setSyncReplicationState(toSyncReplicationState(desc.getSyncReplicationState())); + return builder.build(); } + public static ReplicationProtos.SyncReplicationState + toSyncReplicationState(SyncReplicationState state) { +ReplicationProtos.SyncReplicationState.Builder syncReplicationStateBuilder = +ReplicationProtos.SyncReplicationState.newBuilder(); +syncReplicationStateBuilder + .setState(ReplicationProtos.SyncReplicationState.State.forNumber(state.ordinal())); +return syncReplicationStateBuilder.build(); + } + + public static SyncReplicationState + toSyncReplicationState(ReplicationProtos.SyncReplicationState state) { +return SyncReplicationState.valueOf(state.getState().getNumber()); + } + public static ReplicationPeerConfig appendTableCFsToReplicationPeerConfig( Map> tableCfs, ReplicationPeerConfig peerConfig) { ReplicationPeerConfigBuilder builder = ReplicationPeerConfig.newBuilder(peerConfig); http://git-wip-us.apache.org/repos/asf/hbase/blob/ed3be230/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/SyncReplicationState.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/SyncReplicationState.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/SyncReplicationState.java index bd144e9..a65b144 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/SyncReplicationState.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/SyncReplicationState.java @@ -17,8 +17,15 @@ */ package org.apache.hadoop.hbase.replication;
[20/50] [abbrv] hbase git commit: HBASE-19747 Introduce a special WALProvider for synchronous replication
HBASE-19747 Introduce a special WALProvider for synchronous replication Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d2e18fc2 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d2e18fc2 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d2e18fc2 Branch: refs/heads/HBASE-19064 Commit: d2e18fc2b2bc4bf7e2d4be5ce37280a85d9594f7 Parents: 1558306 Author: zhangduo Authored: Fri Jan 19 18:38:39 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:16:55 2018 +0800 -- .../hbase/regionserver/wal/AbstractFSWAL.java | 7 + .../hbase/regionserver/wal/AsyncFSWAL.java | 1 - .../hbase/regionserver/wal/DualAsyncFSWAL.java | 4 +- .../hadoop/hbase/regionserver/wal/FSHLog.java | 4 - .../regionserver/PeerActionListener.java| 33 +++ .../SynchronousReplicationPeerProvider.java | 35 +++ .../hadoop/hbase/wal/AbstractFSWALProvider.java | 1 + .../hadoop/hbase/wal/AsyncFSWALProvider.java| 18 +- .../hbase/wal/NettyAsyncFSWALConfigHelper.java | 8 +- .../hbase/wal/RegionGroupingProvider.java | 13 +- .../wal/SynchronousReplicationWALProvider.java | 225 +++ .../org/apache/hadoop/hbase/wal/WALFactory.java | 37 ++- .../org/apache/hadoop/hbase/wal/WALKeyImpl.java | 16 +- .../regionserver/TestCompactionPolicy.java | 1 + .../regionserver/TestFailedAppendAndSync.java | 122 +- .../hadoop/hbase/regionserver/TestHRegion.java | 24 +- .../TestHRegionWithInMemoryFlush.java | 7 - .../hbase/regionserver/TestRegionIncrement.java | 20 +- .../hbase/regionserver/TestWALLockup.java | 1 + .../regionserver/wal/AbstractTestWALReplay.java | 1 + .../regionserver/wal/ProtobufLogTestHelper.java | 44 +++- .../hbase/regionserver/wal/TestAsyncFSWAL.java | 13 +- .../regionserver/wal/TestAsyncWALReplay.java| 4 +- .../wal/TestCombinedAsyncWriter.java| 3 +- .../hbase/regionserver/wal/TestFSHLog.java | 15 +- .../hbase/regionserver/wal/TestWALReplay.java | 1 + .../apache/hadoop/hbase/wal/IOTestProvider.java | 2 - .../TestSynchronousReplicationWALProvider.java | 153 + 28 files changed, 659 insertions(+), 154 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/d2e18fc2/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java index 825ad17..4255086 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java @@ -434,6 +434,13 @@ public abstract class AbstractFSWAL implements WAL { this.implClassName = getClass().getSimpleName(); } + /** + * Used to initialize the WAL. Usually just call rollWriter to create the first log writer. + */ + public void init() throws IOException { +rollWriter(); + } + @Override public void registerWALActionsListener(WALActionsListener listener) { this.listeners.add(listener); http://git-wip-us.apache.org/repos/asf/hbase/blob/d2e18fc2/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java index 4732f41..d98ab75 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java @@ -248,7 +248,6 @@ public class AsyncFSWAL extends AbstractFSWAL { batchSize = conf.getLong(WAL_BATCH_SIZE, DEFAULT_WAL_BATCH_SIZE); waitOnShutdownInSeconds = conf.getInt(ASYNC_WAL_WAIT_ON_SHUTDOWN_IN_SECONDS, DEFAULT_ASYNC_WAL_WAIT_ON_SHUTDOWN_IN_SECONDS); -rollWriter(); } private static boolean waitingRoll(int epochAndState) { http://git-wip-us.apache.org/repos/asf/hbase/blob/d2e18fc2/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/DualAsyncFSWAL.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/DualAsyncFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/DualAsyncFSWAL.java index 42b0dae..0495337 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/DualAsyncFSWAL.java +++
[24/50] [abbrv] hbase git commit: HBASE-19857 Complete the procedure for adding a sync replication peer
HBASE-19857 Complete the procedure for adding a sync replication peer Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/720ffcde Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/720ffcde Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/720ffcde Branch: refs/heads/HBASE-19064 Commit: 720ffcde5d4a12ba10fdc5354c3876abed917043 Parents: da14ac3 Author: zhangduo Authored: Thu Jan 25 20:09:00 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:17:53 2018 +0800 -- .../hbase/replication/ReplicationPeer.java | 9 + .../hbase/replication/ReplicationPeerImpl.java | 28 +-- .../hbase/replication/ReplicationPeers.java | 3 +- .../regionserver/PeerActionListener.java| 10 +- .../SyncReplicationPeerProvider.java| 35 +++ .../SynchronousReplicationPeerProvider.java | 35 --- .../hbase/wal/SyncReplicationWALProvider.java | 234 +++ .../wal/SynchronousReplicationWALProvider.java | 225 -- .../org/apache/hadoop/hbase/wal/WALFactory.java | 8 +- .../TestReplicationSourceManager.java | 3 + .../wal/TestSyncReplicationWALProvider.java | 153 .../TestSynchronousReplicationWALProvider.java | 153 12 files changed, 456 insertions(+), 440 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/720ffcde/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java -- diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java index 2da3cce..0196a9a 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java @@ -54,6 +54,15 @@ public interface ReplicationPeer { PeerState getPeerState(); /** + * Returns the sync replication state of the peer by reading local cache. + * + * If the peer is not a synchronous replication peer, a {@link SyncReplicationState#NONE} will be + * returned. + * @return the sync replication state + */ + SyncReplicationState getSyncReplicationState(); + + /** * Test whether the peer is enabled. * @return {@code true} if enabled, otherwise {@code false}. */ http://git-wip-us.apache.org/repos/asf/hbase/blob/720ffcde/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerImpl.java -- diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerImpl.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerImpl.java index d656466..ff3f662 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerImpl.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerImpl.java @@ -36,6 +36,8 @@ public class ReplicationPeerImpl implements ReplicationPeer { private volatile PeerState peerState; + private volatile SyncReplicationState syncReplicationState; + private final List peerConfigListeners; /** @@ -45,12 +47,13 @@ public class ReplicationPeerImpl implements ReplicationPeer { * @param id string representation of this peer's identifier * @param peerConfig configuration for the replication peer */ - public ReplicationPeerImpl(Configuration conf, String id, boolean peerState, - ReplicationPeerConfig peerConfig) { + public ReplicationPeerImpl(Configuration conf, String id, ReplicationPeerConfig peerConfig, + boolean peerState, SyncReplicationState syncReplicationState) { this.conf = conf; this.id = id; this.peerState = peerState ? PeerState.ENABLED : PeerState.DISABLED; this.peerConfig = peerConfig; +this.syncReplicationState = syncReplicationState; this.peerConfigListeners = new ArrayList<>(); } @@ -77,37 +80,26 @@ public class ReplicationPeerImpl implements ReplicationPeer { return peerState; } - /** - * Get the peer config object - * @return the ReplicationPeerConfig for this peer - */ + @Override + public SyncReplicationState getSyncReplicationState() { +return syncReplicationState; + } + @Override public ReplicationPeerConfig getPeerConfig() { return peerConfig; } - /** - * Get the configuration object required to communicate with this peer - * @return configuration object - */ @Override public Configuration getConfiguration() { return conf; } - /** - * Get replicable (table, cf-list) map
[26/50] [abbrv] hbase git commit: HBASE-19781 Add a new cluster state flag for synchronous replication
HBASE-19781 Add a new cluster state flag for synchronous replication Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/da14ac38 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/da14ac38 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/da14ac38 Branch: refs/heads/HBASE-19064 Commit: da14ac38557ac5b81c4e72e08a114f514d560c7f Parents: d2e18fc Author: Guanghao Zhang Authored: Mon Jan 22 11:44:49 2018 +0800 Committer: zhangduo Committed: Thu Jun 21 10:17:53 2018 +0800 -- .../org/apache/hadoop/hbase/client/Admin.java | 39 + .../apache/hadoop/hbase/client/AsyncAdmin.java | 31 .../hadoop/hbase/client/AsyncHBaseAdmin.java| 7 + .../hbase/client/ConnectionImplementation.java | 9 ++ .../apache/hadoop/hbase/client/HBaseAdmin.java | 26 +++ .../hadoop/hbase/client/RawAsyncHBaseAdmin.java | 15 ++ .../client/ShortCircuitMasterConnection.java| 9 ++ .../replication/ReplicationPeerConfigUtil.java | 26 +-- .../replication/ReplicationPeerDescription.java | 10 +- .../hbase/replication/SyncReplicationState.java | 48 ++ .../hbase/shaded/protobuf/RequestConverter.java | 10 ++ .../src/main/protobuf/Master.proto | 4 + .../src/main/protobuf/MasterProcedure.proto | 4 + .../src/main/protobuf/Replication.proto | 20 +++ .../replication/ReplicationPeerStorage.java | 18 ++- .../hbase/replication/ReplicationUtils.java | 1 + .../replication/ZKReplicationPeerStorage.java | 61 +-- .../replication/TestReplicationStateBasic.java | 23 ++- .../TestZKReplicationPeerStorage.java | 12 +- .../hbase/coprocessor/MasterObserver.java | 23 +++ .../org/apache/hadoop/hbase/master/HMaster.java | 12 ++ .../hbase/master/MasterCoprocessorHost.java | 21 +++ .../hadoop/hbase/master/MasterRpcServices.java | 17 ++ .../hadoop/hbase/master/MasterServices.java | 9 ++ .../procedure/PeerProcedureInterface.java | 2 +- .../replication/ReplicationPeerManager.java | 51 +- ...ransitPeerSyncReplicationStateProcedure.java | 159 +++ .../hbase/security/access/AccessController.java | 8 + .../replication/TestReplicationAdmin.java | 62 .../hbase/master/MockNoopMasterServices.java| 6 + .../cleaner/TestReplicationHFileCleaner.java| 4 +- .../TestReplicationTrackerZKImpl.java | 6 +- .../TestReplicationSourceManager.java | 3 +- .../security/access/TestAccessController.java | 16 ++ .../hbase/util/TestHBaseFsckReplication.java| 5 +- .../src/main/ruby/hbase/replication_admin.rb| 15 ++ hbase-shell/src/main/ruby/shell.rb | 1 + .../src/main/ruby/shell/commands/list_peers.rb | 6 +- .../transit_peer_sync_replication_state.rb | 44 + .../test/ruby/hbase/replication_admin_test.rb | 24 +++ 40 files changed, 816 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/da14ac38/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java index 331f2d1..39542e4 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java @@ -51,6 +51,7 @@ import org.apache.hadoop.hbase.regionserver.wal.FailedLogCloseException; import org.apache.hadoop.hbase.replication.ReplicationException; import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; import org.apache.hadoop.hbase.replication.ReplicationPeerDescription; +import org.apache.hadoop.hbase.replication.SyncReplicationState; import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException; import org.apache.hadoop.hbase.snapshot.RestoreSnapshotException; import org.apache.hadoop.hbase.snapshot.SnapshotCreationException; @@ -2657,6 +2658,44 @@ public interface Admin extends Abortable, Closeable { List listReplicationPeers(Pattern pattern) throws IOException; /** + * Transit current cluster to a new state in a synchronous replication peer. + * @param peerId a short name that identifies the peer + * @param state a new state of current cluster + * @throws IOException if a remote or network exception occurs + */ + void transitReplicationPeerSyncReplicationState(String peerId, SyncReplicationState state) + throws IOException; + + /** + * Transit current cluster to a new state in a synchronous replication peer. But does not block + * and wait for it. + * + * You can use Future.get(long, TimeUnit) to wait on the operation to complete. It may throw + *