mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-04 05:53:13 +00:00
269207fdf641abc8327bffb9707bd15f89d9451d
" This series complements JSON support with INSERT JSON and fromJson cql function. INSERT JSON implementation tries hard to interfere as little as possible with regular INSERT path. So, after being parsed, insertJsonStatement exists as a separate statement and is handled in a special way. Overridden add_update_for_key extracts values from JSON map and applies them to columns. Converting from insert_json_statement to insert_statement uses auxiliary from_json_object methods to convert JSON-encoded types to bytes. Then, terms are matched to appropriate column names and cells are updated. fromJson CQL function uses the same from_json_object helper methods, but applies them to single arguments, not whole rows. Existing json handling functions from json.hh and libjsoncpp were used where possible. Things implemented: * expanding CQL grammar to accept INSERT JSON * converting JSON representation of cql values to cql terms * serving 'INSERT INTO xxx JSON yyy' clause * tests for INSERT JSON and fromJson() " * 'json_ops_2' of https://github.com/psarna/scylla: tests: add cql unit tests for INSERT JSON cql3: add fromJson() function cql3: add INSERT JSON parsing to CQL grammar cql3: add support for INSERT JSON clause cql3: decouple execute from term binding in setters cql3: change operation::make_* functions to static cql3: add from_json_object function to types cql3: Make literals::NULL_VALUE public
…
…
Scylla
Quick-start
$ git submodule update --init --recursive
$ sudo ./install-dependencies.sh
$ ./configure.py --mode=release
$ ninja-build -j4 # Assuming 4 system threads.
$ ./build/release/scylla
$ # Rejoice!
Please see HACKING.md for detailed information on building and developing Scylla.
Running Scylla
- Run Scylla
./build/release/scylla
- run Scylla with one CPU and ./tmp as data directory
./build/release/scylla --datadir tmp --commitlog-directory tmp --smp 1
- For more run options:
./build/release/scylla --help
Building Fedora RPM
As a pre-requisite, you need to install Mock on your machine:
# Install mock:
sudo yum install mock
# Add user to the "mock" group:
usermod -a -G mock $USER && newgrp mock
Then, to build an RPM, run:
./dist/redhat/build_rpm.sh
The built RPM is stored in /var/lib/mock/<configuration>/result directory.
For example, on Fedora 21 mock reports the following:
INFO: Done(scylla-server-0.00-1.fc21.src.rpm) Config(default) 20 minutes 7 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-21-x86_64/result
Building Fedora-based Docker image
Build a Docker image with:
cd dist/docker
docker build -t <image-name> .
Run the image with:
docker run -p $(hostname -i):9042:9042 -i -t <image name>
Contributing to Scylla
Description
Languages
C++
72.1%
Python
26.7%
CMake
0.3%
GAP
0.3%
Shell
0.3%