steveloughran 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_r272591322
##########
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:
+1: dot at the start. (note: on scala you should put it at the end so it
doesn't think the line ends early, but this is .java here)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]