Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4B44E200CFC for ; Thu, 14 Sep 2017 05:52:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4A57D1609CB; Thu, 14 Sep 2017 03:52:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8FE451609CA for ; Thu, 14 Sep 2017 05:52:05 +0200 (CEST) Received: (qmail 61398 invoked by uid 500); 14 Sep 2017 03:52:04 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 61386 invoked by uid 99); 14 Sep 2017 03:52:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2017 03:52:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C9D3F18CFD7 for ; Thu, 14 Sep 2017 03:52:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id cq9hEzh4iy5Z for ; Thu, 14 Sep 2017 03:52:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1D702610F0 for ; Thu, 14 Sep 2017 03:52:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 24960E0EF5 for ; Thu, 14 Sep 2017 03:52:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 678AC25387 for ; Thu, 14 Sep 2017 03:52:00 +0000 (UTC) Date: Thu, 14 Sep 2017 03:52:00 +0000 (UTC) From: "Weiwei Yang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11156) Add new op GETFILEBLOCKLOCATIONS to WebHDFS REST API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 14 Sep 2017 03:52:06 -0000 [ https://issues.apache.org/jira/browse/HDFS-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16165687#comment-16165687 ] Weiwei Yang commented on HDFS-11156: ------------------------------------ Hi [~shahrs87] Thanks for sharing your concern, I think you are raising up a good point. Current approach was trying to maintain compatibility as much as possible. We don't want to modify any public APIs because it will cause a lot of problems on upgrade/integrate paths. Ideally we could implement following API in {{ClientProtocol}} {code} public BlockLocation[] getBlockLocations(String src, long start, long length) throws IOException; {code} so that can be exposed via {{NamenodeRpcServer}} for {{NamenodeWebHdfsMethods}} to call. However because of the compatibility concerns I am not sure if this is worth to comparing to current path. It did a bit overhead on creating a dfs client, it is more compatible. Thanks > Add new op GETFILEBLOCKLOCATIONS to WebHDFS REST API > ---------------------------------------------------- > > Key: HDFS-11156 > URL: https://issues.apache.org/jira/browse/HDFS-11156 > Project: Hadoop HDFS > Issue Type: Improvement > Components: webhdfs > Affects Versions: 2.7.3 > Reporter: Weiwei Yang > Assignee: Weiwei Yang > Fix For: 2.9.0, 3.0.0-alpha2 > > Attachments: BlockLocationProperties_JSON_Schema.jpg, BlockLocations_JSON_Schema.jpg, FileStatuses_JSON_Schema.jpg, HDFS-11156.01.patch, HDFS-11156.02.patch, HDFS-11156.03.patch, HDFS-11156.04.patch, HDFS-11156.05.patch, HDFS-11156.06.patch, HDFS-11156.07.patch, HDFS-11156.08.patch, HDFS-11156.09.patch, HDFS-11156.10.patch, HDFS-11156.11.patch, HDFS-11156.12.patch, HDFS-11156.13.patch, HDFS-11156.14.patch, HDFS-11156.15.patch, HDFS-11156.16.patch, HDFS-11156-branch-2.01.patch, Output_JSON_format_v10.jpg, SampleResponse_JSON.jpg > > > Following webhdfs REST API > {code} > http://:/webhdfs/v1/?op=GET_BLOCK_LOCATIONS&offset=0&length=1 > {code} > will get a response like > {code} > { > "LocatedBlocks" : { > "fileLength" : 1073741824, > "isLastBlockComplete" : true, > "isUnderConstruction" : false, > "lastLocatedBlock" : { ... }, > "locatedBlocks" : [ {...} ] > } > } > {code} > This represents for *o.a.h.h.p.LocatedBlocks*. However according to *FileSystem* API, > {code} > public BlockLocation[] getFileBlockLocations(Path p, long start, long len) > {code} > clients would expect an array of BlockLocation. This mismatch should be fixed. Marked as Incompatible change as this will change the output of the GET_BLOCK_LOCATIONS API. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org