hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takashi Ohnishi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10216) distcp -diff relative path exception
Date Thu, 14 Apr 2016 02:03:25 GMT

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

Takashi Ohnishi commented on HDFS-10216:
----------------------------------------

Thank you, [~jzhuge] for helpful reviewing ! :)

I have updated the patch with your advice. Please see the attached one.

{quote}
  1.  683: foo is unused
{quote}

Oops. I want to create f3 under foo dir, but not did so.

{quote}
   2. 697: use dfs.getWorkingDirectory(), e.g.:
{code}
    Path sourcePath = new Path(dfs.getWorkingDirectory(), "source");
{code}
{quote}
Ah, that's a very smart. 

{quote}
  3. 708: use target.toString() instead of "/target".
  4. 710-714: try block is not necessary; junit will catch and print full stacktrace.
In general, avoid hard-coded "/", use Path.SEPARATOR instead.
{quote}
I have fixed them.


> distcp -diff relative path exception
> ------------------------------------
>
>                 Key: HDFS-10216
>                 URL: https://issues.apache.org/jira/browse/HDFS-10216
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: distcp
>    Affects Versions: 2.6.0
>            Reporter: John Zhuge
>            Assignee: Takashi Ohnishi
>            Priority: Critical
>         Attachments: HDFS-10216.1.patch, HDFS-10216.2.patch, HDFS-10216.3.patch
>
>
> Got this exception when running {{distcp -diff}} with relative paths:
> {code}
> $ hadoop distcp -update -diff s1 s2 d1 d2
> 16/03/25 09:45:40 INFO tools.DistCp: Input Options: DistCpOptions{atomicCommit=false,
syncFolder=true, deleteMissing=false, ignoreFailures=false, maxMaps=20, sslConfigurationFile='null',
copyStrategy='uniformsize', sourceFileListing=null, sourcePaths=[d1], targetPath=d2, targetPathExists=true,
preserveRawXattrs=false, filtersFile='null'}
> 16/03/25 09:45:40 INFO client.RMProxy: Connecting to ResourceManager at jzhuge-balancer-1.vpc.cloudera.com/172.26.21.70:8032
> 16/03/25 09:45:41 ERROR tools.DistCp: Exception encountered 
> java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute
URI: hdfs://jzhuge-balancer-1.vpc.cloudera.com:8020./d1/.snapshot/s2
> 	at org.apache.hadoop.fs.Path.initialize(Path.java:206)
> 	at org.apache.hadoop.fs.Path.<init>(Path.java:197)
> 	at org.apache.hadoop.tools.SimpleCopyListing.getPathWithSchemeAndAuthority(SimpleCopyListing.java:193)
> 	at org.apache.hadoop.tools.SimpleCopyListing.addToFileListing(SimpleCopyListing.java:202)
> 	at org.apache.hadoop.tools.SimpleCopyListing.doBuildListingWithSnapshotDiff(SimpleCopyListing.java:243)
> 	at org.apache.hadoop.tools.SimpleCopyListing.doBuildListing(SimpleCopyListing.java:172)
> 	at org.apache.hadoop.tools.CopyListing.buildListing(CopyListing.java:86)
> 	at org.apache.hadoop.tools.DistCp.createInputFileListingWithDiff(DistCp.java:388)
> 	at org.apache.hadoop.tools.DistCp.execute(DistCp.java:164)
> 	at org.apache.hadoop.tools.DistCp.run(DistCp.java:123)
> 	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> 	at org.apache.hadoop.tools.DistCp.main(DistCp.java:436)
> Caused by: java.net.URISyntaxException: Relative path in absolute URI: hdfs://jzhuge-balancer-1.vpc.cloudera.com:8020./d1/.snapshot/s2
> 	at java.net.URI.checkPath(URI.java:1804)
> 	at java.net.URI.<init>(URI.java:752)
> 	at org.apache.hadoop.fs.Path.initialize(Path.java:203)
> 	... 11 more
> {code}
> But theses commands worked:
> * Absolute path: {{hadoop distcp -update -diff s1 s2 /user/systest/d1 /user/systest/d2}}
> * No {{-diff}}: {{hadoop distcp -update d1 d2}}
> However, everything was fine when I ran {{hadoop distcp -update -diff s1 s2 d1 d2}} again.
I am not sure the problem only exists with option {{-diff}}. Trying to reproduce.



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

Mime
View raw message