Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 25510 invoked from network); 17 Jun 2008 13:42:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jun 2008 13:42:37 -0000 Received: (qmail 26266 invoked by uid 500); 17 Jun 2008 13:42:38 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 26047 invoked by uid 500); 17 Jun 2008 13:42:38 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 26036 invoked by uid 99); 17 Jun 2008 13:42:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 06:42:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 13:41:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 03E6E234C142 for ; Tue, 17 Jun 2008 06:41:45 -0700 (PDT) Message-ID: <1735422184.1213710105001.JavaMail.jira@brutus> Date: Tue, 17 Jun 2008 06:41:45 -0700 (PDT) From: "Steve Loughran (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Created: (HADOOP-3584) Add an explicit HadoopConfigurationException that extends RuntimeException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Add an explicit HadoopConfigurationException that extends RuntimeException -------------------------------------------------------------------------- Key: HADOOP-3584 URL: https://issues.apache.org/jira/browse/HADOOP-3584 Project: Hadoop Core Issue Type: Improvement Components: conf Affects Versions: 0.19.0 Reporter: Steve Loughran Priority: Minor It is possible for a get() or set() operation to throw an exception today, especially if a security manager is blocking property access. As more complex cross-references are used, the likelihood for failure is higher. Yet there is no way for a Configuration or subclass to throw an exception today except by throwing a general purpose RuntimeException. I propose having a specific HadoopConfigurationException that extends RuntimeException. Classes that read in configurations can explicitly catch and handle these. The exception could * be raised on some parse error (a float attribute is not a parseable float, etc) * be raised on some error caused by an implementation of a configuration service API * wrap underlying errors from different implementations (like JNDI exceptions) * wrap security errors and other generic problems I'm not going to propose having specific errors for parsing problems versus undefined name,value pair though that may be useful feature creep. It certainly makes bridging from different back-ends trickier. This would not be incompatible with the existing code, at least from my current experiments. What is more likely to cause problems is having the get() operations failing, as that is not something that is broadly tested (yet). If we do want to test it, we could have a custom mock back-end that could be configured to fail on a get() of a specific option. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.