You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Geoffry Roberts <th...@gmail.com> on 2014/03/06 18:50:46 UTC

HDFS java client vs the Command Line

All,

I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want to
create a directory.  From the command line it works; from java it doesn't.
 I have Googled and read bits and pieces that this is an issue with the OSX
"feature" of case insensitivity with its file system.  Can anyone confirm
this?  If so, can anyone advise as to a workaround?

Such a simple thing to get hung up on, go figure.

Thanks

-- 
There are ways and there are ways,

Geoffry Roberts

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
You could avoid all that code by simply placing the configuration
directory on the classpath - it will auto-load necessary properties.

On Thu, Mar 6, 2014 at 11:36 AM, Geoffry Roberts <th...@gmail.com> wrote:
> Thanks for the response.  I figured out what was wrong.
>
> I was doing this:
>
> Configuration conf = new Configuration();
>
> conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));
>
>
> F.CFG_PATH was close but not correct.  Fixed it and all is well.
>
>
> Thanks
>
>
>
>
> On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:
>>
>> I've never faced an issue trying to run hadoop and related programs on
>> my OSX. What is your error exactly?
>>
>> Have you ensured your Java classpath carries the configuration
>> directory on it as well, if you aren't running the program via "hadoop
>> jar ..." but via "java -cp ..." instead.
>>
>> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
>> wrote:
>> > All,
>> >
>> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
>> > to
>> > create a directory.  From the command line it works; from java it
>> > doesn't.
>> > I have Googled and read bits and pieces that this is an issue with the
>> > OSX
>> > "feature" of case insensitivity with its file system.  Can anyone
>> > confirm
>> > this?  If so, can anyone advise as to a workaround?
>> >
>> > Such a simple thing to get hung up on, go figure.
>> >
>> > Thanks
>> >
>> > --
>> > There are ways and there are ways,
>> >
>> > Geoffry Roberts
>>
>>
>>
>> --
>> Harsh J
>
>
>
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
You could avoid all that code by simply placing the configuration
directory on the classpath - it will auto-load necessary properties.

On Thu, Mar 6, 2014 at 11:36 AM, Geoffry Roberts <th...@gmail.com> wrote:
> Thanks for the response.  I figured out what was wrong.
>
> I was doing this:
>
> Configuration conf = new Configuration();
>
> conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));
>
>
> F.CFG_PATH was close but not correct.  Fixed it and all is well.
>
>
> Thanks
>
>
>
>
> On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:
>>
>> I've never faced an issue trying to run hadoop and related programs on
>> my OSX. What is your error exactly?
>>
>> Have you ensured your Java classpath carries the configuration
>> directory on it as well, if you aren't running the program via "hadoop
>> jar ..." but via "java -cp ..." instead.
>>
>> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
>> wrote:
>> > All,
>> >
>> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
>> > to
>> > create a directory.  From the command line it works; from java it
>> > doesn't.
>> > I have Googled and read bits and pieces that this is an issue with the
>> > OSX
>> > "feature" of case insensitivity with its file system.  Can anyone
>> > confirm
>> > this?  If so, can anyone advise as to a workaround?
>> >
>> > Such a simple thing to get hung up on, go figure.
>> >
>> > Thanks
>> >
>> > --
>> > There are ways and there are ways,
>> >
>> > Geoffry Roberts
>>
>>
>>
>> --
>> Harsh J
>
>
>
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
You could avoid all that code by simply placing the configuration
directory on the classpath - it will auto-load necessary properties.

On Thu, Mar 6, 2014 at 11:36 AM, Geoffry Roberts <th...@gmail.com> wrote:
> Thanks for the response.  I figured out what was wrong.
>
> I was doing this:
>
> Configuration conf = new Configuration();
>
> conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));
>
>
> F.CFG_PATH was close but not correct.  Fixed it and all is well.
>
>
> Thanks
>
>
>
>
> On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:
>>
>> I've never faced an issue trying to run hadoop and related programs on
>> my OSX. What is your error exactly?
>>
>> Have you ensured your Java classpath carries the configuration
>> directory on it as well, if you aren't running the program via "hadoop
>> jar ..." but via "java -cp ..." instead.
>>
>> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
>> wrote:
>> > All,
>> >
>> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
>> > to
>> > create a directory.  From the command line it works; from java it
>> > doesn't.
>> > I have Googled and read bits and pieces that this is an issue with the
>> > OSX
>> > "feature" of case insensitivity with its file system.  Can anyone
>> > confirm
>> > this?  If so, can anyone advise as to a workaround?
>> >
>> > Such a simple thing to get hung up on, go figure.
>> >
>> > Thanks
>> >
>> > --
>> > There are ways and there are ways,
>> >
>> > Geoffry Roberts
>>
>>
>>
>> --
>> Harsh J
>
>
>
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
You could avoid all that code by simply placing the configuration
directory on the classpath - it will auto-load necessary properties.

