You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/15 14:05:18 UTC

[GitHub] [kafka] ijuma opened a new pull request #10703: MINOR: Fix deprecations warnings in SlidingWindowedCogroupedKStreamImplTest

ijuma opened a new pull request #10703:
URL: https://github.com/apache/kafka/pull/10703


   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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] [kafka] mjsax merged pull request #10703: MINOR: Fix deprecation warnings in SlidingWindowedCogroupedKStreamImplTest

Posted by GitBox <gi...@apache.org>.
mjsax merged pull request #10703:
URL: https://github.com/apache/kafka/pull/10703


   


-- 
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] [kafka] ijuma commented on a change in pull request #10703: MINOR: Fix deprecation warnings in SlidingWindowedCogroupedKStreamImplTest

Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10703:
URL: https://github.com/apache/kafka/pull/10703#discussion_r633025431



##########
File path: streams/src/test/java/org/apache/kafka/streams/kstream/internals/SlidingWindowedCogroupedKStreamImplTest.java
##########
@@ -156,7 +156,7 @@ public void slidingWindowAggregateStreamsTest() {
             final TestInputTopic<String, String> testInputTopic = driver.createInputTopic(
                     TOPIC, new StringSerializer(), new StringSerializer());
             final TestOutputTopic<Windowed<String>, String> testOutputTopic = driver.createOutputTopic(
-                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer()), new StringDeserializer());
+                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer(), Long.MAX_VALUE), new StringDeserializer());

Review comment:
       I've changed the code to pass `500L`, but the `TestRecord` change causes compilation errors since we explicitly use a `nonWindowedRecord`:
   
   > results.add(nonWindowedRecord);
   
   Can we address that separately? I think we can focus on fixing the deprecation warning in this PR, if that's ok with you.




-- 
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] [kafka] mjsax commented on a change in pull request #10703: MINOR: Fix deprecation warnings in SlidingWindowedCogroupedKStreamImplTest

Posted by GitBox <gi...@apache.org>.
mjsax commented on a change in pull request #10703:
URL: https://github.com/apache/kafka/pull/10703#discussion_r632999895



##########
File path: streams/src/test/java/org/apache/kafka/streams/kstream/internals/SlidingWindowedCogroupedKStreamImplTest.java
##########
@@ -212,7 +212,7 @@ public void slidingWindowAggregateOverlappingWindowsTest() {
             final TestInputTopic<String, String> testInputTopic = driver.createInputTopic(
                     TOPIC, new StringSerializer(), new StringSerializer());
             final TestOutputTopic<Windowed<String>, String> testOutputTopic = driver.createOutputTopic(
-                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer()), new StringDeserializer());
+                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer(), Long.MAX_VALUE), new StringDeserializer());

Review comment:
       as above

##########
File path: streams/src/test/java/org/apache/kafka/streams/kstream/internals/SlidingWindowedCogroupedKStreamImplTest.java
##########
@@ -156,7 +156,7 @@ public void slidingWindowAggregateStreamsTest() {
             final TestInputTopic<String, String> testInputTopic = driver.createInputTopic(
                     TOPIC, new StringSerializer(), new StringSerializer());
             final TestOutputTopic<Windowed<String>, String> testOutputTopic = driver.createOutputTopic(
-                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer()), new StringDeserializer());
+                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer(), Long.MAX_VALUE), new StringDeserializer());

Review comment:
       Seems we setup the window with `500ms`:
   ```
   SlidingWindows.withTimeDifferenceAndGrace(ofMillis(500L),...)
   ```
   Thus we should pass in the same value instead of `MAX_VAVLUE`.
   
   We should also change `TestRecord<String,String>` below to `TestRecorded<Windowed<String>,String>`




-- 
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] [kafka] ijuma commented on a change in pull request #10703: MINOR: Fix deprecation warnings in SlidingWindowedCogroupedKStreamImplTest

Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10703:
URL: https://github.com/apache/kafka/pull/10703#discussion_r633025431



##########
File path: streams/src/test/java/org/apache/kafka/streams/kstream/internals/SlidingWindowedCogroupedKStreamImplTest.java
##########
@@ -156,7 +156,7 @@ public void slidingWindowAggregateStreamsTest() {
             final TestInputTopic<String, String> testInputTopic = driver.createInputTopic(
                     TOPIC, new StringSerializer(), new StringSerializer());
             final TestOutputTopic<Windowed<String>, String> testOutputTopic = driver.createOutputTopic(
-                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer()), new StringDeserializer());
+                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer(), Long.MAX_VALUE), new StringDeserializer());

Review comment:
       I've changed the code to pass `500L`, but the `TestRecord` change causes compilation errors since we explicitly use a `nonWindowedRecord`:
   
   > results.add(nonWindowedRecord);
   
   Can we address that separately? I think we can focus on fixing the deprecation warning in this PR, if that's ok with you.




-- 
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] [kafka] mjsax commented on a change in pull request #10703: MINOR: Fix deprecation warnings in SlidingWindowedCogroupedKStreamImplTest

Posted by GitBox <gi...@apache.org>.
mjsax commented on a change in pull request #10703:
URL: https://github.com/apache/kafka/pull/10703#discussion_r632999895



##########
File path: streams/src/test/java/org/apache/kafka/streams/kstream/internals/SlidingWindowedCogroupedKStreamImplTest.java
##########
@@ -212,7 +212,7 @@ public void slidingWindowAggregateOverlappingWindowsTest() {
             final TestInputTopic<String, String> testInputTopic = driver.createInputTopic(
                     TOPIC, new StringSerializer(), new StringSerializer());
             final TestOutputTopic<Windowed<String>, String> testOutputTopic = driver.createOutputTopic(
-                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer()), new StringDeserializer());
+                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer(), Long.MAX_VALUE), new StringDeserializer());

Review comment:
       as above

##########
File path: streams/src/test/java/org/apache/kafka/streams/kstream/internals/SlidingWindowedCogroupedKStreamImplTest.java
##########
@@ -156,7 +156,7 @@ public void slidingWindowAggregateStreamsTest() {
             final TestInputTopic<String, String> testInputTopic = driver.createInputTopic(
                     TOPIC, new StringSerializer(), new StringSerializer());
             final TestOutputTopic<Windowed<String>, String> testOutputTopic = driver.createOutputTopic(
-                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer()), new StringDeserializer());
+                    OUTPUT, new TimeWindowedDeserializer<>(new StringDeserializer(), Long.MAX_VALUE), new StringDeserializer());

Review comment:
       Seems we setup the window with `500ms`:
   ```
   SlidingWindows.withTimeDifferenceAndGrace(ofMillis(500L),...)
   ```
   Thus we should pass in the same value instead of `MAX_VAVLUE`.
   
   We should also change `TestRecord<String,String>` below to `TestRecorded<Windowed<String>,String>`




-- 
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] [kafka] mjsax commented on pull request #10703: MINOR: Fix deprecation warnings in SlidingWindowedCogroupedKStreamImplTest

Posted by GitBox <gi...@apache.org>.
mjsax commented on pull request #10703:
URL: https://github.com/apache/kafka/pull/10703#issuecomment-846473111


   Thanks. Did a follow up PR: https://github.com/apache/kafka/pull/10745


-- 
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