[
https://issues.apache.org/jira/browse/HADOOP-16769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17602255#comment-17602255
]
ASF GitHub Bot commented on HADOOP-16769:
-----------------------------------------
steveloughran commented on code in PR #4842:
URL: https://github.com/apache/hadoop/pull/4842#discussion_r966898628
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java:
##########
@@ -444,9 +447,20 @@ public Path getLocalPathForWrite(String pathStr, long size,
int dirNum = ctx.getAndIncrDirNumLastAccessed(randomInc);
while (numDirsSearched < numDirs) {
long capacity = ctx.dirDF[dirNum].getAvailable();
+ if (capacity > maxCapacity) {
+ maxCapacity = capacity;
+ }
if (capacity > size) {
- returnPath =
- createPath(ctx.localDirs[dirNum], pathStr, checkWrite);
+ try {
+ returnPath = createPath(ctx.localDirs[dirNum], pathStr,
+ checkWrite);
+ } catch (IOException e) {
+ errorText = e.getMessage();
+ diskException = e;
+ if (LOG.isDebugEnabled()) {
Review Comment:
should just use {} entry for the ctx.localDirs[] ref, let slf4j handle the
toString call if needed, and you can then remove the outer debug enabled check
> LocalDirAllocator to provide diagnostics when file creation fails
> -----------------------------------------------------------------
>
> Key: HADOOP-16769
> URL: https://issues.apache.org/jira/browse/HADOOP-16769
> Project: Hadoop Common
> Issue Type: Improvement
> Components: util
> Reporter: Ramesh Kumar Thangarajan
> Assignee: groot
> Priority: Minor
> Labels: pull-request-available
> Attachments: HADOOP-16769.1.patch, HADOOP-16769.3.patch,
> HADOOP-16769.4.patch, HADOOP-16769.5.patch, HADOOP-16769.6.patch,
> HADOOP-16769.7.patch, HADOOP-16769.8.patch
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Log details of requested size and available capacity when file creation is
> not successuful
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]