On Thu, Mar 6, 2014 at 11:36 AM, Geoffry Roberts <th...@gmail.com> wrote:
> Thanks for the response.  I figured out what was wrong.
>
> I was doing this:
>
> Configuration conf = new Configuration();
>
> conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));
>
> conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));
>
>
> F.CFG_PATH was close but not correct.  Fixed it and all is well.
>
>
> Thanks
>
>
>
>
> On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:
>>
>> I've never faced an issue trying to run hadoop and related programs on
>> my OSX. What is your error exactly?
>>
>> Have you ensured your Java classpath carries the configuration
>> directory on it as well, if you aren't running the program via "hadoop
>> jar ..." but via "java -cp ..." instead.
>>
>> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
>> wrote:
>> > All,
>> >
>> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
>> > to
>> > create a directory.  From the command line it works; from java it
>> > doesn't.
>> > I have Googled and read bits and pieces that this is an issue with the
>> > OSX
>> > "feature" of case insensitivity with its file system.  Can anyone
>> > confirm
>> > this?  If so, can anyone advise as to a workaround?
>> >
>> > Such a simple thing to get hung up on, go figure.
>> >
>> > Thanks
>> >
>> > --
>> > There are ways and there are ways,
>> >
>> > Geoffry Roberts
>>
>>
>>
>> --
>> Harsh J
>
>
>
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J

Re: HDFS java client vs the Command Line

Posted by Geoffry Roberts <th...@gmail.com>.
Thanks for the response.  I figured out what was wrong.

I was doing this:

Configuration conf = new Configuration();

conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));


F.CFG_PATH was close but not correct.  Fixed it and all is well.


Thanks



On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:

> I've never faced an issue trying to run hadoop and related programs on
> my OSX. What is your error exactly?
>
> Have you ensured your Java classpath carries the configuration
> directory on it as well, if you aren't running the program via "hadoop
> jar ..." but via "java -cp ..." instead.
>
> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
> wrote:
> > All,
> >
> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
> to
> > create a directory.  From the command line it works; from java it
> doesn't.
> > I have Googled and read bits and pieces that this is an issue with the
> OSX
> > "feature" of case insensitivity with its file system.  Can anyone confirm
> > this?  If so, can anyone advise as to a workaround?
> >
> > Such a simple thing to get hung up on, go figure.
> >
> > Thanks
> >
> > --
> > There are ways and there are ways,
> >
> > Geoffry Roberts
>
>
>
> --
> Harsh J
>



-- 
There are ways and there are ways,

Geoffry Roberts

Re: HDFS java client vs the Command Line

Posted by Geoffry Roberts <th...@gmail.com>.
Thanks for the response.  I figured out what was wrong.

I was doing this:

Configuration conf = new Configuration();

conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));


F.CFG_PATH was close but not correct.  Fixed it and all is well.


Thanks



On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:

> I've never faced an issue trying to run hadoop and related programs on
> my OSX. What is your error exactly?
>
> Have you ensured your Java classpath carries the configuration
> directory on it as well, if you aren't running the program via "hadoop
> jar ..." but via "java -cp ..." instead.
>
> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
> wrote:
> > All,
> >
> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
> to
> > create a directory.  From the command line it works; from java it
> doesn't.
> > I have Googled and read bits and pieces that this is an issue with the
> OSX
> > "feature" of case insensitivity with its file system.  Can anyone confirm
> > this?  If so, can anyone advise as to a workaround?
> >
> > Such a simple thing to get hung up on, go figure.
> >
> > Thanks
> >
> > --
> > There are ways and there are ways,
> >
> > Geoffry Roberts
>
>
>
> --
> Harsh J
>



-- 
There are ways and there are ways,

Geoffry Roberts

Re: HDFS java client vs the Command Line

Posted by Geoffry Roberts <th...@gmail.com>.
Thanks for the response.  I figured out what was wrong.

I was doing this:

Configuration conf = new Configuration();

conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));


F.CFG_PATH was close but not correct.  Fixed it and all is well.


Thanks



On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:

