You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/10/27 09:58:20 UTC

[GitHub] [ratis] szetszwo commented on a diff in pull request #770: RATIS-1732. Add configuration reference for RaftServer

szetszwo commented on code in PR #770:
URL: https://github.com/apache/ratis/pull/770#discussion_r1006659319


##########
ratis-docs/src/site/markdown/configuraions.md:
##########
@@ -0,0 +1,546 @@
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+# Ratis Configuration Reference
+
+## RaftServer Configurations
+
+All RaftServer configurations can be found at `RaftServerConfigKeys` . To customize configurations, you should first set
+the expected value in the `RaftProperties` and then pass it to RaftServer builder when starting up RaftServer.
+
+```java
+final RaftProperties properties = new RaftProperties();
+RaftServerConfigKeys.LeaderElection.setPreVote(properties,false);
+
+// pass the customized properties when building the RaftServer
+RaftServer server = RaftServer.newBuilder()
+      .setProperties(properties)
+      .build();
+```
+
+### Server
+
+| **Param**       | **raft.server.storage.dir**                    |
+|-----------------|------------------------------------------------|
+| **Description** | root storage directory to hold RaftServer data |
+| **Type**        | string                                         |
+| **Default**     | /tmp/raft-server/                              |
+
+If the storage.dir already contains data (from last run), RaftServer will try recovering from existing data when it
+starts up.
+
+| **Param**       | **raft.server.storage.free-space.min**    |
+|-----------------|-------------------------------------------|
+| **Description** | minimal space requirement for storage dir |
+| **Type**        | SizeInBytes                               |
+| **Default**     | 0MB                                       |
+
+| **Param**       | **raft.server.removed.groups.dir**       |
+|-----------------|------------------------------------------|
+| **Description** | storage directory to hold removed groups |
+| **Type**        | string                                   |
+| **Default**     | /tmp/raft-server/removed-groups/         |
+
+```java
+RaftClientReply remove(RaftGroupId groupId,boolean deleteDirectory,boolean renameDirectory);
+```
+
+When removing an existing group, if the `deleteDirectory` flag is set to false and `renameDirectory` is set to true, the
+group data will be renamed to this dir instead of being deleted.
+
+| **Param**       | **raft.server.sleep.deviation.threshold** |

Review Comment:
   Let's call it "Property" and use code style as below
   ```
   | **Property**    | `raft.server.sleep.deviation.threshold` |
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org