You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/11/12 19:27:54 UTC
[GitHub] [flink] rkhachatryan opened a new pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
rkhachatryan opened a new pull request #14056:
URL: https://github.com/apache/flink/pull/14056
## What is the purpose of the change
Currently, the name ignores passed inputs.
This change uses pattern: OriginalName [src1, srcN]
The name is shown in logs and web UI.
## Verifying this change
- Added `MultipleInputTransformationTest` (unit test)
- Checked manually in logs and web ui
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? no
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726300254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536",
"triggerID" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"triggerType" : "PUSH"
}, {
"hash" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536)
* 4fe64a8f89ec60d1ba0cab944d23f88693d366d4 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726291560
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5 (Thu Nov 12 19:30:22 UTC 2020)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
* **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-19940).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] AHeise commented on a change in pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #14056:
URL: https://github.com/apache/flink/pull/14056#discussion_r522375450
##########
File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/transformations/MultipleInputTransformationTest.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.transformations;
+
+import org.apache.flink.api.common.eventtime.WatermarkStrategy;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.connector.source.lib.NumberSequenceSource;
+
+import org.junit.Test;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Random;
+
+import static org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest.unsupportedOperatorFactory;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * {@link MultipleInputTransformation} test.
+ */
+public class MultipleInputTransformationTest {
+
+ @Test
+ public void testNaming() {
+ Random random = new Random();
+ String baseName = getString(random);
+ MultipleInputTransformation<Long> transformation =
+ new MultipleInputTransformation<>(baseName, unsupportedOperatorFactory(), TypeInformation.of(Long.class), 1);
+ for (int i = 0; i < 10; i++) {
+ transformation.addInput(new SourceTransformation<>(getString(random),
+ new NumberSequenceSource(0, 1),
+ WatermarkStrategy.noWatermarks(),
+ TypeInformation.of(Long.class),
+ 1));
+ }
+ assertTrue(transformation.getName().contains(baseName));
+ transformation.getInputs().forEach(input -> assertTrue(transformation.getName().contains(input.getName())));
+ System.out.println(transformation.getName());
Review comment:
Should be removed.
##########
File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/transformations/MultipleInputTransformationTest.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.transformations;
+
+import org.apache.flink.api.common.eventtime.WatermarkStrategy;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.connector.source.lib.NumberSequenceSource;
+
+import org.junit.Test;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Random;
+
+import static org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest.unsupportedOperatorFactory;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * {@link MultipleInputTransformation} test.
+ */
+public class MultipleInputTransformationTest {
+
+ @Test
+ public void testNaming() {
+ Random random = new Random();
+ String baseName = getString(random);
+ MultipleInputTransformation<Long> transformation =
+ new MultipleInputTransformation<>(baseName, unsupportedOperatorFactory(), TypeInformation.of(Long.class), 1);
+ for (int i = 0; i < 10; i++) {
+ transformation.addInput(new SourceTransformation<>(getString(random),
+ new NumberSequenceSource(0, 1),
+ WatermarkStrategy.noWatermarks(),
+ TypeInformation.of(Long.class),
+ 1));
+ }
+ assertTrue(transformation.getName().contains(baseName));
Review comment:
I like that you just test for containment.
##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/MultipleInputTransformation.java
##########
@@ -40,4 +42,12 @@ public MultipleInputTransformation(
inputs.add(input);
return this;
}
+
+ @Override
+ public String getName() {
+ return String.format(
+ "%s [%s]",
Review comment:
In the old chaining way with only one input, we have `source -> op1 -> op2` in the log and web UI.
If I get this formatting correctly, we would have `op1 [source1, source2] -> op2` now.
I'd naively assume that it's easier for users to read `[source1, source2] -> op1 -> op2`. WDYT?
Ofc, it kinda assumes that chaining is printed with " -> " in JobGraphGenerator, which might be less ideal.
Also, how does it look for no source? Would it print `op []`? I guess we should have a special treatment for non-chained inputs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] aljoscha commented on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
aljoscha commented on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-731186415
I don't think this change makes sense. This must be solved at some other layer, where the chaining is happening. See also my message on https://issues.apache.org/jira/browse/FLINK-19940.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] rkhachatryan closed pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
rkhachatryan closed pull request #14056:
URL: https://github.com/apache/flink/pull/14056
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726300254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536",
"triggerID" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"triggerType" : "PUSH"
}, {
"hash" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9541",
"triggerID" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4fe64a8f89ec60d1ba0cab944d23f88693d366d4 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9541)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726300254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536",
"triggerID" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"triggerType" : "PUSH"
}, {
"hash" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9541",
"triggerID" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536)
* 4fe64a8f89ec60d1ba0cab944d23f88693d366d4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9541)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726300254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] rkhachatryan commented on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726595759
Blink `ExplainTest.testExplainMultipleInput` failed because of the exact matching of the generated explain plain.
Looks like Blink generates a descriptive name and passes it to `MultipleInputTransformation`:
```
MultipleInput(readOrder=[1,0], members=[
HashJoin(joinType=[InnerJoin], where=[=(a, d)], select=[a, EXPR$1, d, EXPR$10], build=[right])
:- HashAggregate(isMerge=[true], groupBy=[a], select=[a, Final_SUM(sum$0) AS EXPR$1])
: +- [#1] Exchange(distribution=[hash[a]])
+- HashAggregate(isMerge=[true], groupBy=[d], select=[d, Final_SUM(sum$0) AS EXPR$1])
+- [#2] Exchange(distribution=[hash[d]])
])
```
My change adds (or replaces this with) `[Partition, Partition]`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] rkhachatryan commented on a change in pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #14056:
URL: https://github.com/apache/flink/pull/14056#discussion_r522422940
##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/MultipleInputTransformation.java
##########
@@ -40,4 +42,12 @@ public MultipleInputTransformation(
inputs.add(input);
return this;
}
+
+ @Override
+ public String getName() {
+ return String.format(
+ "%s [%s]",
Review comment:
Good point!
I've changed it to `originalName` if there are no inputs, and to `[source1, source2]` otherwise.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726300254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536",
"triggerID" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"triggerType" : "PUSH"
}, {
"hash" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9541",
"triggerID" : "4fe64a8f89ec60d1ba0cab944d23f88693d366d4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536)
* 4fe64a8f89ec60d1ba0cab944d23f88693d366d4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9541)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14056: [FLINK-19940][task] Improve naming of multi-input transformation
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14056:
URL: https://github.com/apache/flink/pull/14056#issuecomment-726300254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536",
"triggerID" : "d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d3f1b13bab3ae6fe2f50e27d61bd61f8726a1ea5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=9536)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org