You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/08/27 15:55:05 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #4470: [Spark Load] Redirect the spark launcher's log to a separated log file

morningman commented on a change in pull request #4470:
URL: https://github.com/apache/incubator-doris/pull/4470#discussion_r478522918



##########
File path: fe/fe-core/src/main/java/org/apache/doris/load/loadv2/SparkLauncherMonitor.java
##########
@@ -103,7 +114,7 @@ public void run() {
             try {
                 outReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                 while (!isStop && (line = outReader.readLine()) != null) {
-                    LOG.info("monitor log: " + line);
+                    outputBuffer.append(line + '\n');

Review comment:
       why not just output to the `outputStream`? So that we don't need to buffer a log of content in memory?

##########
File path: fe/fe-core/src/main/java/org/apache/doris/load/loadv2/SparkLoadJob.java
##########
@@ -701,6 +702,20 @@ protected long getEtlStartTimestamp() {
         return etlStartTimestamp;
     }
 
+    public SparkLoadAppHandle getHandle() {
+        return sparkLoadAppHandle;
+    }
+
+    public void clearSparkLauncherLog() {
+        String logPath = sparkLoadAppHandle.getLogPath();

Review comment:
       Are you sure the `sparkLoadAppHandle` is not null here?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org