HBASE-13290 Procedure v2 - client enable/disable table sync (Stephen Yuan Jiang)

This commit is contained in:
Matteo Bertozzi 2015-04-09 21:53:51 +01:00
parent 2cbb1afe52
commit 7c5ae63850
7 changed files with 582 additions and 255 deletions

View File

@ -102,8 +102,10 @@ import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DeleteSnapshotReq
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DeleteTableRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DeleteTableRequest;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DeleteTableResponse; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DeleteTableResponse;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableRequest;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DispatchMergingRegionsRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DispatchMergingRegionsRequest;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableRequest;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ExecProcedureRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ExecProcedureRequest;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ExecProcedureResponse; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ExecProcedureResponse;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetClusterStatusRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetClusterStatusRequest;
@ -940,12 +942,20 @@ public class HBaseAdmin implements Admin {
@Override @Override
public void enableTable(final TableName tableName) public void enableTable(final TableName tableName)
throws IOException { throws IOException {
enableTableAsync(tableName); Future<Void> future = enableTableAsyncV2(tableName);
try {
// Wait until all regions are enabled future.get(syncWaitTimeout, TimeUnit.MILLISECONDS);
waitUntilTableIsEnabled(tableName); } catch (InterruptedException e) {
throw new InterruptedIOException("Interrupted when waiting for table to be disabled");
LOG.info("Enabled table " + tableName); } catch (TimeoutException e) {
throw new TimeoutIOException(e);
} catch (ExecutionException e) {
if (e.getCause() instanceof IOException) {
throw (IOException)e.getCause();
} else {
throw new IOException(e.getCause());
}
}
} }
public void enableTable(final byte[] tableName) public void enableTable(final byte[] tableName)
@ -1012,16 +1022,7 @@ public class HBaseAdmin implements Admin {
@Override @Override
public void enableTableAsync(final TableName tableName) public void enableTableAsync(final TableName tableName)
throws IOException { throws IOException {
TableName.isLegalFullyQualifiedTableName(tableName.getName()); enableTableAsyncV2(tableName);
executeCallable(new MasterCallable<Void>(getConnection()) {
@Override
public Void call(int callTimeout) throws ServiceException {
LOG.info("Started enable of " + tableName);
EnableTableRequest req = RequestConverter.buildEnableTableRequest(tableName);
master.enableTable(null,req);
return null;
}
});
} }
public void enableTableAsync(final byte[] tableName) public void enableTableAsync(final byte[] tableName)
@ -1034,6 +1035,84 @@ public class HBaseAdmin implements Admin {
enableTableAsync(TableName.valueOf(tableName)); enableTableAsync(TableName.valueOf(tableName));
} }
/**
* Enable the table but does not block and wait for it be completely enabled.
* You can use Future.get(long, TimeUnit) to wait on the operation to complete.
* It may throw ExecutionException if there was an error while executing the operation
* or TimeoutException in case the wait timeout was not long enough to allow the
* operation to complete.
*
* @param tableName name of table to delete
* @throws IOException if a remote or network exception occurs
* @return the result of the async enable. You can use Future.get(long, TimeUnit)
* to wait on the operation to complete.
*/
// TODO: This should be called Async but it will break binary compatibility
private Future<Void> enableTableAsyncV2(final TableName tableName) throws IOException {
TableName.isLegalFullyQualifiedTableName(tableName.getName());
EnableTableResponse response = executeCallable(
new MasterCallable<EnableTableResponse>(getConnection()) {
@Override
public EnableTableResponse call(int callTimeout) throws ServiceException {
LOG.info("Started enable of " + tableName);
EnableTableRequest req = RequestConverter.buildEnableTableRequest(tableName);
return master.enableTable(null,req);
}
});
return new EnableTableFuture(this, tableName, response);
}
private static class EnableTableFuture extends ProcedureFuture<Void> {
private final TableName tableName;
public EnableTableFuture(final HBaseAdmin admin, final TableName tableName,
final EnableTableResponse response) {
super(admin, (response != null && response.hasProcId()) ? response.getProcId() : null);
this.tableName = tableName;
}
@Override
protected Void waitOperationResult(final long deadlineTs)
throws IOException, TimeoutException {
waitTableEnabled(deadlineTs);
return null;
}
@Override
protected Void postOperationResult(final Void result, final long deadlineTs)
throws IOException, TimeoutException {
LOG.info("Enabled " + tableName);
return result;
}
private void waitTableEnabled(final long deadlineTs)
throws IOException, TimeoutException {
waitForState(deadlineTs, new WaitForStateCallable() {
@Override
public boolean checkState(int tries) throws IOException {
boolean enabled;
try {
enabled = getAdmin().isTableEnabled(tableName);
} catch (TableNotFoundException tnfe) {
return false;
}
return enabled && getAdmin().isTableAvailable(tableName);
}
@Override
public void throwInterruptedException() throws InterruptedIOException {
throw new InterruptedIOException("Interrupted when waiting for table to be enabled");
}
@Override
public void throwTimeoutException(long elapsedTime) throws TimeoutException {
throw new TimeoutException("Table " + tableName + " not yet enabled after " +
elapsedTime + "msec");
}
});
}
}
/** /**
* Enable tables matching the passed in pattern and wait on completion. * Enable tables matching the passed in pattern and wait on completion.
* *
@ -1092,16 +1171,7 @@ public class HBaseAdmin implements Admin {
*/ */
@Override @Override
public void disableTableAsync(final TableName tableName) throws IOException { public void disableTableAsync(final TableName tableName) throws IOException {
TableName.isLegalFullyQualifiedTableName(tableName.getName()); disableTableAsyncV2(tableName);
executeCallable(new MasterCallable<Void>(getConnection()) {
@Override
public Void call(int callTimeout) throws ServiceException {
LOG.info("Started disable of " + tableName);
DisableTableRequest req = RequestConverter.buildDisableTableRequest(tableName);
master.disableTable(null,req);
return null;
}
});
} }
public void disableTableAsync(final byte[] tableName) throws IOException { public void disableTableAsync(final byte[] tableName) throws IOException {
@ -1126,32 +1196,20 @@ public class HBaseAdmin implements Admin {
@Override @Override
public void disableTable(final TableName tableName) public void disableTable(final TableName tableName)
throws IOException { throws IOException {
disableTableAsync(tableName); Future<Void> future = disableTableAsyncV2(tableName);
// Wait until table is disabled try {
boolean disabled = false; future.get(syncWaitTimeout, TimeUnit.MILLISECONDS);
for (int tries = 0; tries < (this.numRetries * this.retryLongerMultiplier); tries++) { } catch (InterruptedException e) {
disabled = isTableDisabled(tableName); throw new InterruptedIOException("Interrupted when waiting for table to be disabled");
if (disabled) { } catch (TimeoutException e) {
break; throw new TimeoutIOException(e);
} } catch (ExecutionException e) {
long sleep = getPauseTime(tries); if (e.getCause() instanceof IOException) {
if (LOG.isDebugEnabled()) { throw (IOException)e.getCause();
LOG.debug("Sleeping= " + sleep + "ms, waiting for all regions to be " + } else {
"disabled in " + tableName); throw new IOException(e.getCause());
}
try {
Thread.sleep(sleep);
} catch (InterruptedException e) {
// Do this conversion rather than let it out because do not want to
// change the method signature.
throw (InterruptedIOException)new InterruptedIOException("Interrupted").initCause(e);
} }
} }
if (!disabled) {
throw new RegionException("Retries exhausted, it took too long to wait"+
" for the table " + tableName + " to be disabled.");
}
LOG.info("Disabled " + tableName);
} }
public void disableTable(final byte[] tableName) public void disableTable(final byte[] tableName)
@ -1164,6 +1222,78 @@ public class HBaseAdmin implements Admin {
disableTable(TableName.valueOf(tableName)); disableTable(TableName.valueOf(tableName));
} }
/**
* Disable the table but does not block and wait for it be completely disabled.
* You can use Future.get(long, TimeUnit) to wait on the operation to complete.
* It may throw ExecutionException if there was an error while executing the operation
* or TimeoutException in case the wait timeout was not long enough to allow the
* operation to complete.
*
* @param tableName name of table to delete
* @throws IOException if a remote or network exception occurs
* @return the result of the async disable. You can use Future.get(long, TimeUnit)
* to wait on the operation to complete.
*/
// TODO: This should be called Async but it will break binary compatibility
private Future<Void> disableTableAsyncV2(final TableName tableName) throws IOException {
TableName.isLegalFullyQualifiedTableName(tableName.getName());
DisableTableResponse response = executeCallable(
new MasterCallable<DisableTableResponse>(getConnection()) {
@Override
public DisableTableResponse call(int callTimeout) throws ServiceException {
LOG.info("Started disable of " + tableName);
DisableTableRequest req = RequestConverter.buildDisableTableRequest(tableName);
return master.disableTable(null, req);
}
});
return new DisableTableFuture(this, tableName, response);
}
private static class DisableTableFuture extends ProcedureFuture<Void> {
private final TableName tableName;
public DisableTableFuture(final HBaseAdmin admin, final TableName tableName,
final DisableTableResponse response) {
super(admin, (response != null && response.hasProcId()) ? response.getProcId() : null);
this.tableName = tableName;
}
@Override
protected Void waitOperationResult(final long deadlineTs)
throws IOException, TimeoutException {
waitTableDisabled(deadlineTs);
return null;
}
@Override
protected Void postOperationResult(final Void result, final long deadlineTs)
throws IOException, TimeoutException {
LOG.info("Disabled " + tableName);
return result;
}
private void waitTableDisabled(final long deadlineTs)
throws IOException, TimeoutException {
waitForState(deadlineTs, new WaitForStateCallable() {
@Override
public boolean checkState(int tries) throws IOException {
return getAdmin().isTableDisabled(tableName);
}
@Override
public void throwInterruptedException() throws InterruptedIOException {
throw new InterruptedIOException("Interrupted when waiting for table to be disabled");
}
@Override
public void throwTimeoutException(long elapsedTime) throws TimeoutException {
throw new TimeoutException("Table " + tableName + " not yet disabled after " +
elapsedTime + "msec");
}
});
}
}
/** /**
* Disable tables matching the passed in pattern and wait on completion. * Disable tables matching the passed in pattern and wait on completion.
* *

View File

@ -12053,6 +12053,16 @@ public final class MasterProtos {
public interface EnableTableResponseOrBuilder public interface EnableTableResponseOrBuilder
extends com.google.protobuf.MessageOrBuilder { extends com.google.protobuf.MessageOrBuilder {
// optional uint64 proc_id = 1;
/**
* <code>optional uint64 proc_id = 1;</code>
*/
boolean hasProcId();
/**
* <code>optional uint64 proc_id = 1;</code>
*/
long getProcId();
} }
/** /**
* Protobuf type {@code EnableTableResponse} * Protobuf type {@code EnableTableResponse}
@ -12087,6 +12097,7 @@ public final class MasterProtos {
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
initFields(); initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(); com.google.protobuf.UnknownFieldSet.newBuilder();
try { try {
@ -12104,6 +12115,11 @@ public final class MasterProtos {
} }
break; break;
} }
case 8: {
bitField0_ |= 0x00000001;
procId_ = input.readUInt64();
break;
}
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@ -12143,7 +12159,25 @@ public final class MasterProtos {
return PARSER; return PARSER;
} }
private int bitField0_;
// optional uint64 proc_id = 1;
public static final int PROC_ID_FIELD_NUMBER = 1;
private long procId_;
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public boolean hasProcId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public long getProcId() {
return procId_;
}
private void initFields() { private void initFields() {
procId_ = 0L;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@ -12157,6 +12191,9 @@ public final class MasterProtos {
public void writeTo(com.google.protobuf.CodedOutputStream output) public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException { throws java.io.IOException {
getSerializedSize(); getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeUInt64(1, procId_);
}
getUnknownFields().writeTo(output); getUnknownFields().writeTo(output);
} }
@ -12166,6 +12203,10 @@ public final class MasterProtos {
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, procId_);
}
size += getUnknownFields().getSerializedSize(); size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
@ -12189,6 +12230,11 @@ public final class MasterProtos {
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse other = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse) obj; org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse other = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse) obj;
boolean result = true; boolean result = true;
result = result && (hasProcId() == other.hasProcId());
if (hasProcId()) {
result = result && (getProcId()
== other.getProcId());
}
result = result && result = result &&
getUnknownFields().equals(other.getUnknownFields()); getUnknownFields().equals(other.getUnknownFields());
return result; return result;
@ -12202,6 +12248,10 @@ public final class MasterProtos {
} }
int hash = 41; int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasProcId()) {
hash = (37 * hash) + PROC_ID_FIELD_NUMBER;
hash = (53 * hash) + hashLong(getProcId());
}
hash = (29 * hash) + getUnknownFields().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash; memoizedHashCode = hash;
return hash; return hash;
@ -12311,6 +12361,8 @@ public final class MasterProtos {
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
procId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
return this; return this;
} }
@ -12337,6 +12389,13 @@ public final class MasterProtos {
public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse buildPartial() { public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse buildPartial() {
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse result = new org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse(this); org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse result = new org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.procId_ = procId_;
result.bitField0_ = to_bitField0_;
onBuilt(); onBuilt();
return result; return result;
} }
@ -12352,6 +12411,9 @@ public final class MasterProtos {
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse other) { public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse other) {
if (other == org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse.getDefaultInstance()) return this; if (other == org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse.getDefaultInstance()) return this;
if (other.hasProcId()) {
setProcId(other.getProcId());
}
this.mergeUnknownFields(other.getUnknownFields()); this.mergeUnknownFields(other.getUnknownFields());
return this; return this;
} }
@ -12377,6 +12439,40 @@ public final class MasterProtos {
} }
return this; return this;
} }
private int bitField0_;
// optional uint64 proc_id = 1;
private long procId_ ;
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public boolean hasProcId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public long getProcId() {
return procId_;
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public Builder setProcId(long value) {
bitField0_ |= 0x00000001;
procId_ = value;
onChanged();
return this;
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public Builder clearProcId() {
bitField0_ = (bitField0_ & ~0x00000001);
procId_ = 0L;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:EnableTableResponse) // @@protoc_insertion_point(builder_scope:EnableTableResponse)
} }
@ -12952,6 +13048,16 @@ public final class MasterProtos {
public interface DisableTableResponseOrBuilder public interface DisableTableResponseOrBuilder
extends com.google.protobuf.MessageOrBuilder { extends com.google.protobuf.MessageOrBuilder {
// optional uint64 proc_id = 1;
/**
* <code>optional uint64 proc_id = 1;</code>
*/
boolean hasProcId();
/**
* <code>optional uint64 proc_id = 1;</code>
*/
long getProcId();
} }
/** /**
* Protobuf type {@code DisableTableResponse} * Protobuf type {@code DisableTableResponse}
@ -12986,6 +13092,7 @@ public final class MasterProtos {
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
initFields(); initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(); com.google.protobuf.UnknownFieldSet.newBuilder();
try { try {
@ -13003,6 +13110,11 @@ public final class MasterProtos {
} }
break; break;
} }
case 8: {
bitField0_ |= 0x00000001;
procId_ = input.readUInt64();
break;
}
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@ -13042,7 +13154,25 @@ public final class MasterProtos {
return PARSER; return PARSER;
} }
private int bitField0_;
// optional uint64 proc_id = 1;
public static final int PROC_ID_FIELD_NUMBER = 1;
private long procId_;
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public boolean hasProcId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public long getProcId() {
return procId_;
}
private void initFields() { private void initFields() {
procId_ = 0L;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@ -13056,6 +13186,9 @@ public final class MasterProtos {
public void writeTo(com.google.protobuf.CodedOutputStream output) public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException { throws java.io.IOException {
getSerializedSize(); getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeUInt64(1, procId_);
}
getUnknownFields().writeTo(output); getUnknownFields().writeTo(output);
} }
@ -13065,6 +13198,10 @@ public final class MasterProtos {
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, procId_);
}
size += getUnknownFields().getSerializedSize(); size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
@ -13088,6 +13225,11 @@ public final class MasterProtos {
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse other = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse) obj; org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse other = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse) obj;
boolean result = true; boolean result = true;
result = result && (hasProcId() == other.hasProcId());
if (hasProcId()) {
result = result && (getProcId()
== other.getProcId());
}
result = result && result = result &&
getUnknownFields().equals(other.getUnknownFields()); getUnknownFields().equals(other.getUnknownFields());
return result; return result;
@ -13101,6 +13243,10 @@ public final class MasterProtos {
} }
int hash = 41; int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasProcId()) {
hash = (37 * hash) + PROC_ID_FIELD_NUMBER;
hash = (53 * hash) + hashLong(getProcId());
}
hash = (29 * hash) + getUnknownFields().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash; memoizedHashCode = hash;
return hash; return hash;
@ -13210,6 +13356,8 @@ public final class MasterProtos {
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
procId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
return this; return this;
} }
@ -13236,6 +13384,13 @@ public final class MasterProtos {
public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse buildPartial() { public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse buildPartial() {
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse result = new org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse(this); org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse result = new org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.procId_ = procId_;
result.bitField0_ = to_bitField0_;
onBuilt(); onBuilt();
return result; return result;
} }
@ -13251,6 +13406,9 @@ public final class MasterProtos {
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse other) { public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse other) {
if (other == org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse.getDefaultInstance()) return this; if (other == org.apache.hadoop.hbase.protobuf.generated.MasterProtos.DisableTableResponse.getDefaultInstance()) return this;
if (other.hasProcId()) {
setProcId(other.getProcId());
}
this.mergeUnknownFields(other.getUnknownFields()); this.mergeUnknownFields(other.getUnknownFields());
return this; return this;
} }
@ -13276,6 +13434,40 @@ public final class MasterProtos {
} }
return this; return this;
} }
private int bitField0_;
// optional uint64 proc_id = 1;
private long procId_ ;
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public boolean hasProcId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public long getProcId() {
return procId_;
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public Builder setProcId(long value) {
bitField0_ |= 0x00000001;
procId_ = value;
onChanged();
return this;
}
/**
* <code>optional uint64 proc_id = 1;</code>
*/
public Builder clearProcId() {
bitField0_ = (bitField0_ & ~0x00000001);
procId_ = 0L;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:DisableTableResponse) // @@protoc_insertion_point(builder_scope:DisableTableResponse)
} }
@ -51749,195 +51941,196 @@ public final class MasterProtos {
"e\030\001 \002(\0132\n.TableName\022\035\n\016preserveSplits\030\002 " + "e\030\001 \002(\0132\n.TableName\022\035\n\016preserveSplits\030\002 " +
"\001(\010:\005false\"\027\n\025TruncateTableResponse\"4\n\022E" + "\001(\010:\005false\"\027\n\025TruncateTableResponse\"4\n\022E" +
"nableTableRequest\022\036\n\ntable_name\030\001 \002(\0132\n." + "nableTableRequest\022\036\n\ntable_name\030\001 \002(\0132\n." +
"TableName\"\025\n\023EnableTableResponse\"5\n\023Disa" + "TableName\"&\n\023EnableTableResponse\022\017\n\007proc" +
"bleTableRequest\022\036\n\ntable_name\030\001 \002(\0132\n.Ta" + "_id\030\001 \001(\004\"5\n\023DisableTableRequest\022\036\n\ntabl" +
"bleName\"\026\n\024DisableTableResponse\"X\n\022Modif" + "e_name\030\001 \002(\0132\n.TableName\"\'\n\024DisableTable" +
"yTableRequest\022\036\n\ntable_name\030\001 \002(\0132\n.Tabl" + "Response\022\017\n\007proc_id\030\001 \001(\004\"X\n\022ModifyTable" +
"eName\022\"\n\014table_schema\030\002 \002(\0132\014.TableSchem" + "Request\022\036\n\ntable_name\030\001 \002(\0132\n.TableName\022" +
"a\"\025\n\023ModifyTableResponse\"K\n\026CreateNamesp", "\"\n\014table_schema\030\002 \002(\0132\014.TableSchema\"\025\n\023M",
"aceRequest\0221\n\023namespaceDescriptor\030\001 \002(\0132" + "odifyTableResponse\"K\n\026CreateNamespaceReq" +
"\024.NamespaceDescriptor\"\031\n\027CreateNamespace" + "uest\0221\n\023namespaceDescriptor\030\001 \002(\0132\024.Name" +
"Response\"/\n\026DeleteNamespaceRequest\022\025\n\rna" + "spaceDescriptor\"\031\n\027CreateNamespaceRespon" +
"mespaceName\030\001 \002(\t\"\031\n\027DeleteNamespaceResp" + "se\"/\n\026DeleteNamespaceRequest\022\025\n\rnamespac" +
"onse\"K\n\026ModifyNamespaceRequest\0221\n\023namesp" + "eName\030\001 \002(\t\"\031\n\027DeleteNamespaceResponse\"K" +
"aceDescriptor\030\001 \002(\0132\024.NamespaceDescripto" + "\n\026ModifyNamespaceRequest\0221\n\023namespaceDes" +
"r\"\031\n\027ModifyNamespaceResponse\"6\n\035GetNames" + "criptor\030\001 \002(\0132\024.NamespaceDescriptor\"\031\n\027M" +
"paceDescriptorRequest\022\025\n\rnamespaceName\030\001" + "odifyNamespaceResponse\"6\n\035GetNamespaceDe" +
" \002(\t\"S\n\036GetNamespaceDescriptorResponse\0221" + "scriptorRequest\022\025\n\rnamespaceName\030\001 \002(\t\"S" +
"\n\023namespaceDescriptor\030\001 \002(\0132\024.NamespaceD", "\n\036GetNamespaceDescriptorResponse\0221\n\023name",
"escriptor\"!\n\037ListNamespaceDescriptorsReq" + "spaceDescriptor\030\001 \002(\0132\024.NamespaceDescrip" +
"uest\"U\n ListNamespaceDescriptorsResponse" + "tor\"!\n\037ListNamespaceDescriptorsRequest\"U" +
"\0221\n\023namespaceDescriptor\030\001 \003(\0132\024.Namespac" + "\n ListNamespaceDescriptorsResponse\0221\n\023na" +
"eDescriptor\"?\n&ListTableDescriptorsByNam" + "mespaceDescriptor\030\001 \003(\0132\024.NamespaceDescr" +
"espaceRequest\022\025\n\rnamespaceName\030\001 \002(\t\"L\n\'" + "iptor\"?\n&ListTableDescriptorsByNamespace" +
"ListTableDescriptorsByNamespaceResponse\022" + "Request\022\025\n\rnamespaceName\030\001 \002(\t\"L\n\'ListTa" +
"!\n\013tableSchema\030\001 \003(\0132\014.TableSchema\"9\n Li" + "bleDescriptorsByNamespaceResponse\022!\n\013tab" +
"stTableNamesByNamespaceRequest\022\025\n\rnamesp" + "leSchema\030\001 \003(\0132\014.TableSchema\"9\n ListTabl" +
"aceName\030\001 \002(\t\"B\n!ListTableNamesByNamespa" + "eNamesByNamespaceRequest\022\025\n\rnamespaceNam" +
"ceResponse\022\035\n\ttableName\030\001 \003(\0132\n.TableNam", "e\030\001 \002(\t\"B\n!ListTableNamesByNamespaceResp",
"e\"\021\n\017ShutdownRequest\"\022\n\020ShutdownResponse" + "onse\022\035\n\ttableName\030\001 \003(\0132\n.TableName\"\021\n\017S" +
"\"\023\n\021StopMasterRequest\"\024\n\022StopMasterRespo" + "hutdownRequest\"\022\n\020ShutdownResponse\"\023\n\021St" +
"nse\"\020\n\016BalanceRequest\"\'\n\017BalanceResponse" + "opMasterRequest\"\024\n\022StopMasterResponse\"\020\n" +
"\022\024\n\014balancer_ran\030\001 \002(\010\"<\n\031SetBalancerRun" + "\016BalanceRequest\"\'\n\017BalanceResponse\022\024\n\014ba" +
"ningRequest\022\n\n\002on\030\001 \002(\010\022\023\n\013synchronous\030\002" + "lancer_ran\030\001 \002(\010\"<\n\031SetBalancerRunningRe" +
" \001(\010\"8\n\032SetBalancerRunningResponse\022\032\n\022pr" + "quest\022\n\n\002on\030\001 \002(\010\022\023\n\013synchronous\030\002 \001(\010\"8" +
"ev_balance_value\030\001 \001(\010\"\032\n\030IsBalancerEnab" + "\n\032SetBalancerRunningResponse\022\032\n\022prev_bal" +
"ledRequest\",\n\031IsBalancerEnabledResponse\022" + "ance_value\030\001 \001(\010\"\032\n\030IsBalancerEnabledReq" +
"\017\n\007enabled\030\001 \002(\010\"\027\n\025RunCatalogScanReques" + "uest\",\n\031IsBalancerEnabledResponse\022\017\n\007ena" +
"t\"-\n\026RunCatalogScanResponse\022\023\n\013scan_resu", "bled\030\001 \002(\010\"\027\n\025RunCatalogScanRequest\"-\n\026R",
"lt\030\001 \001(\005\"-\n\033EnableCatalogJanitorRequest\022" + "unCatalogScanResponse\022\023\n\013scan_result\030\001 \001" +
"\016\n\006enable\030\001 \002(\010\"2\n\034EnableCatalogJanitorR" + "(\005\"-\n\033EnableCatalogJanitorRequest\022\016\n\006ena" +
"esponse\022\022\n\nprev_value\030\001 \001(\010\" \n\036IsCatalog" + "ble\030\001 \002(\010\"2\n\034EnableCatalogJanitorRespons" +
"JanitorEnabledRequest\"0\n\037IsCatalogJanito" + "e\022\022\n\nprev_value\030\001 \001(\010\" \n\036IsCatalogJanito" +
"rEnabledResponse\022\r\n\005value\030\001 \002(\010\"9\n\017Snaps" + "rEnabledRequest\"0\n\037IsCatalogJanitorEnabl" +
"hotRequest\022&\n\010snapshot\030\001 \002(\0132\024.SnapshotD" + "edResponse\022\r\n\005value\030\001 \002(\010\"9\n\017SnapshotReq" +
"escription\",\n\020SnapshotResponse\022\030\n\020expect" + "uest\022&\n\010snapshot\030\001 \002(\0132\024.SnapshotDescrip" +
"ed_timeout\030\001 \002(\003\"\036\n\034GetCompletedSnapshot" + "tion\",\n\020SnapshotResponse\022\030\n\020expected_tim" +
"sRequest\"H\n\035GetCompletedSnapshotsRespons" + "eout\030\001 \002(\003\"\036\n\034GetCompletedSnapshotsReque" +
"e\022\'\n\tsnapshots\030\001 \003(\0132\024.SnapshotDescripti", "st\"H\n\035GetCompletedSnapshotsResponse\022\'\n\ts",
"on\"?\n\025DeleteSnapshotRequest\022&\n\010snapshot\030" + "napshots\030\001 \003(\0132\024.SnapshotDescription\"?\n\025" +
"\001 \002(\0132\024.SnapshotDescription\"\030\n\026DeleteSna" + "DeleteSnapshotRequest\022&\n\010snapshot\030\001 \002(\0132" +
"pshotResponse\"@\n\026RestoreSnapshotRequest\022" + "\024.SnapshotDescription\"\030\n\026DeleteSnapshotR" +
"&\n\010snapshot\030\001 \002(\0132\024.SnapshotDescription\"" + "esponse\"@\n\026RestoreSnapshotRequest\022&\n\010sna" +
"\031\n\027RestoreSnapshotResponse\"?\n\025IsSnapshot" + "pshot\030\001 \002(\0132\024.SnapshotDescription\"\031\n\027Res" +
"DoneRequest\022&\n\010snapshot\030\001 \001(\0132\024.Snapshot" + "toreSnapshotResponse\"?\n\025IsSnapshotDoneRe" +
"Description\"U\n\026IsSnapshotDoneResponse\022\023\n" + "quest\022&\n\010snapshot\030\001 \001(\0132\024.SnapshotDescri" +
"\004done\030\001 \001(\010:\005false\022&\n\010snapshot\030\002 \001(\0132\024.S" + "ption\"U\n\026IsSnapshotDoneResponse\022\023\n\004done\030" +
"napshotDescription\"F\n\034IsRestoreSnapshotD" + "\001 \001(\010:\005false\022&\n\010snapshot\030\002 \001(\0132\024.Snapsho" +
"oneRequest\022&\n\010snapshot\030\001 \001(\0132\024.SnapshotD", "tDescription\"F\n\034IsRestoreSnapshotDoneReq",
"escription\"4\n\035IsRestoreSnapshotDoneRespo" + "uest\022&\n\010snapshot\030\001 \001(\0132\024.SnapshotDescrip" +
"nse\022\023\n\004done\030\001 \001(\010:\005false\"=\n\033GetSchemaAlt" + "tion\"4\n\035IsRestoreSnapshotDoneResponse\022\023\n" +
"erStatusRequest\022\036\n\ntable_name\030\001 \002(\0132\n.Ta" + "\004done\030\001 \001(\010:\005false\"=\n\033GetSchemaAlterStat" +
"bleName\"T\n\034GetSchemaAlterStatusResponse\022" + "usRequest\022\036\n\ntable_name\030\001 \002(\0132\n.TableNam" +
"\035\n\025yet_to_update_regions\030\001 \001(\r\022\025\n\rtotal_" + "e\"T\n\034GetSchemaAlterStatusResponse\022\035\n\025yet" +
"regions\030\002 \001(\r\"\202\001\n\032GetTableDescriptorsReq" + "_to_update_regions\030\001 \001(\r\022\025\n\rtotal_region" +
"uest\022\037\n\013table_names\030\001 \003(\0132\n.TableName\022\r\n" + "s\030\002 \001(\r\"\202\001\n\032GetTableDescriptorsRequest\022\037" +
"\005regex\030\002 \001(\t\022!\n\022include_sys_tables\030\003 \001(\010" + "\n\013table_names\030\001 \003(\0132\n.TableName\022\r\n\005regex" +
":\005false\022\021\n\tnamespace\030\004 \001(\t\"A\n\033GetTableDe" + "\030\002 \001(\t\022!\n\022include_sys_tables\030\003 \001(\010:\005fals" +
"scriptorsResponse\022\"\n\014table_schema\030\001 \003(\0132", "e\022\021\n\tnamespace\030\004 \001(\t\"A\n\033GetTableDescript",
"\014.TableSchema\"[\n\024GetTableNamesRequest\022\r\n" + "orsResponse\022\"\n\014table_schema\030\001 \003(\0132\014.Tabl" +
"\005regex\030\001 \001(\t\022!\n\022include_sys_tables\030\002 \001(\010" + "eSchema\"[\n\024GetTableNamesRequest\022\r\n\005regex" +
":\005false\022\021\n\tnamespace\030\003 \001(\t\"8\n\025GetTableNa" + "\030\001 \001(\t\022!\n\022include_sys_tables\030\002 \001(\010:\005fals" +
"mesResponse\022\037\n\013table_names\030\001 \003(\0132\n.Table" + "e\022\021\n\tnamespace\030\003 \001(\t\"8\n\025GetTableNamesRes" +
"Name\"\031\n\027GetClusterStatusRequest\"B\n\030GetCl" + "ponse\022\037\n\013table_names\030\001 \003(\0132\n.TableName\"\031" +
"usterStatusResponse\022&\n\016cluster_status\030\001 " + "\n\027GetClusterStatusRequest\"B\n\030GetClusterS" +
"\002(\0132\016.ClusterStatus\"\030\n\026IsMasterRunningRe" + "tatusResponse\022&\n\016cluster_status\030\001 \002(\0132\016." +
"quest\"4\n\027IsMasterRunningResponse\022\031\n\021is_m" + "ClusterStatus\"\030\n\026IsMasterRunningRequest\"" +
"aster_running\030\001 \002(\010\"@\n\024ExecProcedureRequ" + "4\n\027IsMasterRunningResponse\022\031\n\021is_master_" +
"est\022(\n\tprocedure\030\001 \002(\0132\025.ProcedureDescri", "running\030\001 \002(\010\"@\n\024ExecProcedureRequest\022(\n",
"ption\"F\n\025ExecProcedureResponse\022\030\n\020expect" + "\tprocedure\030\001 \002(\0132\025.ProcedureDescription\"" +
"ed_timeout\030\001 \001(\003\022\023\n\013return_data\030\002 \001(\014\"B\n" + "F\n\025ExecProcedureResponse\022\030\n\020expected_tim" +
"\026IsProcedureDoneRequest\022(\n\tprocedure\030\001 \001" + "eout\030\001 \001(\003\022\023\n\013return_data\030\002 \001(\014\"B\n\026IsPro" +
"(\0132\025.ProcedureDescription\"W\n\027IsProcedure" + "cedureDoneRequest\022(\n\tprocedure\030\001 \001(\0132\025.P" +
"DoneResponse\022\023\n\004done\030\001 \001(\010:\005false\022\'\n\010sna" + "rocedureDescription\"W\n\027IsProcedureDoneRe" +
"pshot\030\002 \001(\0132\025.ProcedureDescription\",\n\031Ge" + "sponse\022\023\n\004done\030\001 \001(\010:\005false\022\'\n\010snapshot\030" +
"tProcedureResultRequest\022\017\n\007proc_id\030\001 \002(\004" + "\002 \001(\0132\025.ProcedureDescription\",\n\031GetProce" +
"\"\347\001\n\032GetProcedureResultResponse\0220\n\005state" + "dureResultRequest\022\017\n\007proc_id\030\001 \002(\004\"\347\001\n\032G" +
"\030\001 \002(\0162!.GetProcedureResultResponse.Stat" + "etProcedureResultResponse\0220\n\005state\030\001 \002(\016" +
"e\022\022\n\nstart_time\030\002 \001(\004\022\023\n\013last_update\030\003 \001", "2!.GetProcedureResultResponse.State\022\022\n\ns",
"(\004\022\016\n\006result\030\004 \001(\014\022+\n\texception\030\005 \001(\0132\030." + "tart_time\030\002 \001(\004\022\023\n\013last_update\030\003 \001(\004\022\016\n\006" +
"ForeignExceptionMessage\"1\n\005State\022\r\n\tNOT_" + "result\030\004 \001(\014\022+\n\texception\030\005 \001(\0132\030.Foreig" +
"FOUND\020\000\022\013\n\007RUNNING\020\001\022\014\n\010FINISHED\020\002\"\273\001\n\017S" + "nExceptionMessage\"1\n\005State\022\r\n\tNOT_FOUND\020" +
"etQuotaRequest\022\021\n\tuser_name\030\001 \001(\t\022\022\n\nuse" + "\000\022\013\n\007RUNNING\020\001\022\014\n\010FINISHED\020\002\"\273\001\n\017SetQuot" +
"r_group\030\002 \001(\t\022\021\n\tnamespace\030\003 \001(\t\022\036\n\ntabl" + "aRequest\022\021\n\tuser_name\030\001 \001(\t\022\022\n\nuser_grou" +
"e_name\030\004 \001(\0132\n.TableName\022\022\n\nremove_all\030\005" + "p\030\002 \001(\t\022\021\n\tnamespace\030\003 \001(\t\022\036\n\ntable_name" +
" \001(\010\022\026\n\016bypass_globals\030\006 \001(\010\022\"\n\010throttle" + "\030\004 \001(\0132\n.TableName\022\022\n\nremove_all\030\005 \001(\010\022\026" +
"\030\007 \001(\0132\020.ThrottleRequest\"\022\n\020SetQuotaResp" + "\n\016bypass_globals\030\006 \001(\010\022\"\n\010throttle\030\007 \001(\013" +
"onse\"A\n\037MajorCompactionTimestampRequest\022" + "2\020.ThrottleRequest\"\022\n\020SetQuotaResponse\"A" +
"\036\n\ntable_name\030\001 \002(\0132\n.TableName\"L\n(Major", "\n\037MajorCompactionTimestampRequest\022\036\n\ntab",
"CompactionTimestampForRegionRequest\022 \n\006r" + "le_name\030\001 \002(\0132\n.TableName\"L\n(MajorCompac" +
"egion\030\001 \002(\0132\020.RegionSpecifier\"@\n MajorCo" + "tionTimestampForRegionRequest\022 \n\006region\030" +
"mpactionTimestampResponse\022\034\n\024compaction_" + "\001 \002(\0132\020.RegionSpecifier\"@\n MajorCompacti" +
"timestamp\030\001 \002(\0032\243\033\n\rMasterService\022S\n\024Get" + "onTimestampResponse\022\034\n\024compaction_timest" +
"SchemaAlterStatus\022\034.GetSchemaAlterStatus" + "amp\030\001 \002(\0032\243\033\n\rMasterService\022S\n\024GetSchema" +
"Request\032\035.GetSchemaAlterStatusResponse\022P" + "AlterStatus\022\034.GetSchemaAlterStatusReques" +
"\n\023GetTableDescriptors\022\033.GetTableDescript" + "t\032\035.GetSchemaAlterStatusResponse\022P\n\023GetT" +
"orsRequest\032\034.GetTableDescriptorsResponse" + "ableDescriptors\022\033.GetTableDescriptorsReq" +
"\022>\n\rGetTableNames\022\025.GetTableNamesRequest" + "uest\032\034.GetTableDescriptorsResponse\022>\n\rGe" +
"\032\026.GetTableNamesResponse\022G\n\020GetClusterSt", "tTableNames\022\025.GetTableNamesRequest\032\026.Get",
"atus\022\030.GetClusterStatusRequest\032\031.GetClus" + "TableNamesResponse\022G\n\020GetClusterStatus\022\030" +
"terStatusResponse\022D\n\017IsMasterRunning\022\027.I" + ".GetClusterStatusRequest\032\031.GetClusterSta" +
"sMasterRunningRequest\032\030.IsMasterRunningR" + "tusResponse\022D\n\017IsMasterRunning\022\027.IsMaste" +
"esponse\0222\n\tAddColumn\022\021.AddColumnRequest\032" + "rRunningRequest\032\030.IsMasterRunningRespons" +
"\022.AddColumnResponse\022;\n\014DeleteColumn\022\024.De" + "e\0222\n\tAddColumn\022\021.AddColumnRequest\032\022.AddC" +
"leteColumnRequest\032\025.DeleteColumnResponse" + "olumnResponse\022;\n\014DeleteColumn\022\024.DeleteCo" +
"\022;\n\014ModifyColumn\022\024.ModifyColumnRequest\032\025" + "lumnRequest\032\025.DeleteColumnResponse\022;\n\014Mo" +
".ModifyColumnResponse\0225\n\nMoveRegion\022\022.Mo" + "difyColumn\022\024.ModifyColumnRequest\032\025.Modif" +
"veRegionRequest\032\023.MoveRegionResponse\022Y\n\026" + "yColumnResponse\0225\n\nMoveRegion\022\022.MoveRegi" +
"DispatchMergingRegions\022\036.DispatchMerging", "onRequest\032\023.MoveRegionResponse\022Y\n\026Dispat",
"RegionsRequest\032\037.DispatchMergingRegionsR" + "chMergingRegions\022\036.DispatchMergingRegion" +
"esponse\022;\n\014AssignRegion\022\024.AssignRegionRe" + "sRequest\032\037.DispatchMergingRegionsRespons" +
"quest\032\025.AssignRegionResponse\022A\n\016Unassign" + "e\022;\n\014AssignRegion\022\024.AssignRegionRequest\032" +
"Region\022\026.UnassignRegionRequest\032\027.Unassig" + "\025.AssignRegionResponse\022A\n\016UnassignRegion" +
"nRegionResponse\022>\n\rOfflineRegion\022\025.Offli" + "\022\026.UnassignRegionRequest\032\027.UnassignRegio" +
"neRegionRequest\032\026.OfflineRegionResponse\022" + "nResponse\022>\n\rOfflineRegion\022\025.OfflineRegi" +
"8\n\013DeleteTable\022\023.DeleteTableRequest\032\024.De" + "onRequest\032\026.OfflineRegionResponse\0228\n\013Del" +
"leteTableResponse\022>\n\rtruncateTable\022\025.Tru" + "eteTable\022\023.DeleteTableRequest\032\024.DeleteTa" +
"ncateTableRequest\032\026.TruncateTableRespons" + "bleResponse\022>\n\rtruncateTable\022\025.TruncateT" +
"e\0228\n\013EnableTable\022\023.EnableTableRequest\032\024.", "ableRequest\032\026.TruncateTableResponse\0228\n\013E",
"EnableTableResponse\022;\n\014DisableTable\022\024.Di" + "nableTable\022\023.EnableTableRequest\032\024.Enable" +
"sableTableRequest\032\025.DisableTableResponse" + "TableResponse\022;\n\014DisableTable\022\024.DisableT" +
"\0228\n\013ModifyTable\022\023.ModifyTableRequest\032\024.M" + "ableRequest\032\025.DisableTableResponse\0228\n\013Mo" +
"odifyTableResponse\0228\n\013CreateTable\022\023.Crea" + "difyTable\022\023.ModifyTableRequest\032\024.ModifyT" +
"teTableRequest\032\024.CreateTableResponse\022/\n\010" + "ableResponse\0228\n\013CreateTable\022\023.CreateTabl" +
"Shutdown\022\020.ShutdownRequest\032\021.ShutdownRes" + "eRequest\032\024.CreateTableResponse\022/\n\010Shutdo" +
"ponse\0225\n\nStopMaster\022\022.StopMasterRequest\032" + "wn\022\020.ShutdownRequest\032\021.ShutdownResponse\022" +
"\023.StopMasterResponse\022,\n\007Balance\022\017.Balanc" + "5\n\nStopMaster\022\022.StopMasterRequest\032\023.Stop" +
"eRequest\032\020.BalanceResponse\022M\n\022SetBalance" + "MasterResponse\022,\n\007Balance\022\017.BalanceReque" +
"rRunning\022\032.SetBalancerRunningRequest\032\033.S", "st\032\020.BalanceResponse\022M\n\022SetBalancerRunni",
"etBalancerRunningResponse\022J\n\021IsBalancerE" + "ng\022\032.SetBalancerRunningRequest\032\033.SetBala" +
"nabled\022\031.IsBalancerEnabledRequest\032\032.IsBa" + "ncerRunningResponse\022J\n\021IsBalancerEnabled" +
"lancerEnabledResponse\022A\n\016RunCatalogScan\022" + "\022\031.IsBalancerEnabledRequest\032\032.IsBalancer" +
"\026.RunCatalogScanRequest\032\027.RunCatalogScan" + "EnabledResponse\022A\n\016RunCatalogScan\022\026.RunC" +
"Response\022S\n\024EnableCatalogJanitor\022\034.Enabl" + "atalogScanRequest\032\027.RunCatalogScanRespon" +
"eCatalogJanitorRequest\032\035.EnableCatalogJa" + "se\022S\n\024EnableCatalogJanitor\022\034.EnableCatal" +
"nitorResponse\022\\\n\027IsCatalogJanitorEnabled" + "ogJanitorRequest\032\035.EnableCatalogJanitorR" +
"\022\037.IsCatalogJanitorEnabledRequest\032 .IsCa" + "esponse\022\\\n\027IsCatalogJanitorEnabled\022\037.IsC" +
"talogJanitorEnabledResponse\022L\n\021ExecMaste" + "atalogJanitorEnabledRequest\032 .IsCatalogJ" +
"rService\022\032.CoprocessorServiceRequest\032\033.C", "anitorEnabledResponse\022L\n\021ExecMasterServi",
"oprocessorServiceResponse\022/\n\010Snapshot\022\020." + "ce\022\032.CoprocessorServiceRequest\032\033.Coproce" +
"SnapshotRequest\032\021.SnapshotResponse\022V\n\025Ge" + "ssorServiceResponse\022/\n\010Snapshot\022\020.Snapsh" +
"tCompletedSnapshots\022\035.GetCompletedSnapsh" + "otRequest\032\021.SnapshotResponse\022V\n\025GetCompl" +
"otsRequest\032\036.GetCompletedSnapshotsRespon" + "etedSnapshots\022\035.GetCompletedSnapshotsReq" +
"se\022A\n\016DeleteSnapshot\022\026.DeleteSnapshotReq" + "uest\032\036.GetCompletedSnapshotsResponse\022A\n\016" +
"uest\032\027.DeleteSnapshotResponse\022A\n\016IsSnaps" + "DeleteSnapshot\022\026.DeleteSnapshotRequest\032\027" +
"hotDone\022\026.IsSnapshotDoneRequest\032\027.IsSnap" + ".DeleteSnapshotResponse\022A\n\016IsSnapshotDon" +
"shotDoneResponse\022D\n\017RestoreSnapshot\022\027.Re" + "e\022\026.IsSnapshotDoneRequest\032\027.IsSnapshotDo" +
"storeSnapshotRequest\032\030.RestoreSnapshotRe" + "neResponse\022D\n\017RestoreSnapshot\022\027.RestoreS" +
"sponse\022V\n\025IsRestoreSnapshotDone\022\035.IsRest", "napshotRequest\032\030.RestoreSnapshotResponse",
"oreSnapshotDoneRequest\032\036.IsRestoreSnapsh" + "\022V\n\025IsRestoreSnapshotDone\022\035.IsRestoreSna" +
"otDoneResponse\022>\n\rExecProcedure\022\025.ExecPr" + "pshotDoneRequest\032\036.IsRestoreSnapshotDone" +
"ocedureRequest\032\026.ExecProcedureResponse\022E" + "Response\022>\n\rExecProcedure\022\025.ExecProcedur" +
"\n\024ExecProcedureWithRet\022\025.ExecProcedureRe" + "eRequest\032\026.ExecProcedureResponse\022E\n\024Exec" +
"quest\032\026.ExecProcedureResponse\022D\n\017IsProce" + "ProcedureWithRet\022\025.ExecProcedureRequest\032" +
"dureDone\022\027.IsProcedureDoneRequest\032\030.IsPr" + "\026.ExecProcedureResponse\022D\n\017IsProcedureDo" +
"ocedureDoneResponse\022D\n\017ModifyNamespace\022\027" + "ne\022\027.IsProcedureDoneRequest\032\030.IsProcedur" +
".ModifyNamespaceRequest\032\030.ModifyNamespac" + "eDoneResponse\022D\n\017ModifyNamespace\022\027.Modif" +
"eResponse\022D\n\017CreateNamespace\022\027.CreateNam" + "yNamespaceRequest\032\030.ModifyNamespaceRespo" +
"espaceRequest\032\030.CreateNamespaceResponse\022", "nse\022D\n\017CreateNamespace\022\027.CreateNamespace",
"D\n\017DeleteNamespace\022\027.DeleteNamespaceRequ" + "Request\032\030.CreateNamespaceResponse\022D\n\017Del" +
"est\032\030.DeleteNamespaceResponse\022Y\n\026GetName" + "eteNamespace\022\027.DeleteNamespaceRequest\032\030." +
"spaceDescriptor\022\036.GetNamespaceDescriptor" + "DeleteNamespaceResponse\022Y\n\026GetNamespaceD" +
"Request\032\037.GetNamespaceDescriptorResponse" + "escriptor\022\036.GetNamespaceDescriptorReques" +
"\022_\n\030ListNamespaceDescriptors\022 .ListNames" + "t\032\037.GetNamespaceDescriptorResponse\022_\n\030Li" +
"paceDescriptorsRequest\032!.ListNamespaceDe" + "stNamespaceDescriptors\022 .ListNamespaceDe" +
"scriptorsResponse\022t\n\037ListTableDescriptor" + "scriptorsRequest\032!.ListNamespaceDescript" +
"sByNamespace\022\'.ListTableDescriptorsByNam" + "orsResponse\022t\n\037ListTableDescriptorsByNam" +
"espaceRequest\032(.ListTableDescriptorsByNa" + "espace\022\'.ListTableDescriptorsByNamespace" +
"mespaceResponse\022b\n\031ListTableNamesByNames", "Request\032(.ListTableDescriptorsByNamespac",
"pace\022!.ListTableNamesByNamespaceRequest\032" + "eResponse\022b\n\031ListTableNamesByNamespace\022!" +
"\".ListTableNamesByNamespaceResponse\022/\n\010S" + ".ListTableNamesByNamespaceRequest\032\".List" +
"etQuota\022\020.SetQuotaRequest\032\021.SetQuotaResp" + "TableNamesByNamespaceResponse\022/\n\010SetQuot" +
"onse\022f\n\037getLastMajorCompactionTimestamp\022" + "a\022\020.SetQuotaRequest\032\021.SetQuotaResponse\022f" +
" .MajorCompactionTimestampRequest\032!.Majo" + "\n\037getLastMajorCompactionTimestamp\022 .Majo" +
"rCompactionTimestampResponse\022x\n(getLastM" + "rCompactionTimestampRequest\032!.MajorCompa" +
"ajorCompactionTimestampForRegion\022).Major" + "ctionTimestampResponse\022x\n(getLastMajorCo" +
"CompactionTimestampForRegionRequest\032!.Ma" + "mpactionTimestampForRegion\022).MajorCompac" +
"jorCompactionTimestampResponse\022M\n\022getPro" + "tionTimestampForRegionRequest\032!.MajorCom" +
"cedureResult\022\032.GetProcedureResultRequest", "pactionTimestampResponse\022M\n\022getProcedure",
"\032\033.GetProcedureResultResponseBB\n*org.apa" + "Result\022\032.GetProcedureResultRequest\032\033.Get" +
"che.hadoop.hbase.protobuf.generatedB\014Mas" + "ProcedureResultResponseBB\n*org.apache.ha" +
"terProtosH\001\210\001\001\240\001\001" "doop.hbase.protobuf.generatedB\014MasterPro" +
"tosH\001\210\001\001\240\001\001"
}; };
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@ -52087,7 +52280,7 @@ public final class MasterProtos {
internal_static_EnableTableResponse_fieldAccessorTable = new internal_static_EnableTableResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable( com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_EnableTableResponse_descriptor, internal_static_EnableTableResponse_descriptor,
new java.lang.String[] { }); new java.lang.String[] { "ProcId", });
internal_static_DisableTableRequest_descriptor = internal_static_DisableTableRequest_descriptor =
getDescriptor().getMessageTypes().get(24); getDescriptor().getMessageTypes().get(24);
internal_static_DisableTableRequest_fieldAccessorTable = new internal_static_DisableTableRequest_fieldAccessorTable = new
@ -52099,7 +52292,7 @@ public final class MasterProtos {
internal_static_DisableTableResponse_fieldAccessorTable = new internal_static_DisableTableResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable( com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_DisableTableResponse_descriptor, internal_static_DisableTableResponse_descriptor,
new java.lang.String[] { }); new java.lang.String[] { "ProcId", });
internal_static_ModifyTableRequest_descriptor = internal_static_ModifyTableRequest_descriptor =
getDescriptor().getMessageTypes().get(26); getDescriptor().getMessageTypes().get(26);
internal_static_ModifyTableRequest_fieldAccessorTable = new internal_static_ModifyTableRequest_fieldAccessorTable = new

