HADOOP-14456. Modifier 'static' is redundant for inner enums. Contributed by ZhangBing Lin.
This commit is contained in:
parent
af03c33346
commit
62857be211
@ -47,7 +47,7 @@ public final class OpensslCipher {
|
|||||||
public static final int DECRYPT_MODE = 0;
|
public static final int DECRYPT_MODE = 0;
|
||||||
|
|
||||||
/** Currently only support AES/CTR/NoPadding. */
|
/** Currently only support AES/CTR/NoPadding. */
|
||||||
private static enum AlgMode {
|
private enum AlgMode {
|
||||||
AES_CTR;
|
AES_CTR;
|
||||||
|
|
||||||
static int get(String algorithm, String mode)
|
static int get(String algorithm, String mode)
|
||||||
@ -61,7 +61,7 @@ static int get(String algorithm, String mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static enum Padding {
|
private enum Padding {
|
||||||
NoPadding;
|
NoPadding;
|
||||||
|
|
||||||
static int get(String padding) throws NoSuchPaddingException {
|
static int get(String padding) throws NoSuchPaddingException {
|
||||||
|
@ -198,7 +198,7 @@ public Runnable deleteByName(String name) {
|
|||||||
* "n" values and Queue is empty.
|
* "n" values and Queue is empty.
|
||||||
* This decides how many values to return when client calls "getAtMost"
|
* This decides how many values to return when client calls "getAtMost"
|
||||||
*/
|
*/
|
||||||
public static enum SyncGenerationPolicy {
|
public enum SyncGenerationPolicy {
|
||||||
ATLEAST_ONE, // Return atleast 1 value
|
ATLEAST_ONE, // Return atleast 1 value
|
||||||
LOW_WATERMARK, // Return min(n, lowWatermark * numValues) values
|
LOW_WATERMARK, // Return min(n, lowWatermark * numValues) values
|
||||||
ALL // Return n values
|
ALL // Return n values
|
||||||
|
@ -211,7 +211,7 @@ static <T extends CreateOpts> CreateOpts[] setOpt(final T newValue,
|
|||||||
/**
|
/**
|
||||||
* Enum to support the varargs for rename() options
|
* Enum to support the varargs for rename() options
|
||||||
*/
|
*/
|
||||||
public static enum Rename {
|
public enum Rename {
|
||||||
NONE((byte) 0), // No options
|
NONE((byte) 0), // No options
|
||||||
OVERWRITE((byte) 1), // Overwrite the rename destination
|
OVERWRITE((byte) 1), // Overwrite the rename destination
|
||||||
TO_TRASH ((byte) 2); // Rename to trash
|
TO_TRASH ((byte) 2); // Rename to trash
|
||||||
|
@ -118,7 +118,7 @@ protected void setPreserve(boolean preserve) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static enum FileAttribute {
|
protected enum FileAttribute {
|
||||||
TIMESTAMPS, OWNERSHIP, PERMISSION, ACL, XATTR;
|
TIMESTAMPS, OWNERSHIP, PERMISSION, ACL, XATTR;
|
||||||
|
|
||||||
public static FileAttribute getAttribute(char symbol) {
|
public static FileAttribute getAttribute(char symbol) {
|
||||||
|
@ -145,11 +145,11 @@ public interface ActiveStandbyElectorCallback {
|
|||||||
|
|
||||||
private static final int SLEEP_AFTER_FAILURE_TO_BECOME_ACTIVE = 1000;
|
private static final int SLEEP_AFTER_FAILURE_TO_BECOME_ACTIVE = 1000;
|
||||||
|
|
||||||
private static enum ConnectionState {
|
private enum ConnectionState {
|
||||||
DISCONNECTED, CONNECTED, TERMINATED
|
DISCONNECTED, CONNECTED, TERMINATED
|
||||||
};
|
};
|
||||||
|
|
||||||
static enum State {
|
enum State {
|
||||||
INIT, ACTIVE, STANDBY, NEUTRAL
|
INIT, ACTIVE, STANDBY, NEUTRAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public String toString() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum RequestSource {
|
public enum RequestSource {
|
||||||
REQUEST_BY_USER,
|
REQUEST_BY_USER,
|
||||||
REQUEST_BY_USER_FORCED,
|
REQUEST_BY_USER_FORCED,
|
||||||
REQUEST_BY_ZKFC;
|
REQUEST_BY_ZKFC;
|
||||||
|
@ -230,7 +230,7 @@ private SequenceFile() {} // no public ctor
|
|||||||
*
|
*
|
||||||
* @see SequenceFile.Writer
|
* @see SequenceFile.Writer
|
||||||
*/
|
*/
|
||||||
public static enum CompressionType {
|
public enum CompressionType {
|
||||||
/** Do not compress records. */
|
/** Do not compress records. */
|
||||||
NONE,
|
NONE,
|
||||||
/** Compress values only, each separately. */
|
/** Compress values only, each separately. */
|
||||||
|
@ -68,7 +68,7 @@ public class BuiltInGzipDecompressor implements Decompressor {
|
|||||||
* (Technically, the private variables localBuf through hasHeaderCRC are
|
* (Technically, the private variables localBuf through hasHeaderCRC are
|
||||||
* also part of the state, so this enum is merely the label for it.)
|
* also part of the state, so this enum is merely the label for it.)
|
||||||
*/
|
*/
|
||||||
private static enum GzipStateLabel {
|
private enum GzipStateLabel {
|
||||||
/**
|
/**
|
||||||
* Immediately prior to or (strictly) within the 10-byte basic gzip header.
|
* Immediately prior to or (strictly) within the 10-byte basic gzip header.
|
||||||
*/
|
*/
|
||||||
|
@ -57,7 +57,7 @@ public class ZlibCompressor implements Compressor {
|
|||||||
/**
|
/**
|
||||||
* The compression level for zlib library.
|
* The compression level for zlib library.
|
||||||
*/
|
*/
|
||||||
public static enum CompressionLevel {
|
public enum CompressionLevel {
|
||||||
/**
|
/**
|
||||||
* Compression level for no compression.
|
* Compression level for no compression.
|
||||||
*/
|
*/
|
||||||
@ -133,7 +133,7 @@ int compressionLevel() {
|
|||||||
/**
|
/**
|
||||||
* The compression level for zlib library.
|
* The compression level for zlib library.
|
||||||
*/
|
*/
|
||||||
public static enum CompressionStrategy {
|
public enum CompressionStrategy {
|
||||||
/**
|
/**
|
||||||
* Compression strategy best used for data consisting mostly of small
|
* Compression strategy best used for data consisting mostly of small
|
||||||
* values with a somewhat random distribution. Forces more Huffman coding
|
* values with a somewhat random distribution. Forces more Huffman coding
|
||||||
@ -178,7 +178,7 @@ int compressionStrategy() {
|
|||||||
/**
|
/**
|
||||||
* The type of header for compressed data.
|
* The type of header for compressed data.
|
||||||
*/
|
*/
|
||||||
public static enum CompressionHeader {
|
public enum CompressionHeader {
|
||||||
/**
|
/**
|
||||||
* No headers/trailers/checksums.
|
* No headers/trailers/checksums.
|
||||||
*/
|
*/
|
||||||
|
@ -49,7 +49,7 @@ public class ZlibDecompressor implements Decompressor {
|
|||||||
/**
|
/**
|
||||||
* The headers to detect from compressed data.
|
* The headers to detect from compressed data.
|
||||||
*/
|
*/
|
||||||
public static enum CompressionHeader {
|
public enum CompressionHeader {
|
||||||
/**
|
/**
|
||||||
* No headers/trailers/checksums.
|
* No headers/trailers/checksums.
|
||||||
*/
|
*/
|
||||||
|
@ -75,7 +75,7 @@ public void flush() throws IOException {
|
|||||||
/**
|
/**
|
||||||
* Compression algorithms.
|
* Compression algorithms.
|
||||||
*/
|
*/
|
||||||
static enum Algorithm {
|
enum Algorithm {
|
||||||
LZO(TFile.COMPRESSION_LZO) {
|
LZO(TFile.COMPRESSION_LZO) {
|
||||||
private transient boolean checked = false;
|
private transient boolean checked = false;
|
||||||
private static final String defaultClazz =
|
private static final String defaultClazz =
|
||||||
|
@ -570,7 +570,7 @@ public static native long setFilePointer(FileDescriptor fd,
|
|||||||
private static native String getOwner(FileDescriptor fd) throws IOException;
|
private static native String getOwner(FileDescriptor fd) throws IOException;
|
||||||
|
|
||||||
/** Supported list of Windows access right flags */
|
/** Supported list of Windows access right flags */
|
||||||
public static enum AccessRight {
|
public enum AccessRight {
|
||||||
ACCESS_READ (0x0001), // FILE_READ_DATA
|
ACCESS_READ (0x0001), // FILE_READ_DATA
|
||||||
ACCESS_WRITE (0x0002), // FILE_WRITE_DATA
|
ACCESS_WRITE (0x0002), // FILE_WRITE_DATA
|
||||||
ACCESS_EXECUTE (0x0020); // FILE_EXECUTE
|
ACCESS_EXECUTE (0x0020); // FILE_EXECUTE
|
||||||
|
@ -1552,7 +1552,7 @@ private synchronized void waitPending() throws InterruptedException {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public static enum AuthProtocol {
|
public enum AuthProtocol {
|
||||||
NONE(0),
|
NONE(0),
|
||||||
SASL(-33);
|
SASL(-33);
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public class SaslRpcServer {
|
|||||||
public static final String SASL_DEFAULT_REALM = "default";
|
public static final String SASL_DEFAULT_REALM = "default";
|
||||||
private static SaslServerFactory saslFactory;
|
private static SaslServerFactory saslFactory;
|
||||||
|
|
||||||
public static enum QualityOfProtection {
|
public enum QualityOfProtection {
|
||||||
AUTHENTICATION("auth"),
|
AUTHENTICATION("auth"),
|
||||||
INTEGRITY("auth-int"),
|
INTEGRITY("auth-int"),
|
||||||
PRIVACY("auth-conf");
|
PRIVACY("auth-conf");
|
||||||
@ -218,7 +218,7 @@ public static String[] splitKerberosName(String fullName) {
|
|||||||
|
|
||||||
/** Authentication method */
|
/** Authentication method */
|
||||||
@InterfaceStability.Evolving
|
@InterfaceStability.Evolving
|
||||||
public static enum AuthMethod {
|
public enum AuthMethod {
|
||||||
SIMPLE((byte) 80, ""),
|
SIMPLE((byte) 80, ""),
|
||||||
KERBEROS((byte) 81, "GSSAPI"),
|
KERBEROS((byte) 81, "GSSAPI"),
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -1510,7 +1510,7 @@ public static UserGroupInformation createRemoteUser(String user, AuthMethod auth
|
|||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
@InterfaceStability.Evolving
|
@InterfaceStability.Evolving
|
||||||
public static enum AuthenticationMethod {
|
public enum AuthenticationMethod {
|
||||||
// currently we support only one auth per method, but eventually a
|
// currently we support only one auth per method, but eventually a
|
||||||
// subtype is needed to differentiate, ex. if digest is token or ldap
|
// subtype is needed to differentiate, ex. if digest is token or ldap
|
||||||
SIMPLE(AuthMethod.SIMPLE,
|
SIMPLE(AuthMethod.SIMPLE,
|
||||||
|
@ -57,7 +57,7 @@ public class SSLFactory implements ConnectionConfigurator {
|
|||||||
static final Logger LOG = LoggerFactory.getLogger(SSLFactory.class);
|
static final Logger LOG = LoggerFactory.getLogger(SSLFactory.class);
|
||||||
|
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public static enum Mode { CLIENT, SERVER }
|
public enum Mode { CLIENT, SERVER }
|
||||||
|
|
||||||
public static final String SSL_CLIENT_CONF_KEY = "hadoop.ssl.client.conf";
|
public static final String SSL_CLIENT_CONF_KEY = "hadoop.ssl.client.conf";
|
||||||
public static final String SSL_CLIENT_CONF_DEFAULT = "ssl-client.xml";
|
public static final String SSL_CLIENT_CONF_DEFAULT = "ssl-client.xml";
|
||||||
|
@ -74,7 +74,7 @@ public abstract class DelegationTokenAuthenticator implements Authenticator {
|
|||||||
* DelegationToken operations.
|
* DelegationToken operations.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public static enum DelegationTokenOperation {
|
public enum DelegationTokenOperation {
|
||||||
GETDELEGATIONTOKEN(HTTP_GET, true),
|
GETDELEGATIONTOKEN(HTTP_GET, true),
|
||||||
RENEWDELEGATIONTOKEN(HTTP_PUT, true),
|
RENEWDELEGATIONTOKEN(HTTP_PUT, true),
|
||||||
CANCELDELEGATIONTOKEN(HTTP_PUT, false);
|
CANCELDELEGATIONTOKEN(HTTP_PUT, false);
|
||||||
|
@ -759,7 +759,7 @@ public static String createStartupShutdownMessage(String classname,
|
|||||||
* which can be represented by a 64-bit integer.
|
* which can be represented by a 64-bit integer.
|
||||||
* TraditionalBinaryPrefix symbol are case insensitive.
|
* TraditionalBinaryPrefix symbol are case insensitive.
|
||||||
*/
|
*/
|
||||||
public static enum TraditionalBinaryPrefix {
|
public enum TraditionalBinaryPrefix {
|
||||||
KILO(10),
|
KILO(10),
|
||||||
MEGA(KILO.bitShift + 10),
|
MEGA(KILO.bitShift + 10),
|
||||||
GIGA(MEGA.bitShift + 10),
|
GIGA(MEGA.bitShift + 10),
|
||||||
|
@ -216,7 +216,7 @@ public FileStatus containsPath(FileContext fc, String path,
|
|||||||
return containsPath(fc, new Path(path), dirList);
|
return containsPath(fc, new Path(path), dirList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum fileType {isDir, isFile, isSymlink};
|
public enum fileType {isDir, isFile, isSymlink};
|
||||||
|
|
||||||
public static void checkFileStatus(FileContext aFc, String path,
|
public static void checkFileStatus(FileContext aFc, String path,
|
||||||
fileType expectedType) throws IOException {
|
fileType expectedType) throws IOException {
|
||||||
|
@ -237,7 +237,7 @@ public FileStatus containsPath(FileSystem fSys, String path, FileStatus[] dirLis
|
|||||||
return containsPath(fSys, new Path(path), dirList);
|
return containsPath(fSys, new Path(path), dirList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum fileType {isDir, isFile, isSymlink};
|
public enum fileType {isDir, isFile, isSymlink};
|
||||||
public static void checkFileStatus(FileSystem aFs, String path,
|
public static void checkFileStatus(FileSystem aFs, String path,
|
||||||
fileType expectedType) throws IOException {
|
fileType expectedType) throws IOException {
|
||||||
FileStatus s = aFs.getFileStatus(new Path(path));
|
FileStatus s = aFs.getFileStatus(new Path(path));
|
||||||
|
@ -253,7 +253,7 @@ public void testSkipFully() throws IOException {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static enum NoEntry3Filter implements FilenameFilter {
|
private enum NoEntry3Filter implements FilenameFilter {
|
||||||
INSTANCE;
|
INSTANCE;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,7 +36,7 @@ class UnreliableImplementation implements UnreliableInterface {
|
|||||||
private String identifier;
|
private String identifier;
|
||||||
private TypeOfExceptionToFailWith exceptionToFailWith;
|
private TypeOfExceptionToFailWith exceptionToFailWith;
|
||||||
|
|
||||||
public static enum TypeOfExceptionToFailWith {
|
public enum TypeOfExceptionToFailWith {
|
||||||
UNRELIABLE_EXCEPTION,
|
UNRELIABLE_EXCEPTION,
|
||||||
STANDBY_EXCEPTION,
|
STANDBY_EXCEPTION,
|
||||||
IO_EXCEPTION,
|
IO_EXCEPTION,
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class KMS {
|
public class KMS {
|
||||||
|
|
||||||
public static enum KMSOp {
|
public enum KMSOp {
|
||||||
CREATE_KEY, DELETE_KEY, ROLL_NEW_VERSION, INVALIDATE_CACHE,
|
CREATE_KEY, DELETE_KEY, ROLL_NEW_VERSION, INVALIDATE_CACHE,
|
||||||
GET_KEYS, GET_KEYS_METADATA,
|
GET_KEYS, GET_KEYS_METADATA,
|
||||||
GET_KEY_VERSIONS, GET_METADATA, GET_KEY_VERSION, GET_CURRENT_KEY,
|
GET_KEY_VERSIONS, GET_METADATA, GET_KEY_VERSION, GET_CURRENT_KEY,
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
public interface MountInterface {
|
public interface MountInterface {
|
||||||
/** Mount procedures */
|
/** Mount procedures */
|
||||||
public static enum MNTPROC {
|
public enum MNTPROC {
|
||||||
// the order of the values below are significant.
|
// the order of the values below are significant.
|
||||||
NULL,
|
NULL,
|
||||||
MNT,
|
MNT,
|
||||||
|
@ -32,7 +32,7 @@ public class Nfs3Constant {
|
|||||||
public final static int VERSION = 3;
|
public final static int VERSION = 3;
|
||||||
|
|
||||||
// The procedures
|
// The procedures
|
||||||
public static enum NFSPROC3 {
|
public enum NFSPROC3 {
|
||||||
// the order of the values below are significant.
|
// the order of the values below are significant.
|
||||||
NULL,
|
NULL,
|
||||||
GETATTR,
|
GETATTR,
|
||||||
|
@ -41,7 +41,7 @@ public class SetAttr3 {
|
|||||||
private NfsTime mtime;
|
private NfsTime mtime;
|
||||||
private EnumSet<SetAttrField> updateFields;
|
private EnumSet<SetAttrField> updateFields;
|
||||||
|
|
||||||
public static enum SetAttrField {
|
public enum SetAttrField {
|
||||||
MODE, UID, GID, SIZE, ATIME, MTIME
|
MODE, UID, GID, SIZE, ATIME, MTIME
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
public abstract class RpcMessage {
|
public abstract class RpcMessage {
|
||||||
/** Message type */
|
/** Message type */
|
||||||
public static enum Type {
|
public enum Type {
|
||||||
// the order of the values below are significant.
|
// the order of the values below are significant.
|
||||||
RPC_CALL,
|
RPC_CALL,
|
||||||
RPC_REPLY;
|
RPC_REPLY;
|
||||||
|
Loading…
Reference in New Issue
Block a user