From f6f65257b10ac28a04dea379c8008a11c5c96a6d Mon Sep 17 00:00:00 2001 From: James McMullan Date: Fri, 3 May 2024 08:36:49 -0400 Subject: [PATCH] Code review changes --- .../main/java/org/hpccsystems/dfs/client/FileUtility.java | 5 ----- .../org/hpccsystems/dfs/client/HpccRemoteFileReader.java | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java index 3be16591f..483065663 100644 --- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java +++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java @@ -635,11 +635,6 @@ private static String[] filterFilesByFormat(String[] srcFiles, FileFormat format private static void executeTasks(Runnable[] tasks, int numThreads) throws Exception { - // if (tasks.length > numThreads) - // { - // numThreads = tasks.length; - // } - int numTasksPerThread = tasks.length / numThreads; int numResidualTasks = tasks.length % numThreads; diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java index 62c6ef3bb..c3bb5da84 100644 --- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java +++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java @@ -292,7 +292,7 @@ private boolean retryRead() } catch (Exception e) { - log.error("Failed to retry read for " + this.dataPartition.toString() + " " + e.getMessage()); + log.error("Failed to retry read for " + this.dataPartition.toString() + " " + e.getMessage(), e); return false; } @@ -422,7 +422,7 @@ public boolean hasNext() if (!retryRead()) { canReadNext = false; - log.error("Read failure for " + this.dataPartition.toString()); + log.error("Read failure for " + this.dataPartition.toString(), e); java.util.NoSuchElementException exception = new java.util.NoSuchElementException("Fatal read error: " + e.getMessage()); exception.initCause(e); throw exception; @@ -456,7 +456,7 @@ public T next() { if (!retryRead()) { - log.error("Read failure for " + this.dataPartition.toString() + " " + e.getMessage()); + log.error("Read failure for " + this.dataPartition.toString() + " " + e.getMessage(), e); java.util.NoSuchElementException exception = new java.util.NoSuchElementException("Fatal read error: " + e.getMessage()); exception.initCause(e); throw exception;