1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
| $ su - hbase $ start-hbase.sh
$ jps | grep -v Jps 32538 ThriftServer 9383 HMaster 8423 HRegionServer
$ jps | grep -v Jps 24450 jar 21882 HMaster 2296 HRegionServer 14598 ThriftServer 5998 Jstat
$ jps | grep -v Jps 31119 Bootstrap 8775 HMaster 25289 Bootstrap 14823 Bootstrap 12671 Jstat 9052 ThriftServer 26921 HRegionServer
$ jps | grep -v Jps 29356 hbase-monitor-process-0.0.3-jar-with-dependencies.jar 11023 Jstat 26135 HRegionServer
$ export -p | egrep -i "(hadoop|hbase)" declare -x HADOOP_HOME="/home/bigdata/software/hadoop" declare -x HBASE_HOME="/home/bigdata/software/hbase" declare -x PATH="/usr/local/anaconda/bin:/usr/local/R-3.2.1/bin:/home/bigdata/software/java/bin:/home/bigdata/software/hadoop/bin:/home/bigdata/software/hive/bin:/home/bigdata/software/sqoop/bin:/home/bigdata/software/hbase/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
$ java -XX:+PrintFlagsFinal -version | grep MaxHeapSize uintx MaxHeapSize := 32126271488 {product} java version "1.7.0_60-ea" Java(TM) SE Runtime Environment (build 1.7.0_60-ea-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
$ top top - 11:37:03 up 545 days, 18:45, 5 users, load average: 8.74, 10.39, 10.96 Tasks: 653 total, 1 running, 652 sleeping, 0 stopped, 0 zombie Cpu(s): 32.9%us, 0.7%sy, 0.0%ni, 66.3%id, 0.0%wa, 0.0%hi, 0.1%si, 0.0%st Mem: 264484056k total, 260853032k used, 3631024k free, 2235248k buffers Swap: 10485756k total, 10485756k used, 0k free, 94307776k cached
$ java -classpath ~/opt/hbase/soft/yuzhouwan.jar:`hbase classpath` com.yuzhouwan.hbase.MainApp
Usage: hbase [<options>] <command> [<args>] Options: --config DIR Configuration direction to use. Default: ./conf --hosts HOSTS Override the list in 'regionservers' file
Commands: Some commands take arguments. Pass no args or -h for usage. shell Run the HBase shell hbck Run the hbase 'fsck' tool hlog Write-ahead-log analyzer hfile Store file analyzer zkcli Run the ZooKeeper shell upgrade Upgrade hbase master Run an HBase HMaster node regionserver Run an HBase HRegionServer node zookeeper Run a ZooKeeper server rest Run an HBase REST server thrift Run the HBase Thrift server thrift2 Run the HBase Thrift2 server clean Run the HBase clean up script classpath Dump hbase CLASSPATH mapredcp Dump CLASSPATH entries required by mapreduce pe Run PerformanceEvaluation ltt Run LoadTestTool version Print the version CLASSNAME Run the class named CLASSNAME
$ hbase version 2017-01-13 11:05:07,580 INFO [main] util.VersionInfo: HBase 0.98.8-hadoop2 2017-01-13 11:05:07,580 INFO [main] util.VersionInfo: Subversion file:///e/hbase_compile/hbase-0.98.8 -r Unknown 2017-01-13 11:05:07,581 INFO [main] util.VersionInfo: Compiled by 14074019 on Mon Dec 26 20:17:32 2016
$ hadoop fs -ls /hbase drwxr-xr-x - hbase hbase 0 2017-03-01 00:05 /hbase/.hbase-snapshot drwxr-xr-x - hbase hbase 0 2016-10-26 16:42 /hbase/.hbck drwxr-xr-x - hbase hbase 0 2016-12-19 13:02 /hbase/.tmp drwxr-xr-x - hbase hbase 0 2017-01-22 20:18 /hbase/WALs drwxr-xr-x - hbase hbase 0 2015-09-18 09:34 /hbase/archive drwxr-xr-x - hbase hbase 0 2016-10-18 09:44 /hbase/coprocessor drwxr-xr-x - hbase hbase 0 2015-09-15 17:21 /hbase/corrupt drwxr-xr-x - hbase hbase 0 2017-02-20 14:34 /hbase/data -rw-r--r-- 2 hbase hbase 42 2015-09-14 12:10 /hbase/hbase.id -rw-r--r-- 2 hbase hbase 7 2015-09-14 12:10 /hbase/hbase.version drwxr-xr-x - hbase hbase 0 2016-06-28 12:14 /hbase/inputdir drwxr-xr-x - hbase hbase 0 2017-03-01 10:40 /hbase/oldWALs -rw-r--r-- 2 hbase hbase 345610 2015-12-08 16:54 /hbase/test_bulkload.txt
$ hadoop fs -ls /hbase/WALs drwxr-xr-x - hbase hbase 0 2016-12-27 16:08 /hbase/WALs/yuzhouwan03,60020,1482741120018-splitting drwxr-xr-x - hbase hbase 0 2017-03-01 10:36 /hbase/WALs/yuzhouwan03,60020,1483442645857 drwxr-xr-x - hbase hbase 0 2017-03-01 10:37 /hbase/WALs/yuzhouwan02,60020,1483491016710 drwxr-xr-x - hbase hbase 0 2017-03-01 10:37 /hbase/WALs/yuzhouwan01,60020,1483443835926 drwxr-xr-x - hbase hbase 0 2017-03-01 10:36 /hbase/WALs/yuzhouwan03,60020,1483444682422 drwxr-xr-x - hbase hbase 0 2017-03-01 10:16 /hbase/WALs/yuzhouwan04,60020,1485087488577 drwxr-xr-x - hbase hbase 0 2017-03-01 10:37 /hbase/WALs/yuzhouwan05,60020,1484790306754 drwxr-xr-x - hbase hbase 0 2017-03-01 10:37 /hbase/WALs/yuzhouwan06,60020,1484931966988
$ hadoop fs -ls /hbase/WALs/yuzhouwan01,60020,1483443835926
-rw-r--r-- 3 hbase hbase 127540109 2017-03-01 09:49 /hbase/WALs/yuzhouwan01,60020,1483443835926/yuzhouwan01%2C60020%2C1483443835926.1488330961720 -rw-r--r-- 3 hbase hbase 83 2017-03-01 10:37 /hbase/WALs/yuzhouwan01,60020,1483443835926/yuzhouwan01%2C60020%2C1483443835926.1488335822133
$ vim /home/hbase/logs/hbase-hbase-regionserver-yuzhouwan03.log
$ echo "<command>" | hbase shell $ hbase shell ../script/batch.hbase
$ hbase shell
$ vim hbase-site.xml <configuration> <property> <name>hbase.zookeeper.quorum</name> <value>remote-yuzhouwan-01,remote-yuzhouwan-02,remote-yuzhouwan-03:2181</value> </property> <property> <name>zookeeper.znode.parent</name> <value>/hbase</value> </property> </configuration>
$ status 1 servers, 0 dead, 41.0000 average load
$ zk_dump HBase is rooted at /hbase Active master address: yuzhouwan03,60000,1481009498847 Backup master addresses: yuzhouwan02,60000,1481009591957 yuzhouwan01,60000,1481009567346 Region server holding hbase:meta: yuzhouwan03,60020,1483442645857 Region servers: yuzhouwan02,60020,1483491016710 /hbase/replication: /hbase/replication/peers: /hbase/replication/peers/1: yuzhouwan03,yuzhouwan02,yuzhouwan01:2016:/hbase /hbase/replication/peers/1/peer-state: ENABLED /hbase/replication/rs: /hbase/replication/rs/yuzhouwan03,60020,1483442645857: /hbase/replication/rs/yuzhouwan03,60020,1483442645857/1: /hbase/replication/rs/yuzhouwan03,60020,1483442645857/1/yuzhouwan03%2C60020%2C1483442645857.1488334114131: 116838271 /hbase/replication/rs/1485152902048.SyncUpTool.replication.org,1234,1: /hbase/replication/rs/yuzhouwan06,60020,1484931966988: /hbase/replication/rs/yuzhouwan06,60020,1484931966988/1: Quorum Server Statistics: yuzhouwan02:2015 ZooKeeper version: 3.4.6-1569965, built on 02/20/2014 09:09 GMT Clients: /yuzhouwan:62003[1](queued=0,recved=625845,sent=625845) /yuzhouwan:11151[1](queued=0,recved=8828,sent=8828) Latency min/avg/max: 0/0/1 Received: 161 Sent: 162 Connections: 168 Outstanding: 0 Zxid: 0xc062e91c6 Mode: follower Node count: 25428 yuzhouwan03:2015 ZooKeeper version: 3.4.6-1569965, built on 02/20/2014 09:09 GMT Clients: /yuzhouwan:39582[1](queued=0,recved=399812,sent=399812) /yuzhouwan:58770[1](queued=0,recved=3234,sent=3234)
$ stop-hbase.sh
|