Repository: accumulo
Updated Branches:
  refs/heads/master df2715478 -> 84a42bb59


ACCUMULO-3768 halt if direct memory buffers blow up memory during a scan


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

Branch: refs/heads/master
Commit: 84a42bb5912152322da76d9ac8f6d02555ea1c49
Parents: df27154
Author: Eric C. Newton <eric.new...@gmail.com>
Authored: Tue Jun 23 17:15:19 2015 -0400
Committer: Eric C. Newton <eric.new...@gmail.com>
Committed: Tue Jun 23 17:15:19 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/tserver/scan/NextBatchTask.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/84a42bb5/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
----------------------------------------------------------------------
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
index 768cc53..e3f4146 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.tserver.scan;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.accumulo.core.iterators.IterationInterruptedException;
+import org.apache.accumulo.server.util.Halt;
 import org.apache.accumulo.tserver.TabletServer;
 import org.apache.accumulo.tserver.TooManyFilesException;
 import org.apache.accumulo.tserver.session.ScanSession;
@@ -85,6 +86,9 @@ public class NextBatchTask extends ScanTask<ScanBatch> {
       }
     } catch (TooManyFilesException tmfe) {
       addResult(tmfe);
+    } catch (OutOfMemoryError ome) {
+      Halt.halt("Ran out of memory scanning " + scanSession.extent + " for " + 
scanSession.client);
+      addResult(ome);
     } catch (Throwable e) {
       log.warn("exception while scanning tablet " + (scanSession == null ? 
"(unknown)" : scanSession.extent), e);
       addResult(e);

Reply via email to