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 2022/10/17 14:44:24 UTC

[GitHub] [flink] zentol opened a new pull request, #21088: [FLINK-29582][state-processor] Relax 1+ operator requirement

zentol opened a new pull request, #21088:
URL: https://github.com/apache/flink/pull/21088

   Based on #21085.
   
   The SavepointWriter previously had to enforce that the user provides at least 1 operator because we used them to get access to the execution environment. No operator -> no environment -> can't setup remaining operations.
   
   This PR adds new factory methods that have the user explicitly pass the environment. With that we can define any operation we like internally without requiring another operator.
   The existing factory methods were deprecated. They will continue to work, but it they are used the program is still subject to the old requirement of having at least 1 operator.


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] alpinegizmo commented on pull request #21088: [FLINK-29582][state-processor] Relax 1+ operator requirement

Posted by GitBox <gi...@apache.org>.
alpinegizmo commented on PR #21088:
URL: https://github.com/apache/flink/pull/21088#issuecomment-1285276374

   > @alpinegizmo I can't find other usages in the docs. (although I did find a few more in tests/javadocs 😅 )
   
   I was thinking of the references in https://nightlies.apache.org/flink/flink-docs-master/docs/libs/state_processor_api/#writing-new-savepoints and in https://nightlies.apache.org/flink/flink-docs-master/docs/libs/state_processor_api/#modifying-savepoints.  
   
   Somehow I missed that you already updated those. Sorry about the false alarm.


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on a diff in pull request #21088: [FLINK-29582][state-processor] Relax 1+ operator requirement

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #21088:
URL: https://github.com/apache/flink/pull/21088#discussion_r997984157


##########
flink-libraries/flink-state-processing-api/src/test/java/org/apache/flink/state/api/SavepointWriterTest.java:
##########
@@ -22,43 +22,25 @@
 import org.apache.flink.configuration.Configuration;
 import org.apache.flink.configuration.ExecutionOptions;
 import org.apache.flink.configuration.StateBackendOptions;
-import org.apache.flink.state.api.functions.KeyedStateBootstrapFunction;
 import org.apache.flink.state.api.utils.CustomStateBackendFactory;
-import org.apache.flink.streaming.api.datastream.DataStream;
 import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 /** Tests for the savepoint writer. */
-public class SavepointWriterTest {
+class SavepointWriterTest {
 
-    @Test(expected = CustomStateBackendFactory.ExpectedException.class)
-    public void testCustomStateBackend() throws Exception {
+    @Test
+    void testCustomStateBackend() {
         StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
         Configuration configuration = new Configuration();
         configuration.set(
                 StateBackendOptions.STATE_BACKEND,
                 CustomStateBackendFactory.class.getCanonicalName());
         configuration.set(ExecutionOptions.RUNTIME_MODE, RuntimeExecutionMode.BATCH);
-        env.configure(configuration);

Review Comment:
   This is an excellent example for why `@Test(expected = ...)` is such a flawed approach. You just don't know where the exception is actually thrown.



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol merged pull request #21088: [FLINK-29582][state-processor] Relax 1+ operator requirement

Posted by GitBox <gi...@apache.org>.
zentol merged PR #21088:
URL: https://github.com/apache/flink/pull/21088


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #21088: [FLINK-29582][state-processor] Relax 1+ operator requirement

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #21088:
URL: https://github.com/apache/flink/pull/21088#issuecomment-1280994587

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d88bda59f249ad786262ba0c267041994ab463e6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d88bda59f249ad786262ba0c267041994ab463e6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d88bda59f249ad786262ba0c267041994ab463e6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on pull request #21088: [FLINK-29582][state-processor] Relax 1+ operator requirement

Posted by GitBox <gi...@apache.org>.
zentol commented on PR #21088:
URL: https://github.com/apache/flink/pull/21088#issuecomment-1285262745

   @alpinegizmo I can't find other usages in the docs. (although I did find a few more in tests/javadocs :sweat_smile: )


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on pull request #21088: [FLINK-29582][state-processor] Relax 1+ operator requirement

Posted by GitBox <gi...@apache.org>.
zentol commented on PR #21088:
URL: https://github.com/apache/flink/pull/21088#issuecomment-1285836764

   @flinkbot run azure


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org