hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: HDFS java client vs the Command Line
Date Thu, 06 Mar 2014 19:53:00 GMT
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 <threadedblue@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 <harsh@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 <threadedblue@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

Mime
View raw message