|
20 | 20 | import static org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status.SUCCESS; |
21 | 21 |
|
22 | 22 | import java.io.BufferedOutputStream; |
23 | | -import java.io.Closeable; |
24 | 23 | import java.io.DataInputStream; |
25 | 24 | import java.io.DataOutputStream; |
26 | 25 | import java.io.IOException; |
|
30 | 29 | import java.net.InetAddress; |
31 | 30 | import java.net.InetSocketAddress; |
32 | 31 | import java.net.Socket; |
33 | | -import java.net.UnknownHostException; |
34 | 32 | import java.nio.channels.ClosedChannelException; |
35 | 33 | import java.util.ArrayList; |
36 | 34 | import java.util.Arrays; |
@@ -154,7 +152,7 @@ void recordFailure(final InvalidEncryptionKeyException e) |
154 | 152 | } |
155 | 153 | } |
156 | 154 |
|
157 | | - private class StreamerStreams implements Closeable { |
| 155 | + private class StreamerStreams implements java.io.Closeable { |
158 | 156 | private Socket sock = null; |
159 | 157 | private DataOutputStream out = null; |
160 | 158 | private DataInputStream in = null; |
@@ -575,17 +573,17 @@ private DataStreamer(HdfsFileStatus stat, ExtendedBlock block, |
575 | 573 | if (congestionBackOffMeanTimeInMs <= 0 || congestionBackOffMaxTimeInMs <= 0 || |
576 | 574 | congestionBackOffMaxTimeInMs < congestionBackOffMeanTimeInMs) { |
577 | 575 | if (congestionBackOffMeanTimeInMs <= 0) { |
578 | | - LOG.warn("Configuration: {} is not appropriate, use default value: {}", |
| 576 | + LOG.warn("Configuration: {} is not appropriate, using default value: {}", |
579 | 577 | HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MEAN_TIME, |
580 | 578 | HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MEAN_TIME_DEFAULT); |
581 | 579 | } |
582 | 580 | if (congestionBackOffMaxTimeInMs <= 0) { |
583 | | - LOG.warn("Configuration: {} is not appropriate, use default value: {}", |
| 581 | + LOG.warn("Configuration: {} is not appropriate, using default value: {}", |
584 | 582 | HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MAX_TIME, |
585 | 583 | HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MAX_TIME_DEFAULT); |
586 | 584 | } |
587 | 585 | if (congestionBackOffMaxTimeInMs < congestionBackOffMeanTimeInMs) { |
588 | | - LOG.warn("Configuration: {} can not less than {}, use their default values.", |
| 586 | + LOG.warn("Configuration: {} can not less than {}, using their default values.", |
589 | 587 | HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MAX_TIME, |
590 | 588 | HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MEAN_TIME); |
591 | 589 | } |
@@ -1143,7 +1141,7 @@ boolean shouldWaitForRestart(int index) { |
1143 | 1141 | InetAddress addr = null; |
1144 | 1142 | try { |
1145 | 1143 | addr = InetAddress.getByName(nodes[index].getIpAddr()); |
1146 | | - } catch (UnknownHostException e) { |
| 1144 | + } catch (java.net.UnknownHostException e) { |
1147 | 1145 | // we are passing an ip address. this should not happen. |
1148 | 1146 | assert false; |
1149 | 1147 | } |
|
0 commit comments