diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/ExceptionDiags.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/ExceptionDiags.java index 6baf5c1fac..c7e3d2573f 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/ExceptionDiags.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/ExceptionDiags.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.http; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.lang.reflect.Constructor; @@ -33,7 +33,8 @@ * available in branch-1 too. */ public class ExceptionDiags { - private static final Log LOG = LogFactory.getLog(ExceptionDiags.class); + private static final Logger LOG = + LoggerFactory.getLogger(ExceptionDiags.class); /** text to point users elsewhere: {@value} */ private static final String FOR_MORE_DETAILS_SEE diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/RestClientBindings.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/RestClientBindings.java index d11c369bb2..f6917d3ffa 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/RestClientBindings.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/RestClientBindings.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.http; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.swift.exceptions.SwiftConfigurationException; @@ -39,7 +39,8 @@ * and then builds an appropriate Properties file. */ public final class RestClientBindings { - private static final Log LOG = LogFactory.getLog(RestClientBindings.class); + private static final Logger LOG = + LoggerFactory.getLogger(RestClientBindings.class); public static final String E_INVALID_NAME = "Invalid swift hostname '%s':" + " hostname must in form container.service"; diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java index ee6cc2fc3e..cf6bf9b972 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java @@ -40,8 +40,8 @@ import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.message.BasicHeader; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.swift.auth.ApiKeyAuthenticationRequest; import org.apache.hadoop.fs.swift.auth.ApiKeyCredentials; @@ -97,7 +97,8 @@ * details. */ public final class SwiftRestClient { - private static final Log LOG = LogFactory.getLog(SwiftRestClient.class); + private static final Logger LOG = + LoggerFactory.getLogger(SwiftRestClient.class); /** * Header that says "use newest version" -ensures that @@ -1725,7 +1726,7 @@ private HttpResponse execWithDebugOutput(M req, for (Header header : req.getAllHeaders()) { builder.append(header.toString()); } - LOG.debug(builder); + LOG.debug(builder.toString()); } HttpResponse resp = client.execute(req); if (LOG.isDebugEnabled()) { diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystem.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystem.java index 9217532333..191d56ff71 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystem.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystem.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.snative; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.BlockLocation; @@ -54,8 +54,8 @@ public class SwiftNativeFileSystem extends FileSystem { /** filesystem prefix: {@value} */ public static final String SWIFT = "swift"; - private static final Log LOG = - LogFactory.getLog(SwiftNativeFileSystem.class); + private static final Logger LOG = + LoggerFactory.getLogger(SwiftNativeFileSystem.class); /** * path to user work directory for storing temporary files diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java index a44051ac56..ed7a782284 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java @@ -22,8 +22,8 @@ import org.apache.http.Header; import org.apache.http.HttpStatus; import org.apache.http.message.BasicHeader; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileAlreadyExistsException; import org.apache.hadoop.fs.FileStatus; @@ -65,8 +65,8 @@ public class SwiftNativeFileSystemStore { private static final Pattern URI_PATTERN = Pattern.compile("\"\\S+?\""); private static final String PATTERN = "EEE, d MMM yyyy hh:mm:ss zzz"; - private static final Log LOG = - LogFactory.getLog(SwiftNativeFileSystemStore.class); + private static final Logger LOG = + LoggerFactory.getLogger(SwiftNativeFileSystemStore.class); private URI uri; private SwiftRestClient swiftRestClient; @@ -720,7 +720,7 @@ private void logDirectory(String message, SwiftObjectPath objectPath, if (LOG.isDebugEnabled()) { LOG.debug(message + ": listing of " + objectPath); for (FileStatus fileStatus : statuses) { - LOG.debug(fileStatus.getPath()); + LOG.debug(fileStatus.getPath().toString()); } } } diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeInputStream.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeInputStream.java index 23d8c09f03..bce7325c98 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeInputStream.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeInputStream.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.snative; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.fs.FSExceptionMessages; import org.apache.hadoop.fs.FSInputStream; import org.apache.hadoop.fs.FileSystem; @@ -43,7 +43,8 @@ */ class SwiftNativeInputStream extends FSInputStream { - private static final Log LOG = LogFactory.getLog(SwiftNativeInputStream.class); + private static final Logger LOG = + LoggerFactory.getLogger(SwiftNativeInputStream.class); /** * range requested off the server: {@value} diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java index 127fbb8d46..ac49a8a649 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.snative; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.swift.exceptions.SwiftConnectionClosedException; @@ -45,8 +45,8 @@ class SwiftNativeOutputStream extends OutputStream { public static final int ATTEMPT_LIMIT = 3; private long filePartSize; - private static final Log LOG = - LogFactory.getLog(SwiftNativeOutputStream.class); + private static final Logger LOG = + LoggerFactory.getLogger(SwiftNativeOutputStream.class); private Configuration conf; private String key; private File backupFile; diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftTestUtils.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftTestUtils.java index 726045ee9e..2e3abce251 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftTestUtils.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftTestUtils.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.util; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; @@ -40,8 +40,8 @@ */ public class SwiftTestUtils extends org.junit.Assert { - private static final Log LOG = - LogFactory.getLog(SwiftTestUtils.class); + private static final Logger LOG = + LoggerFactory.getLogger(SwiftTestUtils.class); public static final String TEST_FS_SWIFT = "test.fs.swift.name"; public static final String IO_FILE_BUFFER_SIZE = "io.file.buffer.size"; diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftUtils.java b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftUtils.java index 10e49c2473..f218a80595 100644 --- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftUtils.java +++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftUtils.java @@ -18,7 +18,7 @@ package org.apache.hadoop.fs.swift.util; -import org.apache.commons.logging.Log; +import org.slf4j.Logger; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -98,7 +98,7 @@ public static boolean isRootDir(SwiftObjectPath swiftObject) { * @param text text message * @param args args arguments to the print statement */ - public static void debug(Log log, String text, Object... args) { + public static void debug(Logger log, String text, Object... args) { if (log.isDebugEnabled()) { log.debug(String.format(text, args)); } @@ -110,7 +110,7 @@ public static void debug(Log log, String text, Object... args) { * @param text text message * @param ex exception */ - public static void debugEx(Log log, String text, Exception ex) { + public static void debugEx(Logger log, String text, Exception ex) { if (log.isDebugEnabled()) { log.debug(text + ex, ex); } @@ -124,7 +124,7 @@ public static void debugEx(Log log, String text, Exception ex) { * @param text text message * @param args args arguments to the print statement */ - public static void trace(Log log, String text, Object... args) { + public static void trace(Logger log, String text, Object... args) { if (log.isTraceEnabled()) { log.trace(String.format(text, args)); } diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java index 99e03c7a71..4361a06a94 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; @@ -53,8 +53,8 @@ public class SwiftFileSystemBaseTest extends Assert implements SwiftTestConstants { - protected static final Log LOG = - LogFactory.getLog(SwiftFileSystemBaseTest.class); + protected static final Logger LOG = + LoggerFactory.getLogger(SwiftFileSystemBaseTest.class); protected SwiftNativeFileSystem fs; protected static SwiftNativeFileSystem lastFs; protected byte[] data = SwiftTestUtils.dataset(getBlockSize() * 2, 0, 255); diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestLogResources.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestLogResources.java index 6b1b79fa5e..99c6962cb4 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestLogResources.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestLogResources.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.junit.Test; import java.net.URL; @@ -28,8 +28,8 @@ * This test just debugs which log resources are being picked up */ public class TestLogResources implements SwiftTestConstants { - protected static final Log LOG = - LogFactory.getLog(TestLogResources.class); + protected static final Logger LOG = + LoggerFactory.getLogger(TestLogResources.class); private void printf(String format, Object... args) { String msg = String.format(format, args); diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestReadPastBuffer.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestReadPastBuffer.java index cdcd7626c8..c195bffc51 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestReadPastBuffer.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestReadPastBuffer.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.Path; @@ -44,8 +44,8 @@ * to get confused. */ public class TestReadPastBuffer extends SwiftFileSystemBaseTest { - protected static final Log LOG = - LogFactory.getLog(TestReadPastBuffer.class); + protected static final Logger LOG = + LoggerFactory.getLogger(TestReadPastBuffer.class); public static final int SWIFT_READ_BLOCKSIZE = 4096; public static final int SEEK_FILE_LEN = SWIFT_READ_BLOCKSIZE * 2; diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSeek.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSeek.java index 9a28886473..51fa92a2eb 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSeek.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSeek.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.Path; @@ -48,8 +48,8 @@ * to get confused. */ public class TestSeek extends SwiftFileSystemBaseTest { - protected static final Log LOG = - LogFactory.getLog(TestSeek.class); + protected static final Logger LOG = + LoggerFactory.getLogger(TestSeek.class); public static final int SMALL_SEEK_FILE_LEN = 256; private Path testPath; diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java index c84be6b3da..516dc99fab 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java @@ -19,8 +19,8 @@ package org.apache.hadoop.fs.swift; import org.junit.Assert; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.ParentNotDirectoryException; import org.apache.hadoop.fs.Path; @@ -46,8 +46,8 @@ */ public class TestSwiftFileSystemBasicOps extends SwiftFileSystemBaseTest { - private static final Log LOG = - LogFactory.getLog(TestSwiftFileSystemBasicOps.class); + private static final Logger LOG = + LoggerFactory.getLogger(TestSwiftFileSystemBasicOps.class); @Test(timeout = SWIFT_TEST_TIMEOUT) public void testLsRoot() throws Throwable { diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemConcurrency.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemConcurrency.java index 9b557e7850..c447919efa 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemConcurrency.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemConcurrency.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.swift.util.SwiftTestUtils; @@ -37,8 +37,8 @@ * Consider it "best effort" */ public class TestSwiftFileSystemConcurrency extends SwiftFileSystemBaseTest { - protected static final Log LOG = - LogFactory.getLog(TestSwiftFileSystemConcurrency.class); + protected static final Logger LOG = + LoggerFactory.getLogger(TestSwiftFileSystemConcurrency.class); private Exception thread1Ex, thread2Ex; public static final String TEST_RACE_CONDITION_ON_DELETE_DIR = "/test/testraceconditionondirdeletetest"; diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemContract.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemContract.java index baeb4f3676..1655b95231 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemContract.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemContract.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystemContractBaseTest; import org.apache.hadoop.fs.ParentNotDirectoryException; @@ -47,8 +47,8 @@ */ public class TestSwiftFileSystemContract extends FileSystemContractBaseTest { - private static final Log LOG = - LogFactory.getLog(TestSwiftFileSystemContract.class); + private static final Logger LOG = + LoggerFactory.getLogger(TestSwiftFileSystemContract.class); /** * Override this if the filesystem is not case sensitive diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftObjectPath.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftObjectPath.java index 338763cfe8..5692b48f11 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftObjectPath.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftObjectPath.java @@ -17,8 +17,8 @@ */ package org.apache.hadoop.fs.swift; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.swift.http.RestClientBindings; import org.apache.hadoop.fs.swift.http.SwiftRestClient; @@ -36,7 +36,8 @@ * Unit tests for SwiftObjectPath class. */ public class TestSwiftObjectPath implements SwiftTestConstants { - private static final Log LOG = LogFactory.getLog(TestSwiftObjectPath.class); + private static final Logger LOG = + LoggerFactory.getLogger(TestSwiftObjectPath.class); /** * What an endpoint looks like. This is derived from a (valid) diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/TestSwiftRestClient.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/TestSwiftRestClient.java index 17f616bd9e..7568c11c56 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/TestSwiftRestClient.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/TestSwiftRestClient.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.http; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.swift.SwiftTestConstants; @@ -39,8 +39,8 @@ import java.net.URI; public class TestSwiftRestClient implements SwiftTestConstants { - private static final Log LOG = - LogFactory.getLog(TestSwiftRestClient.class); + private static final Logger LOG = + LoggerFactory.getLogger(TestSwiftRestClient.class); private Configuration conf; private boolean runTests; @@ -110,7 +110,7 @@ public void testPutAndDelete() throws Throwable { //expected } for (DurationStats stats: client.getOperationStatistics()) { - LOG.info(stats); + LOG.info(stats.toString()); } } diff --git a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/TestWriteManySmallFiles.java b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/TestWriteManySmallFiles.java index 8694f6ca48..1d6cfa2e86 100644 --- a/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/TestWriteManySmallFiles.java +++ b/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/TestWriteManySmallFiles.java @@ -18,8 +18,8 @@ package org.apache.hadoop.fs.swift.scale; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.swift.util.Duration; @@ -29,7 +29,8 @@ public class TestWriteManySmallFiles extends SwiftScaleTestBase { - public static final Log LOG = LogFactory.getLog(TestWriteManySmallFiles.class); + public static final Logger LOG = + LoggerFactory.getLogger(TestWriteManySmallFiles.class); @Test(timeout = SWIFT_BULK_IO_TEST_TIMEOUT) public void testScaledWriteThenRead() throws Throwable {