HBASE-14108 Procedure V2 - Administrative Task: provide an API to abort a procedure (Stephen Yuan Jiang)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/90b8a3c8 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/90b8a3c8 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/90b8a3c8 Branch: refs/heads/branch-1 Commit: 90b8a3c894e211a8b0e5236f1872fc1576a455b2 Parents: a2dab02 Author: Stephen Yuan Jiang <syuanjiang...@gmail.com> Authored: Thu Sep 3 07:01:30 2015 -0700 Committer: Stephen Yuan Jiang <syuanjiang...@gmail.com> Committed: Thu Sep 3 07:01:30 2015 -0700 ---------------------------------------------------------------------- .../org/apache/hadoop/hbase/client/Admin.java | 28 + .../hadoop/hbase/client/ConnectionManager.java | 7 + .../apache/hadoop/hbase/client/HBaseAdmin.java | 115 +- .../hbase/procedure2/ProcedureExecutor.java | 17 +- .../hbase/procedure2/TestProcedureRecovery.java | 3 - .../hbase/protobuf/generated/MasterProtos.java | 1359 ++++++++++++++++-- hbase-protocol/src/main/protobuf/Master.proto | 25 +- .../org/apache/hadoop/hbase/master/HMaster.java | 7 +- .../hadoop/hbase/master/MasterRpcServices.java | 13 + .../hadoop/hbase/master/MasterServices.java | 8 + .../apache/hadoop/hbase/client/TestAdmin2.java | 11 + .../hadoop/hbase/master/TestCatalogJanitor.java | 5 + .../master/procedure/TestProcedureAdmin.java | 186 +++ 13 files changed, 1631 insertions(+), 153 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java index 8ea3e80..f73c9f9 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java @@ -22,6 +22,7 @@ import java.io.Closeable; import java.io.IOException; import java.util.List; import java.util.Map; +import java.util.concurrent.Future; import java.util.regex.Pattern; import org.apache.hadoop.conf.Configuration; @@ -934,6 +935,33 @@ public interface Admin extends Abortable, Closeable { throws IOException; /** + * abort a procedure + * @param procId ID of the procedure to abort + * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? + * @return true if aborted, false if procedure already completed or does not exist + * @throws IOException + */ + boolean abortProcedure( + final long procId, + final boolean mayInterruptIfRunning) throws IOException; + + /** + * Abort a procedure but does not block and wait for it be completely removed. + * 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 procId ID of the procedure to abort + * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? + * @return true if aborted, false if procedure already completed or does not exist + * @throws IOException + */ + Future<Boolean> abortProcedureAsync( + final long procId, + final boolean mayInterruptIfRunning) throws IOException; + + /** * Roll the log writer. I.e. for filesystem based write ahead logs, start writing to a new file. * * Note that the actual rolling of the log writer is asynchronous and may not be complete when http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java index 1dbb4f5..8e1e366 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java @@ -79,6 +79,7 @@ import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CoprocessorServiceRequest; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CoprocessorServiceResponse; +import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AddColumnRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AddColumnResponse; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AssignRegionRequest; @@ -1719,6 +1720,12 @@ class ConnectionManager { return new MasterKeepAliveConnection() { MasterServiceState mss = masterServiceState; @Override + public MasterProtos.AbortProcedureResponse abortProcedure( + RpcController controller, + MasterProtos.AbortProcedureRequest request) throws ServiceException { + return stub.abortProcedure(controller, request); + } + @Override public AddColumnResponse addColumn(RpcController controller, AddColumnRequest request) throws ServiceException { return stub.addColumn(controller, request); http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index 5416386..d74a8bc 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -92,6 +92,8 @@ import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ProcedureDescripti import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionSpecifier.RegionSpecifierType; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TableSchema; +import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest; +import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AddColumnRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AssignRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.CreateNamespaceRequest; @@ -282,6 +284,86 @@ public class HBaseAdmin implements Admin { return this.aborted; } + /** + * Abort a procedure + * @param procId ID of the procedure to abort + * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? + * @return true if aborted, false if procedure already completed or does not exist + * @throws IOException + */ + @Override + public boolean abortProcedure( + final long procId, + final boolean mayInterruptIfRunning) throws IOException { + Future<Boolean> future = abortProcedureAsync(procId, mayInterruptIfRunning); + try { + return future.get(syncWaitTimeout, TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + throw new InterruptedIOException("Interrupted when waiting for procedure to be cancelled"); + } 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()); + } + } + } + + /** + * Abort a procedure but does not block and wait for it be completely removed. + * 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 procId ID of the procedure to abort + * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? + * @return true if aborted, false if procedure already completed or does not exist + * @throws IOException + */ + @Override + public Future<Boolean> abortProcedureAsync( + final long procId, + final boolean mayInterruptIfRunning) throws IOException { + Boolean abortProcResponse = executeCallable( + new MasterCallable<AbortProcedureResponse>(getConnection()) { + @Override + public AbortProcedureResponse call(int callTimeout) throws ServiceException { + AbortProcedureRequest abortProcRequest = + AbortProcedureRequest.newBuilder().setProcId(procId).build(); + return master.abortProcedure(null,abortProcRequest); + } + }).getIsProcedureAborted(); + + AbortProcedureFuture abortProcFuture = + new AbortProcedureFuture(this, procId, abortProcResponse); + return abortProcFuture; + } + + private static class AbortProcedureFuture extends ProcedureFuture<Boolean> { + private boolean isAbortInProgress; + + public AbortProcedureFuture( + final HBaseAdmin admin, + final Long procId, + final Boolean abortProcResponse) { + super(admin, procId); + this.isAbortInProgress = abortProcResponse; + } + + @Override + public Boolean get(long timeout, TimeUnit unit) + throws InterruptedException, ExecutionException, TimeoutException { + if (!this.isAbortInProgress) { + return false; + } + super.get(timeout, unit); + return true; + } + } + /** @return HConnection used by this object. */ @Override public HConnection getConnection() { @@ -4169,6 +4251,7 @@ public class HBaseAdmin implements Admin { private ExecutionException exception = null; private boolean procResultFound = false; private boolean done = false; + private boolean cancelled = false; private V result = null; private final HBaseAdmin admin; @@ -4181,13 +4264,39 @@ public class HBaseAdmin implements Admin { @Override public boolean cancel(boolean mayInterruptIfRunning) { - throw new UnsupportedOperationException(); + AbortProcedureRequest abortProcRequest = AbortProcedureRequest.newBuilder() + .setProcId(procId).setMayInterruptIfRunning(mayInterruptIfRunning).build(); + try { + cancelled = abortProcedureResult(abortProcRequest).getIsProcedureAborted(); + if (cancelled) { + done = true; + } + } catch (IOException e) { + // Cancell thrown exception for some reason. At this time, we are not sure whether + // the cancell succeeds or fails. We assume that it is failed, but print out a warning + // for debugging purpose. + LOG.warn( + "Cancelling the procedure with procId=" + procId + " throws exception " + e.getMessage(), + e); + cancelled = false; + } + return cancelled; } @Override public boolean isCancelled() { - // TODO: Abort not implemented yet - return false; + return cancelled; + } + + protected AbortProcedureResponse abortProcedureResult( + final AbortProcedureRequest request) throws IOException { + return admin.executeCallable(new MasterCallable<AbortProcedureResponse>( + admin.getConnection()) { + @Override + public AbortProcedureResponse call(int callTimeout) throws ServiceException { + return master.abortProcedure(null, request); + } + }); } @Override http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java index b7403ec..1a098e5 100644 --- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java +++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java @@ -696,9 +696,24 @@ public class ProcedureExecutor<TEnvironment> { * @return true if the procedure exist and has received the abort, otherwise false. */ public boolean abort(final long procId) { + return abort(procId, true); + } + + /** + * Send an abort notification the specified procedure. + * Depending on the procedure implementation the abort can be considered or ignored. + * @param procId the procedure to abort + * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? + * @return true if the procedure exist and has received the abort, otherwise false. + */ + public boolean abort(final long procId, final boolean mayInterruptIfRunning) { Procedure proc = procedures.get(procId); if (proc != null) { - return proc.abort(getEnvironment()); + if (!mayInterruptIfRunning && proc.wasExecuted()) { + return false; + } else { + return proc.abort(getEnvironment()); + } } return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java index 74e4675..625357a 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java @@ -37,21 +37,18 @@ import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; import org.apache.hadoop.hbase.util.Threads; import org.junit.After; import org.junit.Before; -import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; @Category(SmallTests.class) public class TestProcedureRecovery { private static final Log LOG = LogFactory.getLog(TestProcedureRecovery.class); private static final int PROCEDURE_EXECUTOR_SLOTS = 1; - private static final Procedure NULL_PROC = null; private static TestProcEnv procEnv; private static ProcedureExecutor<TestProcEnv> procExecutor; http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/MasterProtos.java ---------------------------------------------------------------------- diff --git a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/MasterProtos.java b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/MasterProtos.java index 21b9c8e..48dd957 100644 --- a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/MasterProtos.java +++ b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/MasterProtos.java @@ -46353,6 +46353,980 @@ public final class MasterProtos { // @@protoc_insertion_point(class_scope:hbase.pb.GetProcedureResultResponse) } + public interface AbortProcedureRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint64 proc_id = 1; + /** + * <code>required uint64 proc_id = 1;</code> + */ + boolean hasProcId(); + /** + * <code>required uint64 proc_id = 1;</code> + */ + long getProcId(); + + // optional bool mayInterruptIfRunning = 2 [default = true]; + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + boolean hasMayInterruptIfRunning(); + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + boolean getMayInterruptIfRunning(); + } + /** + * Protobuf type {@code hbase.pb.AbortProcedureRequest} + */ + public static final class AbortProcedureRequest extends + com.google.protobuf.GeneratedMessage + implements AbortProcedureRequestOrBuilder { + // Use AbortProcedureRequest.newBuilder() to construct. + private AbortProcedureRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AbortProcedureRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AbortProcedureRequest defaultInstance; + public static AbortProcedureRequest getDefaultInstance() { + return defaultInstance; + } + + public AbortProcedureRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbortProcedureRequest( + com.google.protobuf.CodedInputStream input, + 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 { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + procId_ = input.readUInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + mayInterruptIfRunning_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.class, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.Builder.class); + } + + public static com.google.protobuf.Parser<AbortProcedureRequest> PARSER = + new com.google.protobuf.AbstractParser<AbortProcedureRequest>() { + public AbortProcedureRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbortProcedureRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<AbortProcedureRequest> getParserForType() { + return PARSER; + } + + private int bitField0_; + // required uint64 proc_id = 1; + public static final int PROC_ID_FIELD_NUMBER = 1; + private long procId_; + /** + * <code>required uint64 proc_id = 1;</code> + */ + public boolean hasProcId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>required uint64 proc_id = 1;</code> + */ + public long getProcId() { + return procId_; + } + + // optional bool mayInterruptIfRunning = 2 [default = true]; + public static final int MAYINTERRUPTIFRUNNING_FIELD_NUMBER = 2; + private boolean mayInterruptIfRunning_; + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + public boolean hasMayInterruptIfRunning() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + public boolean getMayInterruptIfRunning() { + return mayInterruptIfRunning_; + } + + private void initFields() { + procId_ = 0L; + mayInterruptIfRunning_ = true; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasProcId()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt64(1, procId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, mayInterruptIfRunning_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, procId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, mayInterruptIfRunning_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest)) { + return super.equals(obj); + } + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest other = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest) obj; + + boolean result = true; + result = result && (hasProcId() == other.hasProcId()); + if (hasProcId()) { + result = result && (getProcId() + == other.getProcId()); + } + result = result && (hasMayInterruptIfRunning() == other.hasMayInterruptIfRunning()); + if (hasMayInterruptIfRunning()) { + result = result && (getMayInterruptIfRunning() + == other.getMayInterruptIfRunning()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasProcId()) { + hash = (37 * hash) + PROC_ID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getProcId()); + } + if (hasMayInterruptIfRunning()) { + hash = (37 * hash) + MAYINTERRUPTIFRUNNING_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getMayInterruptIfRunning()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code hbase.pb.AbortProcedureRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> + implements org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.class, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.Builder.class); + } + + // Construct using org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + procId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + mayInterruptIfRunning_ = true; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureRequest_descriptor; + } + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest getDefaultInstanceForType() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.getDefaultInstance(); + } + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest build() { + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest buildPartial() { + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest result = new org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.procId_ = procId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.mayInterruptIfRunning_ = mayInterruptIfRunning_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest) { + return mergeFrom((org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest other) { + if (other == org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.getDefaultInstance()) return this; + if (other.hasProcId()) { + setProcId(other.getProcId()); + } + if (other.hasMayInterruptIfRunning()) { + setMayInterruptIfRunning(other.getMayInterruptIfRunning()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasProcId()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required uint64 proc_id = 1; + private long procId_ ; + /** + * <code>required uint64 proc_id = 1;</code> + */ + public boolean hasProcId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>required uint64 proc_id = 1;</code> + */ + public long getProcId() { + return procId_; + } + /** + * <code>required uint64 proc_id = 1;</code> + */ + public Builder setProcId(long value) { + bitField0_ |= 0x00000001; + procId_ = value; + onChanged(); + return this; + } + /** + * <code>required uint64 proc_id = 1;</code> + */ + public Builder clearProcId() { + bitField0_ = (bitField0_ & ~0x00000001); + procId_ = 0L; + onChanged(); + return this; + } + + // optional bool mayInterruptIfRunning = 2 [default = true]; + private boolean mayInterruptIfRunning_ = true; + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + public boolean hasMayInterruptIfRunning() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + public boolean getMayInterruptIfRunning() { + return mayInterruptIfRunning_; + } + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + public Builder setMayInterruptIfRunning(boolean value) { + bitField0_ |= 0x00000002; + mayInterruptIfRunning_ = value; + onChanged(); + return this; + } + /** + * <code>optional bool mayInterruptIfRunning = 2 [default = true];</code> + */ + public Builder clearMayInterruptIfRunning() { + bitField0_ = (bitField0_ & ~0x00000002); + mayInterruptIfRunning_ = true; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:hbase.pb.AbortProcedureRequest) + } + + static { + defaultInstance = new AbortProcedureRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:hbase.pb.AbortProcedureRequest) + } + + public interface AbortProcedureResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bool is_procedure_aborted = 1; + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + boolean hasIsProcedureAborted(); + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + boolean getIsProcedureAborted(); + } + /** + * Protobuf type {@code hbase.pb.AbortProcedureResponse} + */ + public static final class AbortProcedureResponse extends + com.google.protobuf.GeneratedMessage + implements AbortProcedureResponseOrBuilder { + // Use AbortProcedureResponse.newBuilder() to construct. + private AbortProcedureResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AbortProcedureResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AbortProcedureResponse defaultInstance; + public static AbortProcedureResponse getDefaultInstance() { + return defaultInstance; + } + + public AbortProcedureResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbortProcedureResponse( + com.google.protobuf.CodedInputStream input, + 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 { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + isProcedureAborted_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.class, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.Builder.class); + } + + public static com.google.protobuf.Parser<AbortProcedureResponse> PARSER = + new com.google.protobuf.AbstractParser<AbortProcedureResponse>() { + public AbortProcedureResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbortProcedureResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<AbortProcedureResponse> getParserForType() { + return PARSER; + } + + private int bitField0_; + // required bool is_procedure_aborted = 1; + public static final int IS_PROCEDURE_ABORTED_FIELD_NUMBER = 1; + private boolean isProcedureAborted_; + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + public boolean hasIsProcedureAborted() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + public boolean getIsProcedureAborted() { + return isProcedureAborted_; + } + + private void initFields() { + isProcedureAborted_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasIsProcedureAborted()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, isProcedureAborted_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, isProcedureAborted_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse)) { + return super.equals(obj); + } + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse other = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse) obj; + + boolean result = true; + result = result && (hasIsProcedureAborted() == other.hasIsProcedureAborted()); + if (hasIsProcedureAborted()) { + result = result && (getIsProcedureAborted() + == other.getIsProcedureAborted()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasIsProcedureAborted()) { + hash = (37 * hash) + IS_PROCEDURE_ABORTED_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getIsProcedureAborted()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code hbase.pb.AbortProcedureResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> + implements org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.class, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.Builder.class); + } + + // Construct using org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + isProcedureAborted_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.internal_static_hbase_pb_AbortProcedureResponse_descriptor; + } + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse getDefaultInstanceForType() { + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.getDefaultInstance(); + } + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse build() { + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse buildPartial() { + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse result = new org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.isProcedureAborted_ = isProcedureAborted_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse) { + return mergeFrom((org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse other) { + if (other == org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.getDefaultInstance()) return this; + if (other.hasIsProcedureAborted()) { + setIsProcedureAborted(other.getIsProcedureAborted()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasIsProcedureAborted()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required bool is_procedure_aborted = 1; + private boolean isProcedureAborted_ ; + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + public boolean hasIsProcedureAborted() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + public boolean getIsProcedureAborted() { + return isProcedureAborted_; + } + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + public Builder setIsProcedureAborted(boolean value) { + bitField0_ |= 0x00000001; + isProcedureAborted_ = value; + onChanged(); + return this; + } + /** + * <code>required bool is_procedure_aborted = 1;</code> + */ + public Builder clearIsProcedureAborted() { + bitField0_ = (bitField0_ & ~0x00000001); + isProcedureAborted_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:hbase.pb.AbortProcedureResponse) + } + + static { + defaultInstance = new AbortProcedureResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:hbase.pb.AbortProcedureResponse) + } + public interface SetQuotaRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -51287,6 +52261,18 @@ public final class MasterProtos { org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse> done); + /** + * <code>rpc AbortProcedure(.hbase.pb.AbortProcedureRequest) returns (.hbase.pb.AbortProcedureResponse);</code> + * + * <pre> + ** Abort a procedure + * </pre> + */ + public abstract void abortProcedure( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest request, + com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse> done); + } public static com.google.protobuf.Service newReflectiveService( @@ -51684,6 +52670,14 @@ public final class MasterProtos { impl.getSecurityCapabilities(controller, request, done); } + @java.lang.Override + public void abortProcedure( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest request, + com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse> done) { + impl.abortProcedure(controller, request, done); + } + }; } @@ -51804,6 +52798,8 @@ public final class MasterProtos { return impl.getProcedureResult(controller, (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetProcedureResultRequest)request); case 48: return impl.getSecurityCapabilities(controller, (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesRequest)request); + case 49: + return impl.abortProcedure(controller, (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest)request); default: throw new java.lang.AssertionError("Can't get here."); } @@ -51916,6 +52912,8 @@ public final class MasterProtos { return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetProcedureResultRequest.getDefaultInstance(); case 48: return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesRequest.getDefaultInstance(); + case 49: + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.getDefaultInstance(); default: throw new java.lang.AssertionError("Can't get here."); } @@ -52028,6 +53026,8 @@ public final class MasterProtos { return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetProcedureResultResponse.getDefaultInstance(); case 48: return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse.getDefaultInstance(); + case 49: + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.getDefaultInstance(); default: throw new java.lang.AssertionError("Can't get here."); } @@ -52647,6 +53647,18 @@ public final class MasterProtos { org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse> done); + /** + * <code>rpc AbortProcedure(.hbase.pb.AbortProcedureRequest) returns (.hbase.pb.AbortProcedureResponse);</code> + * + * <pre> + ** Abort a procedure + * </pre> + */ + public abstract void abortProcedure( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest request, + com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse> done); + public static final com.google.protobuf.Descriptors.ServiceDescriptor getDescriptor() { @@ -52914,6 +53926,11 @@ public final class MasterProtos { com.google.protobuf.RpcUtil.<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse>specializeCallback( done)); return; + case 49: + this.abortProcedure(controller, (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest)request, + com.google.protobuf.RpcUtil.<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse>specializeCallback( + done)); + return; default: throw new java.lang.AssertionError("Can't get here."); } @@ -53026,6 +54043,8 @@ public final class MasterProtos { return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetProcedureResultRequest.getDefaultInstance(); case 48: return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesRequest.getDefaultInstance(); + case 49: + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest.getDefaultInstance(); default: throw new java.lang.AssertionError("Can't get here."); } @@ -53138,6 +54157,8 @@ public final class MasterProtos { return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.GetProcedureResultResponse.getDefaultInstance(); case 48: return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse.getDefaultInstance(); + case 49: + return org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.getDefaultInstance(); default: throw new java.lang.AssertionError("Can't get here."); } @@ -53893,6 +54914,21 @@ public final class MasterProtos { org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse.class, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse.getDefaultInstance())); } + + public void abortProcedure( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest request, + com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse> done) { + channel.callMethod( + getDescriptor().getMethods().get(49), + controller, + request, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.class, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.getDefaultInstance())); + } } public static BlockingInterface newBlockingStub( @@ -54145,6 +55181,11 @@ public final class MasterProtos { com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesRequest request) throws com.google.protobuf.ServiceException; + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse abortProcedure( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest request) + throws com.google.protobuf.ServiceException; } private static final class BlockingStub implements BlockingInterface { @@ -54741,6 +55782,18 @@ public final class MasterProtos { org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse.getDefaultInstance()); } + + public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse abortProcedure( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(49), + controller, + request, + org.apache.hadoop.hbase.protobuf.generated.MasterProtos.AbortProcedureResponse.getDefaultInstance()); + } + } // @@protoc_insertion_point(class_scope:hbase.pb.MasterService) @@ -55177,6 +56230,16 @@ public final class MasterProtos { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_hbase_pb_GetProcedureResultResponse_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor + internal_static_hbase_pb_AbortProcedureRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_hbase_pb_AbortProcedureRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_hbase_pb_AbortProcedureResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_hbase_pb_AbortProcedureResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_hbase_pb_SetQuotaRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -55366,138 +56429,144 @@ public final class MasterProtos { "\013last_update\030\003 \001(\004\022\016\n\006result\030\004 \001(\014\0224\n\tex" + "ception\030\005 \001(\0132!.hbase.pb.ForeignExceptio" + "nMessage\"1\n\005State\022\r\n\tNOT_FOUND\020\000\022\013\n\007RUNN" + - "ING\020\001\022\014\n\010FINISHED\020\002\"\315\001\n\017SetQuotaRequest\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\'\n\ntable_name\030\004 \001(\0132\023." + - "hbase.pb.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(\013" + - "2\031.hbase.pb.ThrottleRequest\"\022\n\020SetQuotaR" + - "esponse\"J\n\037MajorCompactionTimestampReque" + - "st\022\'\n\ntable_name\030\001 \002(\0132\023.hbase.pb.TableN" + - "ame\"U\n(MajorCompactionTimestampForRegion" + - "Request\022)\n\006region\030\001 \002(\0132\031.hbase.pb.Regio" + - "nSpecifier\"@\n MajorCompactionTimestampRe" + - "sponse\022\034\n\024compaction_timestamp\030\001 \002(\003\"\035\n\033" + - "SecurityCapabilitiesRequest\"\354\001\n\034Security" + - "CapabilitiesResponse\022G\n\014capabilities\030\001 \003", - "(\01621.hbase.pb.SecurityCapabilitiesRespon" + - "se.Capability\"\202\001\n\nCapability\022\031\n\025SIMPLE_A" + - "UTHENTICATION\020\000\022\031\n\025SECURE_AUTHENTICATION" + - "\020\001\022\021\n\rAUTHORIZATION\020\002\022\026\n\022CELL_AUTHORIZAT" + - "ION\020\003\022\023\n\017CELL_VISIBILITY\020\0042\357\"\n\rMasterSer" + - "vice\022e\n\024GetSchemaAlterStatus\022%.hbase.pb." + - "GetSchemaAlterStatusRequest\032&.hbase.pb.G" + - "etSchemaAlterStatusResponse\022b\n\023GetTableD" + - "escriptors\022$.hbase.pb.GetTableDescriptor" + - "sRequest\032%.hbase.pb.GetTableDescriptorsR", - "esponse\022P\n\rGetTableNames\022\036.hbase.pb.GetT" + - "ableNamesRequest\032\037.hbase.pb.GetTableName" + - "sResponse\022Y\n\020GetClusterStatus\022!.hbase.pb" + - ".GetClusterStatusRequest\032\".hbase.pb.GetC" + - "lusterStatusResponse\022V\n\017IsMasterRunning\022" + - " .hbase.pb.IsMasterRunningRequest\032!.hbas" + - "e.pb.IsMasterRunningResponse\022D\n\tAddColum" + - "n\022\032.hbase.pb.AddColumnRequest\032\033.hbase.pb" + - ".AddColumnResponse\022M\n\014DeleteColumn\022\035.hba" + - "se.pb.DeleteColumnRequest\032\036.hbase.pb.Del", - "eteColumnResponse\022M\n\014ModifyColumn\022\035.hbas" + - "e.pb.ModifyColumnRequest\032\036.hbase.pb.Modi" + - "fyColumnResponse\022G\n\nMoveRegion\022\033.hbase.p" + - "b.MoveRegionRequest\032\034.hbase.pb.MoveRegio" + - "nResponse\022k\n\026DispatchMergingRegions\022\'.hb" + - "ase.pb.DispatchMergingRegionsRequest\032(.h" + - "base.pb.DispatchMergingRegionsResponse\022M" + - "\n\014AssignRegion\022\035.hbase.pb.AssignRegionRe" + - "quest\032\036.hbase.pb.AssignRegionResponse\022S\n" + - "\016UnassignRegion\022\037.hbase.pb.UnassignRegio", - "nRequest\032 .hbase.pb.UnassignRegionRespon" + - "se\022P\n\rOfflineRegion\022\036.hbase.pb.OfflineRe" + - "gionRequest\032\037.hbase.pb.OfflineRegionResp" + - "onse\022J\n\013DeleteTable\022\034.hbase.pb.DeleteTab" + - "leRequest\032\035.hbase.pb.DeleteTableResponse" + - "\022P\n\rtruncateTable\022\036.hbase.pb.TruncateTab" + - "leRequest\032\037.hbase.pb.TruncateTableRespon" + - "se\022J\n\013EnableTable\022\034.hbase.pb.EnableTable" + - "Request\032\035.hbase.pb.EnableTableResponse\022M" + - "\n\014DisableTable\022\035.hbase.pb.DisableTableRe", - "quest\032\036.hbase.pb.DisableTableResponse\022J\n" + - "\013ModifyTable\022\034.hbase.pb.ModifyTableReque" + - "st\032\035.hbase.pb.ModifyTableResponse\022J\n\013Cre" + - "ateTable\022\034.hbase.pb.CreateTableRequest\032\035" + - ".hbase.pb.CreateTableResponse\022A\n\010Shutdow" + - "n\022\031.hbase.pb.ShutdownRequest\032\032.hbase.pb." + - "ShutdownResponse\022G\n\nStopMaster\022\033.hbase.p" + - "b.StopMasterRequest\032\034.hbase.pb.StopMaste" + - "rResponse\022>\n\007Balance\022\030.hbase.pb.BalanceR" + - "equest\032\031.hbase.pb.BalanceResponse\022_\n\022Set", - "BalancerRunning\022#.hbase.pb.SetBalancerRu" + - "nningRequest\032$.hbase.pb.SetBalancerRunni" + - "ngResponse\022\\\n\021IsBalancerEnabled\022\".hbase." + - "pb.IsBalancerEnabledRequest\032#.hbase.pb.I" + - "sBalancerEnabledResponse\022S\n\016RunCatalogSc" + - "an\022\037.hbase.pb.RunCatalogScanRequest\032 .hb" + - "ase.pb.RunCatalogScanResponse\022e\n\024EnableC" + - "atalogJanitor\022%.hbase.pb.EnableCatalogJa" + - "nitorRequest\032&.hbase.pb.EnableCatalogJan" + - "itorResponse\022n\n\027IsCatalogJanitorEnabled\022", - "(.hbase.pb.IsCatalogJanitorEnabledReques" + - "t\032).hbase.pb.IsCatalogJanitorEnabledResp" + - "onse\022^\n\021ExecMasterService\022#.hbase.pb.Cop" + - "rocessorServiceRequest\032$.hbase.pb.Coproc" + - "essorServiceResponse\022A\n\010Snapshot\022\031.hbase" + - ".pb.SnapshotRequest\032\032.hbase.pb.SnapshotR" + - "esponse\022h\n\025GetCompletedSnapshots\022&.hbase" + - ".pb.GetCompletedSnapshotsRequest\032\'.hbase" + - ".pb.GetCompletedSnapshotsResponse\022S\n\016Del" + - "eteSnapshot\022\037.hbase.pb.DeleteSnapshotReq", - "uest\032 .hbase.pb.DeleteSnapshotResponse\022S" + - "\n\016IsSnapshotDone\022\037.hbase.pb.IsSnapshotDo" + - "neRequest\032 .hbase.pb.IsSnapshotDoneRespo" + - "nse\022V\n\017RestoreSnapshot\022 .hbase.pb.Restor" + - "eSnapshotRequest\032!.hbase.pb.RestoreSnaps" + - "hotResponse\022h\n\025IsRestoreSnapshotDone\022&.h" + - "base.pb.IsRestoreSnapshotDoneRequest\032\'.h" + - "base.pb.IsRestoreSnapshotDoneResponse\022P\n" + - "\rExecProcedure\022\036.hbase.pb.ExecProcedureR" + - "equest\032\037.hbase.pb.ExecProcedureResponse\022", - "W\n\024ExecProcedureWithRet\022\036.hbase.pb.ExecP" + - "rocedureRequest\032\037.hbase.pb.ExecProcedure" + - "Response\022V\n\017IsProcedureDone\022 .hbase.pb.I" + - "sProcedureDoneRequest\032!.hbase.pb.IsProce" + - "dureDoneResponse\022V\n\017ModifyNamespace\022 .hb" + - "ase.pb.ModifyNamespaceRequest\032!.hbase.pb" + - ".ModifyNamespaceResponse\022V\n\017CreateNamesp" + - "ace\022 .hbase.pb.CreateNamespaceRequest\032!." + - "hbase.pb.CreateNamespaceResponse\022V\n\017Dele" + - "teNamespace\022 .hbase.pb.DeleteNamespaceRe", - "quest\032!.hbase.pb.DeleteNamespaceResponse" + - "\022k\n\026GetNamespaceDescriptor\022\'.hbase.pb.Ge" + - "tNamespaceDescriptorRequest\032(.hbase.pb.G" + - "etNamespaceDescriptorResponse\022q\n\030ListNam" + - "espaceDescriptors\022).hbase.pb.ListNamespa" + - "ceDescriptorsRequest\032*.hbase.pb.ListName" + - "spaceDescriptorsResponse\022\206\001\n\037ListTableDe" + - "scriptorsByNamespace\0220.hbase.pb.ListTabl" + - "eDescriptorsByNamespaceRequest\0321.hbase.p" + - "b.ListTableDescriptorsByNamespaceRespons", - "e\022t\n\031ListTableNamesByNamespace\022*.hbase.p" + - "b.ListTableNamesByNamespaceRequest\032+.hba" + - "se.pb.ListTableNamesByNamespaceResponse\022" + - "A\n\010SetQuota\022\031.hbase.pb.SetQuotaRequest\032\032" + - ".hbase.pb.SetQuotaResponse\022x\n\037getLastMaj" + - "orCompactionTimestamp\022).hbase.pb.MajorCo" + - "mpactionTimestampRequest\032*.hbase.pb.Majo" + - "rCompactionTimestampResponse\022\212\001\n(getLast" + - "MajorCompactionTimestampForRegion\0222.hbas" + - "e.pb.MajorCompactionTimestampForRegionRe", - "quest\032*.hbase.pb.MajorCompactionTimestam" + - "pResponse\022_\n\022getProcedureResult\022#.hbase." + - "pb.GetProcedureResultRequest\032$.hbase.pb." + - "GetProcedureResultResponse\022h\n\027getSecurit" + - "yCapabilities\022%.hbase.pb.SecurityCapabil" + - "itiesRequest\032&.hbase.pb.SecurityCapabili" + - "tiesResponseBB\n*org.apache.hadoop.hbase." + - "protobuf.generatedB\014MasterProtosH\001\210\001\001\240\001\001" + "ING\020\001\022\014\n\010FINISHED\020\002\"M\n\025AbortProcedureReq" + + "uest\022\017\n\007proc_id\030\001 \002(\004\022#\n\025mayInterruptIfR" + + "unning\030\002 \001(\010:\004true\"6\n\026AbortProcedureResp" + + "onse\022\034\n\024is_procedure_aborted\030\001 \002(\010\"\315\001\n\017S", + "etQuotaRequest\022\021\n\tuser_name\030\001 \001(\t\022\022\n\nuse" + + "r_group\030\002 \001(\t\022\021\n\tnamespace\030\003 \001(\t\022\'\n\ntabl" + + "e_name\030\004 \001(\0132\023.hbase.pb.TableName\022\022\n\nrem" + + "ove_all\030\005 \001(\010\022\026\n\016bypass_globals\030\006 \001(\010\022+\n" + + "\010throttle\030\007 \001(\0132\031.hbase.pb.ThrottleReque" + + "st\"\022\n\020SetQuotaResponse\"J\n\037MajorCompactio" + + "nTimestampRequest\022\'\n\ntable_name\030\001 \002(\0132\023." + + "hbase.pb.TableName\"U\n(MajorCompactionTim" + + "estampForRegionRequest\022)\n\006region\030\001 \002(\0132\031" + + ".hbase.pb.RegionSpecifier\"@\n MajorCompac", + "tionTimestampResponse\022\034\n\024compaction_time" + + "stamp\030\001 \002(\003\"\035\n\033SecurityCapabilitiesReque" + + "st\"\354\001\n\034SecurityCapabilitiesResponse\022G\n\014c" + + "apabilities\030\001 \003(\01621.hbase.pb.SecurityCap" + + "abilitiesResponse.Capability\"\202\001\n\nCapabil" + + "ity\022\031\n\025SIMPLE_AUTHENTICATION\020\000\022\031\n\025SECURE" + + "_AUTHENTICATION\020\001\022\021\n\rAUTHORIZATION\020\002\022\026\n\022" + + "CELL_AUTHORIZATION\020\003\022\023\n\017CELL_VISIBILITY\020" + + "\0042\304#\n\rMasterService\022e\n\024GetSchemaAlterSta" + + "tus\022%.hbase.pb.GetSchemaAlterStatusReque", + "st\032&.hbase.pb.GetSchemaAlterStatusRespon" + + "se\022b\n\023GetTableDescriptors\022$.hbase.pb.Get" + + "TableDescriptorsRequest\032%.hbase.pb.GetTa" + + "bleDescriptorsResponse\022P\n\rGetTableNames\022" + + "\036.hbase.pb.GetTableNamesRequest\032\037.hbase." + + "pb.GetTableNamesResponse\022Y\n\020GetClusterSt" + + "atus\022!.hbase.pb.GetClusterStatusRequest\032" + + "\".hbase.pb.GetClusterStatusResponse\022V\n\017I" + + "sMasterRunning\022 .hbase.pb.IsMasterRunnin" + + "gRequest\032!.hbase.pb.IsMasterRunningRespo", + "nse\022D\n\tAddColumn\022\032.hbase.pb.AddColumnReq" + + "uest\032\033.hbase.pb.AddColumnResponse\022M\n\014Del" + + "eteColumn\022\035.hbase.pb.DeleteColumnRequest" + + "\032\036.hbase.pb.DeleteColumnResponse\022M\n\014Modi" + + "fyColumn\022\035.hbase.pb.ModifyColumnRequest\032" + + "\036.hbase.pb.ModifyColumnResponse\022G\n\nMoveR" + + "egion\022\033.hbase.pb.MoveRegionRequest\032\034.hba" + + "se.pb.MoveRegionResponse\022k\n\026DispatchMerg" + + "ingRegions\022\'.hbase.pb.DispatchMergingReg" + + "ionsRequest\032(.hbase.pb.DispatchMergingRe", + "gionsResponse\022M\n\014AssignRegion\022\035.hbase.pb" + + ".AssignRegionRequest\032\036.hbase.pb.AssignRe" + + "gionResponse\022S\n\016UnassignRegion\022\037.hbase.p" + + "b.UnassignRegionRequest\032 .hbase.pb.Unass" + + "ignRegionResponse\022P\n\rOfflineRegion\022\036.hba" + + "se.pb.OfflineRegionRequest\032\037.hbase.pb.Of" + + "flineRegionResponse\022J\n\013DeleteTable\022\034.hba" + + "se.pb.DeleteTableRequest\032\035.hbase.pb.Dele" + + "teTableResponse\022P\n\rtruncateTable\022\036.hbase" + + ".pb.TruncateTableRequest\032\037.hbase.pb.Trun", + "cateTableResponse\022J\n\013EnableTable\022\034.hbase" + + ".pb.EnableTableRequest\032\035.hbase.pb.Enable" + + "TableResponse\022M\n\014DisableTable\022\035.hbase.pb" + + ".DisableTableRequest\032\036.hbase.pb.DisableT" + + "ableResponse\022J\n\013ModifyTable\022\034.hbase.pb.M" + + "odifyTableRequest\032\035.hbase.pb.ModifyTable" + + "Response\022J\n\013CreateTable\022\034.hbase.pb.Creat" + + "eTableRequest\032\035.hbase.pb.CreateTableResp" + + "onse\022A\n\010Shutdown\022\031.hbase.pb.ShutdownRequ" + + "est\032\032.hbase.pb.ShutdownResponse\022G\n\nStopM", + "aster\022\033.hbase.pb.StopMasterRequest\032\034.hba" + + "se.pb.StopMasterResponse\022>\n\007Balance\022\030.hb" + + "ase.pb.BalanceRequest\032\031.hbase.pb.Balance" + + "Response\022_\n\022SetBalancerRunning\022#.hbase.p" + + "b.SetBalancerRunningRequest\032$.hbase.pb.S" + + "etBalancerRunningResponse\022\\\n\021IsBalancerE" + + "nabled\022\".hbase.pb.IsBalancerEnabledReque" + + "st\032#.hbase.pb.IsBalancerEnabledResponse\022" + + "S\n\016RunCatalogScan\022\037.hbase.pb.RunCatalogS" + + "canRequest\032 .hbase.pb.RunCatalogScanResp", + "onse\022e\n\024EnableCatalogJanitor\022%.hbase.pb." + + "EnableCatalogJanitorRequest\032&.hbase.pb.E" + + "nableCatalogJanitorResponse\022n\n\027IsCatalog" + + "JanitorEnabled\022(.hbase.pb.IsCatalogJanit" + + "orEnabledRequest\032).hbase.pb.IsCatalogJan" + + "itorEnabledResponse\022^\n\021ExecMasterService" + + "\022#.hbase.pb.CoprocessorServiceRequest\032$." + + "hbase.pb.CoprocessorServiceResponse\022A\n\010S" + + "napshot\022\031.hbase.pb.SnapshotRequest\032\032.hba" + + "se.pb.SnapshotResponse\022h\n\025GetCompletedSn", + "apshots\022&.hbase.pb.GetCompletedSnapshots" + + "Request\032\'.hbase.pb.GetCompletedSnapshots" + + "Response\022S\n\016DeleteSnapshot\022\037.hbase.pb.De" + + "leteSnapshotRequest\032 .hbase.pb.DeleteSna" + + "pshotResponse\022S\n\016IsSnapshotDone\022\037.hbase." + + "pb.IsSnapshotDoneRequest\032 .hbase.pb.IsSn" + + "apshotDoneResponse\022V\n\017RestoreSnapshot\022 ." + + "hbase.pb.RestoreSnapshotRequest\032!.hbase." + + "pb.RestoreSnapshotResponse\022h\n\025IsRestoreS" + + "napshotDone\022&.hbase.pb.IsRestoreSnapshot", + "DoneRequest\032\'.hbase.pb.IsRestoreSnapshot" + + "DoneResponse\022P\n\rExecProcedure\022\036.hbase.pb" + + ".ExecProcedureRequest\032\037.hbase.pb.ExecPro" + + "cedureResponse\022W\n\024ExecProcedureWithRet\022\036" + + ".hbase.pb.ExecProcedureRequest\032\037.hbase.p" + + "b.ExecProcedureResponse\022V\n\017IsProcedureDo" + + "ne\022 .hbase.pb.IsProcedureDoneRequest\032!.h" + + "base.pb.IsProcedureDoneResponse\022V\n\017Modif" + + "yNamespace\022 .hbase.pb.ModifyNamespaceReq" + + "uest\032!.hbase.pb.ModifyNamespaceResponse\022", + "V\n\017CreateNamespace\022 .hbase.pb.CreateName" + + "spaceRequest\032!.hbase.pb.CreateNamespaceR" + + "esponse\022V\n\017DeleteNamespace\022 .hbase.pb.De" + + "leteNamespaceRequest\032!.hbase.pb.DeleteNa" + + "mespaceResponse\022k\n\026GetNamespaceDescripto" + + "r\022\'.hbase.pb.GetNamespaceDescriptorReque" + + "st\032(.hbase.pb.GetNamespaceDescriptorResp" + + "onse\022q\n\030ListNamespaceDescriptors\022).hbase" + + ".pb.ListNamespaceDescriptorsRequest\032*.hb" + + "ase.pb.ListNamespaceDescriptorsResponse\022", + "\206\001\n\037ListTableDescriptorsByNamespace\0220.hb" + + "ase.pb.ListTableDescriptorsByNamespaceRe" + + "quest\0321.hbase.pb.ListTableDescriptorsByN" + + "amespaceResponse\022t\n\031ListTableNamesByName" + + "space\022*.hbase.pb.ListTableNamesByNamespa" + + "ceRequest\032+.hbase.pb.ListTableNamesByNam" + + "espaceResponse\022A\n\010SetQuota\022\031.hbase.pb.Se" + + "tQuotaRequest\032\032.hbase.pb.SetQuotaRespons" + + "e\022x\n\037getLastMajorCompactionTimestamp\022).h" + + "base.pb.MajorCompactionTimestampRequest\032", + "*.hbase.pb.MajorCompactionTimestampRespo" + + "nse\022\212\001\n(getLastMajorCompactionTimestampF" + + "orRegion\0222.hbase.pb.MajorCompactionTimes" + + "tampForRegionRequest\032*.hbase.pb.MajorCom" + + "pactionTimestampResponse\022_\n\022getProcedure" + + "Result\022#.hbase.pb.GetProcedureResultRequ" + + "est\032$.hbase.pb.GetProcedureResultRespons" + + "e\022h\n\027getSecurityCapabilities\022%.hbase.pb." + + "SecurityCapabilitiesRequest\032&.hbase.pb.S" + + "ecurityCapabilitiesResponse\022S\n\016AbortProc", + "edure\022\037.hbase.pb.AbortProcedureRequest\032 " + + ".hbase.pb.AbortProcedureResponseBB\n*org." + + "apache.hadoop.hbase.protobuf.generatedB\014" + + "MasterProtosH\001\210\001\001\240\001\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -56020,44 +57089,56 @@ public final class MasterProtos { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_GetProcedureResultResponse_descriptor, new java.lang.String[] { "State", "StartTime", "LastUpdate", "Result", "Exception", }); - internal_static_hbase_pb_SetQuotaRequest_descriptor = + internal_static_hbase_pb_AbortProcedureRequest_descriptor = getDescriptor().getMessageTypes().get(86); + internal_static_hbase_pb_AbortProcedureRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_hbase_pb_AbortProcedureRequest_descriptor, + new java.lang.String[] { "ProcId", "MayInterruptIfRunning", }); + internal_static_hbase_pb_AbortProcedureResponse_descriptor = + getDescriptor().getMessageTypes().get(87); + internal_static_hbase_pb_AbortProcedureResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_hbase_pb_AbortProcedureResponse_descriptor, + new java.lang.String[] { "IsProcedureAborted", }); + internal_static_hbase_pb_SetQuotaRequest_descriptor = + getDescriptor().getMessageTypes().get(88); internal_static_hbase_pb_SetQuotaRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_SetQuotaRequest_descriptor, new java.lang.String[] { "UserName", "UserGroup", "Namespace", "TableName", "RemoveAll", "BypassGlobals", "Throttle", }); internal_static_hbase_pb_SetQuotaResponse_descriptor = - getDescriptor().getMessageTypes().get(87); + getDescriptor().getMessageTypes().get(89); internal_static_hbase_pb_SetQuotaResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_SetQuotaResponse_descriptor, new java.lang.String[] { }); internal_static_hbase_pb_MajorCompactionTimestampRequest_descriptor = - getDescriptor().getMessageTypes().get(88); + getDescriptor().getMessageTypes().get(90); internal_static_hbase_pb_MajorCompactionTimestampRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_MajorCompactionTimestampRequest_descriptor, new java.lang.String[] { "TableName", }); internal_static_hbase_pb_MajorCompactionTimestampForRegionRequest_descriptor = - getDescriptor().getMessageTypes().get(89); + getDescriptor().getMessageTypes().get(91); internal_static_hbase_pb_MajorCompactionTimestampForRegionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_MajorCompactionTimestampForRegionRequest_descriptor, new java.lang.String[] { "Region", }); internal_static_hbase_pb_MajorCompactionTimestampResponse_descriptor = - getDescriptor().getMessageTypes().get(90); + getDescriptor().getMessageTypes().get(92); internal_static_hbase_pb_MajorCompactionTimestampResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_MajorCompactionTimestampResponse_descriptor, new java.lang.String[] { "CompactionTimestamp", }); internal_static_hbase_pb_SecurityCapabilitiesRequest_descriptor = - getDescriptor().getMessageTypes().get(91); + getDescriptor().getMessageTypes().get(93); internal_static_hbase_pb_SecurityCapabilitiesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_SecurityCapabilitiesRequest_descriptor, new java.lang.String[] { }); internal_static_hbase_pb_SecurityCapabilitiesResponse_descriptor = - getDescriptor().getMessageTypes().get(92); + getDescriptor().getMessageTypes().get(94); internal_static_hbase_pb_SecurityCapabilitiesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_SecurityCapabilitiesResponse_descriptor, http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-protocol/src/main/protobuf/Master.proto ---------------------------------------------------------------------- diff --git a/hbase-protocol/src/main/protobuf/Master.proto b/hbase-protocol/src/main/protobuf/Master.proto index 99f8105..16e3b3a 100644 --- a/hbase-protocol/src/main/protobuf/Master.proto +++ b/hbase-protocol/src/main/protobuf/Master.proto @@ -386,21 +386,21 @@ message IsMasterRunningResponse { } message ExecProcedureRequest { - required ProcedureDescription procedure = 1; + required ProcedureDescription procedure = 1; } message ExecProcedureResponse { - optional int64 expected_timeout = 1; - optional bytes return_data = 2; + optional int64 expected_timeout = 1; + optional bytes return_data = 2; } message IsProcedureDoneRequest { - optional ProcedureDescription procedure = 1; + optional ProcedureDescription procedure = 1; } message IsProcedureDoneResponse { - optional bool done = 1 [default = false]; - optional ProcedureDescription snapshot = 2; + optional bool done = 1 [default = false]; + optional ProcedureDescription snapshot = 2; } message GetProcedureResultRequest { @@ -421,6 +421,15 @@ message GetProcedureResultResponse { optional ForeignExceptionMessage exception = 5; } +message AbortProcedureRequest { + required uint64 proc_id = 1; + optional bool mayInterruptIfRunning = 2 [default = true]; +} + +message AbortProcedureResponse { + required bool is_procedure_aborted = 1; +} + message SetQuotaRequest { optional string user_name = 1; optional string user_group = 2; @@ -693,4 +702,8 @@ service MasterService { /** Returns the security capabilities in effect on the cluster */ rpc getSecurityCapabilities(SecurityCapabilitiesRequest) returns(SecurityCapabilitiesResponse); + + /** Abort a procedure */ + rpc AbortProcedure(AbortProcedureRequest) + returns(AbortProcedureResponse); } http://git-wip-us.apache.org/repos/asf/hbase/blob/90b8a3c8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 4d485b1..53a535c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -378,7 +378,7 @@ public class HMaster extends HRegionServer implements MasterServices, Server { // should we check encryption settings at master side, default true this.masterCheckEncryption = conf.getBoolean("hbase.master.check.encryption", true); - this.metricsMaster = new MetricsMaster( new MetricsMasterWrapperImpl(this)); + this.metricsMaster = new MetricsMaster(new MetricsMasterWrapperImpl(this)); // preload table descriptor at startup this.preLoadTableDescriptors = conf.getBoolean("hbase.master.preload.tabledescriptors", true); @@ -2478,6 +2478,11 @@ public class HMaster extends HRegionServer implements MasterServices, Server { } @Override + public boolean abortProcedure(final long procId, final boolean mayInterruptIfRunning) { + return this.procedureExecutor.abort(procId, mayInterruptIfRunning); + } + + @Override public List<HTableDescriptor> listTableDescriptorsByNamespace(String name) throws IOException { ensureNamespaceExists(name); return listTableDescriptors(name, null, null, true);