[jira] [Commented] (HDFS-7675) Unused member DFSClient.spanReceiverHost

2015-01-27 Thread Colin Patrick McCabe (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294005#comment-14294005
 ] 

Colin Patrick McCabe commented on HDFS-7675:


Currently, we don't reference count our {{SpanReceivers}}.  So if a single 
{{DFSClient}} exited and called {{closeReceivers}}, it could close things that 
other {{DFSClients}} were using.

I would be a fine with a patch adding reference counts to each {{SpanReceiver}} 
here.  I don't think it will be that useful to many HDFS clients (maybe no 
production ones?), but it's more satisfying to have us close things when the 
{{DFSClient}} is closed.

 Unused member DFSClient.spanReceiverHost
 

 Key: HDFS-7675
 URL: https://issues.apache.org/jira/browse/HDFS-7675
 Project: Hadoop HDFS
  Issue Type: Bug
  Components: dfsclient
Affects Versions: 3.0.0
Reporter: Konstantin Shvachko

 DFSClient.spanReceiverHost is initialised but never used. Could be redundant.
 This was introduced by HDFS-7055.



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


[jira] [Commented] (HDFS-7675) Unused member DFSClient.spanReceiverHost

2015-01-27 Thread Konstantin Shvachko (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14293195#comment-14293195
 ] 

Konstantin Shvachko commented on HDFS-7675:
---

Thanks for clarifying. I see it as a compile warning, which indicates something 
is wrong. If the reference is not used there is no reason to keep it in the 
class. In this case would it be logical to {{closeReceivers()}} when DFSClient 
is closing?

 Unused member DFSClient.spanReceiverHost
 

 Key: HDFS-7675
 URL: https://issues.apache.org/jira/browse/HDFS-7675
 Project: Hadoop HDFS
  Issue Type: Bug
  Components: dfsclient
Affects Versions: 3.0.0
Reporter: Konstantin Shvachko

 DFSClient.spanReceiverHost is initialised but never used. Could be redundant.
 This was introduced by HDFS-7055.



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


[jira] [Commented] (HDFS-7675) Unused member DFSClient.spanReceiverHost

2015-01-27 Thread Konstantin Shvachko (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294231#comment-14294231
 ] 

Konstantin Shvachko commented on HDFS-7675:
---

Sounds like you don't need the reference to {{SpanReceiverHost}} in 
{{DFSClient}}, but you still need to initializes 
{{SpanReceiverHost#SingletonHolder#INSTANCE}}. May be a static method, which 
initializes the INSTANCE directly, can be introduced rather than using 
{{getInstance()}} for {{DFSClient}}?

 Unused member DFSClient.spanReceiverHost
 

 Key: HDFS-7675
 URL: https://issues.apache.org/jira/browse/HDFS-7675
 Project: Hadoop HDFS
  Issue Type: Bug
  Components: dfsclient
Affects Versions: 3.0.0
Reporter: Konstantin Shvachko

 DFSClient.spanReceiverHost is initialised but never used. Could be redundant.
 This was introduced by HDFS-7055.



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


[jira] [Commented] (HDFS-7675) Unused member DFSClient.spanReceiverHost

2015-01-27 Thread Colin Patrick McCabe (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294269#comment-14294269
 ] 

Colin Patrick McCabe commented on HDFS-7675:


I don't see a good reason to use a static method here.  That would potentially 
create race conditions where we'd try to initialize the {{SpanReceiverHost}} 
before some other stuff was ready.  If you really want to clean up the compiler 
error, just keep the function call but don't store the result.

 Unused member DFSClient.spanReceiverHost
 

 Key: HDFS-7675
 URL: https://issues.apache.org/jira/browse/HDFS-7675
 Project: Hadoop HDFS
  Issue Type: Bug
  Components: dfsclient
Affects Versions: 3.0.0
Reporter: Konstantin Shvachko

 DFSClient.spanReceiverHost is initialised but never used. Could be redundant.
 This was introduced by HDFS-7055.



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


[jira] [Commented] (HDFS-7675) Unused member DFSClient.spanReceiverHost

2015-01-27 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294534#comment-14294534
 ] 

Yi Liu commented on HDFS-7675:
--

+1, Thanks Colin

 Unused member DFSClient.spanReceiverHost
 

 Key: HDFS-7675
 URL: https://issues.apache.org/jira/browse/HDFS-7675
 Project: Hadoop HDFS
  Issue Type: Bug
  Components: dfsclient
Affects Versions: 3.0.0
Reporter: Konstantin Shvachko
 Attachments: HDFS-7675.001.patch


 DFSClient.spanReceiverHost is initialised but never used. Could be redundant.
 This was introduced by HDFS-7055.



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


[jira] [Commented] (HDFS-7675) Unused member DFSClient.spanReceiverHost

2015-01-27 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294699#comment-14294699
 ] 

Hadoop QA commented on HDFS-7675:
-

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12694895/HDFS-7675.001.patch
  against trunk revision ee1e06a.

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-hdfs-project/hadoop-hdfs.

Test results: 
https://builds.apache.org/job/PreCommit-HDFS-Build/9354//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9354//console

This message is automatically generated.

 Unused member DFSClient.spanReceiverHost
 

 Key: HDFS-7675
 URL: https://issues.apache.org/jira/browse/HDFS-7675
 Project: Hadoop HDFS
  Issue Type: Bug
  Components: dfsclient
Affects Versions: 3.0.0
Reporter: Konstantin Shvachko
Assignee: Colin Patrick McCabe
Priority: Trivial
 Attachments: HDFS-7675.001.patch


 {{DFSClient#spanReceiverHost}} is initialised but never used.



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


[jira] [Commented] (HDFS-7675) Unused member DFSClient.spanReceiverHost

2015-01-26 Thread Colin Patrick McCabe (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14292308#comment-14292308
 ] 

Colin Patrick McCabe commented on HDFS-7675:


It's not redundant.  Calling {{SpanReceiverHost#getInstance}} initializes 
{{SpanReceiverHost#SingletonHolder#INSTANCE}}, which is needed for tracing to 
operate.  This code was taken from HBase, which has a similar construct for 
tracing.

I agree that we could probably skip storing the {{SpanReceiverHost}} inside 
{{DFSClient}}, as long as there was a comment about why we were calling 
{{getInstance}}.

 Unused member DFSClient.spanReceiverHost
 

 Key: HDFS-7675
 URL: https://issues.apache.org/jira/browse/HDFS-7675
 Project: Hadoop HDFS
  Issue Type: Bug
  Components: dfsclient
Affects Versions: 3.0.0
Reporter: Konstantin Shvachko

 DFSClient.spanReceiverHost is initialised but never used. Could be redundant.
 This was introduced by HDFS-7055.



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