Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop, mail # user - Error:Hdfs Client for hadoop using native java api


Copy link to this message
-
Re: Error:Hdfs Client for hadoop using native java api
shashwat shriparv 2012-07-22, 20:31
there may be a problem with hostname resolution check if it is forward and
backword resolvable...and if you have any ip address anywhere please
replace it with hostname and the try..

On Sun, Jul 22, 2012 at 9:56 PM, Minh Duc Nguyen <[EMAIL PROTECTED]> wrote:

> As Shaswat mentioned previously, you're problem may be related to your
> configuration.
>
> Is core-site.xml on your classpath?  For example, what is the value for
> conf.get("fs.default.name")?
>
> Alternatively, you can set this property directly in your code:
>
> conf.set("fs.default.name", "hdfs://hadoop1.devqa.local:8020");
>
> HTH,
> Minh
>
> On Thu, Jul 19, 2012 at 1:18 PM, Sandeep Reddy P <
> [EMAIL PROTECTED]> wrote:
>
> > Hi Shashwat,
> > Here is the snippet of code which is throwing error
> >     Path phdfs = new Path(
> >                     "hdfs://hadoop1.devqa.local:8020/user/hdfs/java/");
> > 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)
> >
> > On Thu, Jul 19, 2012 at 12:02 PM, shashwat shriparv <
> > [EMAIL PROTECTED]> wrote:
> >
> > > Can you provide the code(some part of it if you don't want to throw the
> > > full code here) and let us know which part of your code is throwing
> this
> > > error.
> > >
> > > Regards
> > >
> > > ∞
> > > Shashwat Shriparv
> > >
> > >
> > >
> > > On Thu, Jul 19, 2012 at 6:46 PM, Sandeep Reddy P <
> > > [EMAIL PROTECTED]> wrote:
> > >
> > > > Hi John,
> > > > We have applications in windows. So our dev's need to connect to HDFS
> > > from
> > > > eclipse installed in windows. I'm trying to put data from
> <local-file>
> > to
> > > > <hdfs-file> using java code from windows.
> > > >
> > > > On Thu, Jul 19, 2012 at 5:41 AM, John Hancock <
> [EMAIL PROTECTED]
> > > > >wrote:
> > > >
> > > > > 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 <
> > > > > [EMAIL PROTECTED]> 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)


Shashwat Shriparv