hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r892391 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/HTableDescriptor.java src/java/org/apache/hadoop/hbase/regionserver/HRegion.java src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
Date Fri, 18 Dec 2009 22:46:42 GMT
Author: jdcryans
Date: Fri Dec 18 22:46:41 2009
New Revision: 892391

URL: http://svn.apache.org/viewvc?rev=892391&view=rev
Log:
HBASE-2054  memstore size 0 is >= than blocking -2.0g size
HBASE-2057  Cluster won't stop

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=892391&r1=892390&r2=892391&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Fri Dec 18 22:46:41 2009
@@ -22,6 +22,8 @@
                (Benoit Sigoure via JD)
    HBASE-1960  Master should wait for DFS to come up when creating 
                hbase.version
+   HBASE-2054  memstore size 0 is >= than blocking -2.0g size
+   HBASE-2057  Cluster won't stop 
 
   IMPROVEMENTS
    HBASE-1961  HBase EC2 scripts

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HTableDescriptor.java?rev=892391&r1=892390&r2=892391&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HTableDescriptor.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HTableDescriptor.java Fri
Dec 18 22:46:41 2009
@@ -92,9 +92,9 @@
 
   public static final boolean DEFAULT_READONLY = false;
 
-  public static final int DEFAULT_MEMSTORE_FLUSH_SIZE = 1024*1024*64;
+  public static final long DEFAULT_MEMSTORE_FLUSH_SIZE = 1024*1024*64L;
   
-  public static final int DEFAULT_MAX_FILESIZE = 1024*1024*256;
+  public static final long DEFAULT_MAX_FILESIZE = 1024*1024*256L;
     
   private volatile Boolean meta = null;
   private volatile Boolean root = null;
@@ -402,7 +402,7 @@
   /**
    * @return memory cache flush size for each hregion
    */
-  public int getMemStoreFlushSize() {
+  public long getMemStoreFlushSize() {
     byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY);
     if (value != null)
       return Integer.valueOf(Bytes.toString(value)).intValue();

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=892391&r1=892390&r2=892391&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Fri Dec 18 22:46:41 2009
@@ -181,10 +181,10 @@
 
   private volatile WriteState writestate = new WriteState();
 
-  final int memstoreFlushSize;
+  final long memstoreFlushSize;
   private volatile long lastFlushTime;
   final FlushRequester flushListener;
-  private final int blockingMemStoreSize;
+  private final long blockingMemStoreSize;
   final long threadWakeFrequency;
   // Used to guard splits and closes
   private final ReentrantReadWriteLock splitsAndClosesLock =
@@ -215,11 +215,11 @@
    */
   public HRegion(){
     this.basedir = null;
-    this.blockingMemStoreSize = 0;
+    this.blockingMemStoreSize = 0L;
     this.conf = null;
     this.flushListener = null;
     this.fs = null;
-    this.memstoreFlushSize = 0;
+    this.memstoreFlushSize = 0L;
     this.log = null;
     this.regionCompactionDir = null;
     this.regiondir = null;
@@ -266,14 +266,14 @@
     }
     this.regionCompactionDir =
       new Path(getCompactionDir(basedir), encodedNameStr);
-    int flushSize = regionInfo.getTableDesc().getMemStoreFlushSize();
+    long flushSize = regionInfo.getTableDesc().getMemStoreFlushSize();
     if (flushSize == HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE) {
-      flushSize = conf.getInt("hbase.hregion.memstore.flush.size",
+      flushSize = conf.getLong("hbase.hregion.memstore.flush.size",
                       HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE);
     }
     this.memstoreFlushSize = flushSize;
     this.blockingMemStoreSize = this.memstoreFlushSize *
-      conf.getInt("hbase.hregion.memstore.block.multiplier", 1);
+      conf.getLong("hbase.hregion.memstore.block.multiplier", 2);
   }
 
   /**
@@ -2385,7 +2385,7 @@
   }
 
   public static final long FIXED_OVERHEAD = ClassSize.align(
-      (3 * Bytes.SIZEOF_LONG) + (2 * Bytes.SIZEOF_INT) + Bytes.SIZEOF_BOOLEAN +
+      (5 * Bytes.SIZEOF_LONG) + Bytes.SIZEOF_BOOLEAN +
       (19 * ClassSize.REFERENCE) + ClassSize.OBJECT);
   
   public static final long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD +

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java?rev=892391&r1=892390&r2=892391&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
(original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
Fri Dec 18 22:46:41 2009
@@ -345,7 +345,11 @@
     } catch (InterruptedException e) {
       LOG.warn("Failed to set state node in ZooKeeper", e);
     } catch (KeeperException e) {
-      LOG.warn("Failed to set state node in ZooKeeper", e);
+      if(e.code() == KeeperException.Code.NODEEXISTS) {
+        LOG.debug("State node exists.");
+      } else {
+        LOG.warn("Failed to set state node in ZooKeeper", e);
+      }
     }
 
     return false;



Mime
View raw message