-
Notifications
You must be signed in to change notification settings - Fork 1
Recipe: Basic Recipe For Niovakv
Paul Nowoczynski edited this page Sep 29, 2021
·
1 revision
Ensure that the read and writes are happening through niovakv_client. Verify that read and write is happening successfully.
- Pmdb Server Count: Start servers such that quorum is formed. (Number of servers /2 + 1)
- Niovakv Server Count : 1 or more servers need to be started.
- Niovakv Client-Count: 1 or more clients need to be started.
export CGO_LDFLAGS="-L/usr/local/niova/niova-core/lib/"
export CGO_CFLAGS="-I/usr/local/niova/niova-core/include/niova"
export LD_LIBRARY_PATH=/usr/local/niova/niova-core/lib/
export PATH=$PATH:/usr/local/go/bin
export PYTHONPATH= <holon-directory-path>
export NIOVA_BIN_PATH= /home/user-name/dir-name/niova-core/libexec/niova
- Internally this will start a PMDB Client.
To start niovakv client we need to pass various parameters for write operation.
Operation : "write"
Key : <key-prefix>
Value : <value-prefix>
OutfileName : <abc>
NumRequest : <how many request to process / by default it is 5 no of request>
MultiKey : <since we here are passing single key and value therefore this value will be False>
Sequential : <since we here are passing single key and value therefore this value will be False>
Add checks for Status for write operation it should be 0. And the Response of Validate should be true.
{
"write": [
{
"Request": {
"Operation": "write",
"Key": "Key0",
"Value": "Value0",
"Request_timestamp": "2021-09-23T06:09:38.161834162Z"
},
"Response": {
"Status": 0,
"Response": "",
"Validate": true,
"Response_timestamp": "2021-09-23T06:09:38.227719859Z"
},
"Req_resolved_time": 65885713
}
]
}
Here to start niovakv client we need to pass various parameters for read operation .
Operation : "read"
Key : <key-prefix>
Value : ""
OutfileName : <abc>
NumRequest : <how many request to process / by default it is 5 no of request>
MultiKey : <since we here are passing single key and value therefore this value will be False>
Sequential : <since we here are passing single key and value therefore this value will be False>
Here’s some output from the read operation json file:
{
"read": [
{
"Request": {
"Operation": "read",
"Key": "Key0",
"Value": "",
"Request_timestamp": "2021-09-23T06:09:38.380893291Z"
},
"Response": {
"Status": 0,
"Response": "Value0",
"Validate": false,
"Response_timestamp": "2021-09-23T06:09:38.383659665Z"
},
"Req_resolved_time": 2766378
}
]
}
Compare values of read and write
[‘write’][’Request’][‘Key’] == [‘read’][‘Request’][‘Key’]
[‘write’][‘Request’][‘Value’] == [‘read’][‘Response’][‘Response’]