You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by aljoscha <gi...@git.apache.org> on 2017/04/03 14:12:09 UTC

[GitHub] flink pull request #3662: [FLINK-6246] Fix generic type of OutputTag in oper...

GitHub user aljoscha opened a pull request:

    https://github.com/apache/flink/pull/3662

    [FLINK-6246] Fix generic type of OutputTag in operator Output<Paste>

    R: @dawidwys 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aljoscha/flink jira-6246-fix-output-tag-param

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3662.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3662
    
----
commit 3cfc5b18c27312de0e3e95a56cd78b46f80cf928
Author: Aljoscha Krettek <al...@gmail.com>
Date:   2017-04-03T14:10:14Z

    [FLINK-6246] Fix generic type of OutputTag in operator Output<Paste>

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3662: [FLINK-6246] Fix generic type of OutputTag in oper...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/3662


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3662: [FLINK-6246] Fix generic type of OutputTag in operator Ou...

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on the issue:

    https://github.com/apache/flink/pull/3662
  
    Now, I think it is good to merge ;)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3662: [FLINK-6246] Fix generic type of OutputTag in oper...

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3662#discussion_r109608264
  
    --- Diff: flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/iteration/IterateExample.java ---
    @@ -107,7 +107,8 @@ public static void main(String[] args) throws Exception {
     		}
     
     		// execute the program
    -		env.execute("Streaming Iteration Example");
    +		System.out.println(env.getExecutionPlan());
    --- End diff --
    
    Oh no, I was playing around with something. \U0001f631 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3662: [FLINK-6246] Fix generic type of OutputTag in operator Ou...

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on the issue:

    https://github.com/apache/flink/pull/3662
  
    @dawidwys thanks for reviewing so quickly. I pushed a commit to address your comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3662: [FLINK-6246] Fix generic type of OutputTag in operator Ou...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/3662
  
    merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3662: [FLINK-6246] Fix generic type of OutputTag in oper...

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3662#discussion_r109428611
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java ---
    @@ -619,20 +619,20 @@ public void collect(StreamRecord<T> record) {
     		}
     
     		@Override
    -		public <X> void collect(OutputTag<?> outputTag, StreamRecord<X> record) {
    +		public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) {
     			for (int i = 0; i < outputs.length - 1; i++) {
     				Output<StreamRecord<T>> output = outputs[i];
     
     				// due to side outputs, StreamRecords of varying types can pass through the broadcasting
     				// collector so we need to cast
     				@SuppressWarnings({"unchecked", "rawtypes"})
    -				StreamRecord<T> shallowCopy = (StreamRecord<T>) record.copy(record.getValue());
    +				StreamRecord<X> shallowCopy = record.copy(record.getValue());
     				output.collect(outputTag, shallowCopy);
     			}
     
     			// don't copy for the last output
     			@SuppressWarnings({"unchecked", "rawtypes"})
    --- End diff --
    
    Remove suppression.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3662: [FLINK-6246] Fix generic type of OutputTag in oper...

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3662#discussion_r109428703
  
    --- Diff: flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/iteration/IterateExample.java ---
    @@ -107,7 +107,8 @@ public static void main(String[] args) throws Exception {
     		}
     
     		// execute the program
    -		env.execute("Streaming Iteration Example");
    +		System.out.println(env.getExecutionPlan());
    --- End diff --
    
    I think this change should be reverted.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3662: [FLINK-6246] Fix generic type of OutputTag in oper...

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3662#discussion_r109428555
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java ---
    @@ -619,20 +619,20 @@ public void collect(StreamRecord<T> record) {
     		}
     
     		@Override
    -		public <X> void collect(OutputTag<?> outputTag, StreamRecord<X> record) {
    +		public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) {
     			for (int i = 0; i < outputs.length - 1; i++) {
     				Output<StreamRecord<T>> output = outputs[i];
     
     				// due to side outputs, StreamRecords of varying types can pass through the broadcasting
     				// collector so we need to cast
     				@SuppressWarnings({"unchecked", "rawtypes"})
    --- End diff --
    
    Suppression not needed anymore. Also the comment is not adequate, as we do not cast anything.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---