diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackAware.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackAware.java index 3758b85888..ffebb84c4a 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackAware.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackAware.java @@ -51,8 +51,8 @@ public final class SCMContainerPlacementRackAware extends SCMCommonPolicy { LoggerFactory.getLogger(SCMContainerPlacementRackAware.class); private final NetworkTopology networkTopology; private boolean fallback; - private int RACK_LEVEL = 1; - private int MAX_RETRY= 3; + private static final int RACK_LEVEL = 1; + private static final int MAX_RETRY= 3; /** * Constructs a Container Placement with rack awareness. diff --git a/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackAware.java b/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackAware.java index d80c7e5316..732178e499 100644 --- a/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackAware.java +++ b/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackAware.java @@ -53,7 +53,7 @@ public class TestSCMContainerPlacementRackAware { // policy prohibit fallback private SCMContainerPlacementRackAware policyNoFallback; // node storage capacity - private final long STORAGE_CAPACITY = 100L; + private static final long STORAGE_CAPACITY = 100L; @Before public void setup() {