MatrixBase is an open-source distributed OLAP database.
1. change the root directory of the matrixone
% cd matrixone
% pwd
/pathto/matrixone
2. generate the configuration file
make config
It does things following:
Generate the configuration generator bin gen_config
.
gen_config
reads the configuration definition file cmd/generate-config/system_vars_def.toml
and generates the configuration file cmd/generate-config/system_vars_config.toml
.
Then, it moves the configuration file cmd/generate-config/system_vars_config.toml
to the
matrixone root directory.
It moves cmd/generate-config/system_vars.go
to pkg/config
.
It moves cmd/generate-config/system_vars_test.go
to pkg/config
.
3. generate the main
bin
make build
It makes an execution bin - main
for the matrixone
.
1. Boot the server
The ip
and port
in the system_vars_config.toml
can be changed.
Change to the root directory of the matrixone
.
% ./main system_vars_config.toml
2. Connect the server
We need to install the mysql client first.
Test Account:
user : dump
password : 111
% mysql -h IP -P PORT -udump -p
For example:
% mysql -h 127.0.0.1 -P 6001 -udump -p
Use shell command to send a close signal to the server.
Ctr+C or Ctr+\.
In this system, the configuration logic starts from a definition file. In the definition file, many system parameters can be well-defined.
The definition of the parameter has the form following:
[[parameter]]
name = "xxxx"
scope = ["xxxx"]
access = ["xxxx"]
type = "xxxx"
domain-type = "xxxx"
values = ["xxxx"]
comment = "xxxx"
update-mode = "xxxx"
name
denotes the unique name of the parameter in the definition file. It must be a valid Go identifier. And, the first letter of it must be the low case Ascii char or '_'. The rest letters can be the Ascii char, digit or '_'.
That is :
identifier = low-case-letter { letter | digit } *
low-case-letter = "a" ... "z" | "_"
letter = "a" ... "z" | "A" ... "Z" | "_"
digit = "0" ... "9"
-
scope
denotessession
parameter orglobal
parameter. Thesession
parameter only affects the activity in only one session. Theglobal
parameter effects activity in all sessions. The parameter belongs to the only one of the two. -
access
denotes where you can change the value of the parameter.cmd
means the update can happen in the command line option.file
means the update can happen in the configuration file.env
means the update can happen in the environment variable. Now, onlyfile
really works. -
type
denotes the data type of the parameter includesstring
,int64
,float64
,bool
. -
domain-type
denotes the parameter can be the set or the range.set
means the parameter must be the one element in the set. It is a enum type.range
means the parameter can be any value in a range. -
values
denotes the initial value for the parameter. When thedomain-type
isset
,values
contains all alternatives of the parameter. When thedomain-type
isrange
,values
only contains three values. the first one is the initial value of the parameter. The second one and the third one forms a range. So,in math, the non-equationthe second one
<=the first one
<=the third one
holds. -
comment
denotes the comment for clarification. -
update-mode
denotes the parameter can be changed or not.dynamic
means it can be changed.fix
means it can not be changed. it only holds the initial value.hotload
means it can be changed during the system running.