[Bug](spark load) fix spark load clearSparkLauncherLog NPE #12619

Co-authored-by: wuhangze <wuhangze@jd.com>
This commit is contained in:
Henry2SS
2022-09-16 10:30:57 +08:00
committed by GitHub
parent 20de8ac29d
commit d4f8e0c754

View File

@ -740,11 +740,13 @@ public class SparkLoadJob extends BulkLoadJob {
}
public void clearSparkLauncherLog() {
String logPath = sparkLoadAppHandle.getLogPath();
if (!Strings.isNullOrEmpty(logPath)) {
File file = new File(logPath);
if (file.exists()) {
file.delete();
if (sparkLoadAppHandle != null) {
String logPath = sparkLoadAppHandle.getLogPath();
if (!Strings.isNullOrEmpty(logPath)) {
File file = new File(logPath);
if (file.exists()) {
file.delete();
}
}
}
}