Skip to content

Commit

Permalink
Changed info to debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanKarab committed Jan 15, 2021
1 parent 5437eba commit 2db5323
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ public void run() {
.setAdpEngineStatistics(statsManager.getStatistics());

if (sessionManager != null && !sessionManager.hasError()) {
log.info("Session finished, closing! ID: " + sessionPlan.getSessionID().getLongId()
log.debug("Session finished, closing! ID: " + sessionPlan.getSessionID().getLongId()
+ " , QueryID: " + queryID.getQueryID());
statusManager.setFinished(status.getId());
} else {
statusManager.setError(status.getId(), sessionManager.getErrorList().get(0));
}
log.info("Session closing! ID: "+ sessionPlan.getSessionID().getLongId()
log.debug("Session closing! ID: "+ sessionPlan.getSessionID().getLongId()
+ " , QueryID: " + queryID.getQueryID());
sessionPlan.close();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ private void handleHBPAlgorithmExecution(HttpRequest request, HttpResponse respo
AdpDBClientFactory.createDBClient(manager, clientProperties);
queryStatus = dbClient.query(algorithmKey, dfl);

log.info("Executing algorithm " + algorithmKey +
" started with queryId " + queryStatus.getQueryID().getQueryID());
log.debug("Algorithm " + algorithmKey + " with queryID "
+ queryStatus.getQueryID() + " execution started. DFL Script: \n " + dfl);
log.info("Algorithm " + algorithmKey + " with queryID "
+ queryStatus.getQueryID() + " execution started.");
log.debug("DFL Script: \n " + dfl);

BasicHttpEntity entity = new NQueryResultEntity(queryStatus, ds,
ExaremeGatewayUtils.RESPONSE_BUFFER_SIZE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ public void run() {
if (timeoutMs > 0) {
long timePassed = System.currentTimeMillis() - start;
if (timePassed > timeoutMs) {
log.info("Closing session!!!!");
status.close();
log.warn("Time out:" + timeoutMs + " ms passed");
throw new RuntimeException("Time out:" + timeoutMs + " ms passed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ public ContainerSessionID getContainerSessionID() {

public ContainerJobResults execJobs(ContainerJobs jobs) throws RemoteException {
jobs.setSession(containerSessionID, sessionID);
log.info("Executing jobs for session ID: " + sessionID.getLongId());
log.info("Executing " + jobs.getJobs().size() + " Jobs!");
log.debug("Executing " + jobs.getJobs().size() + " Jobs!");
for (ContainerJob job : jobs.getJobs()) {
log.info("Job: " + job.getType().name() + " " + job.toString());
log.debug("Job: " + job.getType().name() + " " + job.toString());
}
ContainerJobResults results = containerProxy.getRemoteObject().execJobs(jobs);
log.info("Returning results for jobs from sessionID: " + sessionID.getLongId());
log.debug("Returning results for jobs from sessionID: " + sessionID.getLongId());
return results;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,15 @@ public ContainerSessionID createContainerSession(PlanSessionID planSessionID)

@Override
public void destroySession(PlanSessionID sessionID) throws RemoteException {
log.info("Inside Destroying session with ID: " + sessionID.getLongId());
try {
PlanEventScheduler eventScheduler = schedulerMap.get(sessionID);
IndependentEvents jobs = new IndependentEvents(eventScheduler.getState());
eventScheduler.closeSession(jobs);
eventScheduler.queueIndependentEvents(jobs);
Semaphore sem = new Semaphore(0);
if (!eventScheduler.getState().isTerminated()) {
log.info("State not yet terminated. " + sessionID.getLongId());
eventScheduler.getState()
.registerTerminationListener(new SemaphoreTerminationListener(sem));

log.debug(
"Waiting '" + forceSessionStopAfter_sec + "' seconds for session to stop ...");
boolean stopped = sem.tryAcquire(forceSessionStopAfter_sec, TimeUnit.SECONDS);
Expand All @@ -140,7 +137,7 @@ public void destroySession(PlanSessionID sessionID) throws RemoteException {
}
}

log.info("Destroying session with ID: " + sessionID.getLongId());
log.debug("Destroying session with ID: " + sessionID.getLongId());
PlanSessionReportID reportID = eventScheduler.getState().getPlanSessionReportID();
schedulerMap.remove(sessionID);
containerSessionMap.remove(sessionID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public GetStatsAndCloseSession(ContainerSession session) {
@Override
public void run() {
try {
log.info("Closing session: " + session.getSessionID().getLongId() + " , " + this.toString());
log.debug("Closing session: " + session.getSessionID().getLongId() + " , " + this.toString());
ContainerJobs jobs = new ContainerJobs();
jobs.addJob(GetStatisticsJob.instance);
results = session.execJobs(jobs);
Expand All @@ -99,7 +99,7 @@ public void run() {
exception = e;
log.error("Cannot close session " + session.getSessionID().getLongId(), e);
}finally{
log.info("Closed session: " + session.getSessionID().getLongId() + " , " + this.toString());
log.debug("Closed session: " + session.getSessionID().getLongId() + " , " + this.toString());
}
}
}

0 comments on commit 2db5323

Please sign in to comment.