[ 
https://issues.apache.org/jira/browse/HDFS-8990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14720793#comment-14720793
 ] 

Haohui Mai commented on HDFS-8990:
----------------------------------

{code}
   public int available() throws IOException {
     // An optimistic estimate of how much data is available
     // to us without doing network I/O.
-    return DFSClient.TCP_WINDOW_SIZE;
+    return HdfsClientConfigKeys.DFS_CLIENT_CACHED_CONN_RETRY_DEFAULT;
   }
{code}

This is the wrong constant.

{code}
--- 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
@@ -46,6 +46,7 @@
   int DFS_NAMENODE_RPC_PORT_DEFAULT = 8020;
   String DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY =
       "dfs.namenode.kerberos.principal";
+  int DFS_CLIENT_TCP_WINDOW_SIZE = 128 * 1024; // 128 KB
   String  DFS_CLIENT_WRITE_PACKET_SIZE_KEY = "dfs.client-write-packet-size";
   int     DFS_CLIENT_WRITE_PACKET_SIZE_DEFAULT = 64*1024;
   String  DFS_CLIENT_SOCKET_TIMEOUT_KEY = "dfs.client.socket-timeout";
{coe}

{{TCP_WINDOW_SIZE}} is a constant that is only used by the 
{{RemoteBlockReader}} / {{RemoteBlockReader2}}. Let's put it into 
{{RemoteBlockBlockReader2}} instead.

> Move RemoteBlockReader to hdfs-client module
> --------------------------------------------
>
>                 Key: HDFS-8990
>                 URL: https://issues.apache.org/jira/browse/HDFS-8990
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: build
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>         Attachments: HDFS-8990.000.patch
>
>
> This jira tracks the effort of moving the {{RemoteBlockReader}} class into 
> the {{hdfs-client}} module. {{BlockReader}} interface and 
> {{BlockReaderLocal}} class were moved to {{hadoop-hdfs-client}} module in 
> jira [HDFS-8925|https://issues.apache.org/jira/browse/HDFS-8925].
> The extant checkstyle warnings can be fixed in 
> [HDFS-8979|https://issues.apache.org/jira/browse/HDFS-8979]. While we need to 
> replace the _log4j_ with _slf4j_ in this patch, we track the effort of 
> removing the guards when calling LOG.debug() and LOG.trace() in jira 
> [HDFS-8971|https://issues.apache.org/jira/browse/HDFS-8971].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to