visibility 1,779 comment 12 access_time 2 years ago languageEnglish
more_vert
Raymond Raymond
articleArticles 549
imageDiagrams 49
codeCode 3
chat_bubble_outlineThreads 8
commentComments 265
loyaltyKontext Points 6055
account_circleProfile

Install HBase in WSL - Standalone Mode

HBase is the short name for Hadoop database. HBase is a distributed non-SQL database like Google Bigtable, which can utilizes distributed file system like HDFS. HBase can run in two modes - standalone and distributed. In this tutorial, I will show you how to install a standalone HBase on WSL ...
info Last modified by Raymond 2 years ago
thumb_up 0

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

comment Comments
11 months ago link more_vert
Raymond Raymond
articleArticles 549
imageDiagrams 49
codeCode 3
chat_bubble_outlineThreads 8
commentComments 265
loyaltyKontext Points 6055
account_circleProfile
#1636 Re: Install HBase in WSL - Standalone Mode

I am glad it works for you now too. 

format_quote

person Guy access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

thank you sir !

working for me too now without "sudo"


guy@x360:~/code$ python3 hbase_read.py

b'value1'



hbase:006:0> scan "table1"
ROW                  COLUMN+CELL
row1                   column=cf:a, timestamp=2022-03-22T15:31:11.676, value=value1

1 row(s) Took 0.0298 seconds



11 months ago link more_vert
G Guy
articleArticles 0
imageDiagrams 0
codeCode 0
chat_bubble_outlineThreads 0
commentComments 15
loyaltyKontext Points 15
#1635 Re: Install HBase in WSL - Standalone Mode

thank you sir !

working for me too now without "sudo"


guy@x360:~/code$ python3 hbase_read.py

b'value1'



hbase:006:0> scan "table1"
ROW                  COLUMN+CELL
row1                   column=cf:a, timestamp=2022-03-22T15:31:11.676, value=value1

1 row(s) Took 0.0298 seconds



format_quote

person Raymond access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

I just tried to run it in my previous Debian WSL distro but it didn't work anymore and then I used sudo command and it works:

sudo bin/start-hbase.sh

I installed latest happybase package:

pip3 install happybase

Then I started the thirft server:

sudo bin/hbase-daemon.sh start thrift

And then I run the following python code:

import happybase
connection = happybase.Connection('127.0.0.1',9090)
table = connection.table('test_table')
row = table.row(b'row1')
print(row[b'cf:a'])

The output looks like the following:


So it does work for me. I've documented the details here: Connect to HBase in Python via HappyBase

11 months ago link more_vert
Raymond Raymond
articleArticles 549
imageDiagrams 49
codeCode 3
chat_bubble_outlineThreads 8
commentComments 265
loyaltyKontext Points 6055
account_circleProfile
#1634 Re: Install HBase in WSL - Standalone Mode

I just tried to run it in my previous Debian WSL distro but it didn't work anymore and then I used sudo command and it works:

sudo bin/start-hbase.sh

I installed latest happybase package:

pip3 install happybase

Then I started the thirft server:

sudo bin/hbase-daemon.sh start thrift

And then I run the following python code:

import happybase
connection = happybase.Connection('127.0.0.1',9090)
table = connection.table('test_table')
row = table.row(b'row1')
print(row[b'cf:a'])

The output looks like the following:


So it does work for me. I've documented the details here: Connect to HBase in Python via HappyBase

format_quote

person Guy access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

Hey 


so in second vm, only hbase was working fine, not even the errors you talked about in the tutorial, tried to use python with it but failed.

so i installed thrift, successfully .. but since this moment hbase died. 


so, i will let it go now.


thank you for the tutorial anyhow.

:)

Guy

11 months ago link more_vert
G Guy
articleArticles 0
imageDiagrams 0
codeCode 0
chat_bubble_outlineThreads 0
commentComments 15
loyaltyKontext Points 15
#1633 Re: Install HBase in WSL - Standalone Mode

Hey 


so in second vm, only hbase was working fine, not even the errors you talked about in the tutorial, tried to use python with it but failed.

so i installed thrift, successfully .. but since this moment hbase died. 


so, i will let it go now.


thank you for the tutorial anyhow.

:)

Guy

11 months ago link more_vert
G Guy
articleArticles 0
imageDiagrams 0
codeCode 0
chat_bubble_outlineThreads 0
commentComments 15
loyaltyKontext Points 15
#1632 Re: Install HBase in WSL - Standalone Mode

also, do you have a manual how to integrate thrift api into the standalone hbase ? 


thanks

format_quote

person Raymond access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

This article I published is for a standalone mode installation.

Are you trying to configure HBase in distributed mode? 

11 months ago link more_vert
G Guy
articleArticles 0
imageDiagrams 0
codeCode 0
chat_bubble_outlineThreads 0
commentComments 15
loyaltyKontext Points 15
#1631 Re: Install HBase in WSL - Standalone Mode

