Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 DCBC4173BE for ; Tue, 3 Feb 2015 18:20:16 +0000 (UTC) Received: (qmail 77696 invoked by uid 500); 3 Feb 2015 18:20:12 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 77562 invoked by uid 500); 3 Feb 2015 18:20:12 -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 77542 invoked by uid 99); 3 Feb 2015 18:20:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 18:20:12 +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 (athena.apache.org: domain of xeonmailinglist@gmail.com designates 74.125.82.46 as permitted sender) Received: from [74.125.82.46] (HELO mail-wg0-f46.google.com) (74.125.82.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 18:20:05 +0000 Received: by mail-wg0-f46.google.com with SMTP id l2so46172720wgh.5 for ; Tue, 03 Feb 2015 10:19:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=1K0/bPFlI5OeKh1uLI+9biw9rmLWnHOBEh24U+NTtaw=; b=h1V9am74BPDc60ObDzsmt0LtwgGz7W7K/PlGKAso2zPVI6uGrAEnFCgD3NDlykhfMK gOTQG7scdBDjvWvg7I4e/fvq1GAZ2WgbOtPfUon6aZUWxmfcg+0399B5hKYsqyJ++9ix 6nYGcWMTceesMv3sWXRvV+wIkvYcbbpHNoLLj923m9FnmXbaDm+43CJq+azSCFYAtCI5 AG9jHpRzl6WEzd/8L7a6s+ntYu5tDD9+97VIXuV5InGXwOT1aBTr6plaQnaoj2F2955+ qyEuPCrszgwKcr89eh7z2/sQz1mZqRhMcL/oI2klGa7GwVBkFPY98cojS/LFyyi9qt8n JOKw== X-Received: by 10.180.80.67 with SMTP id p3mr36602255wix.55.1422987584885; Tue, 03 Feb 2015 10:19:44 -0800 (PST) Received: from [10.101.231.86] ([194.117.18.101]) by mx.google.com with ESMTPSA id pr9sm27476177wjc.4.2015.02.03.10.19.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Feb 2015 10:19:44 -0800 (PST) Message-ID: <54D1113D.9090006@gmail.com> Date: Tue, 03 Feb 2015 18:19:41 +0000 From: xeonmailinglist User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: user@hadoop.apache.org Subject: create Job with java code. Content-Type: multipart/alternative; boundary="------------020903030109090502070402" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------020903030109090502070402 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, I want this because I want to create depency between 2 jobs. The first job execute the wordcount example, and the second job copy the output of the wordcount to another HDFS. Therefore, I want to create a job (job 2) that includes the code to copy data to another HDFS. The code is below. Is there a way to do it with the API? | // Put inside a job() String proto = "webhdfs://"; String src = "hadoop-coc-1/input1"; String dest = "hadoop-coc-2/input1"; List lsrc = new ArrayList(); lsrc.add(new Path(proto+src)); DistCpOptions options = new DistCpOptions(lsrc, new Path(proto+dest)); DistCp distcp = new DistCp(conf, options); distcp.execute(); | ​ --------------020903030109090502070402 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi,

I want this because I want to create depency between 2 jobs. The first job execute the wordcount example, and the second job copy the output of the wordcount to another HDFS.
Therefore, I want to create a job (job 2) that includes the code to copy data to another HDFS. The code is below. Is there a way to do it with the API?

        // Put inside a job()
        String proto = "webhdfs://";
        String src = "hadoop-coc-1/input1";
        String dest = "hadoop-coc-2/input1";
        List<Path> lsrc = new ArrayList<Path>();
        lsrc.add(new Path(proto+src));
        DistCpOptions options = new DistCpOptions(lsrc, new Path(proto+dest));
        DistCp distcp = new DistCp(conf, options); 
        distcp.execute();
--------------020903030109090502070402--