Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-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 AEE5817E6E for ; Thu, 23 Oct 2014 13:12:25 +0000 (UTC) Received: (qmail 5117 invoked by uid 500); 23 Oct 2014 13:12:21 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 5006 invoked by uid 500); 23 Oct 2014 13:12:20 -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 4995 invoked by uid 99); 23 Oct 2014 13:12:20 -0000 Received: from ec2-54-191-145-13.us-west-2.compute.amazonaws.com (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Oct 2014 13:12:20 +0000 Received: from mx1-us-west.apache.org (localhost [127.0.0.1]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id 0861326EA7 for ; Thu, 23 Oct 2014 13:12:20 +0000 (UTC) Received: by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org, from userid 114) id F13B7261F7; Thu, 23 Oct 2014 13:12:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx1-us-west.apache.org X-Spam-Level: * X-Spam-Status: No, score=1.5 required=10.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, HTML_IMAGE_ONLY_32,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-qa0-f48.google.com (mail-qa0-f48.google.com [209.85.216.48]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 4566126EA7 for ; Thu, 23 Oct 2014 13:12:18 +0000 (UTC) Received: by mail-qa0-f48.google.com with SMTP id x12so615634qac.7 for ; Thu, 23 Oct 2014 06:11:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=WUrLEn7IyFfed4YmruY5pasKIqevxk4CsiRotsg9IkU=; b=fyG4vnQuvimTvSiNlynT/uGw8ZycIyq0235g7CNWFtw5k7KPo46jA8vVZPct8OPjhP V5Xmx9MZUmuv658ILF3EYEUT3L2IafpEAU9xE3ROMyfhnHQoezIape/GblSCpD2LI2i2 dw/Z0s45asj5x1qz2WwuTBO4BiNtq0qw3LWnd7nLsSNSO9T6b466OOoK7e5x6WkqAMFt mjtWAtgaDEKcoOGQa8Tx+f39Lef+LnjQAVEZvc6sK5YGk2ouL1rTtoETBNx6D8UFY+TN ubOLl8GhkAwXmUafkqD05uxttEl7ZRq6LnTwLQOkuXL8CHf6EMIrjuMXalZIzYHBSvLa pidg== X-Gm-Message-State: ALoCoQnVXsMW2fWlor/JK9WBazaeqynqIkyi4k4RdncbFFHU90+AWGqRcdGGDOu57130+eoQ6ECi MIME-Version: 1.0 X-Received: by 10.229.7.133 with SMTP id d5mr7627143qcd.24.1414069892840; Thu, 23 Oct 2014 06:11:32 -0700 (PDT) Received: by 10.140.44.54 with HTTP; Thu, 23 Oct 2014 06:11:32 -0700 (PDT) In-Reply-To: <5448E769.8090907@gmail.com> References: <5448E769.8090907@gmail.com> Date: Thu, 23 Oct 2014 15:11:32 +0200 Message-ID: Subject: Re: getting counters from specific hadoop jobs From: Thomas Demoor To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a1135ec94a6b4ae050616cd8f X-Virus-Scanned: ClamAV using ClamSMTP --001a1135ec94a6b4ae050616cd8f Content-Type: text/plain; charset=UTF-8 Hi Bart, Dieter beat me to it. An alternative would be grepping from the logs. Furthermore, if you write/alter the source code of the applications yourself rather than using f.i. the examples included with Hadoop, you can access the id though job.getJobId() once the job has been submitted and process (print) it to your liking. More info on the Job interface: http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html#Job_Submission_and_Monitoring Good luck and nice to see Belgian academics with interest in Hadoop, Thomas Thomas Demoor skype: demoor.thomas mobile: +32 497883833 On Thu, Oct 23, 2014 at 1:32 PM, Bart Vandewoestyne < Bart.Vandewoestyne@telenet.be> wrote: > 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 > --001a1135ec94a6b4ae050616cd8f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Bart,

Dieter beat me to it. An alter= native would be grepping from the logs.=C2=A0

Furt= hermore, if you write/alter the source code of the applications yourself ra= ther than using f.i. the examples included with Hadoop, you can access the = id though job.getJobId() once the job has been submitted and process (print= ) it to your liking. More info on the Job interface:=C2=A0http://hado= op.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-= core/MapReduceTutorial.html#Job_Submission_and_Monitoring
Good luck and nice to see Belgian academics with interest=C2= =A0in=C2=A0Hadoop,
Thomas

Thomas Demoor
skype: demoor.thomas
mobile:=C2=A0+32 497883833

On Thu, Oct 23, 2014 at 1:32 PM, Bart Vandew= oestyne <Bart.Vandewoestyne@telenet.be> wrote:
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

--001a1135ec94a6b4ae050616cd8f--