Skip to content

Commit bcb4c25

Browse files
committed
HADOOP-18242. checkstyle + merge conflicts
1 parent 6cb9a81 commit bcb4c25

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3ABlockOutputStream.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public void close() throws IOException {
461461
*/
462462
private synchronized void cleanupOnClose() {
463463
cleanupWithLogger(LOG, getActiveBlock(), blockFactory);
464-
mergeThreadIOStatistics(threadIOStatistics);
464+
mergeThreadIOStatistics(statistics.getIOStatistics());
465465
LOG.debug("Statistics: {}", statistics);
466466
cleanupWithLogger(LOG, statistics);
467467
clearActiveBlock();
@@ -471,11 +471,11 @@ private synchronized void cleanupOnClose() {
471471
* Merging the current thread's IOStatistics with the current IOStatistics
472472
* context.
473473
*
474-
* @param threadIOStatistics thread IOStatistics to be merged.
474+
* @param streamStatistics Stream statistics to be merged into thread
475+
* statistics aggregator.
475476
*/
476-
private void mergeThreadIOStatistics(
477-
IOStatisticsAggregator threadIOStatistics) {
478-
threadIOStatistics.aggregate(statistics.getIOStatistics());
477+
private void mergeThreadIOStatistics(IOStatistics streamStatistics) {
478+
threadIOStatistics.aggregate(streamStatistics);
479479
currentIOStatisticsContext().setThreadIOStatistics(threadIOStatistics);
480480
}
481481

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AInputStream.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import org.slf4j.Logger;
3838
import org.slf4j.LoggerFactory;
3939

40-
import org.apache.hadoop.classification.VisibleForTesting;
4140
import org.apache.hadoop.fs.statistics.IOStatisticsAggregator;
4241
import org.apache.hadoop.util.Preconditions;
4342
import org.apache.hadoop.classification.InterfaceAudience;
@@ -58,7 +57,6 @@
5857
import org.apache.hadoop.fs.statistics.IOStatistics;
5958
import org.apache.hadoop.fs.statistics.IOStatisticsSource;
6059
import org.apache.hadoop.io.IOUtils;
61-
import org.apache.hadoop.util.Preconditions;
6260
import org.apache.hadoop.util.functional.CallableRaisingIOE;
6361

6462
import static java.util.Objects.requireNonNull;
@@ -609,7 +607,7 @@ public synchronized void close() throws IOException {
609607
// close or abort the stream; blocking
610608
awaitFuture(closeStream("close() operation", false, true));
611609
// Collect ThreadLevel IOStats
612-
mergeThreadIOStatistics(threadIOStatistics);
610+
mergeThreadIOStatistics(streamStatistics.getIOStatistics());
613611
LOG.debug("Statistics of stream {}\n{}", key, streamStatistics);
614612
// end the client+audit span.
615613
client.close();
@@ -626,10 +624,11 @@ public synchronized void close() throws IOException {
626624
* Merging the current thread's IOStatistics with the current IOStatistics
627625
* context.
628626
*
629-
* @param threadIOStatistics thread IOStatistics to be merged.
627+
* @param streamIOStats Stream statistics to be merged into thread
628+
* statistics aggregator.
630629
*/
631-
private void mergeThreadIOStatistics(IOStatisticsAggregator threadIOStatistics) {
632-
threadIOStatistics.aggregate(streamStatistics.getIOStatistics());
630+
private void mergeThreadIOStatistics(IOStatistics streamIOStats) {
631+
threadIOStatistics.aggregate(streamIOStats);
633632
currentIOStatisticsContext().setThreadIOStatistics(threadIOStatistics);
634633
}
635634

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AIOStatisticsContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public void testThreadIOStatisticsForDifferentThreads()
225225
}
226226

227227
// Worker thread work and wait for it to finish.
228-
testWorkerThread workerThread = new testWorkerThread();
228+
TestWorkerThread workerThread = new TestWorkerThread();
229229
long workerThreadID = workerThread.getId();
230230
workerThread.start();
231231
workerThread.join();
@@ -307,7 +307,7 @@ private void assertThreadStatisticsForThread(long testThreadId,
307307
/**
308308
* Simulating doing some work in a separate thread.
309309
*/
310-
private class testWorkerThread extends Thread implements Runnable {
310+
private class TestWorkerThread extends Thread implements Runnable {
311311
@Override
312312
public void run() {
313313
S3AFileSystem fs = getFileSystem();

0 commit comments

Comments
 (0)