org.apache.hadoop.hive.ql.exec.mapjoin
Class MapJoinMemoryExhaustionHandler

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionHandler

public class MapJoinMemoryExhaustionHandler
extends Object

Handles the logic around deciding when to throw an MapJoinMemoryExhaustionException for HashTableSinkOperator.


Field Summary
 MemoryMXBean memoryMXBean
           
 
Constructor Summary
MapJoinMemoryExhaustionHandler(SessionState.LogHelper console, double maxMemoryUsage)
          Constructor expects a LogHelper object in addition to the max percent of heap memory which can be consumed before a MapJoinMemoryExhaustionException is thrown.
 
Method Summary
 void checkMemoryStatus(long tableContainerSize, long numRows)
          Throws MapJoinMemoryExhaustionException when the JVM has consumed the configured percentage of memory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

memoryMXBean

public final MemoryMXBean memoryMXBean
Constructor Detail

MapJoinMemoryExhaustionHandler

public MapJoinMemoryExhaustionHandler(SessionState.LogHelper console,
                                      double maxMemoryUsage)
Constructor expects a LogHelper object in addition to the max percent of heap memory which can be consumed before a MapJoinMemoryExhaustionException is thrown.

Method Detail

checkMemoryStatus

public void checkMemoryStatus(long tableContainerSize,
                              long numRows)
                       throws MapJoinMemoryExhaustionException
Throws MapJoinMemoryExhaustionException when the JVM has consumed the configured percentage of memory. The arguments are used simply for the error message.

Parameters:
tableContainerSize - currently table container size
numRows - number of rows processed
Throws:
MapJoinMemoryExhaustionException


Copyright © 2014 The Apache Software Foundation. All rights reserved.