Skip to content

Commit

Permalink
[ISSUE-3075][Improve] Improve streampark-console module base on [5 Log]
Browse files Browse the repository at this point in the history
#3075 (#3229)

Co-authored-by: jaslou <jaslouxzhlqq.com>
  • Loading branch information
jaslou authored Oct 10, 2023
1 parent babb494 commit 1f35c80
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public void apiAccess() {}
@Around(value = "apiAccess()")
public RestResponse apiAccess(ProceedingJoinPoint joinPoint) throws Throwable {
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
log.debug("restResponse aspect, method:{}", methodSignature.getName());
if (log.isDebugEnabled()) {
log.debug("restResponse aspect, method:{}", methodSignature.getName());
}
Boolean isApi =
(Boolean) SecurityUtils.getSubject().getSession().getAttribute(AccessToken.IS_API_TOKEN);
if (Objects.nonNull(isApi) && isApi) {
Expand All @@ -91,7 +93,9 @@ public void appUpdated() {}
@Around("appUpdated()")
public Object appUpdated(ProceedingJoinPoint joinPoint) throws Throwable {
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
log.debug("appUpdated aspect, method:{}", methodSignature.getName());
if (log.isDebugEnabled()) {
log.debug("appUpdated aspect, method:{}", methodSignature.getName());
}
Object target = joinPoint.proceed();
flinkAppHttpWatcher.init();
return target;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ private DeployResponse deployInternal(FlinkCluster flinkCluster)
flinkCluster.getClusterId(),
flinkCluster.getId(),
getKubernetesDeployDesc(flinkCluster, "start"));
log.info("Deploy cluster request " + deployRequest);
log.info("Deploy cluster request {}", deployRequest);
Future<DeployResponse> future = executorService.submit(() -> FlinkClient.deploy(deployRequest));
return future.get(60, TimeUnit.SECONDS);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ public class WebSocketEndpoint {

@OnOpen
public void onOpen(Session session, @PathParam("id") String id) {
log.debug("websocket onOpen....");
if (log.isDebugEnabled()) {
log.debug("websocket onOpen....");
}
this.id = id;
this.session = session;
SOCKET_SESSIONS.put(id, session);
}

@OnClose
public void onClose() throws IOException {
log.debug("websocket onClose....");
if (log.isDebugEnabled()) {
log.debug("websocket onClose....");
}
this.session.close();
SOCKET_SESSIONS.remove(this.id);
}
Expand Down

0 comments on commit 1f35c80

Please sign in to comment.