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 57c70f0af8
commit f6512065c2
7 changed files with 586 additions and 259 deletions

View File

@ -101,8 +101,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.DeleteTableResponse;
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.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.ExecProcedureResponse;
import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetClusterStatusRequest;
@ -944,12 +946,20 @@ public class HBaseAdmin implements Admin {
@Override
public void enableTable(final TableName tableName)
throws IOException {
enableTableAsync(tableName);
// Wait until all regions are enabled
waitUntilTableIsEnabled(tableName);
LOG.info("Enabled table " + tableName);
Future<Void> future = enableTableAsyncV2(tableName);
try {
future.get(syncWaitTimeout, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
throw new InterruptedIOException("Interrupted when waiting for table to be disabled");
} 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)
@ -1016,16 +1026,7 @@ public class HBaseAdmin implements Admin {
@Override
public void enableTableAsync(final TableName tableName)
throws IOException {
TableName.isLegalFullyQualifiedTableName(tableName.getName());
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;
}
});
enableTableAsyncV2(tableName);
}
public void enableTableAsync(final byte[] tableName)
@ -1038,6 +1039,84 @@ public class HBaseAdmin implements Admin {
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.
*
@ -1096,16 +1175,7 @@ public class HBaseAdmin implements Admin {
*/
@Override
public void disableTableAsync(final TableName tableName) throws IOException {
TableName.isLegalFullyQualifiedTableName(tableName.getName());
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;
}
});
disableTableAsyncV2(tableName);
}
public void disableTableAsync(final byte[] tableName) throws IOException {
@ -1130,32 +1200,20 @@ public class HBaseAdmin implements Admin {
@Override
public void disableTable(final TableName tableName)
throws IOException {
disableTableAsync(tableName);
// Wait until table is disabled
boolean disabled = false;
for (int tries = 0; tries < (this.numRetries * this.retryLongerMultiplier); tries++) {
disabled = isTableDisabled(tableName);
if (disabled) {
break;
}
long sleep = getPauseTime(tries);
if (LOG.isDebugEnabled()) {
LOG.debug("Sleeping= " + sleep + "ms, waiting for all regions to be " +
"disabled in " + tableName);
}
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);
Future<Void> future = disableTableAsyncV2(tableName);
try {
future.get(syncWaitTimeout, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
throw new InterruptedIOException("Interrupted when waiting for table to be disabled");
} 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());
}
}
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)
@ -1168,6 +1226,78 @@ public class HBaseAdmin implements Admin {
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.
*

View File

@ -12053,6 +12053,16 @@ public final class MasterProtos {
public interface EnableTableResponseOrBuilder
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}
@ -12087,6 +12097,7 @@ public final class MasterProtos {
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@ -12104,6 +12115,11 @@ public final class MasterProtos {
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
procId_ = input.readUInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@ -12143,7 +12159,25 @@ public final class MasterProtos {
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() {
procId_ = 0L;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@ -12157,6 +12191,9 @@ public final class MasterProtos {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeUInt64(1, procId_);
}
getUnknownFields().writeTo(output);
}
@ -12166,6 +12203,10 @@ public final class MasterProtos {
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, procId_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = 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;
boolean result = true;
result = result && (hasProcId() == other.hasProcId());
if (hasProcId()) {
result = result && (getProcId()
== other.getProcId());
}
result = result &&
getUnknownFields().equals(other.getUnknownFields());
return result;
@ -12202,6 +12248,10 @@ public final class MasterProtos {
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasProcId()) {
hash = (37 * hash) + PROC_ID_FIELD_NUMBER;
hash = (53 * hash) + hashLong(getProcId());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@ -12311,6 +12361,8 @@ public final class MasterProtos {
public Builder clear() {
super.clear();
procId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@ -12337,6 +12389,13 @@ public final class MasterProtos {
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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.procId_ = procId_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@ -12352,6 +12411,9 @@ public final class MasterProtos {
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.hasProcId()) {
setProcId(other.getProcId());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
@ -12377,6 +12439,40 @@ public final class MasterProtos {
}
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)
}
@ -12952,6 +13048,16 @@ public final class MasterProtos {
public interface DisableTableResponseOrBuilder
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}
@ -12986,6 +13092,7 @@ public final class MasterProtos {
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@ -13003,6 +13110,11 @@ public final class MasterProtos {
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
procId_ = input.readUInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@ -13042,7 +13154,25 @@ public final class MasterProtos {
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() {
procId_ = 0L;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@ -13056,6 +13186,9 @@ public final class MasterProtos {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeUInt64(1, procId_);
}
getUnknownFields().writeTo(output);
}
@ -13065,6 +13198,10 @@ public final class MasterProtos {
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, procId_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = 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;
boolean result = true;
result = result && (hasProcId() == other.hasProcId());
if (hasProcId()) {
result = result && (getProcId()
== other.getProcId());
}
result = result &&
getUnknownFields().equals(other.getUnknownFields());
return result;
@ -13101,6 +13243,10 @@ public final class MasterProtos {
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasProcId()) {
hash = (37 * hash) + PROC_ID_FIELD_NUMBER;
hash = (53 * hash) + hashLong(getProcId());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@ -13210,6 +13356,8 @@ public final class MasterProtos {
public Builder clear() {
super.clear();
procId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@ -13236,6 +13384,13 @@ public final class MasterProtos {
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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.procId_ = procId_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@ -13251,6 +13406,9 @@ public final class MasterProtos {
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.hasProcId()) {
setProcId(other.getProcId());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
@ -13276,6 +13434,40 @@ public final class MasterProtos {
}
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)
}
@ -52960,199 +53152,200 @@ public final class MasterProtos {
"e\030\001 \002(\0132\n.TableName\022\035\n\016preserveSplits\030\002 " +
"\001(\010:\005false\"\027\n\025TruncateTableResponse\"4\n\022E" +
"nableTableRequest\022\036\n\ntable_name\030\001 \002(\0132\n." +
"TableName\"\025\n\023EnableTableResponse\"5\n\023Disa" +
"bleTableRequest\022\036\n\ntable_name\030\001 \002(\0132\n.Ta" +
"bleName\"\026\n\024DisableTableResponse\"X\n\022Modif" +
"yTableRequest\022\036\n\ntable_name\030\001 \002(\0132\n.Tabl" +
"eName\022\"\n\014table_schema\030\002 \002(\0132\014.TableSchem" +
"a\"\025\n\023ModifyTableResponse\"K\n\026CreateNamesp",
"aceRequest\0221\n\023namespaceDescriptor\030\001 \002(\0132" +
"\024.NamespaceDescriptor\"\031\n\027CreateNamespace" +
"Response\"/\n\026DeleteNamespaceRequest\022\025\n\rna" +
"mespaceName\030\001 \002(\t\"\031\n\027DeleteNamespaceResp" +
"onse\"K\n\026ModifyNamespaceRequest\0221\n\023namesp" +
"aceDescriptor\030\001 \002(\0132\024.NamespaceDescripto" +
"r\"\031\n\027ModifyNamespaceResponse\"6\n\035GetNames" +
"paceDescriptorRequest\022\025\n\rnamespaceName\030\001" +
" \002(\t\"S\n\036GetNamespaceDescriptorResponse\0221" +
"\n\023namespaceDescriptor\030\001 \002(\0132\024.NamespaceD",
"escriptor\"!\n\037ListNamespaceDescriptorsReq" +
"uest\"U\n ListNamespaceDescriptorsResponse" +
"\0221\n\023namespaceDescriptor\030\001 \003(\0132\024.Namespac" +
"eDescriptor\"?\n&ListTableDescriptorsByNam" +
"espaceRequest\022\025\n\rnamespaceName\030\001 \002(\t\"L\n\'" +
"ListTableDescriptorsByNamespaceResponse\022" +
"!\n\013tableSchema\030\001 \003(\0132\014.TableSchema\"9\n Li" +
"stTableNamesByNamespaceRequest\022\025\n\rnamesp" +
"aceName\030\001 \002(\t\"B\n!ListTableNamesByNamespa" +
"ceResponse\022\035\n\ttableName\030\001 \003(\0132\n.TableNam",
"e\"\021\n\017ShutdownRequest\"\022\n\020ShutdownResponse" +
"\"\023\n\021StopMasterRequest\"\024\n\022StopMasterRespo" +
"nse\"\020\n\016BalanceRequest\"\'\n\017BalanceResponse" +
"\022\024\n\014balancer_ran\030\001 \002(\010\"<\n\031SetBalancerRun" +
"ningRequest\022\n\n\002on\030\001 \002(\010\022\023\n\013synchronous\030\002" +
" \001(\010\"8\n\032SetBalancerRunningResponse\022\032\n\022pr" +
"ev_balance_value\030\001 \001(\010\"\032\n\030IsBalancerEnab" +
"ledRequest\",\n\031IsBalancerEnabledResponse\022" +
"\017\n\007enabled\030\001 \002(\010\"\027\n\025RunCatalogScanReques" +
"t\"-\n\026RunCatalogScanResponse\022\023\n\013scan_resu",
"lt\030\001 \001(\005\"-\n\033EnableCatalogJanitorRequest\022" +
"\016\n\006enable\030\001 \002(\010\"2\n\034EnableCatalogJanitorR" +
"esponse\022\022\n\nprev_value\030\001 \001(\010\" \n\036IsCatalog" +
"JanitorEnabledRequest\"0\n\037IsCatalogJanito" +
"rEnabledResponse\022\r\n\005value\030\001 \002(\010\"9\n\017Snaps" +
"hotRequest\022&\n\010snapshot\030\001 \002(\0132\024.SnapshotD" +
"escription\",\n\020SnapshotResponse\022\030\n\020expect" +
"ed_timeout\030\001 \002(\003\"\036\n\034GetCompletedSnapshot" +
"sRequest\"H\n\035GetCompletedSnapshotsRespons" +
"e\022\'\n\tsnapshots\030\001 \003(\0132\024.SnapshotDescripti",
"on\"?\n\025DeleteSnapshotRequest\022&\n\010snapshot\030" +
"\001 \002(\0132\024.SnapshotDescription\"\030\n\026DeleteSna" +
"pshotResponse\"@\n\026RestoreSnapshotRequest\022" +
"&\n\010snapshot\030\001 \002(\0132\024.SnapshotDescription\"" +
"\031\n\027RestoreSnapshotResponse\"?\n\025IsSnapshot" +
"DoneRequest\022&\n\010snapshot\030\001 \001(\0132\024.Snapshot" +
"Description\"U\n\026IsSnapshotDoneResponse\022\023\n" +
"\004done\030\001 \001(\010:\005false\022&\n\010snapshot\030\002 \001(\0132\024.S" +
"napshotDescription\"F\n\034IsRestoreSnapshotD" +
"oneRequest\022&\n\010snapshot\030\001 \001(\0132\024.SnapshotD",
"escription\"4\n\035IsRestoreSnapshotDoneRespo" +
"nse\022\023\n\004done\030\001 \001(\010:\005false\"=\n\033GetSchemaAlt" +
"erStatusRequest\022\036\n\ntable_name\030\001 \002(\0132\n.Ta" +
"bleName\"T\n\034GetSchemaAlterStatusResponse\022" +
"\035\n\025yet_to_update_regions\030\001 \001(\r\022\025\n\rtotal_" +
"regions\030\002 \001(\r\"\202\001\n\032GetTableDescriptorsReq" +
"uest\022\037\n\013table_names\030\001 \003(\0132\n.TableName\022\r\n" +
"\005regex\030\002 \001(\t\022!\n\022include_sys_tables\030\003 \001(\010" +
":\005false\022\021\n\tnamespace\030\004 \001(\t\"A\n\033GetTableDe" +
"scriptorsResponse\022\"\n\014table_schema\030\001 \003(\0132",
"\014.TableSchema\"[\n\024GetTableNamesRequest\022\r\n" +
"\005regex\030\001 \001(\t\022!\n\022include_sys_tables\030\002 \001(\010" +
":\005false\022\021\n\tnamespace\030\003 \001(\t\"8\n\025GetTableNa" +
"mesResponse\022\037\n\013table_names\030\001 \003(\0132\n.Table" +
"Name\"6\n\024GetTableStateRequest\022\036\n\ntable_na" +
"me\030\001 \002(\0132\n.TableName\"9\n\025GetTableStateRes" +
"ponse\022 \n\013table_state\030\001 \002(\0132\013.TableState\"" +
"\031\n\027GetClusterStatusRequest\"B\n\030GetCluster" +
"StatusResponse\022&\n\016cluster_status\030\001 \002(\0132\016" +
".ClusterStatus\"\030\n\026IsMasterRunningRequest",
"\"4\n\027IsMasterRunningResponse\022\031\n\021is_master" +
"_running\030\001 \002(\010\"@\n\024ExecProcedureRequest\022(" +
"\n\tprocedure\030\001 \002(\0132\025.ProcedureDescription" +
"\"F\n\025ExecProcedureResponse\022\030\n\020expected_ti" +
"meout\030\001 \001(\003\022\023\n\013return_data\030\002 \001(\014\"B\n\026IsPr" +
"ocedureDoneRequest\022(\n\tprocedure\030\001 \001(\0132\025." +
"ProcedureDescription\"W\n\027IsProcedureDoneR" +
"esponse\022\023\n\004done\030\001 \001(\010:\005false\022\'\n\010snapshot" +
"\030\002 \001(\0132\025.ProcedureDescription\",\n\031GetProc" +
"edureResultRequest\022\017\n\007proc_id\030\001 \002(\004\"\347\001\n\032",
"GetProcedureResultResponse\0220\n\005state\030\001 \002(" +
"\0162!.GetProcedureResultResponse.State\022\022\n\n" +
"start_time\030\002 \001(\004\022\023\n\013last_update\030\003 \001(\004\022\016\n" +
"\006result\030\004 \001(\014\022+\n\texception\030\005 \001(\0132\030.Forei" +
"gnExceptionMessage\"1\n\005State\022\r\n\tNOT_FOUND" +
"\020\000\022\013\n\007RUNNING\020\001\022\014\n\010FINISHED\020\002\"\273\001\n\017SetQuo" +
"taRequest\022\021\n\tuser_name\030\001 \001(\t\022\022\n\nuser_gro" +
"up\030\002 \001(\t\022\021\n\tnamespace\030\003 \001(\t\022\036\n\ntable_nam" +
"e\030\004 \001(\0132\n.TableName\022\022\n\nremove_all\030\005 \001(\010\022" +
"\026\n\016bypass_globals\030\006 \001(\010\022\"\n\010throttle\030\007 \001(",
"\0132\020.ThrottleRequest\"\022\n\020SetQuotaResponse\"" +
"A\n\037MajorCompactionTimestampRequest\022\036\n\nta" +
"ble_name\030\001 \002(\0132\n.TableName\"L\n(MajorCompa" +
"ctionTimestampForRegionRequest\022 \n\006region" +
"\030\001 \002(\0132\020.RegionSpecifier\"@\n MajorCompact" +
"ionTimestampResponse\022\034\n\024compaction_times" +
"tamp\030\001 \002(\0032\343\033\n\rMasterService\022S\n\024GetSchem" +
"aAlterStatus\022\034.GetSchemaAlterStatusReque" +
"st\032\035.GetSchemaAlterStatusResponse\022P\n\023Get" +
"TableDescriptors\022\033.GetTableDescriptorsRe",
"quest\032\034.GetTableDescriptorsResponse\022>\n\rG" +
"etTableNames\022\025.GetTableNamesRequest\032\026.Ge" +
"tTableNamesResponse\022G\n\020GetClusterStatus\022" +
"\030.GetClusterStatusRequest\032\031.GetClusterSt" +
"atusResponse\022D\n\017IsMasterRunning\022\027.IsMast" +
"erRunningRequest\032\030.IsMasterRunningRespon" +
"se\0222\n\tAddColumn\022\021.AddColumnRequest\032\022.Add" +
"ColumnResponse\022;\n\014DeleteColumn\022\024.DeleteC" +
"olumnRequest\032\025.DeleteColumnResponse\022;\n\014M" +
"odifyColumn\022\024.ModifyColumnRequest\032\025.Modi",
"fyColumnResponse\0225\n\nMoveRegion\022\022.MoveReg" +
"ionRequest\032\023.MoveRegionResponse\022Y\n\026Dispa" +
"tchMergingRegions\022\036.DispatchMergingRegio" +
"nsRequest\032\037.DispatchMergingRegionsRespon" +
"se\022;\n\014AssignRegion\022\024.AssignRegionRequest" +
"\032\025.AssignRegionResponse\022A\n\016UnassignRegio" +
"n\022\026.UnassignRegionRequest\032\027.UnassignRegi" +
"onResponse\022>\n\rOfflineRegion\022\025.OfflineReg" +
"ionRequest\032\026.OfflineRegionResponse\0228\n\013De" +
"leteTable\022\023.DeleteTableRequest\032\024.DeleteT",
"ableResponse\022>\n\rtruncateTable\022\025.Truncate" +
"TableRequest\032\026.TruncateTableResponse\0228\n\013" +
"EnableTable\022\023.EnableTableRequest\032\024.Enabl" +
"eTableResponse\022;\n\014DisableTable\022\024.Disable" +
"TableRequest\032\025.DisableTableResponse\0228\n\013M" +
"odifyTable\022\023.ModifyTableRequest\032\024.Modify" +
"TableResponse\0228\n\013CreateTable\022\023.CreateTab" +
"leRequest\032\024.CreateTableResponse\022/\n\010Shutd" +
"own\022\020.ShutdownRequest\032\021.ShutdownResponse" +
"\0225\n\nStopMaster\022\022.StopMasterRequest\032\023.Sto",
"pMasterResponse\022,\n\007Balance\022\017.BalanceRequ" +
"est\032\020.BalanceResponse\022M\n\022SetBalancerRunn" +
"ing\022\032.SetBalancerRunningRequest\032\033.SetBal" +
"ancerRunningResponse\022J\n\021IsBalancerEnable" +
"d\022\031.IsBalancerEnabledRequest\032\032.IsBalance" +
"rEnabledResponse\022A\n\016RunCatalogScan\022\026.Run" +
"CatalogScanRequest\032\027.RunCatalogScanRespo" +
"nse\022S\n\024EnableCatalogJanitor\022\034.EnableCata" +
"logJanitorRequest\032\035.EnableCatalogJanitor" +
"Response\022\\\n\027IsCatalogJanitorEnabled\022\037.Is",
"CatalogJanitorEnabledRequest\032 .IsCatalog" +
"JanitorEnabledResponse\022L\n\021ExecMasterServ" +
"ice\022\032.CoprocessorServiceRequest\032\033.Coproc" +
"essorServiceResponse\022/\n\010Snapshot\022\020.Snaps" +
"hotRequest\032\021.SnapshotResponse\022V\n\025GetComp" +
"letedSnapshots\022\035.GetCompletedSnapshotsRe" +
"quest\032\036.GetCompletedSnapshotsResponse\022A\n" +
"\016DeleteSnapshot\022\026.DeleteSnapshotRequest\032" +
"\027.DeleteSnapshotResponse\022A\n\016IsSnapshotDo" +
"ne\022\026.IsSnapshotDoneRequest\032\027.IsSnapshotD",
"oneResponse\022D\n\017RestoreSnapshot\022\027.Restore" +
"SnapshotRequest\032\030.RestoreSnapshotRespons" +
"e\022V\n\025IsRestoreSnapshotDone\022\035.IsRestoreSn" +
"apshotDoneRequest\032\036.IsRestoreSnapshotDon" +
"eResponse\022>\n\rExecProcedure\022\025.ExecProcedu" +
"reRequest\032\026.ExecProcedureResponse\022E\n\024Exe" +
"cProcedureWithRet\022\025.ExecProcedureRequest" +
"\032\026.ExecProcedureResponse\022D\n\017IsProcedureD" +
"one\022\027.IsProcedureDoneRequest\032\030.IsProcedu" +
"reDoneResponse\022D\n\017ModifyNamespace\022\027.Modi",
"fyNamespaceRequest\032\030.ModifyNamespaceResp" +
"onse\022D\n\017CreateNamespace\022\027.CreateNamespac" +
"eRequest\032\030.CreateNamespaceResponse\022D\n\017De" +
"leteNamespace\022\027.DeleteNamespaceRequest\032\030" +
".DeleteNamespaceResponse\022Y\n\026GetNamespace" +
"Descriptor\022\036.GetNamespaceDescriptorReque" +
"st\032\037.GetNamespaceDescriptorResponse\022_\n\030L" +
"istNamespaceDescriptors\022 .ListNamespaceD" +
"escriptorsRequest\032!.ListNamespaceDescrip" +
"torsResponse\022t\n\037ListTableDescriptorsByNa",
"mespace\022\'.ListTableDescriptorsByNamespac" +
"eRequest\032(.ListTableDescriptorsByNamespa" +
"ceResponse\022b\n\031ListTableNamesByNamespace\022" +
"!.ListTableNamesByNamespaceRequest\032\".Lis" +
"tTableNamesByNamespaceResponse\022>\n\rGetTab" +
"leState\022\025.GetTableStateRequest\032\026.GetTabl" +
"eStateResponse\022/\n\010SetQuota\022\020.SetQuotaReq" +
"uest\032\021.SetQuotaResponse\022f\n\037getLastMajorC" +
"ompactionTimestamp\022 .MajorCompactionTime" +
"stampRequest\032!.MajorCompactionTimestampR",
"esponse\022x\n(getLastMajorCompactionTimesta" +
"mpForRegion\022).MajorCompactionTimestampFo" +
"rRegionRequest\032!.MajorCompactionTimestam" +
"pResponse\022M\n\022getProcedureResult\022\032.GetPro" +
"cedureResultRequest\032\033.GetProcedureResult" +
"ResponseBB\n*org.apache.hadoop.hbase.prot" +
"obuf.generatedB\014MasterProtosH\001\210\001\001\240\001\001"
"TableName\"&\n\023EnableTableResponse\022\017\n\007proc" +
"_id\030\001 \001(\004\"5\n\023DisableTableRequest\022\036\n\ntabl" +
"e_name\030\001 \002(\0132\n.TableName\"\'\n\024DisableTable" +
"Response\022\017\n\007proc_id\030\001 \001(\004\"X\n\022ModifyTable" +
"Request\022\036\n\ntable_name\030\001 \002(\0132\n.TableName\022" +
"\"\n\014table_schema\030\002 \002(\0132\014.TableSchema\"\025\n\023M",
"odifyTableResponse\"K\n\026CreateNamespaceReq" +
"uest\0221\n\023namespaceDescriptor\030\001 \002(\0132\024.Name" +
"spaceDescriptor\"\031\n\027CreateNamespaceRespon" +
"se\"/\n\026DeleteNamespaceRequest\022\025\n\rnamespac" +
"eName\030\001 \002(\t\"\031\n\027DeleteNamespaceResponse\"K" +
"\n\026ModifyNamespaceRequest\0221\n\023namespaceDes" +
"criptor\030\001 \002(\0132\024.NamespaceDescriptor\"\031\n\027M" +
"odifyNamespaceResponse\"6\n\035GetNamespaceDe" +
"scriptorRequest\022\025\n\rnamespaceName\030\001 \002(\t\"S" +
"\n\036GetNamespaceDescriptorResponse\0221\n\023name",
"spaceDescriptor\030\001 \002(\0132\024.NamespaceDescrip" +
"tor\"!\n\037ListNamespaceDescriptorsRequest\"U" +
"\n ListNamespaceDescriptorsResponse\0221\n\023na" +
"mespaceDescriptor\030\001 \003(\0132\024.NamespaceDescr" +
"iptor\"?\n&ListTableDescriptorsByNamespace" +
"Request\022\025\n\rnamespaceName\030\001 \002(\t\"L\n\'ListTa" +
"bleDescriptorsByNamespaceResponse\022!\n\013tab" +
"leSchema\030\001 \003(\0132\014.TableSchema\"9\n ListTabl" +
"eNamesByNamespaceRequest\022\025\n\rnamespaceNam" +
"e\030\001 \002(\t\"B\n!ListTableNamesByNamespaceResp",
"onse\022\035\n\ttableName\030\001 \003(\0132\n.TableName\"\021\n\017S" +
"hutdownRequest\"\022\n\020ShutdownResponse\"\023\n\021St" +
"opMasterRequest\"\024\n\022StopMasterResponse\"\020\n" +
"\016BalanceRequest\"\'\n\017BalanceResponse\022\024\n\014ba" +
"lancer_ran\030\001 \002(\010\"<\n\031SetBalancerRunningRe" +
"quest\022\n\n\002on\030\001 \002(\010\022\023\n\013synchronous\030\002 \001(\010\"8" +
"\n\032SetBalancerRunningResponse\022\032\n\022prev_bal" +
"ance_value\030\001 \001(\010\"\032\n\030IsBalancerEnabledReq" +
"uest\",\n\031IsBalancerEnabledResponse\022\017\n\007ena" +
"bled\030\001 \002(\010\"\027\n\025RunCatalogScanRequest\"-\n\026R",
"unCatalogScanResponse\022\023\n\013scan_result\030\001 \001" +
"(\005\"-\n\033EnableCatalogJanitorRequest\022\016\n\006ena" +
"ble\030\001 \002(\010\"2\n\034EnableCatalogJanitorRespons" +
"e\022\022\n\nprev_value\030\001 \001(\010\" \n\036IsCatalogJanito" +
"rEnabledRequest\"0\n\037IsCatalogJanitorEnabl" +
"edResponse\022\r\n\005value\030\001 \002(\010\"9\n\017SnapshotReq" +
"uest\022&\n\010snapshot\030\001 \002(\0132\024.SnapshotDescrip" +
"tion\",\n\020SnapshotResponse\022\030\n\020expected_tim" +
"eout\030\001 \002(\003\"\036\n\034GetCompletedSnapshotsReque" +
"st\"H\n\035GetCompletedSnapshotsResponse\022\'\n\ts",
"napshots\030\001 \003(\0132\024.SnapshotDescription\"?\n\025" +
"DeleteSnapshotRequest\022&\n\010snapshot\030\001 \002(\0132" +
"\024.SnapshotDescription\"\030\n\026DeleteSnapshotR" +
"esponse\"@\n\026RestoreSnapshotRequest\022&\n\010sna" +
"pshot\030\001 \002(\0132\024.SnapshotDescription\"\031\n\027Res" +
"toreSnapshotResponse\"?\n\025IsSnapshotDoneRe" +
"quest\022&\n\010snapshot\030\001 \001(\0132\024.SnapshotDescri" +
"ption\"U\n\026IsSnapshotDoneResponse\022\023\n\004done\030" +
"\001 \001(\010:\005false\022&\n\010snapshot\030\002 \001(\0132\024.Snapsho" +
"tDescription\"F\n\034IsRestoreSnapshotDoneReq",
"uest\022&\n\010snapshot\030\001 \001(\0132\024.SnapshotDescrip" +
"tion\"4\n\035IsRestoreSnapshotDoneResponse\022\023\n" +
"\004done\030\001 \001(\010:\005false\"=\n\033GetSchemaAlterStat" +
"usRequest\022\036\n\ntable_name\030\001 \002(\0132\n.TableNam" +
"e\"T\n\034GetSchemaAlterStatusResponse\022\035\n\025yet" +
"_to_update_regions\030\001 \001(\r\022\025\n\rtotal_region" +
"s\030\002 \001(\r\"\202\001\n\032GetTableDescriptorsRequest\022\037" +
"\n\013table_names\030\001 \003(\0132\n.TableName\022\r\n\005regex" +
"\030\002 \001(\t\022!\n\022include_sys_tables\030\003 \001(\010:\005fals" +
"e\022\021\n\tnamespace\030\004 \001(\t\"A\n\033GetTableDescript",
"orsResponse\022\"\n\014table_schema\030\001 \003(\0132\014.Tabl" +
"eSchema\"[\n\024GetTableNamesRequest\022\r\n\005regex" +
"\030\001 \001(\t\022!\n\022include_sys_tables\030\002 \001(\010:\005fals" +
"e\022\021\n\tnamespace\030\003 \001(\t\"8\n\025GetTableNamesRes" +
"ponse\022\037\n\013table_names\030\001 \003(\0132\n.TableName\"6" +
"\n\024GetTableStateRequest\022\036\n\ntable_name\030\001 \002" +
"(\0132\n.TableName\"9\n\025GetTableStateResponse\022" +
" \n\013table_state\030\001 \002(\0132\013.TableState\"\031\n\027Get" +
"ClusterStatusRequest\"B\n\030GetClusterStatus" +
"Response\022&\n\016cluster_status\030\001 \002(\0132\016.Clust",
"erStatus\"\030\n\026IsMasterRunningRequest\"4\n\027Is" +
"MasterRunningResponse\022\031\n\021is_master_runni" +
"ng\030\001 \002(\010\"@\n\024ExecProcedureRequest\022(\n\tproc" +
"edure\030\001 \002(\0132\025.ProcedureDescription\"F\n\025Ex" +
"ecProcedureResponse\022\030\n\020expected_timeout\030" +
"\001 \001(\003\022\023\n\013return_data\030\002 \001(\014\"B\n\026IsProcedur" +
"eDoneRequest\022(\n\tprocedure\030\001 \001(\0132\025.Proced" +
"ureDescription\"W\n\027IsProcedureDoneRespons" +
"e\022\023\n\004done\030\001 \001(\010:\005false\022\'\n\010snapshot\030\002 \001(\013" +
"2\025.ProcedureDescription\",\n\031GetProcedureR",
"esultRequest\022\017\n\007proc_id\030\001 \002(\004\"\347\001\n\032GetPro" +
"cedureResultResponse\0220\n\005state\030\001 \002(\0162!.Ge" +
"tProcedureResultResponse.State\022\022\n\nstart_" +
"time\030\002 \001(\004\022\023\n\013last_update\030\003 \001(\004\022\016\n\006resul" +
"t\030\004 \001(\014\022+\n\texception\030\005 \001(\0132\030.ForeignExce" +
"ptionMessage\"1\n\005State\022\r\n\tNOT_FOUND\020\000\022\013\n\007" +
"RUNNING\020\001\022\014\n\010FINISHED\020\002\"\273\001\n\017SetQuotaRequ" +
"est\022\021\n\tuser_name\030\001 \001(\t\022\022\n\nuser_group\030\002 \001" +
"(\t\022\021\n\tnamespace\030\003 \001(\t\022\036\n\ntable_name\030\004 \001(" +
"\0132\n.TableName\022\022\n\nremove_all\030\005 \001(\010\022\026\n\016byp",
"ass_globals\030\006 \001(\010\022\"\n\010throttle\030\007 \001(\0132\020.Th" +
"rottleRequest\"\022\n\020SetQuotaResponse\"A\n\037Maj" +
"orCompactionTimestampRequest\022\036\n\ntable_na" +
"me\030\001 \002(\0132\n.TableName\"L\n(MajorCompactionT" +
"imestampForRegionRequest\022 \n\006region\030\001 \002(\013" +
"2\020.RegionSpecifier\"@\n MajorCompactionTim" +
"estampResponse\022\034\n\024compaction_timestamp\030\001" +
" \002(\0032\343\033\n\rMasterService\022S\n\024GetSchemaAlter" +
"Status\022\034.GetSchemaAlterStatusRequest\032\035.G" +
"etSchemaAlterStatusResponse\022P\n\023GetTableD",
"escriptors\022\033.GetTableDescriptorsRequest\032" +
"\034.GetTableDescriptorsResponse\022>\n\rGetTabl" +
"eNames\022\025.GetTableNamesRequest\032\026.GetTable" +
"NamesResponse\022G\n\020GetClusterStatus\022\030.GetC" +
"lusterStatusRequest\032\031.GetClusterStatusRe" +
"sponse\022D\n\017IsMasterRunning\022\027.IsMasterRunn" +
"ingRequest\032\030.IsMasterRunningResponse\0222\n\t" +
"AddColumn\022\021.AddColumnRequest\032\022.AddColumn" +
"Response\022;\n\014DeleteColumn\022\024.DeleteColumnR" +
"equest\032\025.DeleteColumnResponse\022;\n\014ModifyC",
"olumn\022\024.ModifyColumnRequest\032\025.ModifyColu" +
"mnResponse\0225\n\nMoveRegion\022\022.MoveRegionReq" +
"uest\032\023.MoveRegionResponse\022Y\n\026DispatchMer" +
"gingRegions\022\036.DispatchMergingRegionsRequ" +
"est\032\037.DispatchMergingRegionsResponse\022;\n\014" +
"AssignRegion\022\024.AssignRegionRequest\032\025.Ass" +
"ignRegionResponse\022A\n\016UnassignRegion\022\026.Un" +
"assignRegionRequest\032\027.UnassignRegionResp" +
"onse\022>\n\rOfflineRegion\022\025.OfflineRegionReq" +
"uest\032\026.OfflineRegionResponse\0228\n\013DeleteTa",
"ble\022\023.DeleteTableRequest\032\024.DeleteTableRe" +
"sponse\022>\n\rtruncateTable\022\025.TruncateTableR" +
"equest\032\026.TruncateTableResponse\0228\n\013Enable" +
"Table\022\023.EnableTableRequest\032\024.EnableTable" +
"Response\022;\n\014DisableTable\022\024.DisableTableR" +
"equest\032\025.DisableTableResponse\0228\n\013ModifyT" +
"able\022\023.ModifyTableRequest\032\024.ModifyTableR" +
"esponse\0228\n\013CreateTable\022\023.CreateTableRequ" +
"est\032\024.CreateTableResponse\022/\n\010Shutdown\022\020." +
"ShutdownRequest\032\021.ShutdownResponse\0225\n\nSt",
"opMaster\022\022.StopMasterRequest\032\023.StopMaste" +
"rResponse\022,\n\007Balance\022\017.BalanceRequest\032\020." +
"BalanceResponse\022M\n\022SetBalancerRunning\022\032." +
"SetBalancerRunningRequest\032\033.SetBalancerR" +
"unningResponse\022J\n\021IsBalancerEnabled\022\031.Is" +
"BalancerEnabledRequest\032\032.IsBalancerEnabl" +
"edResponse\022A\n\016RunCatalogScan\022\026.RunCatalo" +
"gScanRequest\032\027.RunCatalogScanResponse\022S\n" +
"\024EnableCatalogJanitor\022\034.EnableCatalogJan" +
"itorRequest\032\035.EnableCatalogJanitorRespon",
"se\022\\\n\027IsCatalogJanitorEnabled\022\037.IsCatalo" +
"gJanitorEnabledRequest\032 .IsCatalogJanito" +
"rEnabledResponse\022L\n\021ExecMasterService\022\032." +
"CoprocessorServiceRequest\032\033.CoprocessorS" +
"erviceResponse\022/\n\010Snapshot\022\020.SnapshotReq" +
"uest\032\021.SnapshotResponse\022V\n\025GetCompletedS" +
"napshots\022\035.GetCompletedSnapshotsRequest\032" +
"\036.GetCompletedSnapshotsResponse\022A\n\016Delet" +
"eSnapshot\022\026.DeleteSnapshotRequest\032\027.Dele" +
"teSnapshotResponse\022A\n\016IsSnapshotDone\022\026.I",
"sSnapshotDoneRequest\032\027.IsSnapshotDoneRes" +
"ponse\022D\n\017RestoreSnapshot\022\027.RestoreSnapsh" +
"otRequest\032\030.RestoreSnapshotResponse\022V\n\025I" +
"sRestoreSnapshotDone\022\035.IsRestoreSnapshot" +
"DoneRequest\032\036.IsRestoreSnapshotDoneRespo" +
"nse\022>\n\rExecProcedure\022\025.ExecProcedureRequ" +
"est\032\026.ExecProcedureResponse\022E\n\024ExecProce" +
"dureWithRet\022\025.ExecProcedureRequest\032\026.Exe" +
"cProcedureResponse\022D\n\017IsProcedureDone\022\027." +
"IsProcedureDoneRequest\032\030.IsProcedureDone",
"Response\022D\n\017ModifyNamespace\022\027.ModifyName" +
"spaceRequest\032\030.ModifyNamespaceResponse\022D" +
"\n\017CreateNamespace\022\027.CreateNamespaceReque" +
"st\032\030.CreateNamespaceResponse\022D\n\017DeleteNa" +
"mespace\022\027.DeleteNamespaceRequest\032\030.Delet" +
"eNamespaceResponse\022Y\n\026GetNamespaceDescri" +
"ptor\022\036.GetNamespaceDescriptorRequest\032\037.G" +
"etNamespaceDescriptorResponse\022_\n\030ListNam" +
"espaceDescriptors\022 .ListNamespaceDescrip" +
"torsRequest\032!.ListNamespaceDescriptorsRe",
"sponse\022t\n\037ListTableDescriptorsByNamespac" +
"e\022\'.ListTableDescriptorsByNamespaceReque" +
"st\032(.ListTableDescriptorsByNamespaceResp" +
"onse\022b\n\031ListTableNamesByNamespace\022!.List" +
"TableNamesByNamespaceRequest\032\".ListTable" +
"NamesByNamespaceResponse\022>\n\rGetTableStat" +
"e\022\025.GetTableStateRequest\032\026.GetTableState" +
"Response\022/\n\010SetQuota\022\020.SetQuotaRequest\032\021" +
".SetQuotaResponse\022f\n\037getLastMajorCompact" +
"ionTimestamp\022 .MajorCompactionTimestampR",
"equest\032!.MajorCompactionTimestampRespons" +
"e\022x\n(getLastMajorCompactionTimestampForR" +
"egion\022).MajorCompactionTimestampForRegio" +
"nRequest\032!.MajorCompactionTimestampRespo" +
"nse\022M\n\022getProcedureResult\022\032.GetProcedure" +
"ResultRequest\032\033.GetProcedureResultRespon" +
"seBB\n*org.apache.hadoop.hbase.protobuf.g" +
"eneratedB\014MasterProtosH\001\210\001\001\240\001\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@ -53302,7 +53495,7 @@ public final class MasterProtos {
internal_static_EnableTableResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_EnableTableResponse_descriptor,
new java.lang.String[] { });
new java.lang.String[] { "ProcId", });
internal_static_DisableTableRequest_descriptor =
getDescriptor().getMessageTypes().get(24);
internal_static_DisableTableRequest_fieldAccessorTable = new
@ -53314,7 +53507,7 @@ public final class MasterProtos {
internal_static_DisableTableResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_DisableTableResponse_descriptor,
new java.lang.String[] { });
new java.lang.String[] { "ProcId", });
internal_static_ModifyTableRequest_descriptor =
getDescriptor().getMessageTypes().get(26);
internal_static_ModifyTableRequest_fieldAccessorTable = new

View File

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

View File

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

View File

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

View File

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

View File

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