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 25E4717D9B for ; Thu, 23 Oct 2014 12:56:38 +0000 (UTC) Received: (qmail 62990 invoked by uid 500); 23 Oct 2014 12:56:33 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 62841 invoked by uid 500); 23 Oct 2014 12:56:33 -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 62829 invoked by uid 99); 23 Oct 2014 12:56:32 -0000 Received: from mx1-us-east.apache.org (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Oct 2014 12:56:32 +0000 Received: from mx1-us-east.apache.org (localhost [127.0.0.1]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id 9DE824385C for ; Thu, 23 Oct 2014 12:56:32 +0000 (UTC) Received: by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org, from userid 111) id 93B2043858; Thu, 23 Oct 2014 12:56:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx1-us-east.apache.org X-Spam-Level: X-Spam-Status: No, score=0.9 required=10.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id EEB6143865 for ; Thu, 23 Oct 2014 12:56:31 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id z12so785207lbi.16 for ; Thu, 23 Oct 2014 05:56:24 -0700 (PDT) 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=+I4R534gP1WDeep0fvLe0Q9gQOCGw0nSVw820ut0Iio=; b=mQxR0rGOwh+opgIRahiSqlzMuKwbAwyr5tQMwUCqawicfEvF4bylvTCmOTFMoBrSgC 4JKb2IzJu0g4/CnYohVGX9y0FnIaBYnZixJZagSs3cJ4u6JyZFVFJoxjRyvpPQ+jSQnJ 9MAt3UZiKBexfz004KkymA2iDU9Qg5yo7NjV45Zj8KN6wfZHuhA0T3/aRp93BlScM9GD ygMh7+dhvPPndyjIxI5QYelO5mMc6jj2qhzjOMCXAX/4KM7OFL6guKoIQmrLZsieMUWf sapys3MLfvHQZIHAJYFSULnl3P5+LwzY/P1ZqIW9sR2RkhzhVeNzSkzbUbcJ5hUmv+Bf 87+Q== MIME-Version: 1.0 X-Received: by 10.112.140.74 with SMTP id re10mr4962808lbb.40.1414068984203; Thu, 23 Oct 2014 05:56:24 -0700 (PDT) Received: by 10.112.198.104 with HTTP; Thu, 23 Oct 2014 05:56:24 -0700 (PDT) In-Reply-To: <5448E769.8090907@gmail.com> References: <5448E769.8090907@gmail.com> Date: Thu, 23 Oct 2014 14:56:24 +0200 Message-ID: Subject: Re: getting counters from specific hadoop jobs From: Dieter De Witte To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a11c341e07dcfe505061697a7 X-Virus-Scanned: ClamAV using ClamSMTP --001a11c341e07dcfe505061697a7 Content-Type: text/plain; charset=UTF-8 Maybe you could use job -list or job -history to get a list of the jobids and extract it from there? 2014-10-23 13:32 GMT+02:00 Bart Vandewoestyne : > Hello list, > > I order to learn about Hadoop performance tuning, I am currently > investigating the effect of certain Hadoop configuration parameters on > certain Hadoop counters. I would like to do something like the following > (from the command line): > > for some_config_parameter in set_of_config_values > > Step 1) run hadoop job with 'hadoop jar ....' > > Step 2) once job finished, get the value of one or more Hadoop counters > of this job > > I know that I can achieve step 2 with the -counter option of the mapred > job command: > > bart@sandy-quad-1:~$ mapred job -counter > Usage: CLI [-counter ] > > However, I need to specify a job-id here, and that is where I'm having > trouble... I don't know an easy way to get the job-id from the hadoop job > that I started in Step 1. I also don't know of a way to specify a job-id > myself in Step 1 so that I can use it later in Step 2. > > I cannot imagine I'm the only one trying to run jobs and requesting some > of the counters afterwards. How is this typically solved? > > Note that I'm looking for a command-line solution, something that is > scriptable bash or so. > > Thanks, > Bart > --001a11c341e07dcfe505061697a7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Maybe you could use job -list or job -history to get a lis= t of the jobids and extract it from there?

2014-10-23 13:32 GMT+02:00 Bart Vandewoe= styne <Bart.Vandewoestyne@telenet.be>:
Hello list,

I order to learn about Hadoop performance tuning, I am currently investigat= ing the effect of certain Hadoop configuration parameters on certain Hadoop= counters.=C2=A0 I would like to do something like the following (from the = command line):

for some_config_parameter in set_of_config_values

=C2=A0 Step 1) run hadoop job with 'hadoop jar ....'

=C2=A0 Step 2) once job finished, get the value of one or more Hadoop count= ers of this job

I know that I can achieve step 2 with the -counter option of the mapred job= command:

bart@sandy-quad-1:~$ mapred job -counter
Usage: CLI [-counter <job-id> <group-name> <counter-name>= ]

However, I need to specify a job-id here, and that is where I'm having = trouble... I don't know an easy way to get the job-id from the hadoop j= ob that I started in Step 1.=C2=A0 I also don't know of a way to specif= y a job-id myself in Step 1 so that I can use it later in Step 2.

I cannot imagine I'm the only one trying to run jobs and requesting som= e of the counters afterwards.=C2=A0 How is this typically solved?

Note that I'm looking for a command-line solution, something that is sc= riptable bash or so.

Thanks,
Bart

--001a11c341e07dcfe505061697a7--