close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_fs.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Sep 28, 2010, 6:47:03 PM (16 years ago)
- Author:
-
waue
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v5
|
v6
|
|
| 10 | 10 | [wiki:NCHCCloudCourse100928 回課程大綱 << ] 第一關 [wiki:NCHCCloudCourse100929_4_HBEX2 > 下一關 ] |
| 11 | 11 | |
| | 12 | = 注意 = |
| | 13 | |
| | 14 | * 若編譯以下範例的環境為console 端,請設定完整的classpath |
| | 15 | * 若開發是透過 eclipse ,請將 hbase-core.jar , zookeeper*.jar , hbase-*-transactional.jar 匯入到 project library 中 |
| | 16 | * 注意: 若此程式執行於 eclipse ,則方便起見,請將程式的 eclipse only 的後兩行的註解取消,如: |
| | 17 | {{{ |
| | 18 | #!java |
| | 19 | // eclipse only |
| | 20 | String[] args = {"ex1Table","Detail"}; |
| | 21 | argv = args; |
| | 22 | }}} |
| | 23 | |
| 12 | 24 | = 範例一:新增Table = |
| 13 | 25 | |
| 14 | | * 看懂以下程式碼,並成功執行它 |
| 15 | 26 | |
| 16 | 27 | = !CreateTable.java = |
| … |
… |
|
| 48 | 59 | System.out.println("Table: " + tablename + "Existed."); |
| 49 | 60 | } else { |
| 50 | | System.out.println("create new table: " + tablename); |
| 51 | 61 | |
| 52 | 62 | // 建立 |
| 53 | 63 | admin.createTable(htd); |
| | 64 | |
| | 65 | // |
| | 66 | System.out.println( tablename + " created."); |
| 54 | 67 | } |
| 55 | 68 | } |
| … |
… |
|
| 57 | 70 | static public void main(String argv[]) throws IOException { |
| 58 | 71 | // eclipse only |
| 59 | | // String[] args = {"tsmc","Detail"}; |
| | 72 | // String[] args = {"ex1Table","Detail"}; |
| 60 | 73 | // argv = args; |
| 61 | 74 | |
| … |
… |
|
| 76 | 89 | } |
| 77 | 90 | |
| | 91 | |
| 78 | 92 | }}} |
| 79 | 93 | |