You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "zzzk1 (via GitHub)" <gi...@apache.org> on 2023/12/18 09:50:17 UTC

[PR] [ISSUE-3405][Feature] Avoid Null Pointer Exception in ApplicationType [incubator-streampark]

zzzk1 opened a new pull request, #3409:
URL: https://github.com/apache/incubator-streampark/pull/3409

   <!--
   Thank you for contributing to StreamPark! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   ## Contribution Checklist
   
     - If this is your first time, please read our contributor guidelines: [Submit Code](https://streampark.apache.org/community/submit_guide/submit_code).
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-streampark/issues).
   
     - Name the pull request in the form "[Feature] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
   
     - If the PR is unfinished, add `[WIP]` in your PR title, e.g., `[WIP][Feature] Title of the pull request`.
   
   -->
   
   ## What changes were proposed in this pull request
   
   Issue Number: close #3405 <!-- REMOVE this line if no issue to close -->
   
   <!--(For example: This pull request proposed to add checkstyle plugin).-->
   
   ## Brief change log
   - *modify **org/apache/streampark/common/enums/ApplicationType.java***
   - *modify **org/apache/streampark/common/enums/FlinkDevelopmentMode.java***
   <!--*(for example:)*
   - *Add maven-checkstyle-plugin to root pom.xml*
   -->
   
   ## Verifying this change
   
   <!--*(Please pick either of the following options)*-->
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   
   <!--*(example:)*
   - *Added integration tests for end-to-end.*
   - *Added *Test to verify the change.*
   - *Manually verified the change by testing locally.* -->
   
   ## Does this pull request potentially affect one of the following parts
    - Dependencies (does it add or upgrade a dependency): (**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.

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

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


Re: [PR] [ISSUE-3405][Feature] Avoid Null Pointer Exception in switch keyword [incubator-streampark]

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #3409:
URL: https://github.com/apache/incubator-streampark/pull/3409#discussion_r1430097700


##########
streampark-common/src/main/java/org/apache/streampark/common/enums/ApplicationType.java:
##########
@@ -32,7 +31,10 @@ public enum ApplicationType {
   STREAMPARK_SPARK(3, "StreamPark Spark"),
 
   /** Apache Spark */
-  APACHE_SPARK(4, "Apache Spark");
+  APACHE_SPARK(4, "Apache Spark"),
+
+  /** Unknown type replace null */
+  UNKNOWN(5, "unknown");

Review Comment:
   I agree to add a new type "UNKNOWN", but I have a suggestion regarding the value. I recommend setting the value as -1. Currently, the value is 5. If we add another engine type in the future, it may cause trouble.



##########
streampark-common/src/main/java/org/apache/streampark/common/enums/FlinkExecutionMode.java:
##########
@@ -45,8 +45,10 @@ public enum FlinkExecutionMode {
   KUBERNETES_NATIVE_SESSION(5, "kubernetes-session"),
 
   /** kubernetes application */
-  KUBERNETES_NATIVE_APPLICATION(6, "kubernetes-application");
+  KUBERNETES_NATIVE_APPLICATION(6, "kubernetes-application"),
 
+  /** Unknown Mode */
+  UNKNOWN(7, "Unknown");

Review Comment:
   I suggest changing the value to -1.



-- 
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@streampark.apache.org

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


Re: [PR] [ISSUE-3405][Feature] Avoid Null Pointer Exception in switch keyword [incubator-streampark]

Posted by "caicancai (via GitHub)" <gi...@apache.org>.
caicancai commented on PR #3409:
URL: https://github.com/apache/incubator-streampark/pull/3409#issuecomment-1860025633

   cc @RocMarshal Thank you for your contribution


-- 
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@streampark.apache.org

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


Re: [PR] [ISSUE-3405][Feature] Avoid Null Pointer Exception in switch keyword [incubator-streampark]

Posted by "RocMarshal (via GitHub)" <gi...@apache.org>.
RocMarshal commented on code in PR #3409:
URL: https://github.com/apache/incubator-streampark/pull/3409#discussion_r1430129606


##########
streampark-common/src/main/java/org/apache/streampark/common/enums/ApplicationType.java:
##########
@@ -32,7 +31,10 @@ public enum ApplicationType {
   STREAMPARK_SPARK(3, "StreamPark Spark"),
 
   /** Apache Spark */
-  APACHE_SPARK(4, "Apache Spark");
+  APACHE_SPARK(4, "Apache Spark"),
+
+  /** Unknown type replace null */
+  UNKNOWN(5, "unknown");

Review Comment:
   +1



-- 
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@streampark.apache.org

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


Re: [PR] [ISSUE-3405][Feature] Avoid Null Pointer Exception in switch keyword [incubator-streampark]

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys merged PR #3409:
URL: https://github.com/apache/incubator-streampark/pull/3409


-- 
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@streampark.apache.org

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


Re: [PR] [ISSUE-3405][Feature] Avoid Null Pointer Exception in switch keyword [incubator-streampark]

Posted by "zzzk1 (via GitHub)" <gi...@apache.org>.
zzzk1 commented on code in PR #3409:
URL: https://github.com/apache/incubator-streampark/pull/3409#discussion_r1430810335


##########
streampark-common/src/main/java/org/apache/streampark/common/enums/FlinkExecutionMode.java:
##########
@@ -45,8 +45,10 @@ public enum FlinkExecutionMode {
   KUBERNETES_NATIVE_SESSION(5, "kubernetes-session"),
 
   /** kubernetes application */
-  KUBERNETES_NATIVE_APPLICATION(6, "kubernetes-application");
+  KUBERNETES_NATIVE_APPLICATION(6, "kubernetes-application"),
 
+  /** Unknown Mode */
+  UNKNOWN(7, "Unknown");

Review Comment:
   @wolfboys changed



-- 
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@streampark.apache.org

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