This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev-2.1.5
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev-2.1.5 by this push:
new b739eb02f [improve] add more debug log (#3720)
b739eb02f is described below
commit b739eb02f91e272d235d121891f3512294deb327
Author: ouyangwulin <[email protected]>
AuthorDate: Thu May 23 12:27:42 2024 +0800
[improve] add more debug log (#3720)
* add debug log
* [Improve] Unified logging standards.
---
.../streampark/console/core/entity/FlinkCluster.java | 14 ++++++++------
.../console/core/service/impl/AppBuildPipeServiceImpl.java | 1 +
.../core/service/impl/ApplicationBackUpServiceImpl.java | 1 +
.../console/core/service/impl/ApplicationServiceImpl.java | 8 ++++++--
.../console/core/service/impl/ProjectServiceImpl.java | 3 ++-
.../console/core/service/impl/SavePointServiceImpl.java | 5 +++++
.../console/core/service/impl/SettingServiceImpl.java | 3 ++-
7 files changed, 25 insertions(+), 10 deletions(-)
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkCluster.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkCluster.java
index da6b888b9..f43aac68d 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkCluster.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkCluster.java
@@ -45,6 +45,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import lombok.Getter;
import lombok.Setter;
import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
import java.io.Serializable;
import java.net.URI;
@@ -54,6 +55,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+@Slf4j
@Getter
@Setter
@TableName("t_flink_cluster")
@@ -142,8 +144,8 @@ public class FlinkCluster implements Serializable {
HttpClientUtils.httpGetRequest(
this.address, RequestConfig.custom().setSocketTimeout(2000).build());
return new URI(address);
- } catch (Exception ignored) {
- //
+ } catch (Exception e) {
+ log.error("Get remote URI failed!", e);
}
return null;
}
@@ -165,8 +167,8 @@ public class FlinkCluster implements Serializable {
restUrl,
RequestConfig.custom().setConnectTimeout(2000).build());
JacksonUtils.read(result, Overview.class);
return true;
- } catch (Exception ignored) {
- //
+ } catch (Exception e) {
+ log.error("Verify cluster {} connection failed!", address, e);
}
return false;
} else if (ExecutionMode.YARN_SESSION.equals(this.getExecutionModeEnum()))
{
@@ -177,8 +179,8 @@ public class FlinkCluster implements Serializable {
restUrl,
RequestConfig.custom().setConnectTimeout(2000).build());
JacksonUtils.read(result, Overview.class);
return true;
- } catch (Exception ignored) {
- //
+ } catch (Exception e) {
+ log.error("Verify cluster connection failed!", e);
}
return false;
}
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java
index c37fd5e8e..b8c88e3fd 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java
@@ -418,6 +418,7 @@ public class AppBuildPipeServiceImpl
} else if (resourceFrom == ResourceFrom.UPLOAD) {
userJar = new File(WebUtils.getAppTempDir(), app.getJar());
} else {
+ log.error("ResourceFrom error:{}.", resourceFrom);
throw new IllegalArgumentException("ResourceFrom error: " +
resourceFrom);
}
// 2) copy user jar to localUpload DIR
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java
index 6c25e7d6b..5a95ff5e7 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationBackUpServiceImpl.java
@@ -199,6 +199,7 @@ public class ApplicationBackUpServiceImpl
removeById(id);
return true;
} catch (Exception e) {
+ log.error("Delete application {} failed!", id, e);
throw new InternalException(e.getMessage());
}
}
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
index 3cb86d1d1..dcdae2437 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
@@ -332,6 +332,7 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
try {
file.transferTo(saveFile);
} catch (Exception e) {
+ log.error("Upload file {} failed!", fileName, e);
throw new ApiDetailException(e);
}
return saveFile.getAbsolutePath();
@@ -495,7 +496,7 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
HdfsOperator.delete(path);
}
} catch (Exception e) {
- // skip
+ log.error("Remove application {} failed!", appId, e);
}
}
@@ -678,6 +679,7 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
} else {
+ log.error("Job executionMode must be
kubernetes-session|kubernetes-application.");
throw new ApiAlertException(
"Job executionMode must be
kubernetes-session|kubernetes-application.");
}
@@ -805,6 +807,7 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
}
return true;
} else {
+ log.error("Create application failed!");
throw new ApiAlertException("create application failed");
}
}
@@ -1842,7 +1845,8 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
YarnClient yarnClient = HadoopUtils.yarnClient();
yarnClient.killApplication(applications.get(0).getApplicationId());
}
- } catch (Exception ignored) {
+ } catch (Exception e) {
+ log.error("Stopped failed!", e);
}
}
}
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
index a2d38da26..01312dfa9 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
@@ -327,7 +327,8 @@ public class ProjectServiceImpl extends
ServiceImpl<ProjectMapper, Project>
}
return list;
} catch (Exception e) {
- log.info(e.getMessage());
+ log.error("List conf Failed!", e);
+ log.error(e.getMessage());
}
return null;
}
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java
index af0271437..a8a8cbb7a 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java
@@ -369,6 +369,10 @@ public class SavePointServiceImpl extends
ServiceImpl<SavePointMapper, SavePoint
try {
result = this.getSavePointPath(application);
} catch (Exception e) {
+ log.error(
+ "Error in getting savepoint path for triggering savepoint for
app:{}",
+ application.getId(),
+ e);
throw new ApiAlertException(
"Error in getting savepoint path for triggering savepoint for app "
+ application.getId(),
@@ -426,6 +430,7 @@ public class SavePointServiceImpl extends
ServiceImpl<SavePointMapper, SavePoint
removeById(id);
return true;
} catch (Exception e) {
+ log.error("Delete application {} failed!", id, e);
throw new InternalException(e.getMessage());
}
}
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SettingServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SettingServiceImpl.java
index 0386db4b1..de1f9b607 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SettingServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SettingServiceImpl.java
@@ -91,6 +91,7 @@ public class SettingServiceImpl extends
ServiceImpl<SettingMapper, Setting>
optional.ifPresent(x -> x.setSettingValue(value));
return true;
} catch (Exception e) {
+ log.error("Update setting failed!", e);
return false;
}
}
@@ -139,7 +140,7 @@ public class SettingServiceImpl extends
ServiceImpl<SettingMapper, Setting>
}
return senderEmail;
} catch (Exception e) {
- log.warn("Fault Alert Email is not set.");
+ log.warn("Fault Alert Email is not set.", e);
}
return null;
}