From user-return-3352-apmail-hadoop-user-archive=hadoop.apache.org@hadoop.apache.org Mon Dec 3 12:54:50 2012 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 11B04E2B4 for ; Mon, 3 Dec 2012 12:54:50 +0000 (UTC) Received: (qmail 41708 invoked by uid 500); 3 Dec 2012 12:54:45 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 41468 invoked by uid 500); 3 Dec 2012 12:54:43 -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 41358 invoked by uid 99); 3 Dec 2012 12:54:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2012 12:54:40 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dechouxb@gmail.com designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qc0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2012 12:54:32 +0000 Received: by mail-qc0-f176.google.com with SMTP id n41so1616097qco.35 for ; Mon, 03 Dec 2012 04:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ENMayFNP5Ce2USn7kJq0i8SHErnkGy1WuM5qVCZPM3Y=; b=Ol8L4WdozC1/0Y08QfYNDlwX/Zf2P+0zdE2wt1l+U9TnCkU+QrR9S4lPn3qBJgxcvO IxKzGgBxJthnG/GEL8qAROW+Niv/o55/62HNSYE9yn+mZc1WkXbC39vVWn+Kb3oRTmoD YAihadp4hvHKjqZBL4HEWkUGW3v5U+YwacbJY+S+FDDzMp/3idE8lheYzdW4y/FC1hnw Nb2DNqdgWriHw9oMuOO706kTonTYlcqRJmKKLITUXP6CnFTpXY61/SYmSVRAsrh8a26z PKMaIKjyh5TbblYCzyxNpGielnJRxA9fdWbQVTCRx0M4BqMMWwUQldnsRYDLRLDZq7If 719Q== MIME-Version: 1.0 Received: by 10.224.174.67 with SMTP id s3mr16765900qaz.95.1354539251887; Mon, 03 Dec 2012 04:54:11 -0800 (PST) Received: by 10.49.120.66 with HTTP; Mon, 3 Dec 2012 04:54:11 -0800 (PST) In-Reply-To: References: Date: Mon, 3 Dec 2012 13:54:11 +0100 Message-ID: Subject: Re: Calling C inside MR From: Bertrand Dechoux To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=20cf30334ed3f16f8604cff23eb3 X-Virus-Checked: Checked by ClamAV on apache.org --20cf30334ed3f16f8604cff23eb3 Content-Type: text/plain; charset=ISO-8859-1 You provided the answer, JNI is a solution. Another one would be to use hadoop streaming if your program can read stdin and write into stdout with a good enough format. A MR job is, in the end, plain java and does not impact how java can call external process. Bertrand On Mon, Dec 3, 2012 at 1:05 PM, Mohammad Tariq wrote: > Hello list, > > I have a tool (written in C) that performs some different types > of operations and can be used as a command line utility. I had to write a > similar tool, as we have moved towards Hadoop platform for most of the > things. > > Till now I have taken this tool as reference and written MR jobs > corresponding to some the modules of this tool and they are working fine. > But I am wasting a lot of time in this. So, I just wanted to ask if it is > possible to call this tool through a MR job?? Somewhat like JNI kinda > thing. (I hope it is, otherwise I have to write rest of things from scratch > and we are running out of time). > > Many thanks. > > Regards, > Mohammad Tariq > > -- Bertrand Dechoux --20cf30334ed3f16f8604cff23eb3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You provided the answer, JNI is a solution. Another one would be to use=20 hadoop streaming if your program can read stdin and write into stdout=20 with a good enough format.
A MR job is, in the end, plain java and does = not impact how java can call external process.

Bertrand

On Mon, Dec 3, 2012 at 1:05 PM, Mohammad Tariq <don= tariq@gmail.com> wrote:
Hello list,

=A0 =A0 =A0 = =A0 =A0 I have a tool (written in C) that performs some different types of = operations and can be used as a command line utility. I had to write a simi= lar tool, as we have moved towards Hadoop platform for most of the things.= =A0

Till now I have taken this tool as reference =A0and wri= tten MR jobs corresponding to some the modules of this tool and they are wo= rking fine. But I am wasting a lot of time in this. So, I just wanted to as= k if it is possible to call this tool through a MR job?? Somewhat like JNI = kinda thing. (I hope it is, otherwise I have to write rest of things from s= cratch and we are running out of time).

Many thanks.

Regards,
= =A0=A0 =A0Mohammad Tariq




--
Bertrand Dechoux
--20cf30334ed3f16f8604cff23eb3--