hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject [25/45] hadoop git commit: HDFS-13707. [PROVIDED Storage] Fix failing integration tests in ITestProvidedImplementation. Contributed by Virajith Jalaparti.
Date Mon, 02 Jul 2018 20:32:42 GMT
HDFS-13707. [PROVIDED Storage] Fix failing integration tests in ITestProvidedImplementation.
Contributed by Virajith Jalaparti.


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

Branch: refs/heads/HDDS-4
Commit: 73746c5da76d5e39df131534a1ec35dfc5d2529b
Parents: e4d7227
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Fri Jun 29 09:56:13 2018 -0700
Committer: Inigo Goiri <inigoiri@apache.org>
Committed: Fri Jun 29 09:56:13 2018 -0700

----------------------------------------------------------------------
 .../common/blockaliasmap/impl/TextFileRegionAliasMap.java       | 5 +++--
 .../hdfs/server/namenode/ITestProvidedImplementation.java       | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/73746c5d/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/blockaliasmap/impl/TextFileRegionAliasMap.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/blockaliasmap/impl/TextFileRegionAliasMap.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/blockaliasmap/impl/TextFileRegionAliasMap.java
index abe92e3..4d65142 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/blockaliasmap/impl/TextFileRegionAliasMap.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/blockaliasmap/impl/TextFileRegionAliasMap.java
@@ -28,6 +28,7 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
+import java.util.Base64;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Collections;
@@ -359,7 +360,7 @@ public class TextFileRegionAliasMap
       }
       byte[] nonce = new byte[0];
       if (f.length == 6) {
-        nonce = f[5].getBytes(Charset.forName("UTF-8"));
+        nonce = Base64.getDecoder().decode(f[5]);
       }
       return new FileRegion(Long.parseLong(f[0]), new Path(f[1]),
           Long.parseLong(f[2]), Long.parseLong(f[3]), Long.parseLong(f[4]),
@@ -451,7 +452,7 @@ public class TextFileRegionAliasMap
       out.append(Long.toString(block.getGenerationStamp()));
       if (psl.getNonce().length > 0) {
         out.append(delim)
-            .append(new String(psl.getNonce(), Charset.forName("UTF-8")));
+            .append(Base64.getEncoder().encodeToString(psl.getNonce()));
       }
       out.append("\n");
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/73746c5d/hadoop-tools/hadoop-fs2img/src/test/java/org/apache/hadoop/hdfs/server/namenode/ITestProvidedImplementation.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-fs2img/src/test/java/org/apache/hadoop/hdfs/server/namenode/ITestProvidedImplementation.java
b/hadoop-tools/hadoop-fs2img/src/test/java/org/apache/hadoop/hdfs/server/namenode/ITestProvidedImplementation.java
index 49c9bcf..7d3ab0e 100644
--- a/hadoop-tools/hadoop-fs2img/src/test/java/org/apache/hadoop/hdfs/server/namenode/ITestProvidedImplementation.java
+++ b/hadoop-tools/hadoop-fs2img/src/test/java/org/apache/hadoop/hdfs/server/namenode/ITestProvidedImplementation.java
@@ -132,7 +132,7 @@ public class ITestProvidedImplementation {
         nnDirPath.toString());
     conf.set(DFSConfigKeys.DFS_PROVIDED_ALIASMAP_TEXT_READ_FILE,
         new Path(nnDirPath, fileNameFromBlockPoolID(bpid)).toString());
-    conf.set(DFSConfigKeys.DFS_PROVIDED_ALIASMAP_TEXT_DELIMITER, ",");
+    conf.set(DFSConfigKeys.DFS_PROVIDED_ALIASMAP_TEXT_DELIMITER, "\t");
 
     conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR_PROVIDED,
         new File(providedPath.toUri()).toString());


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


Mime
View raw message