Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 886F8E046 for ; Tue, 29 Jan 2013 17:35:20 +0000 (UTC) Received: (qmail 89236 invoked by uid 500); 29 Jan 2013 17:35:13 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 89140 invoked by uid 500); 29 Jan 2013 17:35:13 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 88883 invoked by uid 99); 29 Jan 2013 17:35:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 17:35:13 +0000 Date: Tue, 29 Jan 2013 17:35:13 +0000 (UTC) From: "Joshua Blatt (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-4451) hdfs balancer exits 1 on success, it should exit 0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Joshua Blatt created HDFS-4451: ---------------------------------- Summary: hdfs balancer exits 1 on success, it should exit 0 Key: HDFS-4451 URL: https://issues.apache.org/jira/browse/HDFS-4451 Project: Hadoop HDFS Issue Type: Bug Components: balancer Affects Versions: 2.0.2-alpha Environment: Centos 6.3, JDK 1.6.0_25 Reporter: Joshua Blatt Though the org.apache.hadoop.util.Tool interface javadocs indicate implementations should return 0 on success, the org.apache.hadoop.hdfs.server.balance.Balancer.Cli implementation returns the int values of this enum instead: // Exit status enum ReturnStatus { SUCCESS(1), IN_PROGRESS(0), ALREADY_RUNNING(-1), NO_MOVE_BLOCK(-2), NO_MOVE_PROGRESS(-3), IO_EXCEPTION(-4), ILLEGAL_ARGS(-5), INTERRUPTED(-6); This created an issue for us when we tried to run the hdfs balancer as a cron job. Cron sends emails whenever a executable it runs exits non-zero. We'd either have to disable all emails and miss real issues or fix this bug. I think both SUCCESS and IN_PROGRESS ReturnStatuses should lead to exit 0. Marking this change as incompatible because existing scripts which interpret exit 1 as success will be broken (unless they defensively/liberally interpret both exit 1 and exit 0 as success). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira