diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java index 5c9f925bb4bab..c696db2507c0e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java @@ -1259,7 +1259,7 @@ public void testBalancerDispatchHotBlockTimeInterval() { Field field1 = dispatcher.getClass().getDeclaredField("hotBlockTimeInterval"); field1.setAccessible(true); Object hotBlockTimeInterval = field1.get(dispatcher); - assertEquals(1000, Long.parseLong(String.valueOf(hotBlockTimeInterval))); + assertEquals(1000, (long)hotBlockTimeInterval); } catch (Exception e) { Assert.fail(e.getMessage()); }