HDFS-11901. Modifier 'static' is redundant for inner enums. Contributed by ZhangBing Lin.

This commit is contained in:
Brahma Reddy Battula 2017-05-31 23:09:08 +08:00
parent 547f18cb96
commit 13de636b40
23 changed files with 24 additions and 24 deletions

View File

@ -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 static FILE_TYPE getType(FileStatus fileStatus) {
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),

View File

@ -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),

View File

@ -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}"),

View File

@ -27,7 +27,7 @@
public class TestXException extends HTestCase {
public static enum TestERROR implements XException.ERROR {
public enum TestERROR implements XException.ERROR {
TC;
@Override

View File

@ -100,7 +100,7 @@ public void testLong() throws Exception {
test(param, "L", "a long", 1L, 2L, "x", null);
}
public static enum ENUM {
public enum ENUM {
FOO, BAR
}

View File

@ -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,

View File

@ -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

View File

@ -74,7 +74,7 @@ public interface LayoutFeature {
* </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"),

View File

@ -46,7 +46,7 @@
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

View File

@ -398,7 +398,7 @@ void setRemainingForTests(int remaining) {
this.remaining = remaining;
}
static enum AddBlockResult {
enum AddBlockResult {
ADDED, REPLACED, ALREADY_EXIST
}
}

View File

@ -96,7 +96,7 @@ class BPServiceActor implements Runnable {
Thread bpThread;
DatanodeProtocolClientSideTranslatorPB bpNamenode;
static enum RunningState {
enum RunningState {
CONNECTING, INIT_FAILED, RUNNING, EXITED, FAILED;
}

View File

@ -1185,7 +1185,7 @@ private ReplicaHandler claimReplicaHandler() {
return handler;
}
private static enum PacketResponderType {
private enum PacketResponderType {
NON_PIPELINE, LAST_IN_PIPELINE, HAS_DOWNSTREAM_IN_PIPELINE
}

View File

@ -61,7 +61,7 @@ public static boolean supports(final LayoutFeature f, final int lv) {
* </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 " +

View File

@ -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

View File

@ -63,7 +63,7 @@ public Counts newInstance() {
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);

View File

@ -33,7 +33,7 @@
@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);

View File

@ -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 */

View File

@ -77,7 +77,7 @@ public static boolean supports(final LayoutFeature f, final int lv) {
* 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"),

View File

@ -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);

View File

@ -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,

View File

@ -73,7 +73,7 @@
* @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
}

View File

@ -1123,7 +1123,7 @@ public void testCreateNonCanonicalPathAndRestartFromUri()
doCreateTest(CreationMethod.PATH_FROM_URI);
}
private static enum CreationMethod {
private enum CreationMethod {
DIRECT_NN_RPC,
PATH_FROM_URI,
PATH_FROM_STRING

View File

@ -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;
};