HBASE-22785 Fixed Checkstyle issues in exceptions and enhanced Javadoc
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
d083d17388
commit
946f5e6eb5
|
@ -29,29 +29,29 @@ public class DoNotRetryIOException extends HBaseIOException {
|
|||
// TODO: This would be more useful as a marker interface than as a class.
|
||||
private static final long serialVersionUID = 1197446454511704139L;
|
||||
|
||||
/**
|
||||
* default constructor
|
||||
*/
|
||||
public DoNotRetryIOException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public DoNotRetryIOException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
* @param cause
|
||||
* @param message the message for this exception
|
||||
* @param throwable the {@link Throwable} to use for this exception
|
||||
*/
|
||||
public DoNotRetryIOException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
public DoNotRetryIOException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
public DoNotRetryIOException(Throwable cause) {
|
||||
super(cause);
|
||||
/**
|
||||
* @param throwable the {@link Throwable} to use for this exception
|
||||
*/
|
||||
public DoNotRetryIOException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,27 +22,22 @@ import java.io.IOException;
|
|||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
|
||||
/**
|
||||
* Thrown during flush if the possibility snapshot content was not properly
|
||||
* persisted into store files. Response should include replay of wal content.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class DroppedSnapshotException extends IOException {
|
||||
|
||||
private static final long serialVersionUID = -5463156580831677374L;
|
||||
|
||||
/**
|
||||
* @param msg
|
||||
*/
|
||||
public DroppedSnapshotException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* default constructor
|
||||
*/
|
||||
public DroppedSnapshotException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public DroppedSnapshotException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,35 +20,31 @@ package org.apache.hadoop.hbase;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
* Thrown by a region server if it is sent a request for a region it is not
|
||||
* serving.
|
||||
* Thrown by a region server if it is sent a request for a region it is not serving.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class NotServingRegionException extends IOException {
|
||||
private static final long serialVersionUID = (1L << 17) - 1L;
|
||||
|
||||
/** default constructor */
|
||||
public NotServingRegionException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param s message
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public NotServingRegionException(String s) {
|
||||
super(s);
|
||||
public NotServingRegionException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param s message
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public NotServingRegionException(final byte [] s) {
|
||||
super(Bytes.toString(s));
|
||||
public NotServingRegionException(final byte[] message) {
|
||||
super(Bytes.toString(message));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,26 +21,27 @@ package org.apache.hadoop.hbase;
|
|||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
* Thrown when a table exists but should not
|
||||
* Thrown when a table exists but should not.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class TableExistsException extends DoNotRetryIOException {
|
||||
private static final long serialVersionUID = (1L << 7) - 1L;
|
||||
/** default constructor */
|
||||
|
||||
public TableExistsException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param s message
|
||||
* @param tableName the name of the table that should not exist
|
||||
*/
|
||||
public TableExistsException(String s) {
|
||||
super(s);
|
||||
public TableExistsException(String tableName) {
|
||||
super(tableName);
|
||||
}
|
||||
|
||||
public TableExistsException(TableName t) {
|
||||
this(t.getNameAsString());
|
||||
/**
|
||||
* @param tableName the name of the table that should not exist
|
||||
*/
|
||||
public TableExistsException(TableName tableName) {
|
||||
this(tableName.getNameAsString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,28 +20,37 @@ package org.apache.hadoop.hbase;
|
|||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
*
|
||||
* Failed to find .tableinfo file under table dir
|
||||
*
|
||||
* Failed to find {@code .tableinfo} file under the table directory.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
@SuppressWarnings("serial")
|
||||
public class TableInfoMissingException extends HBaseIOException {
|
||||
|
||||
/**
|
||||
* Failed to find {@code .tableinfo} file under the table directory.
|
||||
*/
|
||||
public TableInfoMissingException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public TableInfoMissingException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public TableInfoMissingException( String message, Throwable t ) {
|
||||
super(message, t);
|
||||
/**
|
||||
* @param message the message for this exception
|
||||
* @param throwable the {@link Throwable} to use for this exception
|
||||
*/
|
||||
public TableInfoMissingException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
public TableInfoMissingException( Throwable t ) {
|
||||
super(t);
|
||||
/**
|
||||
* @param throwable the {@link Throwable} to use for this exception
|
||||
*/
|
||||
public TableInfoMissingException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,37 +18,36 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
* Thrown if a table should be offline but is not
|
||||
* Thrown if a table should be offline but is not.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class TableNotDisabledException extends DoNotRetryIOException {
|
||||
private static final long serialVersionUID = (1L << 19) - 1L;
|
||||
/** default constructor */
|
||||
|
||||
public TableNotDisabledException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param s message
|
||||
* @param tableName the name of the table that is not disabled
|
||||
*/
|
||||
public TableNotDisabledException(String s) {
|
||||
super(s);
|
||||
public TableNotDisabledException(String tableName) {
|
||||
super(tableName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableName Name of table that is not disabled
|
||||
* @param tableName the name of the table that is not disabled
|
||||
*/
|
||||
public TableNotDisabledException(byte[] tableName) {
|
||||
this(Bytes.toString(tableName));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableName Name of table that is not disabled
|
||||
* @param tableName the name of the table that is not disabled
|
||||
*/
|
||||
public TableNotDisabledException(TableName tableName) {
|
||||
this(tableName.getNameAsString());
|
||||
|
|
|
@ -18,12 +18,11 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
* Thrown if a table should be enabled but is not
|
||||
* Thrown if a table should be enabled but is not.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class TableNotEnabledException extends DoNotRetryIOException {
|
||||
|
@ -34,22 +33,21 @@ public class TableNotEnabledException extends DoNotRetryIOException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param s message
|
||||
* @param tableName the name of table that is not enabled
|
||||
*/
|
||||
public TableNotEnabledException(String s) {
|
||||
super(s);
|
||||
public TableNotEnabledException(String tableName) {
|
||||
super(tableName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableName Name of table that is not enabled
|
||||
* @param tableName the name of table that is not enabled
|
||||
*/
|
||||
public TableNotEnabledException(TableName tableName) {
|
||||
this(tableName.getNameAsString());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableName Name of table that is not enabled
|
||||
* @param tableName the name of table that is not enabled
|
||||
*/
|
||||
public TableNotEnabledException(byte[] tableName) {
|
||||
this(Bytes.toString(tableName));
|
||||
|
|
|
@ -18,28 +18,37 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/** Thrown when a table can not be located */
|
||||
/**
|
||||
* Thrown when a table cannot be located.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class TableNotFoundException extends DoNotRetryIOException {
|
||||
private static final long serialVersionUID = 993179627856392526L;
|
||||
|
||||
/** default constructor */
|
||||
public TableNotFoundException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/** @param s message */
|
||||
public TableNotFoundException(String s) {
|
||||
super(s);
|
||||
/**
|
||||
* @param tableName the name of the table which was not found
|
||||
*/
|
||||
public TableNotFoundException(String tableName) {
|
||||
super(tableName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableName the name of the table which was not found
|
||||
*/
|
||||
public TableNotFoundException(byte[] tableName) {
|
||||
super(Bytes.toString(tableName));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableName the name of the table which was not found
|
||||
*/
|
||||
public TableNotFoundException(TableName tableName) {
|
||||
super(tableName.getNameAsString());
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.client.DoNotRetryRegionException;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
* Thrown when we are asked to operate on a region we know nothing about.
|
||||
|
@ -28,6 +28,9 @@ import org.apache.hadoop.hbase.client.DoNotRetryRegionException;
|
|||
public class UnknownRegionException extends DoNotRetryRegionException {
|
||||
private static final long serialVersionUID = 1968858760475205392L;
|
||||
|
||||
/**
|
||||
* @param regionName the name of the region which is unknown
|
||||
*/
|
||||
public UnknownRegionException(String regionName) {
|
||||
super(regionName);
|
||||
}
|
||||
|
|
|
@ -20,31 +20,32 @@ package org.apache.hadoop.hbase;
|
|||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
|
||||
/**
|
||||
* Thrown if a region server is passed an unknown scanner id.
|
||||
* Usually means the client has take too long between checkins and so the
|
||||
* scanner lease on the serverside has expired OR the serverside is closing
|
||||
* Thrown if a region server is passed an unknown scanner ID.
|
||||
* This usually means that the client has taken too long between checkins and so the
|
||||
* scanner lease on the server-side has expired OR the server-side is closing
|
||||
* down and has cancelled all leases.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class UnknownScannerException extends DoNotRetryIOException {
|
||||
private static final long serialVersionUID = 993179627856392526L;
|
||||
|
||||
/** constructor */
|
||||
public UnknownScannerException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param s message
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public UnknownScannerException(String s) {
|
||||
super(s);
|
||||
public UnknownScannerException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public UnknownScannerException(String s, Exception e) {
|
||||
super(s, e);
|
||||
/**
|
||||
* @param message the message for this exception
|
||||
* @param exception the exception to grab data from
|
||||
*/
|
||||
public UnknownScannerException(String message, Exception exception) {
|
||||
super(message, exception);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,9 @@ import org.apache.yetus.audience.InterfaceStability;
|
|||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Stable
|
||||
public class YouAreDeadException extends IOException {
|
||||
/**
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public YouAreDeadException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
|
|
@ -23,29 +23,30 @@ import java.io.IOException;
|
|||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
* Thrown if the client can't connect to zookeeper
|
||||
* Thrown if the client can't connect to ZooKeeper.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
public class ZooKeeperConnectionException extends IOException {
|
||||
private static final long serialVersionUID = (1L << 23) - 1L;
|
||||
/** default constructor */
|
||||
|
||||
public ZooKeeperConnectionException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param s message
|
||||
* @param message the message for this exception
|
||||
*/
|
||||
public ZooKeeperConnectionException(String s) {
|
||||
super(s);
|
||||
public ZooKeeperConnectionException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor taking another exception.
|
||||
* @param e Exception to grab data from.
|
||||
*
|
||||
* @param message the message for this exception
|
||||
* @param exception the exception to grab data from
|
||||
*/
|
||||
public ZooKeeperConnectionException(String message, Exception e) {
|
||||
super(message, e);
|
||||
public ZooKeeperConnectionException(String message, Exception exception) {
|
||||
super(message, exception);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue