hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject hadoop git commit: HDFS-11098. Datanode in tests cannot start in Windows after HDFS-10638 (Contributed by Vinayakumar B)
Date Fri, 04 Nov 2016 03:02:21 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 5cad93d5c -> 69dd5fa2d


HDFS-11098. Datanode in tests cannot start in Windows after HDFS-10638 (Contributed by Vinayakumar
B)


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

Branch: refs/heads/trunk
Commit: 69dd5fa2d43eefeec112f36b91a13513ac21a763
Parents: 5cad93d
Author: Vinayakumar B <vinayakumarb@apache.org>
Authored: Fri Nov 4 08:31:43 2016 +0530
Committer: Vinayakumar B <vinayakumarb@apache.org>
Committed: Fri Nov 4 08:31:43 2016 +0530

----------------------------------------------------------------------
 .../apache/hadoop/hdfs/server/datanode/StorageLocation.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/69dd5fa2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java
index a040395..1bd3782 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java
@@ -62,8 +62,11 @@ public class StorageLocation implements Comparable<StorageLocation>{
       // make sure all URIs that point to a file have the same scheme
       try {
         File uriFile = new File(uri.getPath());
-        String absPath = uriFile.getAbsolutePath();
-        uri = new URI("file", null, absPath, uri.getQuery(), uri.getFragment());
+        String uriStr = uriFile.toURI().normalize().toString();
+        if (uriStr.endsWith("/")) {
+          uriStr = uriStr.substring(0, uriStr.length() - 1);
+        }
+        uri = new URI(uriStr);
       } catch (URISyntaxException e) {
         throw new IllegalArgumentException(
             "URI: " + uri + " is not in the expected format");


---------------------------------------------------------------------
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