hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Oskin <stas.os...@gmail.com>
Subject Re: Specifying NameNode externally to hadoop-site.xml
Date Tue, 26 May 2009 07:11:25 GMT
Hi.

Thanks for the tip.

Regards.

2009/5/26 Aaron Kimball <aaron@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 <stas.oskin@gmail.com> wrote:
>
> > Hi.
> >
> > And if I don't use jobs but only DFS for now?
> >
> > Regards.
> >
> > 2009/5/25 jason hadoop <jason.hadoop@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 <stas.oskin@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 <jason.hadoop@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 <stas.oskin@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
> > >
> >
>

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