hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ninad Raut <hbase.user.ni...@gmail.com>
Subject Re: Getting Slaves list in hadoop
Date Tue, 28 Jul 2009 04:16:14 GMT
You can extends hadoop configuration
public class YourConfiguration extends Configuration {



 /** constructor */
  public IthursConfiguration() {

  super();

  }

  /**
  * Create a clone of passed configuration.
  *
  * @param c
  * Configuration to clone.
  */
  public YourConfiguration(final HBaseConfiguration c) {

  this();
  for(final Entry <String, String> e: c) {
  set(e.getKey(), e.getValue());
  }

  addIThursResources();
  }

  private void addIThursResources() {


  addResource("ithurs-default.xml");

  }
this will help you load your own config parameters which inclues your slaves
too!!


On Mon, Jul 27, 2009 at 3:45 PM, Pallavi Palleti <
pallavi.palleti@corp.aol.com> wrote:

> I can do that. But, what if a user gives a different conf directory at the
> startup. Then, is there a way to find that? Essentially, what I am looking
> for is a variable or property which specifies the location of conf directory
> so that I can read from there.
>
> Thanks
> Pallavi
> ----- Original Message -----
> From: "Ninad Raut" <hbase.user.ninad@gmail.com>
> To: common-user@hadoop.apache.org
> Sent: Monday, July 27, 2009 3:34:58 PM GMT +05:30 Chennai, Kolkata, Mumbai,
> New Delhi
> Subject: Re: Getting Slaves list in hadoop
>
> write a java class to read the slaves file in conf folder. I hope thats
> what
> you want.
>
> On Mon, Jul 27, 2009 at 3:19 PM, Pallavi Palleti <
> pallavi.palleti@corp.aol.com> wrote:
>
> > Hi all,
> >
> > Is there an easy way to get the slaves list in Server.java code?
> >
> > Thanks
> > Pallavi
> >
>

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