You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/11/07 10:45:00 UTC

[GitHub] [incubator-streampark] MonsterChenzhuo opened a new pull request, #1981: [bug]Resolve that running logs do not display exceptions.

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

   <!--
   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/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 #xxx <!-- REMOVE this line if no issue to close -->
   
   <!--(For example: This pull request proposed to add checkstyle plugin).-->
   
   ## Brief change log
   
   <!--*(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.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   <!--*(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): (yes / 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


[GitHub] [incubator-streampark] wolfboys merged pull request #1981: [bug]Resolve that running logs do not display exceptions.

Posted by GitBox <gi...@apache.org>.
wolfboys merged PR #1981:
URL: https://github.com/apache/incubator-streampark/pull/1981


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


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #1981: [bug]Resolve that running logs do not display exceptions.

Posted by GitBox <gi...@apache.org>.
wolfboys commented on code in PR #1981:
URL: https://github.com/apache/incubator-streampark/pull/1981#discussion_r1015353486


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/LoggerServiceImpl.java:
##########
@@ -47,20 +47,20 @@ public class LoggerServiceImpl implements LoggerService {
      * @param limit       limit
      * @return log string data
      */
-    public CompletionStage<String> queryLog(String nameSpace, String jobName, int skipLineNum, int limit) {
-        return CompletableFuture.supplyAsync(() -> jobDeploymentsWatch(nameSpace, jobName)
+    public CompletionStage<String> queryLog(String nameSpace, String jobName, String jobId, int skipLineNum, int limit) {
+        return CompletableFuture.supplyAsync(() -> jobDeploymentsWatch(nameSpace, jobName, jobId)
         ).exceptionally(e -> {
             try {
-                return String.format("%s/%s_%s_err.log", new File("").getCanonicalPath(), nameSpace, jobName);
+                return String.format("%s/%s_err.log", new File("temp").getCanonicalPath(), jobId);

Review Comment:
   `new File("temp").getCanonicalPath()` need to replace to `WebUtils.getAppTempDir()`



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


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #1981: [bug]Resolve that running logs do not display exceptions.

Posted by GitBox <gi...@apache.org>.
wolfboys commented on code in PR #1981:
URL: https://github.com/apache/incubator-streampark/pull/1981#discussion_r1015353486


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/LoggerServiceImpl.java:
##########
@@ -47,20 +47,20 @@ public class LoggerServiceImpl implements LoggerService {
      * @param limit       limit
      * @return log string data
      */
-    public CompletionStage<String> queryLog(String nameSpace, String jobName, int skipLineNum, int limit) {
-        return CompletableFuture.supplyAsync(() -> jobDeploymentsWatch(nameSpace, jobName)
+    public CompletionStage<String> queryLog(String nameSpace, String jobName, String jobId, int skipLineNum, int limit) {
+        return CompletableFuture.supplyAsync(() -> jobDeploymentsWatch(nameSpace, jobName, jobId)
         ).exceptionally(e -> {
             try {
-                return String.format("%s/%s_%s_err.log", new File("").getCanonicalPath(), nameSpace, jobName);
+                return String.format("%s/%s_err.log", new File("temp").getCanonicalPath(), jobId);

Review Comment:
   `new File("temp").getCanonicalPath()` need to replace to `WebUtils.getAppTempDir().getCanonicalPath() `



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