You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Stas Oskin <st...@gmail.com> on 2009/05/25 00:02:54 UTC

Specifying NameNode externally to hadoop-site.xml

Hi.

I'm looking to move the Hadoop NameNode URL outside the hadoop-site.xml
file, so I could set it at the run-time.

Any idea how to do it?

Or perhaps there is another configuration that can be applied to the
FileSystem object?

Regards.

Re: Specifying NameNode externally to hadoop-site.xml

Posted by Stas Oskin <st...@gmail.com>.
Hi.

Thanks for the tip.

Regards.

2009/5/26 Aaron Kimball <aa...@cloudera.com>

> Same way.
>
> Configuration conf = new Configuration();
> conf.set("fs.default.name", "hdfs://foo");
> FileSystem fs = FileSystem.get(conf);
>
> - Aaron
>
> On Mon, May 25, 2009 at 1:02 PM, Stas Oskin <st...@gmail.com> wrote:
>
> > Hi.
> >
> > And if I don't use jobs but only DFS for now?
> >
> > Regards.
> >
> > 2009/5/25 jason hadoop <ja...@gmail.com>
> >
> > > conf.set("fs.default.name", "hdfs://host:port");
> > > where conf is the JobConf object of your job, before you submit it.
> > >
> > >
> > > On Mon, May 25, 2009 at 10:16 AM, Stas Oskin <st...@gmail.com>
> > wrote:
> > >
> > > > Hi.
> > > >
> > > > Thanks for the tip, but is it possible to set this in dynamic way via
> > > code?
> > > >
> > > > Thanks.
> > > >
> > > > 2009/5/25 jason hadoop <ja...@gmail.com>
> > > >
> > > > > if you launch your jobs via bin/hadoop jar jar_file [main class]
> > > >  [options]
> > > > >
> > > > > you can simply specify -fs hdfs://host:port before the jar_file
> > > > >
> > > > > On Sun, May 24, 2009 at 3:02 PM, Stas Oskin <st...@gmail.com>
> > > > wrote:
> > > > >
> > > > > > Hi.
> > > > > >
> > > > > > I'm looking to move the Hadoop NameNode URL outside the
> > > hadoop-site.xml
> > > > > > file, so I could set it at the run-time.
> > > > > >
> > > > > > Any idea how to do it?
> > > > > >
> > > > > > Or perhaps there is another configuration that can be applied to
> > the
> > > > > > FileSystem object?
> > > > > >
> > > > > > Regards.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Alpha Chapters of my book on Hadoop are available
> > > > > http://www.apress.com/book/view/9781430219422
> > > > > www.prohadoopbook.com a community for Hadoop Professionals
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Alpha Chapters of my book on Hadoop are available
> > > http://www.apress.com/book/view/9781430219422
> > > www.prohadoopbook.com a community for Hadoop Professionals
> > >
> >
>

Re: Specifying NameNode externally to hadoop-site.xml

Posted by Aaron Kimball <aa...@cloudera.com>.
Same way.

Configuration conf = new Configuration();
conf.set("fs.default.name", "hdfs://foo");
FileSystem fs = FileSystem.get(conf);

- Aaron

On Mon, May 25, 2009 at 1:02 PM, Stas Oskin <st...@gmail.com> wrote:

> Hi.
>
> And if I don't use jobs but only DFS for now?
>
> Regards.
>
> 2009/5/25 jason hadoop <ja...@gmail.com>
>
> > conf.set("fs.default.name", "hdfs://host:port");
> > where conf is the JobConf object of your job, before you submit it.
> >
> >
> > On Mon, May 25, 2009 at 10:16 AM, Stas Oskin <st...@gmail.com>
> wrote:
> >
> > > Hi.
> > >
> > > Thanks for the tip, but is it possible to set this in dynamic way via
> > code?
> > >
> > > Thanks.
> > >
> > > 2009/5/25 jason hadoop <ja...@gmail.com>
> > >
> > > > if you launch your jobs via bin/hadoop jar jar_file [main class]
> > >  [options]
> > > >
> > > > you can simply specify -fs hdfs://host:port before the jar_file
> > > >
> > > > On Sun, May 24, 2009 at 3:02 PM, Stas Oskin <st...@gmail.com>
> > > wrote:
> > > >
> > > > > Hi.
> > > > >
> > > > > I'm looking to move the Hadoop NameNode URL outside the
> > hadoop-site.xml
> > > > > file, so I could set it at the run-time.
> > > > >
> > > > > Any idea how to do it?
> > > > >
> > > > > Or perhaps there is another configuration that can be applied to
> the
> > > > > FileSystem object?
> > > > >
> > > > > Regards.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Alpha Chapters of my book on Hadoop are available
> > > > http://www.apress.com/book/view/9781430219422
> > > > www.prohadoopbook.com a community for Hadoop Professionals
> > > >
> > >
> >
> >
> >
> > --
> > Alpha Chapters of my book on Hadoop are available
> > http://www.apress.com/book/view/9781430219422
> > www.prohadoopbook.com a community for Hadoop Professionals
> >
>

Re: Specifying NameNode externally to hadoop-site.xml

