Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3D7BD8A9B for ; Mon, 22 Aug 2011 19:57:42 +0000 (UTC) Received: (qmail 60562 invoked by uid 500); 22 Aug 2011 19:57:40 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 60477 invoked by uid 500); 22 Aug 2011 19:57:39 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 60469 invoked by uid 99); 22 Aug 2011 19:57:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 19:57:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.128.54.194] (HELO ironport.calpont.com) (66.128.54.194) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 19:57:33 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: how to pass a hdfs file to a c++ process Date: Mon, 22 Aug 2011 14:57:12 -0500 Message-ID: <8953B8331AA98041B0C11DBC678AFC08AEC745@srvemail1.calpont.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: how to pass a hdfs file to a c++ process Thread-Index: AcxhBa7ameq59CWYTdiK0QG9HBPRyA== From: "Zhixuan Zhu" To: Hi All, I'm using hadoop-0.20.2 to try out some simple tasks. I asked a question about FileInputFormat a few days ago and get some prompt replys from this forum and it helped a lot. Thanks again! Now I have another question. I'm trying to invoke a C++ process from my mapper for each hdfs file in the input directory to achieve some parallel processing. But how do I pass the file to the program? I would want to do something like the following in my mapper: Process lChldProc =3D Runtime.getRuntime().exec("myprocess -file $filepath"); How do I pass the hdfs filesystem to an outside process like that? Is HadoopStreaming the direction I should go? Thanks very much for any reply in advance. Best, Grace