Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-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 709839D18 for ; Sat, 25 May 2013 15:14:10 +0000 (UTC) Received: (qmail 45512 invoked by uid 500); 25 May 2013 15:14:05 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 45197 invoked by uid 500); 25 May 2013 15:14:05 -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 45184 invoked by uid 99); 25 May 2013 15:14:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2013 15:14:05 +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 philippe.signoret@gmail.com designates 209.85.128.44 as permitted sender) Received: from [209.85.128.44] (HELO mail-qe0-f44.google.com) (209.85.128.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2013 15:13:58 +0000 Received: by mail-qe0-f44.google.com with SMTP id 6so3152862qeb.3 for ; Sat, 25 May 2013 08:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=vyaK1tRgZD7AAaHcJOCJEYg0O9naOO8X9d7Nq/caqZg=; b=i8d7ODCLL4P8UrFCBDKBFjVwKuTjb0VImlxmaGsPczlHSJ/VWxvXwiZt+BF7w20ES/ nFwFLDVMuS9T9wccYz0VlFHpkWXGcY0dEhbVGI+xY1sWVrpWftoblyvuBAC1mTu3L2x3 dqG8oTDzPfuPv5lKO/qCmbCcILcd/0gdPXGFaEO9JW9ojVRH40xQ4hD+ksysTnz825UH TKwx2FN7GjiCU85Uej5g10683YyS9I/u8vyUGlTEtGJY+mE0YRM323LCXYxD+iFD30ka aggp83qqpYU4CzvpxEXMQqYK2ZCsCwIL55OIpedyHdJZRW/ohZrZaG7aKpAvHvJh/lfm hdOw== X-Received: by 10.229.198.133 with SMTP id eo5mr1549416qcb.148.1369494818140; Sat, 25 May 2013 08:13:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.77.71 with HTTP; Sat, 25 May 2013 08:13:18 -0700 (PDT) From: Philippe Signoret Date: Sat, 25 May 2013 17:13:18 +0200 Message-ID: Subject: Nicely removing and adding nodes To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a11c3b142283b0f04dd8c5c58 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3b142283b0f04dd8c5c58 Content-Type: text/plain; charset=ISO-8859-1 I'm running Hadoop 1.1.2 on a cluster with 10ish computers. I would like to nicely add and remove nodes, both for HDFS and MapReduce. I've noticed the *datanode* process dies once decomissioning is done, so this is what I do to remove a node: - Add node to *mapred.exclude* - Add node to *hdfs.exclude* - $ hadoop mradmin -refreshNodes - $ hadoop dfsadmin -refreshNodes - $ hadoop-daemon.sh stop tasktracker To add athe node back in (assuming it was removed like above): - Remove from *mapred.exclude* - Remove from *hdfs.exclude* - $ hadoop mradmin -refreshNodes - $ hadoop dfsadmin -refreshNodes - $ hadoop-daemon.sh start tasktracker - $ hadoop-daemon.sh start datanode Is this the correct way to scale up and down "nicely"? By "nicely", I mean without data loss, and without stopping tasks running on the nodes that I'm removing. (I.e. I'm assuming that *$ hadoop-daemon.sh stop tasktracker* lets the tasktracker finish any currently running tasks before dying). Thanks, Philippe --001a11c3b142283b0f04dd8c5c58 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm running Hadoop 1.1.2 on a cluster with 10ish compu= ters. I would like to nicely add and remove nodes, both for HDFS and MapRed= uce.

I've noticed the=A0datanode= =A0process dies once decomissioning is done, so this is what I do to remove= a node:
  • Add node to mapred.exclude
  • Add node to hdfs.exclude
  • $ hadoop mradmin -refreshNodes<= /li>
  • $ hadoop dfsadmin -refreshNodes
  • $ hadoop-daemon.sh st= op tasktracker
To add athe node back in (assuming it was removed lik= e above):
  • Remove from map= red.exclude
  • Remove from hdfs.exclude
  • $ hadoop mradmin -refreshNodes
  • $ hadoop dfsadmin -refreshNodes
  • =
  • $ hadoop-daemon.sh start tasktracker
  • $ hadoop-daemo= n.sh start datanode
Is this the correc= t way to scale up and down "nicely"?=A0

By "nicely", I mean without data = loss, and without stopping tasks running on the nodes that I'm removing= . (I.e. I'm assuming that $ hadoop-daemon.sh stop tasktracker le= ts the tasktracker finish any currently running tasks before dying).

Thanks,
Philippe
--001a11c3b142283b0f04dd8c5c58--