Hey


so i installed a new fresh copy of ubuntu inside the windows WSL.

only hbase and it is working perfectly.


thank you

Guy 

format_quote

person Raymond access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

This article I published is for a standalone mode installation.

Are you trying to configure HBase in distributed mode? 

11 months ago link more_vert
Raymond Raymond
articleArticles 549
imageDiagrams 49
codeCode 3
chat_bubble_outlineThreads 8
commentComments 265
loyaltyKontext Points 6055
account_circleProfile
#1630 Re: Install HBase in WSL - Standalone Mode

Good luck! I have not installed a distributed mode for HBase thus am not able to advise right now. I will publish a new article if I do that. 

format_quote

person Guy access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

Well . I do have hive hdfs and spark from you other tutorials .. so since it didn't work i tried twicking and trying .. i use previously installed zk. And changed root.dir to hdfs ( i found i need to change something from false to true .. can't remember now what. I will check tomorrow.


I installed new copy of Ubuntu today into wsl and will try tomorrow only hbase on it. 

11 months ago link more_vert
G Guy
articleArticles 0
imageDiagrams 0
codeCode 0
chat_bubble_outlineThreads 0
commentComments 15
loyaltyKontext Points 15
#1629 Re: Install HBase in WSL - Standalone Mode

Well . I do have hive hdfs and spark from you other tutorials .. so since it didn't work i tried twicking and trying .. i use previously installed zk. And changed root.dir to hdfs ( i found i need to change something from false to true .. can't remember now what. I will check tomorrow.


I installed new copy of Ubuntu today into wsl and will try tomorrow only hbase on it. 

format_quote

person Raymond access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

This article I published is for a standalone mode installation.

Are you trying to configure HBase in distributed mode? 

11 months ago link more_vert
Raymond Raymond
articleArticles 549
imageDiagrams 49
codeCode 3
chat_bubble_outlineThreads 8
commentComments 265
loyaltyKontext Points 6055
account_circleProfile
#1628 Re: Install HBase in WSL - Standalone Mode

This article I published is for a standalone mode installation.

Are you trying to configure HBase in distributed mode? 

format_quote

person Guy access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

Hey

thank you for answering, yes i did get several error messages, i was googling deeply and had some advancement .. yet the shell is not connecting to the hbase server and i cannot create a table or get status.


