Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-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 4C0FC1924D for ; Tue, 19 Apr 2016 21:25:27 +0000 (UTC) Received: (qmail 66160 invoked by uid 500); 19 Apr 2016 21:25:26 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 66048 invoked by uid 500); 19 Apr 2016 21:25:26 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 66038 invoked by uid 99); 19 Apr 2016 21:25:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 21:25:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4A7A4C008B for ; Tue, 19 Apr 2016 21:25:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.397 X-Spam-Level: X-Spam-Status: No, score=-3.397 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.996, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=kth.se Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id dhnAMMeFIbQP for ; Tue, 19 Apr 2016 21:25:23 +0000 (UTC) Received: from smtp-3.sys.kth.se (smtp-3.sys.kth.se [130.237.48.192]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 6A8985F343 for ; Tue, 19 Apr 2016 21:25:23 +0000 (UTC) Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id 7DB9E418 for ; Tue, 19 Apr 2016 23:25:16 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id As_VxuAHGG5Z for ; Tue, 19 Apr 2016 23:25:15 +0200 (CEST) X-KTH-Auth: tkak [2.87.144.245] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1461101115; bh=kX5TYjxMWa/kzdS/2fzSwBuPs2V+t8O0gPyUILxmrmQ=; h=Subject:To:References:From:Date:In-Reply-To; b=K+63uwSMFPWzaaV+F+RAjoJv+82J5iDt7nUOpbAibfhC+7AzwUicm1oszSC5Fumsn 83d9KlNiS63ayqJ5QYl7gYNEJ9qplv3JMLojkbgq4npFI/S50SRIn1P6bS5xd5HhUJ hS3YXRw6B0L1KU4S4S3IRx8+PQaRi+kJWReq4hf8= X-KTH-mail-from: tkak@kth.se X-KTH-rcpt-to: user@flink.apache.org Received: from [192.168.1.4] (ppp-2-87-144-245.home.otenet.gr [2.87.144.245]) by smtp-3.sys.kth.se (Postfix) with ESMTPSA id 08D80248 for ; Tue, 19 Apr 2016 23:25:14 +0200 (CEST) Subject: Re: Flink on Yarn - ApplicationMaster command To: user@flink.apache.org References: <57162676.4040008@kth.se> From: Theofilos Kakantousis Message-ID: <5716A238.3060309@kth.se> Date: Wed, 20 Apr 2016 00:25:12 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Max, Thank you for your reply. Exactly, I want to setup the Yarn cluster and submit a job through code and not using cmd client. I had done what you suggested, I used part of the deploy method to write my own code that starts up the cluster which seems to be working fine. Could you point me to some examples how to use the Client you mention? Cheers, Theofilos On 2016-04-19 16:35, Maximilian Michels wrote: > Hi Theofilos, > > I'm not sure whether I understand correctly what you are trying to do. > I'm assuming you don't want to use the command-line client. > > You can setup the Yarn cluster in your code manually using the > FlinkYarnClient class. The deploy() method will give you a > FlinkYarnCluster which you can use to connect to the deployed cluster. > Then get the JobManager address and use the Client class to submit > Flink jobs to the cluster. I have to warn you that these classes are > subject to change in Flink 1.1.0 and above. > > Let me know if the procedure works for you. > > Cheers, > Max > > On Tue, Apr 19, 2016 at 2:37 PM, Theofilos Kakantousis wrote: >> Hi everyone, >> >> I'm using Flink 0.10.1 and hadoop 2.4.0 to implement a client that submits a >> flink application to Yarn. To keep it simple I use the ConnectedComponents >> app from flink examples. >> >> I set the required properties (Resources, AM ContainerLaunchContext etc.) on >> the YARN client interface. What happens is the JobManager and TaskManager >> processes start and based on the logs containers are running but the actual >> application does not start. I'm probably missing the proper way to pass >> parameters to the ApplicationMaster and it cannot pick up the application it >> needs to run. Anyone knows where I could get some info on how to pass >> runtime params to the AppMaster? >> >> The ApplicationMaster launchcontainer script includes the following: >> exec /bin/bash -c "$JAVA_HOME/bin/java -Xmx1024M >> org.apache.flink.yarn.ApplicationMaster -c >> org.apache.flink.examples.java.graph.ConnectedComponents 1> >> /tmp/stdOut5237161854714899800 2> /tmp/stdErr606502839107545371 " >> >> Thank you, >> Theofilos >>