Compilare lo Storage Engine Cassandra

Stai visualizzando una vecchia versione di questo article. Visualizza la versione più recente.

Questa pagina spiega come compilare lo Storage Engine Cassandra.

Ottenere il codice sorgente

Il codice si trova in una brach di bazaar su lp:maria-captains/maria/5.5-cassandra.

Compilare

Il processo di compilazione non è ancora pienamente inserito nella streamline. Si sa che:

  • funziona su Fedora 15 e OpenSUSE
  • non funziona su Ubuntu Oneiric Ocelot (si veda MDEV-501).
  • funziona su Ubuntu Precise Pangolin

Il processo di compilazione è il seguente:

  • Installare Cassandra (abbiamo provato le versioni 1.1.3 ... 1.1.5, mentre la beta di 1.2 dovrebbe funzionare ma non è stata testata)
  • Installare la libreria Thrift (abbiamo usato 0.8.0 e 0.9.0-trunk), serve solo il backend C++.
    • L'abbiamo installato compilando il tarball dei sorgenti scaricato da thrift.apache.org
  • Modificare storage/cassandra/CMakeLists.txt cambiando la direttiva INCLUDE_DIRECTORIES perché punti alla directory di Thrift.
  • export LIBS="-lthrift", su un'altra macchina era "-lthrift -ldl"
  • export LDFLAGS=-L/path/to/thrift/libs
  • Compilare il server
    • Abbiamo usato lo script BUILD/compile-pentium-max (il nome è per ragioni storiche; in effetti crea un binario ottimizzato per amd64)

Running the server

Cassandra storage engine is linked into the server (ie, it is not a plugin). All you need to do is to make sure Thrift's libthrift.so can be found by the loader. This may require adjusting the LD_LIBRARY_PATH variable.

Running tests

There is a basic testsuite. In order to run it, one needs

  • Start Cassandra on localhost
  • Set PATH so that cqlsh and cassandra-cli binaries can be found
  • From the build directory, run
cd mysql-test
./mysql-test-run t/cassandra.test

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.