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 AA55C10D65 for ; Tue, 28 Jan 2014 22:57:27 +0000 (UTC) Received: (qmail 87583 invoked by uid 500); 28 Jan 2014 22:57:23 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 87432 invoked by uid 500); 28 Jan 2014 22:57:19 -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 87368 invoked by uid 99); 28 Jan 2014 22:57:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 22:57:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3938C90AF89; Tue, 28 Jan 2014 22:57:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vines@apache.org To: commits@accumulo.apache.org Date: Tue, 28 Jan 2014 22:57:22 -0000 Message-Id: <994e4ee31e2c4de7996391defb5f500f@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [5/8] git commit: ACCUMULO-2266 Checking hdfs minimum block size and failing if it clashes with walog max size ACCUMULO-2266 Checking hdfs minimum block size and failing if it clashes with walog max size Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/07da9e3f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/07da9e3f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/07da9e3f Branch: refs/heads/master Commit: 07da9e3f3cf783074a52331e0d3a4fe0ab4e388b Parents: f1ae5a8 Author: John Vines Authored: Tue Jan 28 17:52:25 2014 -0500 Committer: John Vines Committed: Tue Jan 28 17:52:25 2014 -0500 ---------------------------------------------------------------------- .../apache/accumulo/server/tabletserver/TabletServer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/07da9e3f/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java ---------------------------------------------------------------------- diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java index 2ce6b9d..ebbc214 100644 --- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java +++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java @@ -3042,8 +3042,13 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu log.info("Tablet server starting on " + hostname); security = AuditedSecurityOperation.getInstance(); clientAddress = new InetSocketAddress(hostname, 0); - logger = new TabletServerLogger(this, getSystemConfiguration().getMemoryInBytes(Property.TSERV_WALOG_MAX_SIZE)); - + long walogMaxSize = getSystemConfiguration().getMemoryInBytes(Property.TSERV_WALOG_MAX_SIZE); + long minBlockSize = CachedConfiguration.getInstance().getLong("dfs.namenode.fs-limits.min-block-size", 0); + if (minBlockSize != 0 && minBlockSize > walogMaxSize) + throw new RuntimeException("Unable to start TabletServer. Logger is set to use blocksize " + walogMaxSize + " but hdfs minimum block size is " + + minBlockSize + ". Either increase the " + Property.TSERV_WALOG_MAX_SIZE + " or decrease dfs.namenode.fs-limits.min-block-size in hdfs-site.xml."); + logger = new TabletServerLogger(this, walogMaxSize); + if (getSystemConfiguration().getBoolean(Property.TSERV_LOCK_MEMORY)) { String path = "lib/native/mlock/" + System.mapLibraryName("MLock-" + Platform.getPlatform()); path = new File(path).getAbsolutePath();