use of com.datatorrent.stram.api.StramToNodeSetPropertyRequest in project apex-core by apache.
the class StreamingContainerManager method setOperatorProperty.
private void setOperatorProperty(OperatorMeta logicalOperator, String propertyName, String propertyValue) {
Map<String, String> properties = Collections.singletonMap(propertyName, propertyValue);
LogicalPlanConfiguration.setOperatorProperties(logicalOperator.getOperator(), properties);
List<PTOperator> operators = plan.getOperators(logicalOperator);
for (PTOperator o : operators) {
StramToNodeSetPropertyRequest request = new StramToNodeSetPropertyRequest();
request.setOperatorId(o.getId());
request.setPropertyKey(propertyName);
request.setPropertyValue(propertyValue);
addOperatorRequest(o, request);
// re-apply to checkpointed state on deploy
updateOnDeployRequests(o, new SetOperatorPropertyRequestFilter(propertyName), request);
}
// should probably not record it here because it's better to get confirmation from the operators first.
// but right now, the operators do not give confirmation for the requests. so record it here for now.
recordEventAsync(new StramEvent.SetOperatorPropertyEvent(logicalOperator.getName(), propertyName, propertyValue));
}
use of com.datatorrent.stram.api.StramToNodeSetPropertyRequest in project apex-core by apache.
the class StreamingContainerManager method setPhysicalOperatorProperty.
private void setPhysicalOperatorProperty(PTOperator o, String propertyName, String propertyValue) {
String operatorName = o.getName();
StramToNodeSetPropertyRequest request = new StramToNodeSetPropertyRequest();
request.setOperatorId(o.getId());
request.setPropertyKey(propertyName);
request.setPropertyValue(propertyValue);
addOperatorRequest(o, request);
updateOnDeployRequests(o, new SetOperatorPropertyRequestFilter(propertyName), request);
// should probably not record it here because it's better to get confirmation from the operators first.
// but right now, the operators do not give confirmation for the requests. so record it here for now.
recordEventAsync(new StramEvent.SetPhysicalOperatorPropertyEvent(operatorName, o.getId(), propertyName, propertyValue));
}
Aggregations