[ 
https://issues.apache.org/jira/browse/HADOOP-17038?focusedWorklogId=548059&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-548059
 ]

ASF GitHub Bot logged work on HADOOP-17038:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Feb/21 06:39
            Start Date: 05/Feb/21 06:39
    Worklog Time Spent: 10m 
      Work Description: anoopsjohn commented on a change in pull request #2646:
URL: https://github.com/apache/hadoop/pull/2646#discussion_r570750775



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
##########
@@ -634,12 +638,15 @@ public AbfsInputStream openFileForRead(final Path path, 
final FileSystem.Statist
       // Add statistics for InputStream
       return new AbfsInputStream(client, statistics,
               relativePath, contentLength,
-              populateAbfsInputStreamContext(),
+              populateAbfsInputStreamContext(options),
               eTag);
     }
   }
 
-  private AbfsInputStreamContext populateAbfsInputStreamContext() {
+  private AbfsInputStreamContext populateAbfsInputStreamContext(
+      Optional<Configuration> options) {
+    boolean bufferedPreadDisabled = options.isPresent()

Review comment:
       Its Configuration in Optional and we need fetch the boolean config out 
of that. 
   So if use orElse() we will end up 
   Configuration conf = options.orElse();
   boolean bufferedPreadDisabled  = conf != null && 
conf.getBoolean(FS_AZURE_BUFFERED_PREAD_DISABLE, false);
   Otherwise
   boolean bufferedPreadDisabled  = options.orElseGet(()->{return new 
Configuration(false);}).getBoolean("key", false);
   Not sure why we should end up creating a new Conf object.
   I feel like its better to have current way of hasPresent() check.
   WDYT?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 548059)
    Time Spent: 5h  (was: 4h 50m)

> Support disabling buffered reads in ABFS positional reads
> ---------------------------------------------------------
>
>                 Key: HADOOP-17038
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17038
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>            Priority: Major
>              Labels: HBase, abfsactive, pull-request-available
>         Attachments: HBase Perf Test Report.xlsx, screenshot-1.png
>
>          Time Spent: 5h
>  Remaining Estimate: 0h
>
> Right now it will do a seek to the position , read and then seek back to the 
> old position.  (As per the impl in the super class)
> In HBase kind of workloads we rely mostly on short preads. (like 64 KB size 
> by default).  So would be ideal to support a pure pos read API which will not 
> even keep the data in a buffer but will only read the required data as what 
> is asked for by the caller. (Not reading ahead more data as per the read size 
> config)
> Allow an optional boolean config to be specified while opening file for read 
> using which buffered pread can be disabled. 
> FutureDataInputStreamBuilder openFile(Path path)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to