[2022-03-17 16:10:56,313] WARN Empty contextPath (org.eclipse.jetty.server.handler.ContextHandler) [2022-03-17 16:10:56,328] INFO jetty-9.4.43.v20210629; built: 2021-06-30T11:07:22.254Z; git: 526006ecfa3af7f1a27ef3a288e2bef7ea9dd7e8; jvm 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 (org.eclipse.jetty.server.Server) [2022-03-17 16:10:56,355] INFO DefaultSessionIdManager workerName=node0 (org.eclipse.jetty.server.session) [2022-03-17 16:10:56,355] INFO No SessionScavenger set, using defaults (org.eclipse.jetty.server.session) [2022-03-17 16:10:56,356] INFO node0 Scavenging every 600000ms (org.eclipse.jetty.server.session) [2022-03-17 16:10:56,360] WARN ServletContext@o.e.j.s.ServletContextHandler@6950e31{/,null,STARTING} has uncovered http methods for path: /* (org.eclipse.jetty.security.SecurityHandler) [2022-03-17 16:10:56,371] INFO Started o.e.j.s.ServletContextHandler@6950e31{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler) [2022-03-17 16:10:56,387] INFO Started ServerConnector@2d8f65a4{HTTP/1.1, (http/1.1)}{0.0.0.0:8081} (org.eclipse.jetty.server.AbstractConnector) [2022-03-17 16:10:56,388] INFO Started @682ms (org.eclipse.jetty.server.Server) [2022-03-17 16:10:56,388] INFO Started AdminServer on address 0.0.0.0, port 8081 and command URL /commands (org.apache.zookeeper.server.admin.JettyAdminServer) [2022-03-17 16:10:56,394] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory) [2022-03-17 16:10:56,395] WARN maxCnxns is not configured, using default value 0. (org.apache.zookeeper.server.ServerCnxnFactory) [2022-03-17 16:10:56,396] INFO Configuring NIO connection handler with 10s sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 kB direct buffers. (org.apache.zookeeper.server.NIOServerCnxnFactory) [2022-03-17 16:10:56,397] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory) [2022-03-17 16:10:56,413] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory) [2022-03-17 16:10:56,413] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory) [2022-03-17 16:10:56,413] INFO zookeeper.snapshotSizeFactor = 0.33 (org.apache.zookeeper.server.ZKDatabase) [2022-03-17 16:10:56,413] INFO zookeeper.commitLogCount=500 (org.apache.zookeeper.server.ZKDatabase) [2022-03-17 16:10:56,419] INFO zookeeper.snapshot.compression.method = CHECKED (org.apache.zookeeper.server.persistence.SnapStream) [2022-03-17 16:10:56,425] INFO Reading snapshot /tmp/zookeeper/version-2/snapshot.143 (org.apache.zookeeper.server.persistence.FileSnap)


hbase:010:0> create "tbl1", "fc1"
ERROR: KeeperErrorCode = NoNode
for /hbase/master For usage try 'help "create"'
Took 0.0058 seconds
hbase:011:0>




guy@x360:~$ hadoop/hbase-2.4.9/bin/start-hbase.sh
guy@x360:~$ jps
15539 HRegionServer
1285 NodeManager
918 SecondaryNameNode
15334 HMaster
520 NameNode
1144 ResourceManager
1656 QuorumPeerMain
666 DataNode
3819 JarBootstrapMain
15885 Jps
guy@x360:~$


11 months ago link more_vert
G Guy
articleArticles 0
imageDiagrams 0
codeCode 0
chat_bubble_outlineThreads 0
commentComments 15
loyaltyKontext Points 15
#1627 Re: Install HBase in WSL - Standalone Mode

Hey

thank you for answering, yes i did get several error messages, i was googling deeply and had some advancement .. yet the shell is not connecting to the hbase server and i cannot create a table or get status.


[2022-03-17 16:10:56,313] WARN Empty contextPath (org.eclipse.jetty.server.handler.ContextHandler) [2022-03-17 16:10:56,328] INFO jetty-9.4.43.v20210629; built: 2021-06-30T11:07:22.254Z; git: 526006ecfa3af7f1a27ef3a288e2bef7ea9dd7e8; jvm 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 (org.eclipse.jetty.server.Server) [2022-03-17 16:10:56,355] INFO DefaultSessionIdManager workerName=node0 (org.eclipse.jetty.server.session) [2022-03-17 16:10:56,355] INFO No SessionScavenger set, using defaults (org.eclipse.jetty.server.session) [2022-03-17 16:10:56,356] INFO node0 Scavenging every 600000ms (org.eclipse.jetty.server.session) [2022-03-17 16:10:56,360] WARN ServletContext@o.e.j.s.ServletContextHandler@6950e31{/,null,STARTING} has uncovered http methods for path: /* (org.eclipse.jetty.security.SecurityHandler) [2022-03-17 16:10:56,371] INFO Started o.e.j.s.ServletContextHandler@6950e31{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler) [2022-03-17 16:10:56,387] INFO Started ServerConnector@2d8f65a4{HTTP/1.1, (http/1.1)}{0.0.0.0:8081} (org.eclipse.jetty.server.AbstractConnector) [2022-03-17 16:10:56,388] INFO Started @682ms (org.eclipse.jetty.server.Server) [2022-03-17 16:10:56,388] INFO Started AdminServer on address 0.0.0.0, port 8081 and command URL /commands (org.apache.zookeeper.server.admin.JettyAdminServer) [2022-03-17 16:10:56,394] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory) [2022-03-17 16:10:56,395] WARN maxCnxns is not configured, using default value 0. (org.apache.zookeeper.server.ServerCnxnFactory) [2022-03-17 16:10:56,396] INFO Configuring NIO connection handler with 10s sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 kB direct buffers. (org.apache.zookeeper.server.NIOServerCnxnFactory) [2022-03-17 16:10:56,397] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory) [2022-03-17 16:10:56,413] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory) [2022-03-17 16:10:56,413] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory) [2022-03-17 16:10:56,413] INFO zookeeper.snapshotSizeFactor = 0.33 (org.apache.zookeeper.server.ZKDatabase) [2022-03-17 16:10:56,413] INFO zookeeper.commitLogCount=500 (org.apache.zookeeper.server.ZKDatabase) [2022-03-17 16:10:56,419] INFO zookeeper.snapshot.compression.method = CHECKED (org.apache.zookeeper.server.persistence.SnapStream) [2022-03-17 16:10:56,425] INFO Reading snapshot /tmp/zookeeper/version-2/snapshot.143 (org.apache.zookeeper.server.persistence.FileSnap)


hbase:010:0> create "tbl1", "fc1"
ERROR: KeeperErrorCode = NoNode
for /hbase/master For usage try 'help "create"'
Took 0.0058 seconds
hbase:011:0>




guy@x360:~$ hadoop/hbase-2.4.9/bin/start-hbase.sh
guy@x360:~$ jps
15539 HRegionServer
1285 NodeManager
918 SecondaryNameNode
15334 HMaster
520 NameNode
1144 ResourceManager
1656 QuorumPeerMain
666 DataNode
3819 JarBootstrapMain
15885 Jps
guy@x360:~$


format_quote

person Raymond access_time 11 months ago
Re: Install HBase in WSL - Standalone Mode

Did you get any error message when starting the service?

recommendMore from Kontext