You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by en...@apache.org on 2015/12/16 23:40:22 UTC

[1/3] phoenix git commit: PHOENIX-2527 InsufficientMemoryException error message is misleading

Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 f9569496e -> 14944d1ab
  refs/heads/4.x-HBase-1.0 a2b40de63 -> feec7c4ff
  refs/heads/master 2685d5464 -> b38989dc7


PHOENIX-2527 InsufficientMemoryException error message is misleading


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b38989dc
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b38989dc
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b38989dc

Branch: refs/heads/master
Commit: b38989dc7008e1f7568bb0146f669d95f0ca62bb
Parents: 2685d54
Author: Enis Soztutar <en...@apache.org>
Authored: Wed Dec 16 14:15:03 2015 -0800
Committer: Enis Soztutar <en...@apache.org>
Committed: Wed Dec 16 14:15:03 2015 -0800

----------------------------------------------------------------------
 .../phoenix/memory/GlobalMemoryManager.java     | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b38989dc/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
index 79b49c5..6460260 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
@@ -21,15 +21,15 @@ import org.apache.http.annotation.GuardedBy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 /**
- * 
+ *
  * Global memory manager to track course grained memory usage across all requests.
  *
- * 
+ *
  * @since 0.1
  */
 public class GlobalMemoryManager implements MemoryManager {
     private static final Logger logger = LoggerFactory.getLogger(GlobalMemoryManager.class);
-    
+
     private final Object sync = new Object();
     private final long maxMemoryBytes;
     private final int maxWaitMs;
@@ -46,7 +46,7 @@ public class GlobalMemoryManager implements MemoryManager {
         this.maxWaitMs = maxWaitMs;
         this.usedMemoryBytes = 0;
     }
-    
+
     @Override
     public long getAvailableMemory() {
         synchronized(sync) {
@@ -75,7 +75,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 try {
                     long remainingWaitTimeMs = maxWaitMs - (System.currentTimeMillis() - startTimeMs);
                     if (remainingWaitTimeMs <= 0) { // Ran out of time waiting for some memory to get freed up
-                        throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated from remaining memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms.");
+                        throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated. Using memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms.");
                     }
                     sync.wait(remainingWaitTimeMs);
                 } catch (InterruptedException ie) {
@@ -106,7 +106,7 @@ public class GlobalMemoryManager implements MemoryManager {
     protected MemoryChunk newMemoryChunk(long sizeBytes) {
         return new GlobalMemoryChunk(sizeBytes);
     }
-    
+
     private class GlobalMemoryChunk implements MemoryChunk {
         private volatile long size;
 
@@ -123,7 +123,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 return size; // TODO: does this need to be synchronized?
             }
         }
-        
+
         @Override
         public void resize(long nBytes) {
             if (nBytes < 0) {
@@ -141,7 +141,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 }
             }
         }
-        
+
         /**
          * Check that MemoryChunk has previously been closed.
          */
@@ -159,7 +159,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 super.finalize();
             }
         }
-        
+
         @Override
         public void close() {
             synchronized(sync) {
@@ -170,4 +170,4 @@ public class GlobalMemoryManager implements MemoryManager {
         }
     }
 }
- 
+


[2/3] phoenix git commit: PHOENIX-2527 InsufficientMemoryException error message is misleading

Posted by en...@apache.org.
PHOENIX-2527 InsufficientMemoryException error message is misleading


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/feec7c4f
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/feec7c4f
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/feec7c4f

Branch: refs/heads/4.x-HBase-1.0
Commit: feec7c4ffbdef515b6f553530e9d0c591156de6a
Parents: a2b40de
Author: Enis Soztutar <en...@apache.org>
Authored: Wed Dec 16 14:15:03 2015 -0800
Committer: Enis Soztutar <en...@apache.org>
Committed: Wed Dec 16 14:15:06 2015 -0800

----------------------------------------------------------------------
 .../phoenix/memory/GlobalMemoryManager.java     | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/feec7c4f/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
index 79b49c5..6460260 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
@@ -21,15 +21,15 @@ import org.apache.http.annotation.GuardedBy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 /**
- * 
+ *
  * Global memory manager to track course grained memory usage across all requests.
  *
- * 
+ *
  * @since 0.1
  */
 public class GlobalMemoryManager implements MemoryManager {
     private static final Logger logger = LoggerFactory.getLogger(GlobalMemoryManager.class);
-    
+
     private final Object sync = new Object();
     private final long maxMemoryBytes;
     private final int maxWaitMs;
@@ -46,7 +46,7 @@ public class GlobalMemoryManager implements MemoryManager {
         this.maxWaitMs = maxWaitMs;
         this.usedMemoryBytes = 0;
     }
-    
+
     @Override
     public long getAvailableMemory() {
         synchronized(sync) {
@@ -75,7 +75,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 try {
                     long remainingWaitTimeMs = maxWaitMs - (System.currentTimeMillis() - startTimeMs);
                     if (remainingWaitTimeMs <= 0) { // Ran out of time waiting for some memory to get freed up
-                        throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated from remaining memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms.");
+                        throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated. Using memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms.");
                     }
                     sync.wait(remainingWaitTimeMs);
                 } catch (InterruptedException ie) {
@@ -106,7 +106,7 @@ public class GlobalMemoryManager implements MemoryManager {
     protected MemoryChunk newMemoryChunk(long sizeBytes) {
         return new GlobalMemoryChunk(sizeBytes);
     }
-    
+
     private class GlobalMemoryChunk implements MemoryChunk {
         private volatile long size;
 
@@ -123,7 +123,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 return size; // TODO: does this need to be synchronized?
             }
         }
-        
+
         @Override
         public void resize(long nBytes) {
             if (nBytes < 0) {
@@ -141,7 +141,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 }
             }
         }
-        
+
         /**
          * Check that MemoryChunk has previously been closed.
          */
@@ -159,7 +159,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 super.finalize();
             }
         }
-        
+
         @Override
         public void close() {
             synchronized(sync) {
@@ -170,4 +170,4 @@ public class GlobalMemoryManager implements MemoryManager {
         }
     }
 }
- 
+


[3/3] phoenix git commit: PHOENIX-2527 InsufficientMemoryException error message is misleading

Posted by en...@apache.org.
PHOENIX-2527 InsufficientMemoryException error message is misleading


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/14944d1a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/14944d1a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/14944d1a

Branch: refs/heads/4.x-HBase-0.98
Commit: 14944d1ab9db38963816a79484d121f3f74c8e28
Parents: f956949
Author: Enis Soztutar <en...@apache.org>
Authored: Wed Dec 16 14:15:03 2015 -0800
Committer: Enis Soztutar <en...@apache.org>
Committed: Wed Dec 16 14:16:48 2015 -0800

----------------------------------------------------------------------
 .../phoenix/memory/GlobalMemoryManager.java     | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/14944d1a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
index 79b49c5..6460260 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
@@ -21,15 +21,15 @@ import org.apache.http.annotation.GuardedBy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 /**
- * 
+ *
  * Global memory manager to track course grained memory usage across all requests.
  *
- * 
+ *
  * @since 0.1
  */
 public class GlobalMemoryManager implements MemoryManager {
     private static final Logger logger = LoggerFactory.getLogger(GlobalMemoryManager.class);
-    
+
     private final Object sync = new Object();
     private final long maxMemoryBytes;
     private final int maxWaitMs;
@@ -46,7 +46,7 @@ public class GlobalMemoryManager implements MemoryManager {
         this.maxWaitMs = maxWaitMs;
         this.usedMemoryBytes = 0;
     }
-    
+
     @Override
     public long getAvailableMemory() {
         synchronized(sync) {
@@ -75,7 +75,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 try {
                     long remainingWaitTimeMs = maxWaitMs - (System.currentTimeMillis() - startTimeMs);
                     if (remainingWaitTimeMs <= 0) { // Ran out of time waiting for some memory to get freed up
-                        throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated from remaining memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms.");
+                        throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated. Using memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms.");
                     }
                     sync.wait(remainingWaitTimeMs);
                 } catch (InterruptedException ie) {
@@ -106,7 +106,7 @@ public class GlobalMemoryManager implements MemoryManager {
     protected MemoryChunk newMemoryChunk(long sizeBytes) {
         return new GlobalMemoryChunk(sizeBytes);
     }
-    
+
     private class GlobalMemoryChunk implements MemoryChunk {
         private volatile long size;
 
@@ -123,7 +123,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 return size; // TODO: does this need to be synchronized?
             }
         }
-        
+
         @Override
         public void resize(long nBytes) {
             if (nBytes < 0) {
@@ -141,7 +141,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 }
             }
         }
-        
+
         /**
          * Check that MemoryChunk has previously been closed.
          */
@@ -159,7 +159,7 @@ public class GlobalMemoryManager implements MemoryManager {
                 super.finalize();
             }
         }
-        
+
         @Override
         public void close() {
             synchronized(sync) {
@@ -170,4 +170,4 @@ public class GlobalMemoryManager implements MemoryManager {
         }
     }
 }
- 
+