[fix](LOG)change printStackTracker to LOG (#24884)
This commit is contained in:
@ -89,6 +89,10 @@ under the License.
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>doris-fe-common</finalName>
|
||||
|
||||
@ -17,6 +17,8 @@
|
||||
|
||||
package org.apache.doris.common.io;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -24,7 +26,9 @@ import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
public class DiskUtils {
|
||||
|
||||
public static class Df {
|
||||
public String fileSystem = "";
|
||||
public long blocks;
|
||||
@ -69,7 +73,7 @@ public class DiskUtils {
|
||||
df.mountedOn = values[5];
|
||||
return df;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.info("failed to obtain disk information", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2329,7 +2329,7 @@ public class OlapTable extends Table {
|
||||
Analyzer analyzer = new Analyzer(Env.getCurrentEnv(), connectContext);
|
||||
meta.parseStmt(analyzer);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
LOG.info(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,10 +17,12 @@
|
||||
|
||||
package org.apache.doris.catalog.authorizer;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.TimerTask;
|
||||
|
||||
@Slf4j
|
||||
public class RangerHiveAuditLogFlusher extends TimerTask {
|
||||
|
||||
private RangerHiveAuditHandler auditHandler;
|
||||
|
||||
public RangerHiveAuditLogFlusher(RangerHiveAuditHandler auditHandler) {
|
||||
@ -35,7 +37,7 @@ public class RangerHiveAuditLogFlusher extends TimerTask {
|
||||
try {
|
||||
Thread.sleep(20000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
log.info("error ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ import org.apache.doris.qe.VariableMgr;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.output.FileWriterWithEncoding;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -40,8 +41,8 @@ import java.util.Map;
|
||||
* This class is used to generate doc for FE config and session variable.
|
||||
* The doc is generated from Config.java and SessionVariable.java
|
||||
*/
|
||||
@Slf4j
|
||||
public class DocGenerator {
|
||||
|
||||
private static final String PLACEHOLDER = "<--DOC_PLACEHOLDER-->";
|
||||
private static final String[] TYPE = new String[] {"类型:", "Type: "};
|
||||
private static final String[] DEFAULT_VALYUE = new String[] {"默认值:", "Default: "};
|
||||
@ -52,6 +53,7 @@ public class DocGenerator {
|
||||
private static final String[] VAR_READ_ONLY = new String[] {"只读变量:", "Read Only: "};
|
||||
private static final String[] VAR_GLOBAL_ONLY = new String[] {"仅全局变量:", "Global only: "};
|
||||
|
||||
|
||||
private String configDocTemplatePath;
|
||||
private String configDocTemplatePathCN;
|
||||
private String configDocOutputPath;
|
||||
@ -288,7 +290,7 @@ public class DocGenerator {
|
||||
docGenerator.generate();
|
||||
System.out.println("Done!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info("failed to generate doc", e);
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,6 +42,7 @@ import org.apache.doris.statistics.ColumnStatistic;
|
||||
import org.apache.doris.statistics.ColumnStatisticBuilder;
|
||||
import org.apache.doris.statistics.Histogram;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -60,6 +61,7 @@ import java.util.Optional;
|
||||
/**
|
||||
* Util for minidump
|
||||
*/
|
||||
@Slf4j
|
||||
public class MinidumpUtils {
|
||||
|
||||
public static String DUMP_PATH = null;
|
||||
@ -73,7 +75,7 @@ public class MinidumpUtils {
|
||||
try (FileWriter file = new FileWriter(dumpPath + ".json")) {
|
||||
file.write(jsonMinidump);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.info("failed to save minidump file", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,7 +158,7 @@ public class MinidumpUtils {
|
||||
String inputString = sb.toString();
|
||||
return jsonMinidumpLoadFromString(inputString);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.info("failed to open minidump file", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@ import org.apache.doris.nereids.trees.plans.AbstractPlan;
|
||||
import org.apache.doris.nereids.trees.plans.Plan;
|
||||
import org.apache.doris.qe.ConnectContext;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -40,6 +41,7 @@ import java.util.Optional;
|
||||
/**
|
||||
* log consumer
|
||||
*/
|
||||
@Slf4j
|
||||
public class NereidsTracer {
|
||||
private static long startTime;
|
||||
private static String TRACE_PATH = null;
|
||||
@ -162,7 +164,7 @@ public class NereidsTracer {
|
||||
try (FileWriter file = new FileWriter(TRACE_PATH + "/" + queryId + ".json")) {
|
||||
file.write(totalTraces.toString(4));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.info("failed to output of tracer", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ import org.apache.doris.statistics.ColumnStatisticBuilder;
|
||||
import org.apache.doris.statistics.Statistics;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* table: T(A, B)
|
||||
@ -55,7 +56,9 @@ import com.google.common.base.Preconditions;
|
||||
* for other expressions(except cast), we also need to adjust their input column stats.
|
||||
*
|
||||
*/
|
||||
@Slf4j
|
||||
public class ColumnStatsAdjustVisitor extends ExpressionVisitor<ColumnStatistic, Statistics> {
|
||||
|
||||
@Override
|
||||
public ColumnStatistic visit(Expression expr, Statistics context) {
|
||||
expr.children().forEach(child -> child.accept(this, context));
|
||||
@ -88,7 +91,7 @@ public class ColumnStatsAdjustVisitor extends ExpressionVisitor<ColumnStatistic,
|
||||
context.addColumnStats(cast.child(), colStats);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info("error", e);
|
||||
Preconditions.checkArgument(false, "type conversion failed");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user