[ 
https://issues.apache.org/jira/browse/FLINK-14740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974170#comment-16974170
 ] 

Chesnay Schepler commented on FLINK-14740:
------------------------------------------

You have 80 character for the operator name, which should be plenty. If a name 
exceeds this limit we also log a warning. Ultimately it depends on the user of 
course, but if you're interested in metrics, particularly when viewing them 
through the WebUI, then you want unique names again since the metric view does 
only show the operator name.

Since the operator ID isn't exposed anywhere in the REST API you cannot map the 
name to the ID. We'd need a dedicated endpoint for operators, but this would 
likely just end up being a hack. The REST API, and backing data-structures, 
just don't work on operators.

It has been a long-time wish of mine to rework the REST API and WebUI to only 
be aware of operators, not tasks (as tasks, or chaining, really is just a 
deployment optimization that imo should be transparent to the user), but this 
is a gargantuan task.

> Create OperatorID for OperatorMetricGroup which in batch job 
> -------------------------------------------------------------
>
>                 Key: FLINK-14740
>                 URL: https://issues.apache.org/jira/browse/FLINK-14740
>             Project: Flink
>          Issue Type: Wish
>          Components: Runtime / Metrics
>            Reporter: lining
>            Priority: Major
>
> *In current design:*
> The DataSet job uses VertexID as the OperatorID in the OperatorMetricGroup 
> (ps:TaskMetricGroup.getOrAddOperator (string name)).
> If two operators in the same vertex have the same name, they will overwrite 
> each other in the TaskMetricGroup.
> *Proposal:*
> We could add the OperatorID to the operator of the dataset.
> {code:java}
> for (TaskInChain tic : this.chainedTasksInSequence) {
>    TaskConfig t = new 
> TaskConfig(tic.getContainingVertex().getConfiguration());
>    Integer nodeId = tic.getPlanNode().getOptimizerNode().getId();
>    OperatorID operatorID = this.nodeId2OperatorId.get(nodeId);
>    if(operatorID == null) {
>       operatorID = new OperatorID();
>       this.nodeId2OperatorId.put(nodeId, operatorID);
>    }
>    t.addChainedTask(tic.getChainedTask(), tic.getTaskConfig(), 
> tic.getTaskName(), operatorID.toString());
> }
> {code}
> Then we could get id from TaskInfo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to