Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EDC4E10926 for ; Fri, 3 Jan 2014 22:11:48 +0000 (UTC) Received: (qmail 87371 invoked by uid 500); 3 Jan 2014 22:11:48 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 87347 invoked by uid 500); 3 Jan 2014 22:11:48 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 87338 invoked by uid 99); 3 Jan 2014 22:11:48 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2014 22:11:48 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9CE8F82040F; Fri, 3 Jan 2014 22:11:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Fri, 03 Jan 2014 22:11:48 -0000 Message-Id: <9c6840417d09400f82860f397d107431@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: ACCUMULO-1973 Add a warning if we don't find non-default values for namenode configuration Updated Branches: refs/heads/1.5.1-SNAPSHOT 652b5af39 -> 536211b3c ACCUMULO-1973 Add a warning if we don't find non-default values for namenode configuration This is one of biggest confusions that new users seem to run into when trying to initialize Accumulo (as it's a problem with us not finding Hadoop configurations). Hadoop will work properly, as its configuration is likely correct, but Accumulo can't find core-site.xml, tries to write to the root of the local fs, and fails. Try to be a bit more explicit about what happened when we initialized and the Configuration from the FS. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/79ff4f1b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/79ff4f1b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/79ff4f1b Branch: refs/heads/1.5.1-SNAPSHOT Commit: 79ff4f1bbee3d9603b1b5007e7041ef6f1d1a8de Parents: adaf057 Author: Josh Elser Authored: Fri Jan 3 16:42:20 2014 -0500 Committer: Josh Elser Committed: Fri Jan 3 16:42:20 2014 -0500 ---------------------------------------------------------------------- .../org/apache/accumulo/server/util/Initialize.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/79ff4f1b/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java ---------------------------------------------------------------------- diff --git a/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java b/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java index c6bb57a..5c749dd 100644 --- a/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java +++ b/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java @@ -204,6 +204,19 @@ public class Initialize { initFileSystem(fs, conf, uuid); } catch (Exception e) { log.fatal("Failed to initialize filesystem", e); + + // Try to warn the user about what the actual problem is + Configuration fsConf = fs.getConf(); + + final String defaultFsUri = "file:///"; + String fsDefaultName = fsConf.get("fs.default.name", defaultFsUri), fsDefaultFS = fsConf.get("fs.defaultFS", defaultFsUri); + + // Try to determine when we couldn't find an appropriate core-site.xml on the classpath + if (defaultFsUri.equals(fsDefaultName) && defaultFsUri.equals(fsDefaultFS)) { + log.fatal("Default filesystem value ('fs.defaultFS' or 'fs.default.name') was found in the Hadoop configuration"); + log.fatal("Please ensure that the Hadoop core-site.xml is on the classpath using 'general.classpaths' in accumulo-site.xml"); + } + return false; }