You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2011/01/10 21:26:47 UTC
[jira] Created: (HDFS-1573) LeaseChecker thread name trace not that
useful
LeaseChecker thread name trace not that useful
----------------------------------------------
Key: HDFS-1573
URL: https://issues.apache.org/jira/browse/HDFS-1573
Project: Hadoop HDFS
Issue Type: Improvement
Components: hdfs client
Affects Versions: 0.23.0
Reporter: Todd Lipcon
Assignee: Todd Lipcon
Priority: Trivial
Fix For: 0.23.0
The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HDFS-1573:
------------------------------
Attachment: hdfs-1573.txt
Updated patch with no random UTF-8 characters
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033828#comment-13033828 ]
Todd Lipcon commented on HDFS-1573:
-----------------------------------
The empty exception gets its stack trace filled in when it's instantiated. Then when we print it out later, we can see the call stack that caused the thread to get started - useful if trying to track down a leak.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033827#comment-13033827 ]
Eli Collins commented on HDFS-1573:
-----------------------------------
Why use an empty exception to record the time the renewal thread was started instead of a timestamp? Otherwise the patch looks great.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HDFS-1573:
------------------------------
Attachment: hdfs-1573.txt
Woops, bad Eclipse! Fixed to junit 4 Assert class.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035026#comment-13035026 ]
Todd Lipcon commented on HDFS-1573:
-----------------------------------
The failing tests are intermittent and/or known to be failing (reopened HDFS-1828 for the TestBlocksWithNotEnoughRacks failure)
I'll commit this momentarily
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992934#comment-12992934 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
Is this already fixed by now?
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Fix For: 0.23.0
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HDFS-1573:
------------------------------
Status: Patch Available (was: Open)
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033464#comment-13033464 ]
Todd Lipcon commented on HDFS-1573:
-----------------------------------
LeaseChecker is now called LeaseRenewer, but now the thread name is even less descriptive. It should contain the client name, the NN, and the UGI.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037377#comment-13037377 ]
Hudson commented on HDFS-1573:
------------------------------
Integrated in Hadoop-Hdfs-trunk #673 (See [https://builds.apache.org/hudson/job/Hadoop-Hdfs-trunk/673/])
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034371#comment-13034371 ]
Todd Lipcon commented on HDFS-1573:
-----------------------------------
bq. Is the annotation currently used in our test framework? There are various annotation packages. Why choose Guava?
Guava was already included in Hadoop Common since HADOOP-6919. I opened a thread on the mailing list a couple months ago and received several +1s to the effect that it's a useful dependency. Keep in mind that Guava provides a lot of useful stuff - @VisibleForTesting is just one little thing in there.
We don't currently do anything useful with the annotation, but it's at least as good as a comment that says /** Visible for testing */ - but better since down the road we could use it to exclude JavaDoc generation, for example. If you're strongly against it, happy to remove.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HDFS-1573:
------------------------------
Attachment: hdfs-1573.txt
This patch addresses Nicholas's latest comments.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034597#comment-13034597 ]
Hadoop QA commented on HDFS-1573:
---------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12479402/hdfs-1573.txt
against trunk revision 1103987.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 2 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
-1 core tests. The patch failed these core unit tests:
org.apache.hadoop.hdfs.server.namenode.TestBlocksWithNotEnoughRacks
org.apache.hadoop.hdfs.TestDFSStorageStateRecovery
org.apache.hadoop.hdfs.TestFileConcurrentReader
org.apache.hadoop.tools.TestJMXGet
+1 contrib tests. The patch passed contrib unit tests.
+1 system test framework. The patch passed system test framework compile.
Test results: https://builds.apache.org/hudson/job/PreCommit-HDFS-Build/537//testReport/
Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HDFS-Build/537//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/hudson/job/PreCommit-HDFS-Build/537//console
This message is automatically generated.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eli Collins updated HDFS-1573:
------------------------------
Hadoop Flags: [Reviewed]
Status: Patch Available (was: Open)
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993105#comment-12993105 ]
Todd Lipcon commented on HDFS-1573:
-----------------------------------
I don't think so. I had a patch around somewhere, I'll see if I can find it and upload it (apparently forgot to when I made the JIRA)
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Fix For: 0.23.0
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034123#comment-13034123 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
- Why using {{com.google.common.annotations.VisibleForTesting}}?
- There are some not standard charcters
{code}
- return s + ", clients=" + clientsString() + ", "
- + StringUtils.stringifyException(new Throwable("for testing"));
+ return s + ", clients=" + clientsString()
+ + ", Ñreated at " +
+ StringUtils.stringifyException(instantiationTrace);
{code}
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033835#comment-13033835 ]
Eli Collins commented on HDFS-1573:
-----------------------------------
Makes sense, thanks.
+1
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eli Collins updated HDFS-1573:
------------------------------
Status: Open (was: Patch Available)
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034126#comment-13034126 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
{code}
+ int getHdfsTimeout() {
+ return hdfsTimeout;
+ }
+
+ String getClientName() {
+ return clientName;
+ }
{code}
{{hdfsTimeout}} and {{clientName}} are final constants. So these two methods are not needed.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HDFS-1573:
------------------------------
Attachment: hdfs-1573.txt
Added some unit tests for LeaseRenewer, and fixed up the thread name.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034418#comment-13034418 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
+1
Thanks Todd.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HDFS-1573:
------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Committed to trunk. Thanks for the reviews, Nicholas!
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035033#comment-13035033 ]
Hudson commented on HDFS-1573:
------------------------------
Integrated in Hadoop-Hdfs-trunk-Commit #662 (See [https://builds.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/662/])
HDFS-1573. Add useful tracing information to Lease Renewer thread names. Contributed by Todd Lipcon.
todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1104526
Files :
* /hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/TestLeaseRenewer.java
* /hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/LeaseRenewer.java
* /hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/DFSClient.java
* /hadoop/hdfs/trunk/CHANGES.txt
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034388#comment-13034388 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
> ... If you're strongly against it, happy to remove.
Since {{@VisibleForTesting}} is not yet used in our test framework, I think it is rather confusing to use it here. Please remove it. We could add such annotations when we are actually using them.
- For the {{getDaemon()}} method, how about change it to {{getDaemonName()}} which returns a string?
- For {{instantiationTrace}}, it is better to create it using {{new Throwable("TRACE")}} and store it as a string.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034161#comment-13034161 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
> Since we have Guava around now, why not? It's a nice annotation to say that the function is only meant to be used by test code.
Is the annotation currently used in our test framework? There are various annotation packages. Why choose Guava?
I like the idea on adding annotations if we are actually using them. Otherwise, they are just some unused codes.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034162#comment-13034162 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
> Those are needed so that DFSClient can be mocked in the unit tests. ...
This is a good point. Thanks, Todd.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034136#comment-13034136 ]
Todd Lipcon commented on HDFS-1573:
-----------------------------------
Woops, not sure how that Cyrillic 'с' got in there instead of a Latin 'c' (they look the same in most fonts).
bq. Why using com.google.common.annotations.VisibleForTesting?
Since we have Guava around now, why not? It's a nice annotation to say that the function is only meant to be used by test code.
bq. hdfsTimeout and clientName are final constants. So these two methods are not needed
Those are needed so that DFSClient can be mocked in the unit tests. It's not possible to stub a field, so we need it to be accessed through an accessor. I can mark these as @VisibleForTesting as well?
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-1573) LeaseChecker thread name trace not
that useful
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034412#comment-13034412 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1573:
----------------------------------------------
We should use junit 4.
{code}
+import junit.framework.Assert;
{code}
Otherwise, patch looks good.
> LeaseChecker thread name trace not that useful
> ----------------------------------------------
>
> Key: HDFS-1573
> URL: https://issues.apache.org/jira/browse/HDFS-1573
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs client
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Trivial
> Labels: newbie
> Fix For: 0.23.0
>
> Attachments: hdfs-1573.txt, hdfs-1573.txt, hdfs-1573.txt
>
>
> The LeaseChecker thread in DFSClient will put a stack trace in its thread name, theoretically to help debug cases where these threads get leaked. However it just shows the stack trace of whoever is asking for the thread's name, not the stack trace of when the thread was allocated. I'd like to fix this so that you can see where the thread got started, which was presumably its original intent.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira