hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hancock <jhancock1...@gmail.com>
Subject Re: Error:Hdfs Client for hadoop using native java api
Date Thu, 19 Jul 2012 09:41:08 GMT
Sandeep,

I don't understand your situation completely, but why not just use
bin/hadoop dfs -copyFromLocal <local-file-name> <hdfs-file-name> ?

-John

On Wed, Jul 18, 2012 at 11:33 AM, Sandeep Reddy P <
sandeepreddy.3647@gmail.com> wrote:

> Hi,
> I'm trying to load data into hdfs from local linux file system using java
> code from a windows machine.But i'm getting the error
>
> java.lang.IllegalArgumentException: Wrong FS:
> hdfs://hadoop1.devqa.local:8020/user/hdfs/java, expected: file:///
>     at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:410)
>     at
>
> org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:56)
>     at
>
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:404)
>     at
>
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251)
>     at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:797)
>     at org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:349)
>     at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:205)
>     at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:157)
>     at
>
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:55)
>     at
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1292)
>     at Hdfs.main(Hdfs.java:18)
> File not found
>
> Can any one please help me with the issue.
>
> --
> Thanks,
> sandeep
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message