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 BC8CDEAF5 for ; Thu, 27 Dec 2012 18:11:50 +0000 (UTC) Received: (qmail 29876 invoked by uid 500); 27 Dec 2012 18:11:46 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 29538 invoked by uid 500); 27 Dec 2012 18:11:45 -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 29530 invoked by uid 99); 27 Dec 2012 18:11:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2012 18:11:45 +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 (nike.apache.org: domain of vinodkv@hortonworks.com designates 209.85.220.47 as permitted sender) Received: from [209.85.220.47] (HELO mail-pa0-f47.google.com) (209.85.220.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2012 18:11:37 +0000 Received: by mail-pa0-f47.google.com with SMTP id fa10so5599433pad.6 for ; Thu, 27 Dec 2012 10:11:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:mime-version:content-type:subject:date:in-reply-to :to:references:message-id:x-mailer:x-gm-message-state; bh=1VrAr6JodDvAFPX5GPX7xt6OcKNE0oqv2HkiAhfTUkA=; b=hywmQk/jhgPqraBLmnSaFSnuyz66e+7hg0Z8diJgiR4rO7dIKRAg5XkVWPwmC0/bXg GU3p94n/8fslx0kaHliQOOksMfOOH7yhuY0KTXr/q0vW1FyKKO04F8e4rgp1o+vfVEuA u8r/u5jeR70Uo5n5MtUbVdcfK8iKn/4LQ/a354hNYY5niiSN92kUBllz2/hUGYJgYD/L Q9iO3zzPSpnUGE5jnq9/eTZTs6WdNKRmAmaBY28ZcrvNhCa+/AztjlNIDDT4c2kfE9R1 KqWhM2TYSqNZOzEdKagoc/CMNx8vPgALKtX72Cwkvi2RvndMFZE70erlDtQWTtbrx7ST 94nQ== X-Received: by 10.66.82.67 with SMTP id g3mr91270359pay.58.1356631876543; Thu, 27 Dec 2012 10:11:16 -0800 (PST) Received: from [10.10.8.105] (host1.hortonworks.com. [70.35.59.2]) by mx.google.com with ESMTPS id nf9sm18174815pbc.17.2012.12.27.10.11.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Dec 2012 10:11:14 -0800 (PST) From: Vinod Kumar Vavilapalli Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_7DA23415-C37F-4115-A9C5-4EF73383EEAC" Subject: Re: Selecting a task for the tasktracker Date: Thu, 27 Dec 2012 10:11:14 -0800 In-Reply-To: To: user@hadoop.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1283) X-Gm-Message-State: ALoCoQl1MAtbF7JndZhBQju9Paw5wZW9IIFCHfk/L5xA7c0f4ySbYJL6LEmoYGGRBBSnCgmmAPFg X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_7DA23415-C37F-4115-A9C5-4EF73383EEAC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On top of that, the message indicates that you need to have your = scheduler class in the mapred package. Thanks, +Vinod Kumar Vavilapalli Hortonworks Inc. http://hortonworks.com/ On Dec 27, 2012, at 7:38 AM, Hemanth Yamijala wrote: > Hi, >=20 > Firstly, I am talking about Hadoop 1.0. Please note that in Hadoop 2.x = and trunk, the Mapreduce framework is completely revamped to Yarn = (http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.h= tml) and you may need to look at different interfaces for building your = own scheduler. >=20 > In 1.0, the primary function of the TaskScheduler is the assignTasks = method. Given a TaskTracker object as input, this method figures out how = many free map and reduce slots exist in that particular tasktracker and = selects one or more task that can be scheduled on it. Since task = selection is the primary responsibility and the granularity is at a task = level, the class is called TaskScheduler. >=20 > The method of choosing a job and then a task within the job is = customised by the different schedulers already present in Hadoop. Also, = the core logic of selecting a map task with data locality optimizations = is not implemented in the schedulers per se, but they rely on the = JobInProgress object in MapReduce framework for achieving the same. >=20 > To implement your own Scheduler, it may be best to look at the sources = of existing schedulers: JobQueueTaskScheduler, CapacityTaskScheduler or = FairScheduler. In particular, the last two are in the contrib modules = of mapreduce, and hence will be fairly independent to follow. Their = build files will also tell you how to resolve any compile problems like = the one you are facing. >=20 > Thanks > Hemanth =20 >=20 >=20 >=20 >=20 > On Thu, Dec 27, 2012 at 4:10 PM, Yaron Gonen = wrote: > Hi, > If I understand correctly, the job scheduler (why is the class called = TaskScheduler?) is responsible for assigning the task whose split is as = close as possible to the tasktacker. > Meaning that the job scheduler is responsible to two things: > Selecting a job. > Once a job is selected, assign the closest task to the tasktracker = that send the heartbeat. > Is this correct? >=20 > I want to write my own job scheduler to change the logic above, but it = says The type TaskScheduler is not visible. > How can I write my own scheduler? >=20 > thanks >=20 --Apple-Mail=_7DA23415-C37F-4115-A9C5-4EF73383EEAC Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1

On top of that, the message indicates that you need to have your scheduler class in the mapred package.

Thanks,
+Vinod Kumar Vavilapalli
Hortonworks Inc.
http://hortonworks.com/

On Dec 27, 2012, at 7:38 AM, Hemanth Yamijala wrote:

Hi,

Firstly, I am talking about Hadoop 1.0. Please note that in Hadoop 2.x and trunk, the Mapreduce framework is completely revamped to Yarn (http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.html) and you may need to look at different interfaces for building your own scheduler.

In 1.0, the primary function of the TaskScheduler is the assignTasks method. Given a TaskTracker object as input, this method figures out how many free map and reduce slots exist in that particular tasktracker and selects one or more task that can be scheduled on it. Since task selection is the primary responsibility and the granularity is at a task level, the class is called TaskScheduler.

The method of choosing a job and then a task within the job is customised by the different schedulers already present in Hadoop. Also, the core logic of selecting a map task with data locality optimizations is not implemented in the schedulers per se, but they rely on the JobInProgress object in MapReduce framework for achieving the same.

To implement your own Scheduler, it may be best to look at the sources of existing schedulers: JobQueueTaskScheduler, CapacityTaskScheduler or FairScheduler.  In particular, the last two are in the contrib modules of mapreduce, and hence will be fairly independent to follow. Their build files will also tell you how to resolve any compile problems like the one you are facing.

Thanks
Hemanth  




On Thu, Dec 27, 2012 at 4:10 PM, Yaron Gonen <yaron.gonen@gmail.com> wrote:
Hi,
If I understand correctly, the job scheduler (why is the class called TaskScheduler?) is responsible for assigning the task whose split is as close as possible to the tasktacker.
Meaning that the job scheduler is responsible to two things:
  1. Selecting a job.
  2. Once a job is selected, assign the closest task to the tasktracker that send the heartbeat.
Is this correct?

I want to write my own job scheduler to change the logic above, but it says The type TaskScheduler is not visible.
How can I write my own scheduler?

thanks


--Apple-Mail=_7DA23415-C37F-4115-A9C5-4EF73383EEAC--