Support Questions
Find answers, ask questions, and share your expertise

Which user to start HBase Thrift server with?

I've followed the instructions here:

https://community.hortonworks.com/articles/87655/start-and-test-hbase-thrift-server-in-a-kerberised....

to get Thrift started in our kerberized environment. Right now I'm just running the command

/usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift

as root. Everything starts fine but I'm just wondering if I should be starting the Thrift server as the hbase user instead? What's the best practice here?

2 REPLIES 2

Re: Which user to start HBase Thrift server with?

As a general rule of thumb, you should never be running software as root on a system (unless there is a good reason to do so).

Most people would run the service as the `hbase` user, but this is a common simplification that makes sense (run all HBase services as the hbase user).

Re: Which user to start HBase Thrift server with?

Just in case someone is interested, here is the systemd unit file I use for the Thrift service on CentOS 7.3.

[Unit]
Description=Thrift Service
After=network.target

[Service]
User=hbase
Type=forking
PIDFile=/var/run/hbase/hbase-hbase-thrift.pid
ExecStart=/usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift
ExecStop=/usr/hdp/current/hbase-master/bin/hbase-daemon.sh stop thrift
Restart=on-abort

[Install]
WantedBy=default.target