HDFS-11901. Modifier 'static' is redundant for inner enums. Contributed by ZhangBing Lin.
This commit is contained in:
parent
547f18cb96
commit
13de636b40
|
@ -139,7 +139,7 @@ public class HttpFSFileSystem extends FileSystem
|
|||
|
||||
public static final String UPLOAD_CONTENT_TYPE= "application/octet-stream";
|
||||
|
||||
public static enum FILE_TYPE {
|
||||
public enum FILE_TYPE {
|
||||
FILE, DIRECTORY, SYMLINK;
|
||||
|
||||
public static FILE_TYPE getType(FileStatus fileStatus) {
|
||||
|
@ -210,7 +210,7 @@ public class HttpFSFileSystem extends FileSystem
|
|||
private static final String HTTP_DELETE = "DELETE";
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public static enum Operation {
|
||||
public enum Operation {
|
||||
OPEN(HTTP_GET), GETFILESTATUS(HTTP_GET), LISTSTATUS(HTTP_GET),
|
||||
GETHOMEDIRECTORY(HTTP_GET), GETCONTENTSUMMARY(HTTP_GET),
|
||||
GETFILECHECKSUM(HTTP_GET), GETFILEBLOCKLOCATIONS(HTTP_GET),
|
||||
|
|
|
@ -101,7 +101,7 @@ public class Server {
|
|||
* Enumeration that defines the server status.
|
||||
*/
|
||||
@InterfaceAudience.Private
|
||||
public static enum Status {
|
||||
public enum Status {
|
||||
UNDEF(false, false),
|
||||
BOOTING(false, true),
|
||||
HALTED(true, true),
|
||||
|
|
|
@ -31,7 +31,7 @@ public class ServerException extends XException {
|
|||
* Error codes use by the {@link Server} class.
|
||||
*/
|
||||
@InterfaceAudience.Private
|
||||
public static enum ERROR implements XException.ERROR {
|
||||
public enum ERROR implements XException.ERROR {
|
||||
S01("Dir [{0}] does not exist"),
|
||||
S02("[{0}] is not a directory"),
|
||||
S03("Could not load file from classpath [{0}], {1}"),
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.junit.Test;
|
|||
|
||||
public class TestXException extends HTestCase {
|
||||
|
||||
public static enum TestERROR implements XException.ERROR {
|
||||
public enum TestERROR implements XException.ERROR {
|
||||
TC;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -100,7 +100,7 @@ public class TestParam {
|
|||
test(param, "L", "a long", 1L, 2L, "x", null);
|
||||
}
|
||||
|
||||
public static enum ENUM {
|
||||
public enum ENUM {
|
||||
FOO, BAR
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class OpenFileCtx {
|
|||
// Pending writes water mark for dump, 1MB
|
||||
private static long DUMP_WRITE_WATER_MARK = 1024 * 1024;
|
||||
|
||||
static enum COMMIT_STATUS {
|
||||
enum COMMIT_STATUS {
|
||||
COMMIT_FINISHED,
|
||||
COMMIT_WAIT,
|
||||
COMMIT_INACTIVE_CTX,
|
||||
|
|
|
@ -44,7 +44,7 @@ class WriteCtx {
|
|||
* wait for prerequisite writes. NO_DUMP: sequential write, no need to dump
|
||||
* since it will be written to HDFS soon. DUMPED: already dumped to a file.
|
||||
*/
|
||||
public static enum DataState {
|
||||
public enum DataState {
|
||||
ALLOW_DUMP,
|
||||
NO_DUMP,
|
||||
DUMPED
|
||||
|
|
|
@ -74,7 +74,7 @@ public class LayoutVersion {
|
|||
* </li>
|
||||
* </ul>
|
||||
*/
|
||||
public static enum Feature implements LayoutFeature {
|
||||
public enum Feature implements LayoutFeature {
|
||||
NAMESPACE_QUOTA(-16, "Support for namespace quotas"),
|
||||
FILE_ACCESS_TIME(-17, "Support for access time on files"),
|
||||
DISKSPACE_QUOTA(-18, "Support for disk space quotas"),
|
||||
|
|
|
@ -46,7 +46,7 @@ import com.google.common.annotations.VisibleForTesting;
|
|||
public class CorruptReplicasMap{
|
||||
|
||||
/** The corruption reason code */
|
||||
public static enum Reason {
|
||||
public enum Reason {
|
||||
NONE, // not specified.
|
||||
ANY, // wildcard reason
|
||||
GENSTAMP_MISMATCH, // mismatch in generation stamps
|
||||
|
|
|
@ -398,7 +398,7 @@ public class DatanodeStorageInfo {
|
|||
this.remaining = remaining;
|
||||
}
|
||||
|
||||
static enum AddBlockResult {
|
||||
enum AddBlockResult {
|
||||
ADDED, REPLACED, ALREADY_EXIST
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class BPServiceActor implements Runnable {
|
|||
Thread bpThread;
|
||||
DatanodeProtocolClientSideTranslatorPB bpNamenode;
|
||||
|
||||
static enum RunningState {
|
||||
enum RunningState {
|
||||
CONNECTING, INIT_FAILED, RUNNING, EXITED, FAILED;
|
||||
}
|
||||
|
||||
|
|
|
@ -1185,7 +1185,7 @@ class BlockReceiver implements Closeable {
|
|||
return handler;
|
||||
}
|
||||
|
||||
private static enum PacketResponderType {
|
||||
private enum PacketResponderType {
|
||||
NON_PIPELINE, LAST_IN_PIPELINE, HAS_DOWNSTREAM_IN_PIPELINE
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public class DataNodeLayoutVersion {
|
|||
* </li>
|
||||
* </ul>
|
||||
*/
|
||||
public static enum Feature implements LayoutFeature {
|
||||
public enum Feature implements LayoutFeature {
|
||||
FIRST_LAYOUT(-55, -53, "First datanode layout", false),
|
||||
BLOCKID_BASED_LAYOUT(-56,
|
||||
"The block ID of a finalized block uniquely determines its position " +
|
||||
|
|
|
@ -55,7 +55,7 @@ public class BackupImage extends FSImage {
|
|||
* stopApplyingOnNextRoll is true.
|
||||
*/
|
||||
volatile BNState bnState;
|
||||
static enum BNState {
|
||||
enum BNState {
|
||||
/**
|
||||
* Edits from the NN should be dropped. On the next log roll,
|
||||
* transition to JOURNAL_ONLY state
|
||||
|
|
|
@ -63,7 +63,7 @@ public enum Content {
|
|||
public static class CountsMap
|
||||
extends EnumCounters.Map<CountsMap.Key, Content, Counts> {
|
||||
/** The key type of the map. */
|
||||
public static enum Key { CURRENT, SNAPSHOT }
|
||||
public enum Key { CURRENT, SNAPSHOT }
|
||||
|
||||
CountsMap() {
|
||||
super(FACTORY);
|
||||
|
|
|
@ -33,7 +33,7 @@ import com.google.common.base.Preconditions;
|
|||
@InterfaceAudience.Private
|
||||
public abstract class INodeWithAdditionalFields extends INode
|
||||
implements LinkedElement {
|
||||
static enum PermissionStatusFormat {
|
||||
enum PermissionStatusFormat {
|
||||
MODE(null, 16),
|
||||
GROUP(MODE.BITS, 25),
|
||||
USER(GROUP.BITS, 23);
|
||||
|
|
|
@ -209,7 +209,7 @@ public class NameNode extends ReconfigurableBase implements
|
|||
/**
|
||||
* Categories of operations supported by the namenode.
|
||||
*/
|
||||
public static enum OperationCategory {
|
||||
public enum OperationCategory {
|
||||
/** Operations that are state agnostic */
|
||||
UNCHECKED,
|
||||
/** Read operation that does not change the namespace state */
|
||||
|
|
|
@ -77,7 +77,7 @@ public class NameNodeLayoutVersion {
|
|||
* support downgrade.
|
||||
* </ul>
|
||||
*/
|
||||
public static enum Feature implements LayoutFeature {
|
||||
public enum Feature implements LayoutFeature {
|
||||
ROLLING_UPGRADE(-55, -53, -55, "Support rolling upgrade", false),
|
||||
EDITLOG_LENGTH(-56, -56, "Add length field to every edit log op"),
|
||||
XATTRS(-57, -57, "Extended attributes"),
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ReceivedDeletedBlockInfo {
|
|||
BlockStatus status;
|
||||
String delHints;
|
||||
|
||||
public static enum BlockStatus {
|
||||
public enum BlockStatus {
|
||||
RECEIVING_BLOCK(1),
|
||||
RECEIVED_BLOCK(2),
|
||||
DELETED_BLOCK(3);
|
||||
|
|
|
@ -61,7 +61,7 @@ class OfflineEditsXmlLoader
|
|||
private long nextTxId;
|
||||
private final OpInstanceCache opCache = new OpInstanceCache();
|
||||
|
||||
static enum ParseState {
|
||||
enum ParseState {
|
||||
EXPECT_EDITS_TAG,
|
||||
EXPECT_VERSION,
|
||||
EXPECT_RECORD,
|
||||
|
|
|
@ -73,7 +73,7 @@ import com.google.common.base.Preconditions;
|
|||
* @param <E> The element type, which must implement {@link Element} interface.
|
||||
*/
|
||||
public class Diff<K, E extends Diff.Element<K>> {
|
||||
public static enum ListType {
|
||||
public enum ListType {
|
||||
CREATED, DELETED
|
||||
}
|
||||
|
||||
|
|
|
@ -1123,7 +1123,7 @@ public class TestFileCreation {
|
|||
doCreateTest(CreationMethod.PATH_FROM_URI);
|
||||
}
|
||||
|
||||
private static enum CreationMethod {
|
||||
private enum CreationMethod {
|
||||
DIRECT_NN_RPC,
|
||||
PATH_FROM_URI,
|
||||
PATH_FROM_STRING
|
||||
|
|
|
@ -82,7 +82,7 @@ public class TestFailureToReadEdits {
|
|||
private NameNode nn1;
|
||||
private FileSystem fs;
|
||||
|
||||
private static enum TestType {
|
||||
private enum TestType {
|
||||
SHARED_DIR_HA,
|
||||
QJM_HA;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue