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

ASF GitHub Bot logged work on HDFS-6874:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Aug/21 03:59
            Start Date: 25/Aug/21 03:59
    Worklog Time Spent: 10m 
      Work Description: jojochuang commented on a change in pull request #3322:
URL: https://github.com/apache/hadoop/pull/3322#discussion_r695373362



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
##########
@@ -3889,4 +3891,27 @@ public MultipartUploaderBuilder 
createMultipartUploader(final Path basePath)
       throws IOException {
     return new FileSystemMultipartUploaderBuilder(this, basePath);
   }
+
+  public LocatedBlocks getLocatedBlocks(Path p, long start, long len)
+      throws IOException {
+    statistics.incrementReadOps(1);
+    storageStatistics.incrementOpCounter(OpType.GET_FILE_BLOCK_LOCATIONS);
+    final Path absF = fixRelativePart(p);
+    return new FileSystemLinkResolver<LocatedBlocks>() {
+      @Override
+      public LocatedBlocks doCall(final Path p) throws IOException {
+        return dfs.getLocatedBlocks(getPathName(p), start, len);
+      }
+      @Override
+      public LocatedBlocks next(final FileSystem fs, final Path p)
+          throws IOException {
+        if (fs instanceof DistributedFileSystem) {
+          DistributedFileSystem myDfs = (DistributedFileSystem)fs;
+          return myDfs.getLocatedBlocks(p, start, len);
+        }
+        throw new UnsupportedOperationException("Cannot recoverLease through" +

Review comment:
       TODO: update the exception message. It was modified based on 
recoverLease()




-- 
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.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

    Worklog Id:     (was: 641496)
    Time Spent: 1h 10m  (was: 1h)

> Add GETFILEBLOCKLOCATIONS operation to HttpFS
> ---------------------------------------------
>
>                 Key: HDFS-6874
>                 URL: https://issues.apache.org/jira/browse/HDFS-6874
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: httpfs
>    Affects Versions: 2.4.1, 2.7.3
>            Reporter: Gao Zhong Liang
>            Assignee: Weiwei Yang
>            Priority: Major
>              Labels: BB2015-05-TBR, pull-request-available
>         Attachments: HDFS-6874-1.patch, HDFS-6874-branch-2.6.0.patch, 
> HDFS-6874.011.patch, HDFS-6874.02.patch, HDFS-6874.03.patch, 
> HDFS-6874.04.patch, HDFS-6874.05.patch, HDFS-6874.06.patch, 
> HDFS-6874.07.patch, HDFS-6874.08.patch, HDFS-6874.09.patch, 
> HDFS-6874.10.patch, HDFS-6874.patch
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> GETFILEBLOCKLOCATIONS operation is missing in HttpFS, which is already 
> supported in WebHDFS.  For the request of GETFILEBLOCKLOCATIONS in 
> org.apache.hadoop.fs.http.server.HttpFSServer, BAD_REQUEST is returned so far:
> .......
>  case GETFILEBLOCKLOCATIONS: {
>         response = Response.status(Response.Status.BAD_REQUEST).build();
>         break;
>       }
> ........ 



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

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

Reply via email to