Does Hbase read .bashrc file??

2013-05-11 Thread Mohammad Tariq
Hello list,

   Does Hbase read the environment variables set in
*~/.bashrc*file everytime I issue
*bin/start-hbase.sh*??What could be the possible reasons for that?Specially
if I have a standalone setup on my local FS.

Thank you so much for your time.

Warm Regards,
Tariq
cloudfront.blogspot.com


Re: Does Hbase read .bashrc file??

2013-05-11 Thread Amandeep Khurana
The start script is a shell script and it forks a new shell when the
script is executed. That'll source the bashrc file.

On May 11, 2013, at 12:39 PM, Mohammad Tariq donta...@gmail.com wrote:

 Hello list,

   Does Hbase read the environment variables set in
 *~/.bashrc*file everytime I issue
 *bin/start-hbase.sh*??What could be the possible reasons for that?Specially
 if I have a standalone setup on my local FS.

 Thank you so much for your time.

 Warm Regards,
 Tariq
 cloudfront.blogspot.com


Re: Does Hbase read .bashrc file??

2013-05-11 Thread Mohammad Tariq
Hello Aman,

Thank you so much for the quick response. But why would that happen? I
mean the required env variables are present in hbase-env.sh already. What
is the need to source bashrc?

Consider a scenario wherein you want to run Hbase in standalone mode. You
have a Hadoop setup on the same machine and HADOOP_HOME is set in bashrc,
but you don't want to use hadoop for some reason. In that case Hbase will
face connection issues as it'll try to contact the Hadoop host(as
HADOOP_HOME is present in bashrc) which is not running because it is
standalone setup. On the other hand if you are running Hbase in pseudo
distributed mode and if you haven't set HADOOP_HOME in bashrc, it would
still work.

I'm sorry to be a pest of questions. I am actually not able to understand
this. Pardon my ignorance.

Warm Regards,
Tariq
cloudfront.blogspot.com


On Sun, May 12, 2013 at 1:14 AM, Amandeep Khurana ama...@gmail.com wrote:

 The start script is a shell script and it forks a new shell when the
 script is executed. That'll source the bashrc file.

 On May 11, 2013, at 12:39 PM, Mohammad Tariq donta...@gmail.com wrote:

  Hello list,
 
Does Hbase read the environment variables set in
  *~/.bashrc*file everytime I issue
  *bin/start-hbase.sh*??What could be the possible reasons for
 that?Specially
  if I have a standalone setup on my local FS.
 
  Thank you so much for your time.
 
  Warm Regards,
  Tariq
  cloudfront.blogspot.com



Re: Does Hbase read .bashrc file??

2013-05-11 Thread Stack
On Sat, May 11, 2013 at 1:02 PM, Mohammad Tariq donta...@gmail.com wrote:

 Hello Aman,

 Thank you so much for the quick response. But why would that happen? I
 mean the required env variables are present in hbase-env.sh already. What
 is the need to source bashrc?

 Consider a scenario wherein you want to run Hbase in standalone mode. You
 have a Hadoop setup on the same machine and HADOOP_HOME is set in bashrc,
 but you don't want to use hadoop for some reason. In that case Hbase will
 face connection issues as it'll try to contact the Hadoop host(as
 HADOOP_HOME is present in bashrc) which is not running because it is
 standalone setup. On the other hand if you are running Hbase in pseudo
 distributed mode and if you haven't set HADOOP_HOME in bashrc, it would
 still work.

 I'm sorry to be a pest of questions. I am actually not able to understand
 this. Pardon my ignorance.



Hey Tariq:

We generally try to avoid picking up anything from the environment.  This
is why you have define where you want to get your JAVA, etc., from in the
hbase configuration.  Is there something in particular that we are finding
in .bashrc that you notice?

Thanks,
St.Ack


Re: Does Hbase read .bashrc file??

2013-05-11 Thread Mohammad Tariq
Hello sir,

  Long time :)

Yeah, my understanding was same as whatever you have written. But today I
noticed that Hbase is picking HADOOP_HOME from bashrc when I was trying to
run it in standalone mode(on my local FS). Although all the Hadoop daemons
were stopped and Hbase was configured to run in standalone mode, it was
still trying to reach hdfs://localhost:9000 and hence getting :

java.net.ConnectException: Call to localhost/127.0.0.1:9000 failed on
connection exception: .

So I arrived at the conclusion that if I have HADOOP_HOME set in bashrc,
Hbase will try to search for the NN neglecting the properties set in
hbase-site.xml. And once I commented out HADOOP_HOME in bashrc, everything
started behaving just perfectly.

Thank you.

Warm Regards,
Tariq
cloudfront.blogspot.com


