accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject [1/3] git commit: ACCUMULO-2266 Checking hdfs minimum block size and failing if it clashes with walog max size
Date Tue, 28 Jan 2014 22:56:57 GMT
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 07d7ececf -> 550d8ac65


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


Mime
View raw message