[ 
https://issues.apache.org/jira/browse/HADOOP-11444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14954720#comment-14954720
 ] 

Hadoop QA commented on HADOOP-11444:
------------------------------------

\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | pre-patch |  16m 13s | Pre-patch trunk compilation is 
healthy. |
| {color:green}+1{color} | @author |   0m  0s | The patch does not contain any 
@author tags. |
| {color:red}-1{color} | tests included |   0m  0s | The patch doesn't appear 
to include any new or modified tests.  Please justify why no new tests are 
needed for this patch. Also please list what manual steps were performed to 
verify this patch. |
| {color:green}+1{color} | javac |   8m  5s | There were no new javac warning 
messages. |
| {color:green}+1{color} | javadoc |  10m 47s | There were no new javadoc 
warning messages. |
| {color:green}+1{color} | release audit |   0m 23s | The applied patch does 
not increase the total number of release audit warnings. |
| {color:green}+1{color} | checkstyle |   0m 19s | There were no new checkstyle 
issues. |
| {color:green}+1{color} | whitespace |   0m  0s | The patch has no lines that 
end in whitespace. |
| {color:green}+1{color} | install |   1m 27s | mvn install still works. |
| {color:green}+1{color} | eclipse:eclipse |   0m 35s | The patch built with 
eclipse:eclipse. |
| {color:green}+1{color} | findbugs |   0m 48s | The patch does not introduce 
any new Findbugs (version 3.0.0) warnings. |
| {color:green}+1{color} | tools/hadoop tests |   0m 15s | Tests passed in 
hadoop-aws. |
| | |  38m 56s | |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | 
http://issues.apache.org/jira/secure/attachment/12766290/HADOOP-11444.patch |
| Optional Tests | javadoc javac unit findbugs checkstyle |
| git revision | trunk / 5b6bae0 |
| hadoop-aws test log | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7800/artifact/patchprocess/testrun_hadoop-aws.txt
 |
| Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7800/testReport/ |
| Java | 1.7.0_55 |
| uname | Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP 
PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7800/console |


This message was automatically generated.

> Jets3tFileSystemStore fails to remove initial slash from object keys, 
> resulting in objects with double forward slashes being stored 
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11444
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11444
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/s3
>    Affects Versions: 2.2.0
>         Environment: java version "1.7.0_71"
> Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
> Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
>            Reporter: Enno Shioji
>            Priority: Minor
>         Attachments: HADOOP-11444.patch
>
>
> While writing to S3 using Spark 1.2.0's ReceiverInputDStream#saveAsTextFiles 
> with a S3 URL ("s3://fake-test/1234"), I noticed that files are written with 
> double forward slashes (e.g. "s3://fake-test//1234/-1419334280000/").  
> After debugging, it seems this is caused by 
> Jets3tFileSystemStore#pathToKey(path), which returns "/fake-test/1234/..." 
> for the input "s3://fake-test/1234/...". when it should hack off the first 
> forward slash.
> When I used a s3n URL and hence Jets3tNativeFileSystemStore, the double 
> slashes went away. Here are the comparison between their pathToKey 
> implementation:
>  Jets3tNativeFileSystemStore's implementation of pathToKey is:
> {code}
>   private static String pathToKey(Path path) {
>     if (path.toUri().getScheme() != null && path.toUri().getPath().isEmpty()) 
> {
>       // allow uris without trailing slash after bucket to refer to root,
>       // like s3n://mybucket
>       return "";
>     }
>     if (!path.isAbsolute()) {
>       throw new IllegalArgumentException("Path must be absolute: " + path);
>     }
>     String ret = path.toUri().getPath().substring(1); // remove initial slash
>     if (ret.endsWith("/") && (ret.indexOf("/") != ret.length() - 1)) {
>       ret = ret.substring(0, ret.length() -1);
>   }
>     return ret;
>   }
> {code}
> whereas Jets3tFileSystemStore uses:
> {code}
>   private String pathToKey(Path path) {
>     if (!path.isAbsolute()) {
>       throw new IllegalArgumentException("Path must be absolute: " + path);
>     }
>     return path.toUri().getPath();
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to