On Sun, May 12, 2013 at 2:02 AM, Stack st...@duboce.net wrote:

 On Sat, May 11, 2013 at 1:02 PM, Mohammad Tariq donta...@gmail.com
 wrote:

  Hello Aman,
 
  Thank you so much for the quick response. But why would that happen?
 I
  mean the required env variables are present in hbase-env.sh already. What
  is the need to source bashrc?
 
  Consider a scenario wherein you want to run Hbase in standalone mode. You
  have a Hadoop setup on the same machine and HADOOP_HOME is set in bashrc,
  but you don't want to use hadoop for some reason. In that case Hbase will
  face connection issues as it'll try to contact the Hadoop host(as
  HADOOP_HOME is present in bashrc) which is not running because it is
  standalone setup. On the other hand if you are running Hbase in pseudo
  distributed mode and if you haven't set HADOOP_HOME in bashrc, it would
  still work.
 
  I'm sorry to be a pest of questions. I am actually not able to understand
  this. Pardon my ignorance.
 


 Hey Tariq:

 We generally try to avoid picking up anything from the environment.  This
 is why you have define where you want to get your JAVA, etc., from in the
 hbase configuration.  Is there something in particular that we are finding
 in .bashrc that you notice?

 Thanks,
 St.Ack



Re: Does Hbase read .bashrc file??

2013-05-11 Thread Amandeep Khurana
The #!/usr/bin/bash command in the script tells the shell to execute the
script as a bash script. The execution is done by forking off a new shell
instance, inside of which the bashrc is sourced automatically. It's not a
HBase script specific phenomena.

Like you said - removing the HADOOP_HOME env variable from the bashrc would
solve the problem.


On Sat, May 11, 2013 at 1:02 PM, Mohammad Tariq donta...@gmail.com wrote:

 Hello Aman,

 Thank you so much for the quick response. But why would that happen? I
 mean the required env variables are present in hbase-env.sh already. What
 is the need to source bashrc?

 Consider a scenario wherein you want to run Hbase in standalone mode. You
 have a Hadoop setup on the same machine and HADOOP_HOME is set in bashrc,
 but you don't want to use hadoop for some reason. In that case Hbase will
 face connection issues as it'll try to contact the Hadoop host(as
 HADOOP_HOME is present in bashrc) which is not running because it is
 standalone setup. On the other hand if you are running Hbase in pseudo
 distributed mode and if you haven't set HADOOP_HOME in bashrc, it would
 still work.

 I'm sorry to be a pest of questions. I am actually not able to understand
 this. Pardon my ignorance.

 Warm Regards,
 Tariq
 cloudfront.blogspot.com


 On Sun, May 12, 2013 at 1:14 AM, Amandeep Khurana ama...@gmail.com
 wrote:

  The start script is a shell script and it forks a new shell when the
  script is executed. That'll source the bashrc file.
 
  On May 11, 2013, at 12:39 PM, Mohammad Tariq donta...@gmail.com wrote:
 
   Hello list,
  
 Does Hbase read the environment variables set in
   *~/.bashrc*file everytime I issue
   *bin/start-hbase.sh*??What could be the possible reasons for
  that?Specially
   if I have a standalone setup on my local FS.
  
   Thank you so much for your time.
  
   Warm Regards,
   Tariq
   cloudfront.blogspot.com
 



Re: Does Hbase read .bashrc file??

2013-05-11 Thread Mohammad Tariq
I see. It was actually a Linux thing. Thank you so much for the
clarification.

Warm Regards,
Tariq
cloudfront.blogspot.com


On Sun, May 12, 2013 at 4:51 AM, Amandeep Khurana ama...@gmail.com wrote:

 The #!/usr/bin/bash command in the script tells the shell to execute the
 script as a bash script. The execution is done by forking off a new shell
 instance, inside of which the bashrc is sourced automatically. It's not a
 HBase script specific phenomena.

 Like you said - removing the HADOOP_HOME env variable from the bashrc would
 solve the problem.


 On Sat, May 11, 2013 at 1:02 PM, Mohammad Tariq donta...@gmail.com
 wrote:

  Hello Aman,
 
  Thank you so much for the quick response. But why would that happen?
 I
  mean the required env variables are present in hbase-env.sh already. What
  is the need to source bashrc?
 
  Consider a scenario wherein you want to run Hbase in standalone mode. You
  have a Hadoop setup on the same machine and HADOOP_HOME is set in bashrc,
  but you don't want to use hadoop for some reason. In that case Hbase will
  face connection issues as it'll try to contact the Hadoop host(as
  HADOOP_HOME is present in bashrc) which is not running because it is
  standalone setup. On the other hand if you are running Hbase in pseudo
  distributed mode and if you haven't set HADOOP_HOME in bashrc, it would
  still work.
 
  I'm sorry to be a pest of questions. I am actually not able to understand
  this. Pardon my ignorance.
 
  Warm Regards,
  Tariq
  cloudfront.blogspot.com
 
 
  On Sun, May 12, 2013 at 1:14 AM, Amandeep Khurana ama...@gmail.com
  wrote:
 
   The start script is a shell script and it forks a new shell when the
   script is executed. That'll source the bashrc file.
  
   On May 11, 2013, at 12:39 PM, Mohammad Tariq donta...@gmail.com
 wrote:
  
Hello list,
   
  Does Hbase read the environment variables set in
*~/.bashrc*file everytime I issue
*bin/start-hbase.sh*??What could be the possible reasons for
   that?Specially
if I have a standalone setup on my local FS.
   
Thank you so much for your time.
   
Warm Regards,
Tariq
cloudfront.blogspot.com