You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Daniel Templeton (JIRA)" <ji...@apache.org> on 2017/08/30 22:06:01 UTC
[jira] [Created] (YARN-7135) Clean up lock-try order in common
scheduler code
Daniel Templeton created YARN-7135:
--------------------------------------
Summary: Clean up lock-try order in common scheduler code
Key: YARN-7135
URL: https://issues.apache.org/jira/browse/YARN-7135
Project: Hadoop YARN
Issue Type: Improvement
Components: scheduler
Affects Versions: 3.0.0-alpha4
Reporter: Daniel Templeton
There are many places that follow the pattern:{code}try {
lock.lock();
...
} finally {
lock.unlock();
}{code}
There are a couple of reasons that's a bad idea. The correct pattern is:{code}lock.lock();
try {
...
} finally {
lock.unlock();
}{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org