Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8988B182B4 for ; Tue, 2 Jun 2015 14:23:13 +0000 (UTC) Received: (qmail 28099 invoked by uid 500); 2 Jun 2015 14:23:08 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 27990 invoked by uid 500); 2 Jun 2015 14:23:08 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 27979 invoked by uid 99); 2 Jun 2015 14:23:08 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2015 14:23:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B4E5CC08D9 for ; Tue, 2 Jun 2015 14:23:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id iC0MMohL95jm for ; Tue, 2 Jun 2015 14:23:05 +0000 (UTC) Received: from relayvx11a.securemail.intermedia.net (relayvx11a.securemail.intermedia.net [64.78.56.46]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 1B3E6249C8 for ; Tue, 2 Jun 2015 14:23:05 +0000 (UTC) Received: from securemail.intermedia.net (localhost [127.0.0.1]) by emg-ca-1-1.localdomain (Postfix) with ESMTP id 9309053E3E for ; Tue, 2 Jun 2015 07:22:21 -0700 (PDT) Subject: Re: WebHdfs API MIME-Version: 1.0 x-echoworx-emg-received: Tue, 2 Jun 2015 07:22:21.580 -0700 x-echoworx-msg-id: 01181b8f-5b43-4632-b27d-18efb12ca9ca x-echoworx-action: delivered Received: from emg-ca-1-1.securemail.intermedia.net ([10.254.155.11]) by emg-ca-1-1 (JAMES SMTP Server 2.3.2) with SMTP ID 997 for ; Tue, 2 Jun 2015 07:22:21 -0700 (PDT) Received: from MBX080-W4-CO-2.exch080.serverpod.net (unknown [10.224.117.102]) by emg-ca-1-1.localdomain (Postfix) with ESMTP id 6185653E3E for ; Tue, 2 Jun 2015 07:22:21 -0700 (PDT) Received: from MBX080-W4-CO-2.exch080.serverpod.net (10.224.117.102) by MBX080-W4-CO-2.exch080.serverpod.net (10.224.117.102) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Tue, 2 Jun 2015 07:22:20 -0700 Received: from MBX080-W4-CO-2.exch080.serverpod.net ([10.224.117.102]) by mbx080-w4-co-2.exch080.serverpod.net ([10.224.117.102]) with mapi id 15.00.1044.021; Tue, 2 Jun 2015 07:22:20 -0700 From: Larry McCay To: "user@hadoop.apache.org" Thread-Topic: WebHdfs API Thread-Index: AQHQnS9jkbhxd8Wz/028rRF9y3pYRJ2Zsu2AgAAHHgA= Date: Tue, 2 Jun 2015 14:22:20 +0000 Message-ID: <86C39281-9E11-4526-ABA7-F6FD9F4CEB17@hortonworks.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [108.24.150.25] x-source-routing-agent: Processed Content-Type: multipart/alternative; boundary="_000_86C392819E114526ABA7F6FD9F4CEB17hortonworkscom_" --_000_86C392819E114526ABA7F6FD9F4CEB17hortonworkscom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable To build on what Manoj has described, there are few aspects to your usecase= and cluster interaction from outside the cluster that you need to be aware= of=85 * If the cluster is secured - you will need to use SPNEGO - HttpClient does= support this too * if you need to invoke the REST APIs as each authenticated enduser rather = than as a single identity representing the application then you will need y= our application to be configured as a trusted proxy to HDFS * if you have the cluster firewalled off from the rest of your network then= you will need to punch holes in the firewall for the host:ports that you n= eed access to You can simplify the above by use a reverse proxy like Apache Knox to be an= API Gateway for the REST APIs that you need access to. See http://knox.apache.org/ for more details. On Jun 2, 2015, at 9:56 AM, Manoj Babu > wrote: Hi - You can invoke the REST service using HTTP request with help of any HT= TP clients. Example if it is an Java web application you can use Apache com= mons HTTP client. Thanks. On Tuesday, June 2, 2015, Carmen Manzulli > wrote: Hi, I would like to know hot to use WebHDFS methods of RESTful Web Services to = open and read a file from a web application....instead of using curl! For example, i would know ho to create a client and submit a Get HTTP reque= st to the namenode. Thanks in advance, Carmen. -- Cheers! Manoj. --_000_86C392819E114526ABA7F6FD9F4CEB17hortonworkscom_ Content-Type: text/html; charset="Windows-1252" Content-ID: <45B2806DD5E48C47874491381D0B1A03@exch080.serverpod.net> Content-Transfer-Encoding: quoted-printable
To build on what Manoj has described, there are few aspects to your us= ecase and cluster interaction from outside the cluster that you need to be = aware of=85

* If the cluster is secured - you will need to use SPNEGO - HttpClient= does support this too
* if you need to invoke the REST APIs as each authenticated enduser ra= ther than as a single identity representing the application then you will n= eed your application to be configured as a trusted proxy to HDFS
* if you have the cluster firewalled off from the rest of your network= then you will need to punch holes in the firewall for the host:ports that = you need access to

You can simplify the above by use a reverse proxy like Apache Knox to = be an API Gateway for the REST APIs that you need access to.


Hi - You can invoke the REST service using HTTP r= equest with help of any HTTP clients. Example if it is an Java web applicat= ion you can use Apache commons HTTP client.

Thanks.

On Tuesday, June 2, 2015, Carmen Manzulli <carmenmanzulli@gmail.com> wrote:
Hi,
I would like to know hot to use WebHDFS methods of RESTful Web Services to = open and read a file from a web application....instead of using curl!

For example, i would know ho to create a client and submit a Get HTTP reque= st to the namenode.

Thanks in advance,

Carmen.


--
Cheers!
Manoj.


--_000_86C392819E114526ABA7F6FD9F4CEB17hortonworkscom_--