hbase0.96.0 stand-alone mode installation (Win7 without Cygwin)

Source: Internet
Author: User

Before tossing for a few days, want to let HBase's stand-alone mode on the Cygwin run up, are unsuccessful. As I was discouraged, I stumbled upon the hbase0.96.0 bin and the Conf directory with some files with the extension cmd. Is this for Windows? Can hbase now run directly on Windows? With this idea, I tried to run HBase without Cygwin, and it really worked. Record it and make a reference to the person in need.

1. Environment:
Win7 64bit
Jdk1.6.0_43 64bit
Hbase-0.96.0-hadoop1

Yes, I don't need cygwin.
Comparing the new HBase version is natively supported for Windows, and at least supports standalone mode.

2. Download

I downloaded the hbase-0.96.0-hadoop1-bin.tar.gz and unzipped it.

3. Configure Conf/hbase-site.xml
XML code
  1. <configuration>
  2. <property>
  3. <name>hbase.rootdir</name>
  4. <value>file:///c:/cygwin64/tmp/hbase/root</value>
  5. </Property>
  6. <property>
  7. <name>hbase.tmp.dir</name>
  8. <value>c:/cygwin64/tmp/hbase/tmp</value>
  9. </Property>
  10. <property>
  11. <name>hbase.zookeeper.quorum</name>
  12. <value>127.0.0.1</value>
  13. </Property>
  14. <property>
  15. <name>hbase.zookeeper.property.datadir</name>
  16. <value>c:/cygwin64/tmp/hbase/zoo</value>
  17. </Property>
  18. <property>
  19. <name>hbase.cluster.distributed</name>
  20. <value>false</value>
  21. </Property>
  22. </configuration>


The 3 directories mentioned in the configuration file are not created manually, and are created automatically the first time.

4. Go directly to the Windows CMD command line and start HBase standalone mode
Text Code
    1. Start-hbase.cmd


5. Test HBase Shell

D:\opensource\hadoop\hbase-0.96.0-hadoop1\bin>hbase Shell
HBase Shell; Enter ' help<return> ' for list of supported commands.
Type "exit<return>" to leave the HBase Shell
Version 0.96.0-hadoop1, r1531434, Fri Oct 15:11:29 PDT 2013

HBase (main):001:0> create ' mytable ', ' data '
0 row (s) in 1.1420 seconds

= Hbase::table-mytable
HBase (main):002:0> put ' mytable ', ' row1 ', ' data:1 ', ' value1 '
0 row (s) in 0.0580 seconds

HBase (main):003:0> put ' mytable ', ' row2 ', ' data:2 ', ' value2 '
0 row (s) in 0.0090 seconds

HBase (main):004:0> put ' mytable ', ' row3 ', ' data:3 ', ' value3 '
0 row (s) in 0.0080 seconds

HBase (main):005:0> list
TABLE

MyTable

1 row (s) in 0.0200 seconds

= = ["MyTable"]
HBase (main):006:0> scan ' mytable '
ROW Column+cell

Row1 column=data:1, timestamp=1416554699558, value=value1

Row2 column=data:2, timestamp=1416554715456, value=value2

Row3 Column=data:3, timestamp=1416554730255, Value=value3

3 row (s) in 0.0520 seconds

HBase (main):009:0> exit


Test everything OK, very perfect. No need for Cygwin. It's also a surprise for HBase.

6. Supplement: Another way to operate under the Cygwin
Then inadvertently tried to run under the Cygwin, forgot to open sshd, but succeeded.
My god! Open sshd instead of error??!
The beta version is also HBASE-0.96.0-HADOOP1

OK, the only point is to remember to close sshd.

And hbase-env.sh is definitely going to change.
Java code
    1. Export JAVA_HOME=/CYGDRIVE/C/JDK1. 7.0_67
    2. Export hbase_classpath=/cygdrive/d/opensource/hadoop/hbase-0.96. 0-hadoop1/lib/zookeeper-3.4. 5.jar
    3. Export hbase_manages_zk=true


Then start hbase before starting to clear the log and TMP directories to avoid interference.
There is a failure to connect to port 22 at startup, and it runs slowly, but don't panic, please continue.
$./bin/start-hbase.sh
127.0.0.1:ssh:connect to host 127.0.0.1 Port 22:connection refused
Starting master, logging to/cygdrive/d/opensource/hadoop/hbase-0.96.0-hadoop1/bin/. /logs/hbase-pchen4-master-w-shdc-pchen4.out
Localhost:ssh:connect to host localhost Port 22:connection refused


Test the shell below
There is a problem with no prompt, and the first command has to wait a long time to respond. Yes, do not panic, do not think that death, I am waiting on the machine for about 2, 3 minutes (see below the scarlet Letter), after the miracle appeared. The commands in the back are normal.

$./bin/hbase Shell
HBase Shell; Enter ' help<return> ' for list of supported commands.
Type "exit<return>" to leave the HBase Shell
Version 0.96.0-hadoop1, r1531434, Fri Oct 15:11:29 PDT 2013

List
List
TABLE
0 row (s) in 154.4250 seconds

[]
Create ' mytable ', ' data '
Create ' mytable ', ' data '
0 row (s) in 0.3510 seconds

Hbase::table-mytable
List
List
TABLE
MyTable
1 row (s) in 0.0150 seconds

["MyTable"]
Scan ' mytable '
Scan ' mytable '
ROW Column+cell
0 row (s) in 0.0280 seconds

It was a fluke, but it was too slow, so I guess no one would use it.
Hey, all right. This hbase is too frustrating, do not want to trouble, or use Linux it. That's it.

hbase0.96.0 stand-alone mode installation (Win7 without Cygwin)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.