You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2014/01/28 23:52:53 UTC

git commit: ACCUMULO-2266 Checking hdfs minimum block size and failing if it clashes with walog max size

Updated Branches:
  refs/heads/1.5.1-SNAPSHOT f1ae5a860 -> 07da9e3f3


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/1.5.1-SNAPSHOT
Commit: 07da9e3f3cf783074a52331e0d3a4fe0ab4e388b
Parents: f1ae5a8
Author: John Vines <vi...@apache.org>
Authored: Tue Jan 28 17:52:25 2014 -0500
Committer: John Vines <vi...@apache.org>
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();