View File

@ -133,6 +133,7 @@ message EnableTableRequest {
} }
message EnableTableResponse { message EnableTableResponse {
optional uint64 proc_id = 1;
} }
message DisableTableRequest { message DisableTableRequest {
@ -140,6 +141,7 @@ message DisableTableRequest {
} }
message DisableTableResponse { message DisableTableResponse {
optional uint64 proc_id = 1;
} }
message ModifyTableRequest { message ModifyTableRequest {

View File

@ -1706,7 +1706,7 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
} }
@Override @Override
public void enableTable(final TableName tableName) throws IOException { public long enableTable(final TableName tableName) throws IOException {
checkInitialized(); checkInitialized();
if (cpHost != null) { if (cpHost != null) {
cpHost.preEnableTable(tableName); cpHost.preEnableTable(tableName);
@ -1728,12 +1728,11 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
cpHost.postEnableTable(tableName); cpHost.postEnableTable(tableName);
} }
// TODO: return procId as part of client-side change return procId;
// return procId;
} }
@Override @Override
public void disableTable(final TableName tableName) throws IOException { public long disableTable(final TableName tableName) throws IOException {
checkInitialized(); checkInitialized();
if (cpHost != null) { if (cpHost != null) {
cpHost.preDisableTable(tableName); cpHost.preDisableTable(tableName);
@ -1756,8 +1755,7 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
cpHost.postDisableTable(tableName); cpHost.postDisableTable(tableName);
} }
// TODO: return procId as part of client-side change return procId;
// return procId;
} }
/** /**

View File

@ -488,11 +488,11 @@ public class MasterRpcServices extends RSRpcServices
public DisableTableResponse disableTable(RpcController controller, public DisableTableResponse disableTable(RpcController controller,
DisableTableRequest request) throws ServiceException { DisableTableRequest request) throws ServiceException {
try { try {
master.disableTable(ProtobufUtil.toTableName(request.getTableName())); long procId = master.disableTable(ProtobufUtil.toTableName(request.getTableName()));
return DisableTableResponse.newBuilder().setProcId(procId).build();
} catch (IOException ioe) { } catch (IOException ioe) {
throw new ServiceException(ioe); throw new ServiceException(ioe);
} }
return DisableTableResponse.newBuilder().build();
} }
@Override @Override
@ -574,11 +574,11 @@ public class MasterRpcServices extends RSRpcServices
public EnableTableResponse enableTable(RpcController controller, public EnableTableResponse enableTable(RpcController controller,
EnableTableRequest request) throws ServiceException { EnableTableRequest request) throws ServiceException {
try { try {
master.enableTable(ProtobufUtil.toTableName(request.getTableName())); long procId = master.enableTable(ProtobufUtil.toTableName(request.getTableName()));
return EnableTableResponse.newBuilder().setProcId(procId).build();
} catch (IOException ioe) { } catch (IOException ioe) {
throw new ServiceException(ioe); throw new ServiceException(ioe);
} }
return EnableTableResponse.newBuilder().build();
} }
@Override @Override

View File

@ -132,14 +132,14 @@ public interface MasterServices extends Server {
* @param tableName The table name * @param tableName The table name
* @throws IOException * @throws IOException
*/ */
void enableTable(final TableName tableName) throws IOException; long enableTable(final TableName tableName) throws IOException;
/** /**
* Disable an existing table * Disable an existing table
* @param tableName The table name * @param tableName The table name
* @throws IOException * @throws IOException
*/ */
void disableTable(final TableName tableName) throws IOException; long disableTable(final TableName tableName) throws IOException;
/** /**

View File

@ -422,10 +422,14 @@ public class TestCatalogJanitor {
throws IOException { } throws IOException { }
@Override @Override
public void enableTable(TableName tableName) throws IOException { } public long enableTable(TableName tableName) throws IOException {
return -1;
}
@Override @Override
public void disableTable(TableName tableName) throws IOException { } public long disableTable(TableName tableName) throws IOException {
return -1;
}
@Override @Override
public void addColumn(TableName tableName, HColumnDescriptor column) public void addColumn(TableName tableName, HColumnDescriptor column)