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


Ignore:
Timestamp:
Dec 6, 2011, 3:01:54 PM (13 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2011/1207

    v1 v1  
     1cassandra + thrift + python
     2
     3 = Download Thrift and Cassandra =
     4 * 下載 cassandra-0.8.1 於 /opt/cassandra-0.8.1
     5 * thrift-0.6.1 於  /opt/cassandra-0.8.1/thrift-0.6.1
     6
     7cassandra 是 java 因此只需要驅動即可,但thrift 是中介平台,因此需要make install 來加載到各語言的函式庫
     8
     9之後在 cassandra 的資料夾下執行 gen-語言 則會產生該語言的驅動檔,透過驅動檔使用
     10
     11 = install thrift =
     12
     13{{{
     14cd /opt/cassandra-0.8.1/thrift-0.6.1
     15./configure
     16make
     17make install
     18}}}
     19
     20注意 /usr/lib/python2.6/site-packages/thrift/ 內有資料才是 thrift python 安裝完成
     21
     22 = generate gen-py =
     23{{{
     24cd /opt/cassandra-0.8.1/interface
     25thrift -gen py cassandra.thrift
     26cd gen-py/cassandra
     27}}}
     28
     29 = use =
     30{{{
     31./Cassandra-remote -h cass-1:9160 insert Keyspace1 eevans "ColumnPath('Standard1', column='fruit')" apple 1 ConsistencyLevel.QUORUM
     32}}}