hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-4661) fix various bugs in short circuit read
Date Sat, 04 May 2013 00:02:15 GMT

     [ https://issues.apache.org/jira/browse/HDFS-4661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tsz Wo (Nicholas), SZE updated HDFS-4661:
-----------------------------------------

    Component/s:     (was: performance)
    Description: 
- For the log statement in DataXceiver below,
-* it has two String.format(..);
-* it uses %s for string constants.
{code}
BlockSender.ClientTraceLog.info(String.format(
          String.format(
            "src: %s, dest: %s, op: %s, blockid: %s, srvID: %s, " +
              "success: %b",
            "127.0.0.1",                   // src IP
            "127.0.0.1",                   // dst IP
            "REQUEST_SHORT_CIRCUIT_FDS",   // operation
            blk.getBlockId(),             // block id
            dnR.getStorageID(),
            (fis != null)
          )));
{code}

- The new method getShortCircuitFdsForRead(..) added to FsDatasetSpi is unecssary.

- {{FileInputStreamCache.Key.equals}} mistakenly uses & instead of &&.

- In FileInputStreamCache.CacheCleaner, it uncessarily call map.entries().iterator()) for
each loop.

- The cache objects should not be passed in BlockReader.close(..)

  was:
* The log statement in DataXceiver "BlockSender.ClientTraceLog.info("REQUEST_SHORT_CIRCUIT_FDS"...)"
could be cleaned up somewhat.

* use {{FsDatasetSpi#getBlockInputStream}} and {{FsDatasetSpi#getMetaDataInputStream}} rather
than adding {{FsDatasetSpi#getShortCircuitFdsForRead}}

* {{FileInputStreamCache.Key.equals}}: use short-circuit boolean AND

* In FileInputStreamCache.CacheCleaner, the code "iter = map.entries().iterator()" can be
removed with the same result since the (previous) first element must be removed.

       Priority: Major  (was: Minor)
        Summary: fix various bugs in short circuit read  (was: code style fixes suggested
by Nicholas)
    
> fix various bugs in short circuit read
> --------------------------------------
>
>                 Key: HDFS-4661
>                 URL: https://issues.apache.org/jira/browse/HDFS-4661
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, hdfs-client
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-4661.001.patch, HDFS-4661.002.patch, HDFS-4661.003.patch, HDFS-4661.004.patch
>
>
> - For the log statement in DataXceiver below,
> -* it has two String.format(..);
> -* it uses %s for string constants.
> {code}
> BlockSender.ClientTraceLog.info(String.format(
>           String.format(
>             "src: %s, dest: %s, op: %s, blockid: %s, srvID: %s, " +
>               "success: %b",
>             "127.0.0.1",                   // src IP
>             "127.0.0.1",                   // dst IP
>             "REQUEST_SHORT_CIRCUIT_FDS",   // operation
>             blk.getBlockId(),             // block id
>             dnR.getStorageID(),
>             (fis != null)
>           )));
> {code}
> - The new method getShortCircuitFdsForRead(..) added to FsDatasetSpi is unecssary.
> - {{FileInputStreamCache.Key.equals}} mistakenly uses & instead of &&.
> - In FileInputStreamCache.CacheCleaner, it uncessarily call map.entries().iterator())
for each loop.
> - The cache objects should not be passed in BlockReader.close(..)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message