VGalaxies commented on code in PR #2614:
URL:
https://github.com/apache/incubator-hugegraph/pull/2614#discussion_r1703138494
##########
hugegraph-store/hg-store-cli/src/main/java/org/apache/hugegraph/store/cli/loader/HgThread2DB.java:
##########
@@ -51,13 +51,13 @@
import lombok.extern.slf4j.Slf4j;
/**
- * 使用pd,支持raft
- * 读取文件并多线程进行入库
+ * use pd, support raft
+ * Read the file and go into multi thread warehouse
*/
@Slf4j
public class HgThread2DB {
- /*正在进行和在排队的任务的总数*/
+ /* The total number of tasks in line and queuing*/
Review Comment:
```suggestion
/* The total number of tasks in line and queuing */
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/NodeTxSessionProxy.java:
##########
@@ -692,7 +692,7 @@ public boolean doAction(String table, HgOwnerKey startKey,
Integer code,
}
private List<NodeTkv> toNodeTkvList(Builder scanReqBuilder) {
- // TODO 使用builder获取owner
+ // Todo use builder to get Owner
Review Comment:
```suggestion
// TODO: use builder to get owner
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/HgKvStore.java:
##########
@@ -43,8 +43,8 @@ public interface HgKvStore {
boolean put(String table, HgOwnerKey ownerKey, byte[] value);
/**
- * 该版本被store内部使用。向分区写入数据,
- * partitionId与key.keyCode必须与pd存储的分区信息保持一致。
+ * This version isstore Internal use.Write data to the partition,
+ * Partitionid andkey.keycode must be consistent with the partition
information of PD storage.
Review Comment:
```suggestion
* This version is store internal use. Write data to the partition,
* partitionid and key.keycode must be consistent with the partition
information of PD storage.
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/GrpcUtil.java:
##########
@@ -63,7 +63,7 @@ static Key.Builder getOwnerKeyBuilder() {
Key.Builder builder = keyBuilder.get();
if (builder == null) {
builder = Key.newBuilder();
- // TODO 线程级变量,寻找删除时机
+ // TODO thread-level variables, find the timing of deletion
Review Comment:
```suggestion
// TODO: thread-level variables, find the timing of deletion
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/HgStoreNodePartitionerImpl.java:
##########
@@ -141,7 +141,7 @@ public int partition(HgNodePartitionerBuilder builder,
String graphName,
}
/**
- * 查询hgstore信息
+ * Inquirehgstore information
Review Comment:
```suggestion
* Inquire hgstore information
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/HgStoreNodePartitionerImpl.java:
##########
@@ -48,7 +48,7 @@ public HgStoreNodePartitionerImpl(PDClient pdClient,
HgStoreNodeManager nodeMana
}
/**
- * 查询分区信息,结果通过HgNodePartitionerBuilder返回
+ * Query Partition Information, the result is returned through
HGNODEPARTITITITITINERBUILDER
Review Comment:
```suggestion
* Query Partition Information, the result is returned through
HgNodePartitionerBuilder
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/GrpcUtil.java:
##########
@@ -86,7 +86,7 @@ static Key toKey(HgOwnerKey ownerKey) {
Key.Builder builder = keyBuilder.get();
if (builder == null) {
builder = Key.newBuilder();
- // TODO 线程级变量,寻找删除时机
+ // TODO thread-level variables, find the timing of deletion
Review Comment:
```suggestion
// TODO: thread-level variables, find the timing of deletion
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvBatchScannerMerger.java:
##########
@@ -125,7 +128,7 @@ public void registerScanner(KvBatchScanner closeable) {
}
/**
- * 返回值<0表示任务结束
+ * Return value <0 means the task is over
Review Comment:
```suggestion
* Return value < 0 means the task is over
```
##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/HgStoreEngine.java:
##########
@@ -235,9 +236,9 @@ public void restoreLocalPartitionEngine() {
}
/**
- * 收到store raft addr 变更,需要重新创建raft group
+ * ReceiveStore Raft Addr change, you need to re-create Raft Group
*
- * @param storeId 变更的store id
+ * @param storeId changedstore id
Review Comment:
```suggestion
* @param storeId changed store id
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvBatchScannerMerger.java:
##########
@@ -170,7 +173,7 @@ public void add(Supplier<HgKvIterator<HgKvEntry>> supplier)
{
}
/**
- * 迭代器是否有效,如果没有数据,等待数据到达
+ * WHETHER the ITERATOR is value, if no data, wait for the data to
arrive
Review Comment:
```suggestion
* whether the iterator is valid, if no data, wait for the data to
arrive
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvBatchScannerMerger.java:
##########
@@ -221,18 +226,18 @@ private void moveNext() {
}
/**
- * 对多个Scanner返回结果进行归并排序
+ * Multiplescanner return results for merger and sorting
Review Comment:
```suggestion
* Multiple scanner return results for merger and sorting
```
##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/HgStoreEngine.java:
##########
@@ -193,26 +194,26 @@ public void snapshotForTest() {
}
/**
- * Store注册状态发生改变
+ * Store registration status changes
*/
@Override
public void stateChanged(Store store, Metapb.StoreState oldState,
Metapb.StoreState newState) {
log.info("stateChanged, oldState {}, newState {}", oldState, newState);
if (newState == Metapb.StoreState.Up) {
- // 状态变为上线,记录store信息
+ // Status becomes online, record store information
partitionManager.setStore(store);
partitionManager.loadPartition();
restoreLocalPartitionEngine();
}
}
/**
- * 恢复本地的PartitionEngine,恢复PD返回的分区信息
- * 1、需要检查本次保存的分区,删除作废的分区
+ * RESTORE LOCALPARTITITITINGINE, restore the partition information
returned by PD
Review Comment:
```suggestion
* restore local PartitionEngine, restore the partition information
returned by PD
```
##########
hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvBatchScannerMerger.java:
##########
@@ -146,7 +149,7 @@ public int getScannerCount() {
}
/**
- * 组装一个Scanner的多个有序迭代器为一个迭代器
+ * ASSEMBLE ASCANNer's multiple ordered iterator is an iterator
Review Comment:
```suggestion
* assemble a Scanner's multiple ordered iterator is an iterator
```
##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/HgStoreEngine.java:
##########
@@ -153,7 +154,7 @@ public synchronized boolean init(final HgStoreEngineOptions
opts) {
}
/**
- * 创建raft rpc server,用于store之间通讯
+ * Createraft RPC Server, used for communication between store
Review Comment:
```suggestion
* Create raft RPC Server, used for communication between store
```
--
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]