Posted by Stas Oskin <st...@gmail.com>.
Hi.

And if I don't use jobs but only DFS for now?

Regards.

2009/5/25 jason hadoop <ja...@gmail.com>

> conf.set("fs.default.name", "hdfs://host:port");
> where conf is the JobConf object of your job, before you submit it.
>
>
> On Mon, May 25, 2009 at 10:16 AM, Stas Oskin <st...@gmail.com> wrote:
>
> > Hi.
> >
> > Thanks for the tip, but is it possible to set this in dynamic way via
> code?
> >
> > Thanks.
> >
> > 2009/5/25 jason hadoop <ja...@gmail.com>
> >
> > > if you launch your jobs via bin/hadoop jar jar_file [main class]
> >  [options]
> > >
> > > you can simply specify -fs hdfs://host:port before the jar_file
> > >
> > > On Sun, May 24, 2009 at 3:02 PM, Stas Oskin <st...@gmail.com>
> > wrote:
> > >
> > > > Hi.
> > > >
> > > > I'm looking to move the Hadoop NameNode URL outside the
> hadoop-site.xml
> > > > file, so I could set it at the run-time.
> > > >
> > > > Any idea how to do it?
> > > >
> > > > Or perhaps there is another configuration that can be applied to the
> > > > FileSystem object?
> > > >
> > > > Regards.
> > > >
> > >
> > >
> > >
> > > --
> > > Alpha Chapters of my book on Hadoop are available
> > > http://www.apress.com/book/view/9781430219422
> > > www.prohadoopbook.com a community for Hadoop Professionals
> > >
> >
>
>
>
> --
> Alpha Chapters of my book on Hadoop are available
> http://www.apress.com/book/view/9781430219422
> www.prohadoopbook.com a community for Hadoop Professionals
>

Re: Specifying NameNode externally to hadoop-site.xml

Posted by jason hadoop <ja...@gmail.com>.
conf.set("fs.default.name", "hdfs://host:port");
where conf is the JobConf object of your job, before you submit it.


On Mon, May 25, 2009 at 10:16 AM, Stas Oskin <st...@gmail.com> wrote:

> Hi.
>
> Thanks for the tip, but is it possible to set this in dynamic way via code?
>
> Thanks.
>
> 2009/5/25 jason hadoop <ja...@gmail.com>
>
> > if you launch your jobs via bin/hadoop jar jar_file [main class]
>  [options]
> >
> > you can simply specify -fs hdfs://host:port before the jar_file
> >
> > On Sun, May 24, 2009 at 3:02 PM, Stas Oskin <st...@gmail.com>
> wrote:
> >
> > > Hi.
> > >
> > > I'm looking to move the Hadoop NameNode URL outside the hadoop-site.xml
> > > file, so I could set it at the run-time.
> > >
> > > Any idea how to do it?
> > >
> > > Or perhaps there is another configuration that can be applied to the
> > > FileSystem object?
> > >
> > > Regards.
> > >
> >
> >
> >
> > --
> > Alpha Chapters of my book on Hadoop are available
> > http://www.apress.com/book/view/9781430219422
> > www.prohadoopbook.com a community for Hadoop Professionals
> >
>



-- 
Alpha Chapters of my book on Hadoop are available
http://www.apress.com/book/view/9781430219422
www.prohadoopbook.com a community for Hadoop Professionals

Re: Specifying NameNode externally to hadoop-site.xml

Posted by Stas Oskin <st...@gmail.com>.
Hi.

Thanks for the tip, but is it possible to set this in dynamic way via code?

Thanks.

2009/5/25 jason hadoop <ja...@gmail.com>

> if you launch your jobs via bin/hadoop jar jar_file [main class]  [options]
>
> you can simply specify -fs hdfs://host:port before the jar_file
>
> On Sun, May 24, 2009 at 3:02 PM, Stas Oskin <st...@gmail.com> wrote:
>
> > Hi.
> >
> > I'm looking to move the Hadoop NameNode URL outside the hadoop-site.xml
> > file, so I could set it at the run-time.
> >
> > Any idea how to do it?
> >
> > Or perhaps there is another configuration that can be applied to the
> > FileSystem object?
> >
> > Regards.
> >
>
>
>
> --
> Alpha Chapters of my book on Hadoop are available
> http://www.apress.com/book/view/9781430219422
> www.prohadoopbook.com a community for Hadoop Professionals
>

Re: Specifying NameNode externally to hadoop-site.xml

Posted by jason hadoop <ja...@gmail.com>.
if you launch your jobs via bin/hadoop jar jar_file [main class]  [options]

you can simply specify -fs hdfs://host:port before the jar_file

On Sun, May 24, 2009 at 3:02 PM, Stas Oskin <st...@gmail.com> wrote:

> Hi.
>
> I'm looking to move the Hadoop NameNode URL outside the hadoop-site.xml
> file, so I could set it at the run-time.
>
> Any idea how to do it?
>
> Or perhaps there is another configuration that can be applied to the
> FileSystem object?
>
> Regards.
>



-- 
Alpha Chapters of my book on Hadoop are available
http://www.apress.com/book/view/9781430219422
www.prohadoopbook.com a community for Hadoop Professionals