HBASE-25176 MasterStoppedException should be moved to hbase-client module (#2538)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
niuyulin 2020-10-28 14:52:27 +08:00 committed by GitHub
parent 4bbc772ffc
commit 485da758bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 6 deletions

View File

@ -0,0 +1,34 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.exceptions;
import org.apache.hadoop.hbase.DoNotRetryIOException;
import org.apache.yetus.audience.InterfaceAudience;
/**
* Thrown when the master is stopped
*/
@InterfaceAudience.Private
public class MasterStoppedException extends DoNotRetryIOException {
private static final long serialVersionUID = -4284604435898100365L;
public MasterStoppedException() {
super();
}
}

View File

@ -92,6 +92,7 @@ import org.apache.hadoop.hbase.client.TableDescriptor;
import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.client.TableState;
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
import org.apache.hadoop.hbase.exceptions.MasterStoppedException;
import org.apache.hadoop.hbase.executor.ExecutorType;
import org.apache.hadoop.hbase.favored.FavoredNodesManager;
import org.apache.hadoop.hbase.http.InfoServer;
@ -2853,12 +2854,6 @@ public class HMaster extends HRegionServer implements MasterServices {
}
}
public static class MasterStoppedException extends DoNotRetryIOException {
MasterStoppedException() {
super();
}
}
void checkInitialized() throws PleaseHoldException, ServerNotRunningYetException,
MasterNotRunningException, MasterStoppedException {
checkServiceStarted();