From ef8f0ff5b56b0a2123eff8aaa4aa5b4949c2cfe7 Mon Sep 17 00:00:00 2001 From: ashamw <96609310+ashamw@users.noreply.github.com> Date: Wed, 20 Sep 2023 02:02:17 +0530 Subject: [PATCH] Fixes #176 (#183) Co-authored-by: ashamahadev --- .../amazon/nio/spi/s3/S3DirectReadableByteChannel.java | 2 +- .../software/amazon/nio/spi/s3/S3ReadAheadByteChannel.java | 2 +- .../software/amazon/nio/spi/s3/S3SeekableByteChannel.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/software/amazon/nio/spi/s3/S3DirectReadableByteChannel.java b/src/main/java/software/amazon/nio/spi/s3/S3DirectReadableByteChannel.java index 774c2171..a75e376e 100644 --- a/src/main/java/software/amazon/nio/spi/s3/S3DirectReadableByteChannel.java +++ b/src/main/java/software/amazon/nio/spi/s3/S3DirectReadableByteChannel.java @@ -73,7 +73,7 @@ public int read(ByteBuffer dst) throws IOException { .range(range)); byte[] s3Bytes = responseBytes.asByteArray(); - logger.info("read {} bytes from {}", s3Bytes.length, key); + logger.debug("read {} bytes from {}", s3Bytes.length, key); delegator.position(delegator.position() + s3Bytes.length); logger.debug("new position of {} is: {}", key, delegator.position()); diff --git a/src/main/java/software/amazon/nio/spi/s3/S3ReadAheadByteChannel.java b/src/main/java/software/amazon/nio/spi/s3/S3ReadAheadByteChannel.java index 17bb65e6..f4576fae 100644 --- a/src/main/java/software/amazon/nio/spi/s3/S3ReadAheadByteChannel.java +++ b/src/main/java/software/amazon/nio/spi/s3/S3ReadAheadByteChannel.java @@ -74,7 +74,7 @@ public S3ReadAheadByteChannel(S3Path path, int maxFragmentSize, int maxNumberFra if (maxNumberFragments < 2) throw new IllegalArgumentException("maxNumberFragments must be >= 2"); - logger.info("max read ahead fragments '{}' with size '{}' bytes", maxNumberFragments, maxFragmentSize); + logger.debug("max read ahead fragments '{}' with size '{}' bytes", maxNumberFragments, maxFragmentSize); this.client = client; this.path = path; this.delegator = delegator; diff --git a/src/main/java/software/amazon/nio/spi/s3/S3SeekableByteChannel.java b/src/main/java/software/amazon/nio/spi/s3/S3SeekableByteChannel.java index 140cd68f..06485cb6 100644 --- a/src/main/java/software/amazon/nio/spi/s3/S3SeekableByteChannel.java +++ b/src/main/java/software/amazon/nio/spi/s3/S3SeekableByteChannel.java @@ -100,12 +100,12 @@ private S3SeekableByteChannel(S3Path s3Path, S3AsyncClient s3Client, long startA S3NioSpiConfiguration config = new S3NioSpiConfiguration(); if (options.contains(StandardOpenOption.WRITE)) { - LOGGER.info("using S3WritableByteChannel as write delegate for path '{}'", s3Path.toUri()); + LOGGER.debug("using S3WritableByteChannel as write delegate for path '{}'", s3Path.toUri()); readDelegate = null; writeDelegate = new S3WritableByteChannel(s3Path, s3Client, options, timeout, timeUnit); position = 0L; } else if (options.contains(StandardOpenOption.READ) || options.size() == 0) { - LOGGER.info("using S3ReadAheadByteChannel as read delegate for path '{}'", s3Path.toUri()); + LOGGER.debug("using S3ReadAheadByteChannel as read delegate for path '{}'", s3Path.toUri()); readDelegate = new S3ReadAheadByteChannel(s3Path, config.getMaxFragmentSize(), config.getMaxFragmentNumber(), s3Client, this, timeout, timeUnit); writeDelegate = null; } else {