public OperatorContext addOperatorContext(int operatorId, PlanNodeId planNodeId, String operatorType) { checkArgument(operatorId >= 0, "operatorId is negative"); for (OperatorContext operatorContext : operatorContexts) { checkArgument(operatorId != operatorContext.getOperatorId(), "A context already exists for operatorId %s", operatorId); } OperatorContext operatorContext = new OperatorContext( operatorId, planNodeId, operatorType, this, notificationExecutor, driverMemoryContext.newMemoryTrackingContext()); operatorContexts.add(operatorContext); return operatorContext; }
public OperatorContext addOperatorContext(int operatorId, PlanNodeId planNodeId, String operatorType, long maxMemoryReservation) { checkArgument(operatorId >= 0, "operatorId is negative"); for (OperatorContext operatorContext : operatorContexts) { checkArgument(operatorId != operatorContext.getOperatorId(), "A context already exists for operatorId %s", operatorId); } OperatorContext operatorContext = new OperatorContext(operatorId, planNodeId, operatorType, this, executor, maxMemoryReservation); operatorContexts.add(operatorContext); return operatorContext; }