> I've never faced an issue trying to run hadoop and related programs on
> my OSX. What is your error exactly?
>
> Have you ensured your Java classpath carries the configuration
> directory on it as well, if you aren't running the program via "hadoop
> jar ..." but via "java -cp ..." instead.
>
> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
> wrote:
> > All,
> >
> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
> to
> > create a directory.  From the command line it works; from java it
> doesn't.
> > I have Googled and read bits and pieces that this is an issue with the
> OSX
> > "feature" of case insensitivity with its file system.  Can anyone confirm
> > this?  If so, can anyone advise as to a workaround?
> >
> > Such a simple thing to get hung up on, go figure.
> >
> > Thanks
> >
> > --
> > There are ways and there are ways,
> >
> > Geoffry Roberts
>
>
>
> --
> Harsh J
>



-- 
There are ways and there are ways,

Geoffry Roberts

Re: HDFS java client vs the Command Line

Posted by Geoffry Roberts <th...@gmail.com>.
Thanks for the response.  I figured out what was wrong.

I was doing this:

Configuration conf = new Configuration();

conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));

conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));


F.CFG_PATH was close but not correct.  Fixed it and all is well.


Thanks



On Thu, Mar 6, 2014 at 1:05 PM, Harsh J <ha...@cloudera.com> wrote:

> I've never faced an issue trying to run hadoop and related programs on
> my OSX. What is your error exactly?
>
> Have you ensured your Java classpath carries the configuration
> directory on it as well, if you aren't running the program via "hadoop
> jar ..." but via "java -cp ..." instead.
>
> On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com>
> wrote:
> > All,
> >
> > I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want
> to
> > create a directory.  From the command line it works; from java it
> doesn't.
> > I have Googled and read bits and pieces that this is an issue with the
> OSX
> > "feature" of case insensitivity with its file system.  Can anyone confirm
> > this?  If so, can anyone advise as to a workaround?
> >
> > Such a simple thing to get hung up on, go figure.
> >
> > Thanks
> >
> > --
> > There are ways and there are ways,
> >
> > Geoffry Roberts
>
>
>
> --
> Harsh J
>



-- 
There are ways and there are ways,

Geoffry Roberts

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
I've never faced an issue trying to run hadoop and related programs on
my OSX. What is your error exactly?

Have you ensured your Java classpath carries the configuration
directory on it as well, if you aren't running the program via "hadoop
jar ..." but via "java -cp ..." instead.

On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com> wrote:
> All,
>
> I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want to
> create a directory.  From the command line it works; from java it doesn't.
> I have Googled and read bits and pieces that this is an issue with the OSX
> "feature" of case insensitivity with its file system.  Can anyone confirm
> this?  If so, can anyone advise as to a workaround?
>
> Such a simple thing to get hung up on, go figure.
>
> Thanks
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
I've never faced an issue trying to run hadoop and related programs on
my OSX. What is your error exactly?

Have you ensured your Java classpath carries the configuration
directory on it as well, if you aren't running the program via "hadoop
jar ..." but via "java -cp ..." instead.

On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com> wrote:
> All,
>
> I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want to
> create a directory.  From the command line it works; from java it doesn't.
> I have Googled and read bits and pieces that this is an issue with the OSX
> "feature" of case insensitivity with its file system.  Can anyone confirm
> this?  If so, can anyone advise as to a workaround?
>
> Such a simple thing to get hung up on, go figure.
>
> Thanks
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
I've never faced an issue trying to run hadoop and related programs on
my OSX. What is your error exactly?

Have you ensured your Java classpath carries the configuration
directory on it as well, if you aren't running the program via "hadoop
jar ..." but via "java -cp ..." instead.

On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com> wrote:
> All,
>
> I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want to
> create a directory.  From the command line it works; from java it doesn't.
> I have Googled and read bits and pieces that this is an issue with the OSX
> "feature" of case insensitivity with its file system.  Can anyone confirm
> this?  If so, can anyone advise as to a workaround?
>
> Such a simple thing to get hung up on, go figure.
>
> Thanks
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J

Re: HDFS java client vs the Command Line

Posted by Harsh J <ha...@cloudera.com>.
I've never faced an issue trying to run hadoop and related programs on
my OSX. What is your error exactly?

Have you ensured your Java classpath carries the configuration
directory on it as well, if you aren't running the program via "hadoop
jar ..." but via "java -cp ..." instead.

On Thu, Mar 6, 2014 at 9:50 AM, Geoffry Roberts <th...@gmail.com> wrote:
> All,
>
> I'm running the 2.3.0 distribution as a single node on OSX 10.7.  I want to
> create a directory.  From the command line it works; from java it doesn't.
> I have Googled and read bits and pieces that this is an issue with the OSX
> "feature" of case insensitivity with its file system.  Can anyone confirm
> this?  If so, can anyone advise as to a workaround?
>
> Such a simple thing to get hung up on, go figure.
>
> Thanks
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts



-- 
Harsh J