From df59446d55f23f4480457a8ae223a895d9d570d8 Mon Sep 17 00:00:00 2001 From: Rajesh Balamohan Date: Mon, 15 May 2023 14:20:44 +0530 Subject: [PATCH] Support for JDK 1.8. Fixed minor issues related to exception handling --- pom.xml | 17 +++++++++++++---- .../lst_bench/common/LSTBenchmarkExecutor.java | 17 +++++++++-------- .../lst_bench/sql/ConnectionManager.java | 5 +++++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 7c287c7e..66ef3891 100644 --- a/pom.xml +++ b/pom.xml @@ -9,8 +9,8 @@ 0.1-SNAPSHOT - 17 - 17 + 1.8 + 1.8 UTF-8 @@ -66,6 +66,12 @@ duckdb_jdbc 0.7.1 + + org.hsqldb + hsqldb + 2.2.7 + test + com.networknt json-schema-validator @@ -166,7 +172,8 @@ com.diffplug.spotless spotless-maven-plugin - 2.36.0 + + 2.30.0 @@ -186,6 +193,7 @@ ${project.basedir}/src/main/resources/license-header + src/main/resources/**/*.sql diff --git a/src/main/java/com/microsoft/lst_bench/common/LSTBenchmarkExecutor.java b/src/main/java/com/microsoft/lst_bench/common/LSTBenchmarkExecutor.java index 8d56f569..76e0fa63 100644 --- a/src/main/java/com/microsoft/lst_bench/common/LSTBenchmarkExecutor.java +++ b/src/main/java/com/microsoft/lst_bench/common/LSTBenchmarkExecutor.java @@ -115,7 +115,7 @@ public void execute() throws Exception { checkResults(executor.invokeAll(threads)); eventInfo = writePhaseEvent(phaseStartTime, phase.getId(), Status.SUCCESS); } catch (Exception e) { - LOGGER.error("Exception executing phase: " + phase.getId()); + LOGGER.error("Exception executing phase: " + phase.getId(), e); writePhaseEvent(phaseStartTime, phase.getId(), Status.FAILURE); throw e; } @@ -136,7 +136,7 @@ public void execute() throws Exception { Status.SUCCESS, new ObjectMapper().writeValueAsString(experimentMetadata)); } catch (Exception e) { - LOGGER.error("Exception executing experiment: " + config.getId()); + LOGGER.error("Exception executing experiment: " + config.getId(), e); writeExperimentEvent( repetitionStartTime, config.getId(), @@ -232,14 +232,14 @@ public Boolean call() throws SQLException { Map values = getRuntimeParameterValues(task); executeTask(connection, task, values); } catch (Exception e) { - LOGGER.error("Exception executing task: " + task.getId()); + LOGGER.error("Exception executing task: " + task.getId(), e); writeTaskEvent(taskStartTime, task.getId(), Status.FAILURE); throw e; } writeTaskEvent(taskStartTime, task.getId(), Status.SUCCESS); } } catch (Exception e) { - LOGGER.error("Exception executing session: " + session.getId()); + LOGGER.error("Exception executing session: " + session.getId(), e); writeSessionEvent(sessionStartTime, session.getId(), Status.FAILURE); throw e; } @@ -255,8 +255,9 @@ private void executeTask(Connection connection, TaskExec task, Map