Browse Source

HADOOP-11762. Enable swift distcp to secure HDFS (Chen He via aw)

Allen Wittenauer 9 years ago
parent
commit
68d1f4bfe8

+ 2 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -495,6 +495,8 @@ Trunk (Unreleased)
     HADOOP-12107. long running apps may have a huge number of StatisticsData
     HADOOP-12107. long running apps may have a huge number of StatisticsData
     instances under FileSystem (Sangjin Lee via Ming Ma)
     instances under FileSystem (Sangjin Lee via Ming Ma)
 
 
+    HADOOP-11762. Enable swift distcp to secure HDFS (Chen He via aw)
+
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
     HADOOP-7761. Improve the performance of raw comparisons. (todd)
     HADOOP-7761. Improve the performance of raw comparisons. (todd)

+ 9 - 0
hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystem.java

@@ -221,6 +221,15 @@ public class SwiftNativeFileSystem extends FileSystem {
     }
     }
   }
   }
 
 
+  /**
+   * Override getCononicalServiceName because we don't support token in Swift
+   */
+  @Override
+  public String getCanonicalServiceName() {
+    // Does not support Token
+    return null;
+  }
+
   /**
   /**
    * Return an array containing hostnames, offset and size of
    * Return an array containing hostnames, offset and size of
    * portions of the given file.  For a nonexistent
    * portions of the given file.  For a nonexistent

+ 7 - 0
hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java

@@ -18,6 +18,7 @@
 
 
 package org.apache.hadoop.fs.swift;
 package org.apache.hadoop.fs.swift;
 
 
+import org.junit.Assert;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileStatus;
@@ -286,4 +287,10 @@ public class TestSwiftFileSystemBasicOps extends SwiftFileSystemBaseTest {
     }
     }
   }
   }
 
 
+  @Test(timeout = SWIFT_TEST_TIMEOUT)
+  public void testGetCanonicalServiceName() {
+    Assert.assertNull(fs.getCanonicalServiceName());
+  }
+
+
 }
 }