HADOOP-15274. Move hadoop-openstack to slf4j

Signed-off-by: Akira Ajisaka <aajis...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/29233c3c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/29233c3c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/29233c3c

Branch: refs/heads/HDFS-7240
Commit: 29233c3c4a5ef6c7829177fef454c0052d852cc5
Parents: 96e8f26
Author: fang zhenyi <fang.zhe...@zte.com.cn>
Authored: Thu Mar 1 15:08:21 2018 -0800
Committer: Akira Ajisaka <aajis...@apache.org>
Committed: Thu Mar 1 15:08:30 2018 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/fs/swift/http/ExceptionDiags.java   |  7 ++++---
 .../apache/hadoop/fs/swift/http/RestClientBindings.java   |  7 ++++---
 .../org/apache/hadoop/fs/swift/http/SwiftRestClient.java  |  9 +++++----
 .../hadoop/fs/swift/snative/SwiftNativeFileSystem.java    |  8 ++++----
 .../fs/swift/snative/SwiftNativeFileSystemStore.java      | 10 +++++-----
 .../hadoop/fs/swift/snative/SwiftNativeInputStream.java   |  7 ++++---
 .../hadoop/fs/swift/snative/SwiftNativeOutputStream.java  |  8 ++++----
 .../org/apache/hadoop/fs/swift/util/SwiftTestUtils.java   |  8 ++++----
 .../java/org/apache/hadoop/fs/swift/util/SwiftUtils.java  |  8 ++++----
 .../apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java   |  8 ++++----
 .../java/org/apache/hadoop/fs/swift/TestLogResources.java |  8 ++++----
 .../org/apache/hadoop/fs/swift/TestReadPastBuffer.java    |  8 ++++----
 .../test/java/org/apache/hadoop/fs/swift/TestSeek.java    |  8 ++++----
 .../hadoop/fs/swift/TestSwiftFileSystemBasicOps.java      |  8 ++++----
 .../hadoop/fs/swift/TestSwiftFileSystemConcurrency.java   |  8 ++++----
 .../hadoop/fs/swift/TestSwiftFileSystemContract.java      |  8 ++++----
 .../org/apache/hadoop/fs/swift/TestSwiftObjectPath.java   |  7 ++++---
 .../apache/hadoop/fs/swift/http/TestSwiftRestClient.java  | 10 +++++-----
 .../hadoop/fs/swift/scale/TestWriteManySmallFiles.java    |  7 ++++---
 19 files changed, 79 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/ExceptionDiags.java
----------------------------------------------------------------------
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 6baf5c1..c7e3d25 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 @@ import java.net.UnknownHostException;
  * 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

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/RestClientBindings.java
----------------------------------------------------------------------
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 d11c369..f6917d3 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 @@ import static 
org.apache.hadoop.fs.swift.http.SwiftProtocolConstants.*;
  * 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";

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java
----------------------------------------------------------------------
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 ee6cc2f..cf6bf9b 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.CloseableHttpClient;
 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 @@ import static 
org.apache.hadoop.fs.swift.http.SwiftProtocolConstants.*;
  * 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 @@ public final class SwiftRestClient {
       for (Header header : req.getAllHeaders()) {
         builder.append(header.toString());
       }
-      LOG.debug(builder);
+      LOG.debug(builder.toString());
     }
     HttpResponse resp = client.execute(req);
     if (LOG.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystem.java
----------------------------------------------------------------------
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 9217532..191d56f 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

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java
----------------------------------------------------------------------
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 a44051a..ed7a782 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 com.fasterxml.jackson.databind.type.CollectionType;
 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 @@ import java.util.regex.Pattern;
 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 @@ public class SwiftNativeFileSystemStore {
     if (LOG.isDebugEnabled()) {
       LOG.debug(message + ": listing of " + objectPath);
       for (FileStatus fileStatus : statuses) {
-        LOG.debug(fileStatus.getPath());
+        LOG.debug(fileStatus.getPath().toString());
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeInputStream.java
----------------------------------------------------------------------
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 23d8c09..bce7325 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 @@ import java.io.IOException;
  */
 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}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java
----------------------------------------------------------------------
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 127fbb8..ac49a8a 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 @@ import java.io.OutputStream;
 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;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftTestUtils.java
----------------------------------------------------------------------
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 726045e..2e3abce 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 @@ import java.util.Properties;
  */
 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";

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftUtils.java
----------------------------------------------------------------------
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 10e49c2..f218a80 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 final class SwiftUtils {
    * @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 final class SwiftUtils {
    * @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 final class SwiftUtils {
    * @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));
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java
----------------------------------------------------------------------
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 99e03c7..4361a06 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 @@ import static 
org.apache.hadoop.fs.swift.util.SwiftTestUtils.noteAction;
 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);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestLogResources.java
----------------------------------------------------------------------
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 6b1b79f..99c6962 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 @@ import java.net.URL;
  * 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);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestReadPastBuffer.java
----------------------------------------------------------------------
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 cdcd762..c195bff 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 @@ import org.junit.Test;
  * 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;
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSeek.java
----------------------------------------------------------------------
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 9a28886..51fa92a 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 @@ import java.io.IOException;
  * 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;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java
----------------------------------------------------------------------
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 c84be6b..516dc99 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 @@ import static 
org.apache.hadoop.fs.swift.util.SwiftTestUtils.writeTextFile;
  */
 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 {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemConcurrency.java
----------------------------------------------------------------------
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 9b557e7..c447919 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 @@ import java.util.concurrent.TimeUnit;
  * 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";

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemContract.java
----------------------------------------------------------------------
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 baeb4f3..1655b95 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 @@ import java.net.URISyntaxException;
  */
 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

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftObjectPath.java
----------------------------------------------------------------------
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 338763c..5692b48 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 @@ import static org.junit.Assert.assertTrue;
  * 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)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/TestSwiftRestClient.java
----------------------------------------------------------------------
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 17f616b..7568c11 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.io.IOException;
 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 class TestSwiftRestClient implements 
SwiftTestConstants {
       //expected
     }
     for (DurationStats stats: client.getOperationStatistics()) {
-      LOG.info(stats);
+      LOG.info(stats.toString());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/29233c3c/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/TestWriteManySmallFiles.java
----------------------------------------------------------------------
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 8694f6c..1d6cfa2 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 @@ import org.junit.Test;
 
 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 {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to