Search in sources :

Example 1 with MemoryUpdateCallback

use of org.apache.tez.runtime.api.MemoryUpdateCallback in project tez by apache.

the class TezTaskContextImpl method requestInitialMemory.

@Override
public void requestInitialMemory(long size, MemoryUpdateCallback callbackHandler) {
    // Nulls allowed since all IOs have to make this call.
    if (callbackHandler == null) {
        Preconditions.checkArgument(size == 0, "A Null callback handler can only be used with a request size of 0");
        callbackHandler = new MemoryUpdateCallback() {

            @Override
            public void memoryAssigned(long assignedSize) {
            }
        };
    }
    this.initialMemoryDistributor.requestMemory(size, callbackHandler, this, this.descriptor);
}
Also used : MemoryUpdateCallback(org.apache.tez.runtime.api.MemoryUpdateCallback)

Aggregations

MemoryUpdateCallback (org.apache.tez.runtime.api.MemoryUpdateCallback)1