forked from mooncake-track/Mooncake
[Store] Add Master Json Config Example
This commit is contained in:
parent
c0f83b1ab3
commit
bf88c3dc4f
|
|
@ -45,6 +45,15 @@ mooncake_master \
|
|||
--enable_metric_reporting=true
|
||||
```
|
||||
|
||||
**Tips:**
|
||||
|
||||
In addition to command-line flags, the Master also supports configuration via JSON and YAML files. For example:
|
||||
|
||||
```bash
|
||||
mooncake_master \
|
||||
--config_path=mooncake-store/conf/master.yaml
|
||||
```
|
||||
|
||||
## Metrics Endpoints
|
||||
|
||||
The master exposes Prometheus-style metrics over HTTP on `--metrics_port`:
|
||||
|
|
|
|||
|
|
@ -216,4 +216,4 @@ store.close()
|
|||
|
||||
### More Examples and Documentation
|
||||
|
||||
Please refer to the [Mooncake Store Python API](../python-api-reference/mooncake-store.md) and [Mooncake Store](../design/mooncake-store.md) for more examples and documentation.
|
||||
Please refer to the [Mooncake Store Python API](../python-api-reference/mooncake-store.md), [Mooncake Store](../design/mooncake-store.md) and [Mooncake Store Deployment & Operations Guide](../deployment/mooncake-store-deployment-guide.md) for more examples and documentation.
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"enable_metric_reporting": true,
|
||||
"metrics_port": 9003,
|
||||
"rpc_port": 50051,
|
||||
"rpc_thread_num": 4,
|
||||
"rpc_address": "0.0.0.0",
|
||||
"rpc_conn_timeout_seconds": 0,
|
||||
"rpc_enable_tcp_no_delay": true,
|
||||
"default_kv_lease_ttl": 5000,
|
||||
"default_kv_soft_pin_ttl": 1800000,
|
||||
"allow_evict_soft_pinned_objects": true,
|
||||
"eviction_ratio": 0.1,
|
||||
"eviction_high_watermark_ratio": 1.0,
|
||||
"enable_ha": false,
|
||||
"etcd_endpoints": "http://localhost:2379",
|
||||
"root_fs_dir": "",
|
||||
"cluster_id": "mooncake_cluster",
|
||||
"memory_allocator": "offset",
|
||||
"client_live_ttl_sec": 60,
|
||||
"enable_http_metadata_server": false,
|
||||
"http_metadata_server_host": "0.0.0.0",
|
||||
"http_metadata_server_port": 8080
|
||||
}
|
||||
|
|
@ -11,9 +11,14 @@ default_kv_soft_pin_ttl: 1800000
|
|||
allow_evict_soft_pinned_objects: true
|
||||
eviction_ratio: 0.1
|
||||
eviction_high_watermark_ratio: 1.0
|
||||
client_live_ttl_sec: 60
|
||||
|
||||
enable_ha: false
|
||||
etcd_endpoints: "http://localhost:2379"
|
||||
root_fs_dir: ""
|
||||
cluster_id: "mooncake_cluster"
|
||||
memory_allocator: "offset"
|
||||
memory_allocator: "offset"
|
||||
client_live_ttl_sec: 60
|
||||
|
||||
enable_http_metadata_server: false
|
||||
http_metadata_server_host: "0.0.0.0"
|
||||
http_metadata_server_port: 8080
|
||||
|
|
@ -18,7 +18,7 @@ using namespace coro_rpc;
|
|||
using namespace async_simple;
|
||||
using namespace async_simple::coro;
|
||||
|
||||
DEFINE_string(conf_path, "", "master service config file path");
|
||||
DEFINE_string(config_path, "", "master service config file path");
|
||||
DEFINE_int32(port, 50051,
|
||||
"Port for master service to listen on (deprecated, use rpc_port)");
|
||||
DEFINE_int32(
|
||||
|
|
@ -324,7 +324,7 @@ int main(int argc, char* argv[]) {
|
|||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
// Initialize the master configuration
|
||||
mooncake::MasterConfig master_config;
|
||||
std::string conf_path = FLAGS_conf_path;
|
||||
std::string conf_path = FLAGS_config_path;
|
||||
if (!conf_path.empty()) {
|
||||
mooncake::DefaultConfig default_config;
|
||||
default_config.SetPath(conf_path);
|
||||
|
|
|
|||
Loading…
Reference in New Issue