Changes between Initial Version and Version 1 of III120825/Lab12


Ignore:
Timestamp:
Aug 24, 2012, 12:01:02 AM (12 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • III120825/Lab12

    v1 v1  
     1[[PageOutline]]
     2
     3◢ <[wiki:III120825/Lab11 實作十一]> | <[wiki:III120825 回課程大綱]> ▲ | <[wiki:III120825/Lab13 實作十三]> ◣
     4
     5= 實作十二 Lab 12 =
     6
     7{{{
     8#!html
     9<div style="text-align: center;"><big style="font-weight: bold;"><big>HBase 行為觀察<br/>HBase in Practice</big></big></div>
     10}}}
     11
     12{{{
     13#!text
     14以下練習,請使用 hadoop4win 環境執行。
     15}}}
     16
     17 * 首先請先下 start-hbase 指令或點選"開始"->"stat-hbase",來開啟 HBase 與 Hadoop 的 Daemon
     18 * 請回到家目錄,並輸入指令『__'''hbase shell hbase-test'''__』。
     19 * 註一:這個 hbase-test 存放在安裝帳號身分的家目錄中,倘若用其他帳號登入,可能會找不到。
     20 * 註二:如果剛剛有下 stop-hadoop 的話,一定要記得 start-hadoop,因為 HBase 的資料表格是存在 HDFS 之上。
     21{{{
     22$ cd ~
     23$ hbase shell hbase-test
     24}}}
     25   * [[BR]][[Image(Hadoop4Win:hadoop4win_24.jpg,width=600)]]
     26
     27 * STEP 11: 您也可以輸入指令『__'''hbase shell'''__』進入互動式的 HBase 指令列。您可以嘗試用底下列舉的指令,重現 hbase-test 的過程。
     28{{{
     29$ hbase shell
     30}}}
     31{{{
     32create 'test','data'
     33put 'test','row1','data:1','v1'
     34put 'test','row2','data:2','v2'
     35put 'test','row3','data:3','v3'
     36scan 'test'
     37disable 'test'
     38drop 'test'
     39list
     40exit
     41}}}
     42   * [[BR]][[Image(Hadoop4Win:hadoop4win_25.jpg,width=600)]]
     43
     44 * 欲離開 Cygwin 環境前或者要暫時關閉 HBase 系統時,請輸入指令『__'''stop-hbase'''__』。需提醒您的是 HBase 因採用 !ZooKeeper,有時關閉 master 的速度會比較慢,請耐心等候。註:目前下 exit 指令登出時會執行 stop-hbase 與 stop-hadoop 的動作。
     45{{{
     46$ stop-hbase
     47}}}
     48   * [[BR]][[Image(Hadoop4Win:hadoop4win_26.jpg,width=600)]]
     49
     50 * 倘若是已經關閉 Cygwin 視窗,第二次重新執行 C:\hadoop4win\Cygwin.bat,請輸入指令『__'''start-hbase'''__』,目前 start-hbase 會視目前 java process 判斷 hadoop 是否存在而執行『__'''start-hadoop'''__』。
     51{{{
     52$ start-hbase
     53}}}
     54   * [[BR]][[Image(Hadoop4Win:hadoop4win_27.jpg,width=600)]]