jiwq commented on a change in pull request #692: HADOOP-16222. Fix new 
deprecations after guava 27.0 update in trunk
URL: https://github.com/apache/hadoop/pull/692#discussion_r272266136
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java
 ##########
 @@ -208,16 +208,16 @@ public void testFencer() throws Exception {
     assertEquals(0, runTool("-ns", "minidfs-ns", "-failover", "nn2", "nn1"));
 
     // Fencer has not run yet, since none of the above required fencing 
-    assertEquals("", Files.toString(tmpFile, Charsets.UTF_8));
+    assertEquals("", Files.asCharSource(tmpFile, Charsets.UTF_8).read());
 
     // Test failover with fencer and forcefence option
     assertEquals(0, runTool("-failover", "nn1", "nn2", "--forcefence"));
     
     // The fence script should run with the configuration from the target
     // node, rather than the configuration from the fencing node. Strip
     // out any trailing spaces and CR/LFs which may be present on Windows.
-    String fenceCommandOutput =Files.toString(tmpFile, Charsets.UTF_8).
-            replaceAll(" *[\r\n]+", "");
+    String fenceCommandOutput = Files.asCharSource(tmpFile, Charsets.UTF_8).
+        read().replaceAll(" *[\r\n]+", "");
 
 Review comment:
   In chained method calls, if we need wrap it, I think the dot operator and 
method is best in the same line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to