You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Jay Vyas <ja...@gmail.com> on 2014/02/08 00:38:51 UTC

Who creates hbase root.dir ?

Hi hbase.

In normal installations, Im wondering who should create hbase root.dir.

1) I have seen pseudo-distributed mode docs implying that Hbase is smart
enough to do it by itself.

"Let HBase create the hbase.rootdir directory. If you don't, you'll get
warning saying HBase needs a migration run because the directory is missing
files expected by HBase (it'll create them if you let it)."

2) But in bigtop, I see "mkdir" in the init-hdfs.sh :

su -s /bin/bash hdfs -c '/usr/bin/hadoop fs -mkdir /hbase'
su -s /bin/bash hdfs -c '/usr/bin/hadoop fs -chown hbase:hbase /hbase'

So whats the right way to maintain hbase-root ?



-- 
Jay Vyas
http://jayunit100.blogspot.com

Re: Who creates hbase root.dir ?

Posted by Jean-Daniel Cryans <jd...@apache.org>.
IIRC it used to be an issue if the folder was already existing, even if
empty. It's not the case anymore.

J-D


On Fri, Feb 7, 2014 at 3:38 PM, Jay Vyas <ja...@gmail.com> wrote:

> Hi hbase.
>
> In normal installations, Im wondering who should create hbase root.dir.
>
> 1) I have seen pseudo-distributed mode docs implying that Hbase is smart
> enough to do it by itself.
>
> "Let HBase create the hbase.rootdir directory. If you don't, you'll get
> warning saying HBase needs a migration run because the directory is missing
> files expected by HBase (it'll create them if you let it)."
>
> 2) But in bigtop, I see "mkdir" in the init-hdfs.sh :
>
> su -s /bin/bash hdfs -c '/usr/bin/hadoop fs -mkdir /hbase'
> su -s /bin/bash hdfs -c '/usr/bin/hadoop fs -chown hbase:hbase /hbase'
>
> So whats the right way to maintain hbase-root ?
>
>
>
> --
> Jay Vyas
> http://jayunit100.blogspot.com
>

Re: Who creates hbase root.dir ?

Posted by Harsh J <ha...@cloudera.com>.
Yes, so long as you also ensure it has desired ownership and
permissions as well.

On Sun, Feb 9, 2014 at 9:01 AM, Jay Vyas <ja...@gmail.com> wrote:
> Makes sense thanks harsh.  I guess the moral of the story is : in any case,
> its okay to externally create the hbase/ root directory.?



-- 
Harsh J

Re: Who creates hbase root.dir ?

Posted by Jay Vyas <ja...@gmail.com>.
Makes sense thanks harsh.  I guess the moral of the story is : in any case,
its okay to externally create the hbase/ root directory.?

Re: Who creates hbase root.dir ?

Posted by Harsh J <ha...@cloudera.com>.
A pseudo-distributed tarball setup runs all services as the same user,
so the user running HBase is automatically the HDFS superuser and can
create the directory by itself if it does not exist.

In a Bigtop environment there's a secure user-separation involved,
thereby requiring those commands you noticed during the
initialization.

On Sat, Feb 8, 2014 at 5:08 AM, Jay Vyas <ja...@gmail.com> wrote:
> Hi hbase.
>
> In normal installations, Im wondering who should create hbase root.dir.
>
> 1) I have seen pseudo-distributed mode docs implying that Hbase is smart
> enough to do it by itself.
>
> "Let HBase create the hbase.rootdir directory. If you don't, you'll get
> warning saying HBase needs a migration run because the directory is missing
> files expected by HBase (it'll create them if you let it)."
>
> 2) But in bigtop, I see "mkdir" in the init-hdfs.sh :
>
> su -s /bin/bash hdfs -c '/usr/bin/hadoop fs -mkdir /hbase'
> su -s /bin/bash hdfs -c '/usr/bin/hadoop fs -chown hbase:hbase /hbase'
>
> So whats the right way to maintain hbase-root ?
>
>
>
> --
> Jay Vyas
> http://jayunit100.blogspot.com



-- 
Harsh J