VGalaxies commented on code in PR #2624:
URL:
https://github.com/apache/incubator-hugegraph/pull/2624#discussion_r1705571775
##########
hugegraph-store/hg-store-grpc/pom.xml:
##########
@@ -91,23 +91,23 @@
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
</pluginArtifact>
- <!--默认值-->
+ <!--Default value-->
Review Comment:
```suggestion
<!-- Default value -->
```
##########
hugegraph-store/hg-store-grpc/pom.xml:
##########
@@ -91,23 +91,23 @@
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
</pluginArtifact>
- <!--默认值-->
+ <!--Default value-->
<protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
- <!--默认值-->
+ <!--Default value-->
Review Comment:
```suggestion
<!-- Default value -->
```
##########
hugegraph-store/hg-store-grpc/pom.xml:
##########
@@ -91,23 +91,23 @@
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
</pluginArtifact>
- <!--默认值-->
+ <!--Default value-->
<protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
- <!--默认值-->
+ <!--Default value-->
<!--<outputDirectory>${project.build.directory}/generated-sources/protobuf/java</outputDirectory>-->
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
-
<!--设置是否在生成java文件之前清空outputDirectory的文件,默认值为true,设置为false时也会覆盖同名文件-->
+ <!--Set whether to clear the files in outputDirectory
before generating java files, the default value is true, and it will also
override files with the same name when set to false-->
<clearOutputDirectory>false</clearOutputDirectory>
-
<!--更多配置信息可以查看https://www.xolstice.org/protobuf-maven-plugin/compile-mojo.html-->
+ <!--More configuration information can be found at
https://www.xolstice.org/protobuf-maven-plugin/compile-mojo.html-->
Review Comment:
```suggestion
<!-- More configuration information can be found at
https://www.xolstice.org/protobuf-maven-plugin/compile-mojo.html -->
```
##########
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/grpc/HgStoreNodeService.java:
##########
@@ -140,14 +140,14 @@ void addRaftTask(byte methodId, String graphName, Integer
partitionId, Req req,
}
//
try {
- // 序列化,
+ // Serialization,
Review Comment:
```suggestion
// Serialization
```
##########
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/grpc/ParallelScanIterator.java:
##########
@@ -107,7 +107,7 @@ public boolean hasNext() {
while (current == null && tryTimes < waitDataMaxTryTimes) {
try {
if (queue.size() != 0 || !finished) {
- current = queue.poll(100, TimeUnit.MILLISECONDS);
//定期检查client是否被关闭了
+ current = queue.poll(100, TimeUnit.MILLISECONDS);
//Regularly check if the client has been closed.
Review Comment:
```suggestion
current = queue.poll(100, TimeUnit.MILLISECONDS); //
Regularly check if the client has been closed.
```
##########
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/grpc/HgStoreNodeService.java:
##########
@@ -140,14 +140,14 @@ void addRaftTask(byte methodId, String graphName, Integer
partitionId, Req req,
}
//
try {
- // 序列化,
+ // Serialization,
final byte[] buffer = new byte[req.getSerializedSize() + 1];
final CodedOutputStream output =
CodedOutputStream.newInstance(buffer);
output.write(methodId);
req.writeTo(output);
output.checkNoSpaceLeft();
output.flush();
- // 传送给raft
+ // Send to raft */
Review Comment:
```suggestion
// Send to raft
```
##########
hugegraph-store/hg-store-grpc/src/main/proto/graphpb.proto:
##########
@@ -74,19 +74,19 @@ message Property{
}
message Vertex{
- int64 label = 1; // 点类型
- Variant id = 2; // 点ID
- repeated Property properties = 3; //点属性
+ int64 label = 1; // Point type
+ Variant id = 2; // Point ID
+ repeated Property properties = 3; // point properties
Review Comment:
```suggestion
repeated Property properties = 3; // Point properties
```
##########
hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/PartitionEngineTest.java:
##########
@@ -88,7 +88,7 @@ public void test() {
addedNodes.forEach(s -> System.out.print(s + " "));
System.out.println();
- // 删除 4,5
+ // Delete 4,5
Review Comment:
```suggestion
// Delete 4, 5
```
##########
hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/HgSessionManagerTest.java:
##########
@@ -173,7 +173,7 @@ public void batchPrefix() {
@Test
//CAUTION: ONLY FOR LONG!
Review Comment:
```suggestion
// CAUTION: ONLY FOR LONG!
```
##########
hugegraph-store/hg-store-test/src/main/resources/pd-server.yml:
##########
@@ -41,31 +41,31 @@ pd:
patrol-interval: 3000000
data-path: tmp/8686
- # 最少节点数,少于该数字,集群停止入库
+ # Minimum number of nodes, less than this number, the cluster stops
ingesting data.
initial-store-count: 1
- # 初始store列表,在列表内的store自动激活
+ # Initial store list, stores within the list are automatically activated.
initial-store-list: 127.0.0.1:8501,127.0.0.1:8502,127.0.0.1:8503
#initial-store-list: 127.0.0.1:8501
raft:
address: 127.0.0.1:8610
- # raft集群
+ # raft cluster
peers-list: 127.0.0.1:8610
- # raft rpc读写超时时间,单位毫秒
+ # raft rpc read-write timeout, unit in milliseconds
rpc-timeout: 10000
- # 快照生成时间间隔,单位秒
+ # Snapshot generation interval, unit: seconds
snapshotInterval: 30000
metrics: true
store:
- # store心跳超时时间,超过该时间,认为store临时不可用,转移Leader到其他副本,单位秒
+ # store heartbeat timeout, if exceeds this time, consider the store
temporarily unavailable, transfer Leader to another replica, in seconds
keepAlive-timeout: 300
- # store下线时间。超过该时间,认为store永久不可用,分配副本到其他机器,单位秒
+ # store offline time. Beyond this time, it is considered that the store is
permanently unavailable, and the replica is allocated to other machines, in
seconds.
max-down-time: 180000
partition:
- # 默认每个分区副本数
+ # Default number of replicas per partition
default-shard-count: 3
- # 默认每机器最大副本数,初始分区数= store-max-shard-count * store-number /
default-shard-count
+ # Default maximum number of replicas per machine, initial number of
partitions = store-max-shard-count * store-number / default-shard-count
store-max-shard-count: 1
discovery:
- #客户端注册后,无心跳最长次数,超过后,之前的注册信息会被删除
+ #After client registration, no heartbeat longest number, after exceeding,
previous registration information will be deleted.
Review Comment:
```suggestion
# After client registration, no heartbeat longest number, after exceeding,
previous registration information will be deleted.
```
##########
hugegraph-store/hg-store-grpc/src/main/proto/graphpb.proto:
##########
@@ -74,19 +74,19 @@ message Property{
}
message Vertex{
- int64 label = 1; // 点类型
- Variant id = 2; // 点ID
- repeated Property properties = 3; //点属性
+ int64 label = 1; // Point type
+ Variant id = 2; // Point ID
+ repeated Property properties = 3; // point properties
}
message Edge{
- int64 label = 1; // 边类型
+ int64 label = 1; // Edge type
int64 sourceLabel = 2;
int64 targetLabel = 3;
- Variant source_id = 4; // 源点ID
- Variant target_id = 5; // 目标点ID
+ Variant source_id = 4; // Source point ID
+ Variant target_id = 5; // Target point ID
- repeated Property properties = 6; //边属性
+ repeated Property properties = 6; // edge properties
Review Comment:
```suggestion
repeated Property properties = 6; // Edge properties
```
##########
hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/HgSessionManagerRaftFakePDTest.java:
##########
@@ -217,7 +217,7 @@ public void batchGet() {
// @Test
//CAUTION: ONLY FOR LONG!
Review Comment:
```suggestion
// CAUTION: ONLY FOR LONG!
```
##########
hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/HgSessionManagerOneRaftFakePDTest.java:
##########
@@ -175,7 +175,7 @@ public void batchGet() {
// @Test
//CAUTION: ONLY FOR LONG!
Review Comment:
```suggestion
// CAUTION: ONLY FOR LONG!
```
##########
hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/HgSessionManagerRaftPDTest.java:
##########
@@ -263,7 +263,7 @@ public void testBatchPutMultiGraph() throws IOException {
// @Test
//CAUTION: ONLY FOR LONG!
Review Comment:
```suggestion
// CAUTION: ONLY FOR LONG!
```
##########
hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/client/HgSessionManagerRaftPDTest.java:
##########
@@ -241,7 +241,7 @@ public void testBatchPutMultiGraph() throws IOException {
// @Test
// CAUTION: ONLY FOR LONG!
Review Comment:
```suggestion
// CAUTION: ONLY FOR LONG!
```
##########
hugegraph-store/hg-store-grpc/pom.xml:
##########
@@ -91,23 +91,23 @@
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
</pluginArtifact>
- <!--默认值-->
+ <!--Default value-->
<protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
- <!--默认值-->
+ <!--Default value-->
<!--<outputDirectory>${project.build.directory}/generated-sources/protobuf/java</outputDirectory>-->
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
-
<!--设置是否在生成java文件之前清空outputDirectory的文件,默认值为true,设置为false时也会覆盖同名文件-->
+ <!--Set whether to clear the files in outputDirectory
before generating java files, the default value is true, and it will also
override files with the same name when set to false-->
Review Comment:
```suggestion
<!-- Set whether to clear the files in outputDirectory
before generating java files, the default value is true, and it will also
override files with the same name when set to false -->
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]