@Override public R visitQueryContext(QueryContext queryContext, C visitContext) { return mergeResults(queryContext.acceptChildren(this, visitContext)); }
private boolean memoryRevokingNeeded(MemoryPool memoryPool) { return memoryPool.getReservedRevocableBytes() > 0 && memoryPool.getFreeBytes() <= memoryPool.getMaxBytes() * (1.0 - memoryRevokingThreshold); }
@Override public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context) { return visitor.visitQueryContext(this, context); }
private synchronized ListenableFuture<?> updateUserMemory(String allocationTag, long delta) { if (delta >= 0) { enforceUserMemoryLimit(queryMemoryContext.getUserMemory(), delta, maxMemory); return memoryPool.reserve(queryId, allocationTag, delta); } memoryPool.free(queryId, allocationTag, -delta); return NOT_BLOCKED; }
private synchronized ListenableFuture<?> updateSystemMemory(String allocationTag, long delta) { if (delta >= 0) { systemMemoryPool.reserve(queryId, allocationTag, delta); // Since various operators and the output buffers now support blocking when the system pool is full // we return NOT_BLOCKED to prevent them from blocking, which is the legacy behavior. return NOT_BLOCKED; } systemMemoryPool.free(queryId, allocationTag, -delta); return NOT_BLOCKED; }
public synchronized void setResourceOvercommit() { // Allow the query to use the entire pool. This way the worker will kill the query, if it uses the entire local general pool. // The coordinator will kill the query if the cluster runs out of memory. maxUserMemory = memoryPool.getMaxBytes(); maxTotalMemory = memoryPool.getMaxBytes(); }
private synchronized ListenableFuture<?> updateRevocableMemory(String allocationTag, long delta) { if (delta >= 0) { return memoryPool.reserveRevocable(queryId, delta); } memoryPool.freeRevocable(queryId, -delta); return NOT_BLOCKED; }
@Override public VersionedMemoryPoolId getMemoryPool() { return new VersionedMemoryPoolId(GENERAL_POOL, 0); }
public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context) { return visitor.visitTaskContext(this, context); }
public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context) { return visitor.visitPipelineContext(this, context); }
private boolean memoryRevokingNeeded(MemoryPool memoryPool) { return memoryPool.getReservedRevocableBytes() > 0 && memoryPool.getFreeBytes() <= memoryPool.getMaxBytes() * (1.0 - memoryRevokingThreshold); }
@Override public synchronized void setResourceOvercommit() { // Allow the query to use the entire pool. This way the worker will kill the query, if it uses the entire local general pool. // The coordinator will kill the query if the cluster runs out of memory. maxMemory = memoryPool.getMaxBytes(); }
private synchronized ListenableFuture<?> updateRevocableMemory(String allocationTag, long delta) { if (delta >= 0) { return memoryPool.reserveRevocable(queryId, delta); } memoryPool.freeRevocable(queryId, -delta); return NOT_BLOCKED; }
@Override public R visitQueryContext(QueryContext queryContext, C visitContext) { return mergeResults(queryContext.acceptChildren(this, visitContext)); }
@Override public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context) { return visitor.visitQueryContext(this, context); }
@Override public VersionedMemoryPoolId getMemoryPool() { return new VersionedMemoryPoolId(GENERAL_POOL, 0); }
public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context) { return visitor.visitTaskContext(this, context); }
@Override public synchronized void setResourceOvercommit() { // Allow the query to use the entire pool. This way the worker will kill the query, if it uses the entire local general pool. // The coordinator will kill the query if the cluster runs out of memory. maxUserMemory = memoryPool.getMaxBytes(); maxTotalMemory = memoryPool.getMaxBytes(); }
private synchronized ListenableFuture<?> updateRevocableMemory(String allocationTag, long delta) { if (delta >= 0) { return memoryPool.reserveRevocable(queryId, delta); } memoryPool.freeRevocable(queryId, -delta); return NOT_BLOCKED; }
public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context) { return visitor.visitQueryContext(this, context); }