Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E48F10AD3 for ; Mon, 27 Apr 2015 12:36:42 +0000 (UTC) Received: (qmail 1214 invoked by uid 500); 27 Apr 2015 12:36:36 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 1106 invoked by uid 500); 27 Apr 2015 12:36:36 -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 1092 invoked by uid 99); 27 Apr 2015 12:36:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 12:36:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: message received from 54.76.25.247 which is an MX secondary for user@hadoop.apache.org) Received: from [54.76.25.247] (HELO mx1-eu-west.apache.org) (54.76.25.247) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 12:36:08 +0000 Received: from gateway07.websitewelcome.com (gateway07.websitewelcome.com [69.56.170.18]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 1983427F99 for ; Mon, 27 Apr 2015 12:36:06 +0000 (UTC) Received: by gateway07.websitewelcome.com (Postfix, from userid 5007) id A80721FC06D2F; Mon, 27 Apr 2015 07:35:58 -0500 (CDT) Received: from gator4106.hostgator.com (gator4106.hostgator.com [192.185.4.118]) by gateway07.websitewelcome.com (Postfix) with ESMTP id A2B201FC06D06 for ; Mon, 27 Apr 2015 07:35:58 -0500 (CDT) Received: from [89.216.116.44] (port=47792 helo=[192.168.1.157]) by gator4106.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1YmiGU-00073Q-5l for user@hadoop.apache.org; Mon, 27 Apr 2015 07:35:58 -0500 Message-ID: <553E2D2C.7050702@nissatech.com> Date: Mon, 27 Apr 2015 14:35:56 +0200 From: Marko Dinic User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: user@hadoop.apache.org Subject: How to call Hadoop job from a web service in a non-blocking fashion? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4106.hostgator.com X-AntiAbuse: Original Domain - hadoop.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nissatech.com X-BWhitelist: no X-Source-IP: 89.216.116.44 X-Exim-ID: 1YmiGU-00073Q-5l X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.1.157]) [89.216.116.44]:47792 X-Source-Auth: marko.dinic@nissatech.com X-Email-Count: 2 X-Source-Cap: bmlzc2E7bmlzc2E7Z2F0b3I0MTA2Lmhvc3RnYXRvci5jb20= X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have a sequence of jobs that depend on each other, output of one job is input for the next one. Also, there is a loop in one part of the sequence, containing two jobs executing in a row. Until now I was able to run this job by simply creating Job objects and using waitForCompletition(true). In that way, I was forwarding output of one job as input to next one. The problem is, waitForCompletition(true) will block the web service I'm trying to use, so I need a way to run this sequence of dependent jobs, but not to get stuck waiting for result of the whole sequence. So, I want the next model - user uploads some files, starts the job and gets the response that the job has been started. After the sequence has finished user should be notified in some way. I wouldn't like to use Oozie, since this the jobs are more low-level (it's actually an algorithm similar to those implemented in Mahout), and I don't know if I may use JobControl, since there is a loop, and how to do it. Any help would be highly appreciated. Regards, Marko