hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wei-Chiu Chuang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-13330) Clean up dead code
Date Thu, 22 Mar 2018 20:51:00 GMT
Wei-Chiu Chuang created HDFS-13330:
--------------------------------------

             Summary: Clean up dead code
                 Key: HDFS-13330
                 URL: https://issues.apache.org/jira/browse/HDFS-13330
             Project: Hadoop HDFS
          Issue Type: Improvement
            Reporter: Wei-Chiu Chuang


The follow do .. while(false) loop seems useless to me.
{code:java}
ShortCircuitReplicaInfo info = null;
do {
  if (closed) {
    LOG.trace("{}: can't fethchOrCreate {} because the cache is closed.",
        this, key);
    return null;
  }
  Waitable<ShortCircuitReplicaInfo> waitable = replicaInfoMap.get(key);
  if (waitable != null) {
    try {
      info = fetch(key, waitable);
    } catch (RetriableException e) {
      LOG.debug("{}: retrying {}", this, e.getMessage());
    }
  }
} while (false);{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message