Changes between Initial Version and Version 1 of waue/2011/0707


Ignore:
Timestamp:
Jul 7, 2011, 5:37:26 PM (13 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2011/0707

    v1 v1  
     1
     2{{{
     3#!html
     4<div style="text-align: center; color:#151B8D"><big style="font-weight: bold;"><big><big>
     5Cassandra 安裝與測試
     6</big></big></big></div> <div style="text-align: center; color:#7E2217"><big style="font-weight: bold;"><big>
     7 0.8.1
     8</big></big></div>
     9}}}
     10[[PageOutline]]
     11
     12
     13 == 1. download  ==
     14下載 bin 版如 apache-cassandra-0.8.1-bin.tar.gz
     15
     16 == 2. single setup ==
     17
     18 * 修改 conf/cassandra_env.sh
     19{{{
     20#!text
     21max_heap_size_in_mb=1024
     22}}}
     23
     24 * 修改 conf/log4j-server.properties
     25{{{
     26#!text
     27log4j.appender.R.File=/opt/cassandra/run/system.log
     28}}}
     29
     30 * 修改 conf/cassandra.yaml
     31{{{
     32#!text
     33data_file_directories: /opt/cassandra/run/data
     34commitlog_directory: /opt/cassandra/run/commitlog
     35saved_caches_directory: /opt/cassandra/run/saved_caches
     36}}}
     37
     38 == 3. run ==
     39
     40{{{
     41bin/cassandra 
     42...(程序跑於背景)
     43
     44bin/cassandra-cli
     45[default@unknown] (進入指令交談模式)
     46}}}
     47
     48 == 4. 操作 ==
     49{{{
     50create keyspace Keyspace1;
     51
     52use Keyspace1;
     53
     54create column family Users with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type;
     55
     56set Users[jsmith][first] = 'John';
     57
     58set Users[jsmith][last] = 'Smith';
     59
     60set Users[jsmith][age] = long(42);
     61
     62get Users[jsmith];
     63}}}
     64
     65{{{
     66#!text
     67  set Users[jsmith][first] = 'John';
     68        \      \        \          \
     69         \      \_ key   \          \_ value
     70          \               \_ column
     71           \_ column family
     72
     73}}}
     74
     75
     76== ps. 注意 ==
     77 * 在Cassandra0.6.x中,​​默認實現的是與Hadoop0.20.x的整合
     78