Search in sources :

Example 1 with StramToNodeGetPropertyRequest

use of com.datatorrent.stram.api.StramToNodeGetPropertyRequest in project apex-core by apache.

the class StreamingContainerManager method getPhysicalOperatorProperty.

public FutureTask<Object> getPhysicalOperatorProperty(int operatorId, String propertyName, long waitTime) {
    PTOperator o = this.plan.getAllOperators().get(operatorId);
    StramToNodeGetPropertyRequest request = new StramToNodeGetPropertyRequest();
    request.setOperatorId(operatorId);
    request.setPropertyName(propertyName);
    addOperatorRequest(o, request);
    RequestHandler task = new RequestHandler();
    task.requestId = nodeToStramRequestIds.incrementAndGet();
    task.waitTime = waitTime;
    request.requestId = task.requestId;
    FutureTask<Object> future = new FutureTask<>(task);
    dispatch(future);
    return future;
}
Also used : StramToNodeGetPropertyRequest(com.datatorrent.stram.api.StramToNodeGetPropertyRequest) PTOperator(com.datatorrent.stram.plan.physical.PTOperator) FutureTask(java.util.concurrent.FutureTask) JSONObject(org.codehaus.jettison.json.JSONObject)

Aggregations

StramToNodeGetPropertyRequest (com.datatorrent.stram.api.StramToNodeGetPropertyRequest)1 PTOperator (com.datatorrent.stram.plan.physical.PTOperator)1 FutureTask (java.util.concurrent.FutureTask)1 JSONObject (org.codehaus.jettison.json.JSONObject)1