Changes between Version 3 and Version 4 of waue/2010/0402


Ignore:
Timestamp:
Apr 22, 2010, 10:51:25 AM (14 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2010/0402

    v3 v4  
    6565 == 2.1 列出hbase 裡的所有 table ==
    6666{{{
    67 !#php
     67#!php
    6868echo( "listing tables...\n" );
    6969$tables = $client->getTableNames();
     
    7676 == 2.2 刪除table ==
    7777{{{
    78 !#php
     78#!php
    7979$name = "hbase table name";
    8080if ($client->isTableEnabled( $name )) {
     
    9090 * 我們先定義columns 的物件結構如下
    9191{{{
    92 !#php
     92#!php
    9393$columns = array(
    9494  new ColumnDescriptor( array(
     
    104104 * 將剛剛的column 放到table 內
    105105{{{
    106 !#php
     106#!php
    107107$t = "table name";
    108108echo( "creating table: {$t}\n" );
     
    117117 == 2.4 列出 table內的家族成員 family ==
    118118{{{
    119 !#php
     119#!php
    120120$t = "table name";
    121121echo( "column families in {$t}:\n" );
     
    129129 == 2.5 寫入資料 ==
    130130{{{
    131 !#php
     131#!php
    132132$t = "table name";
    133133$row = "row name"
     
    148148 * get  取得一個 column value 的用法
    149149
     150{{{
     151#!php
    150152$table_name = 't1';
    151153$row_name = '1';
     
    160162        }
    161163}
    162 
     164}}}
    163165 ===  getRow 取得一整個row ===
    164166 * getRow($tableName, $row) 用法
     
    180182
    181183{{{
    182 !#php
     184#!php
    183185$table_name = 't1';
    184186$start_row = ""; // 從row 的起點開始