forked from hugegraph/hugegraph-sync
Compare commits
3 Commits
master
...
fix_vaughn
| Author | SHA1 | Date |
|---|---|---|
|
|
91b404c352 | |
|
|
e1e613e4b3 | |
|
|
a39fcc3e62 |
|
|
@ -28,7 +28,8 @@ github:
|
|||
del_branch_on_merge: true
|
||||
#labels:
|
||||
enabled_merge_buttons:
|
||||
merge: false
|
||||
# TODO: disable it after common merged
|
||||
merge: true
|
||||
rebase: true
|
||||
squash: true
|
||||
protected_branches:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ on:
|
|||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-server:
|
||||
# TODO: rename to build-server later
|
||||
build:
|
||||
# TODO: we need test & replace it to ubuntu-24.04 or ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
<properties>
|
||||
<!-- Use parent params -->
|
||||
<lombok.version>1.18.8</lombok.version>
|
||||
<okhttp.version>4.10.0</okhttp.version>
|
||||
</properties>
|
||||
|
||||
|
|
@ -224,7 +223,7 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@ package org.apache.hugegraph.rest;
|
|||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URI;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.KeyStore;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
|
@ -414,14 +411,6 @@ public abstract class AbstractRestClient implements RestClient {
|
|||
}
|
||||
}
|
||||
|
||||
public static String encode(String raw) {
|
||||
try {
|
||||
return URLEncoder.encode(raw, StandardCharsets.UTF_8.toString()).replace("+", "%2B");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new IllegalArgumentException("Failed to encode string: " + raw, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void resetAuthContext() {
|
||||
this.authContext.remove();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import org.apache.hugegraph.testutil.WhiteboxTest;
|
|||
import org.apache.hugegraph.unit.config.HugeConfigTest;
|
||||
import org.apache.hugegraph.unit.config.OptionSpaceTest;
|
||||
import org.apache.hugegraph.unit.event.EventHubTest;
|
||||
import org.apache.hugegraph.unit.rest.AbstractRestClientTest;
|
||||
import org.apache.hugegraph.unit.version.VersionTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Suite;
|
||||
|
|
@ -84,7 +83,6 @@ import org.apache.hugegraph.unit.util.VersionUtilTest;
|
|||
EventHubTest.class,
|
||||
PerfUtilTest.class,
|
||||
StopwatchTest.class,
|
||||
AbstractRestClientTest.class,
|
||||
RestClientTest.class,
|
||||
RestResultTest.class,
|
||||
VersionTest.class,
|
||||
|
|
|
|||
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.apache.hugegraph.unit.rest;
|
||||
|
||||
import org.apache.hugegraph.rest.AbstractRestClient;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class AbstractRestClientTest {
|
||||
|
||||
@Test
|
||||
public void testEncodeWithSpaces() {
|
||||
String raw = "hello world";
|
||||
String expected = "hello%2Bworld";
|
||||
String encoded = AbstractRestClient.encode(raw);
|
||||
Assert.assertEquals(expected, encoded);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEncodeWithSpecialCharacters() {
|
||||
String raw = "hello@world!";
|
||||
String expected = "hello%40world%21";
|
||||
String encoded = AbstractRestClient.encode(raw);
|
||||
Assert.assertEquals(expected, encoded);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEncodeWithChineseCharacters() {
|
||||
String raw = "你好";
|
||||
String expected = "%E4%BD%A0%E5%A5%BD";
|
||||
String encoded = AbstractRestClient.encode(raw);
|
||||
Assert.assertEquals(expected, encoded);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEncodeWithNullInput() {
|
||||
String raw = null;
|
||||
Assert.assertThrows(NullPointerException.class, () -> {
|
||||
AbstractRestClient.encode(raw);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
animal-sniffer-annotations-1.18.jar
|
||||
annotations-4.1.1.4.jar
|
||||
annotations-13.0.jar
|
||||
bolt-1.6.2.jar
|
||||
checker-qual-3.5.0.jar
|
||||
commons-beanutils-1.9.4.jar
|
||||
commons-codec-1.13.jar
|
||||
|
|
@ -13,25 +10,14 @@ commons-lang-2.6.jar
|
|||
commons-lang3-3.12.0.jar
|
||||
commons-logging-1.1.1.jar
|
||||
commons-text-1.9.jar
|
||||
disruptor-3.3.7.jar
|
||||
error_prone_annotations-2.3.4.jar
|
||||
failureaccess-1.0.1.jar
|
||||
grpc-api-1.28.1.jar
|
||||
grpc-context-1.28.1.jar
|
||||
grpc-core-1.28.1.jar
|
||||
grpc-netty-shaded-1.28.0.jar
|
||||
grpc-protobuf-1.28.0.jar
|
||||
grpc-protobuf-lite-1.28.0.jar
|
||||
grpc-stub-1.28.0.jar
|
||||
gson-2.8.6.jar
|
||||
guava-30.0-jre.jar
|
||||
hamcrest-core-1.3.jar
|
||||
hessian-3.3.7.jar
|
||||
j2objc-annotations-1.3.jar
|
||||
jackson-annotations-2.14.0-rc1.jar
|
||||
jackson-core-2.14.0-rc1.jar
|
||||
jackson-databind-2.14.0-rc1.jar
|
||||
jackson-dataformat-yaml-2.9.3.jar
|
||||
jackson-jaxrs-base-2.14.0-rc1.jar
|
||||
jackson-jaxrs-json-provider-2.14.0-rc1.jar
|
||||
jackson-module-jaxb-annotations-2.14.0-rc1.jar
|
||||
|
|
@ -44,34 +30,16 @@ jaxb-impl-3.0.2.jar
|
|||
joda-time-2.10.8.jar
|
||||
jsr305-3.0.1.jar
|
||||
junit-4.13.1.jar
|
||||
listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
|
||||
log4j-api-2.18.0.jar
|
||||
log4j-core-2.18.0.jar
|
||||
log4j-slf4j-impl-2.18.0.jar
|
||||
lookout-api-1.4.1.jar
|
||||
netty-all-4.1.42.Final.jar
|
||||
opentracing-api-0.22.0.jar
|
||||
opentracing-mock-0.22.0.jar
|
||||
opentracing-noop-0.22.0.jar
|
||||
opentracing-util-0.22.0.jar
|
||||
perfmark-api-0.19.0.jar
|
||||
proto-google-common-protos-1.17.0.jar
|
||||
protobuf-java-3.11.0.jar
|
||||
slf4j-api-1.7.25.jar
|
||||
snakeyaml-1.18.jar
|
||||
sofa-common-tools-1.0.12.jar
|
||||
sofa-rpc-all-5.7.6.jar
|
||||
swagger-annotations-1.5.18.jar
|
||||
swagger-core-1.5.18.jar
|
||||
swagger-models-1.5.18.jar
|
||||
tracer-core-3.0.8.jar
|
||||
validation-api-1.1.0.Final.jar
|
||||
kotlin-stdlib-1.6.20.jar
|
||||
kotlin-stdlib-common-1.5.31.jar
|
||||
kotlin-stdlib-jdk7-1.6.10.jar
|
||||
kotlin-stdlib-jdk8-1.6.10.jar
|
||||
listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
|
||||
log4j-api-2.18.0.jar
|
||||
log4j-core-2.18.0.jar
|
||||
log4j-slf4j-impl-2.18.0.jar
|
||||
logging-interceptor-4.10.0.jar
|
||||
lombok-1.18.8.jar
|
||||
okhttp-4.10.0.jar
|
||||
okio-jvm-3.0.0.jar
|
||||
|
||||
slf4j-api-1.7.25.jar
|
||||
|
|
|
|||
|
|
@ -124,6 +124,16 @@
|
|||
<module>hugegraph-rpc</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.30</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.20</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java-util -->
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@
|
|||
<artifactId>hg-pd-common</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.30</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
|
|
|||
|
|
@ -627,7 +627,6 @@ public class GraphTransaction extends IndexableTransaction {
|
|||
* unconcerned with add vertex
|
||||
*/
|
||||
this.beforeWrite();
|
||||
//todo This is where the transaction feature needs to be added
|
||||
this.addedVertices.put(vertex.id(), vertex);
|
||||
this.afterWrite();
|
||||
} catch (Throwable e) {
|
||||
|
|
@ -2221,4 +2220,3 @@ public class GraphTransaction extends IndexableTransaction {
|
|||
this.store().removeOlapTable(pkId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,12 @@
|
|||
<artifactId>hg-pd-client</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<properties>
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
<lombok.version>1.18.20</lombok.version>
|
||||
<lombok.version>1.18.30</lombok.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -61,6 +61,8 @@
|
|||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ export FILE_LIMITN=1024
|
|||
function check_evn_limit() {
|
||||
local limit_check=$(ulimit -n)
|
||||
if [[ ${limit_check} != "unlimited" && ${limit_check} -lt ${FILE_LIMITN} ]]; then
|
||||
echo -e "${BASH_SOURCE[0]##*/}:${LINENO}:\E[1;32m ulimit -n can open too few maximum file descriptors, need (${FILE_LIMITN})!! \E[0m"
|
||||
echo -e "${BASH_SOURCE[0]##*/}:${LINENO}:\E[1;32m ulimit -n 可以打开的最大文件描述符数太少,需要(${FILE_LIMITN})!! \E[0m"
|
||||
return 1
|
||||
fi
|
||||
limit_check=$(ulimit -u)
|
||||
if [[ ${limit_check} != "unlimited" && ${limit_check} -lt ${PROC_LIMITN} ]]; then
|
||||
echo -e "${BASH_SOURCE[0]##*/}:${LINENO}:\E[1;32m ulimit -u too few available processes for the user, need (${PROC_LIMITN})!! \E[0m"
|
||||
echo -e "${BASH_SOURCE[0]##*/}:${LINENO}:\E[1;32m ulimit -u 用户最大可用的进程数太少,需要(${PROC_LIMITN})!! \E[0m"
|
||||
return 2
|
||||
fi
|
||||
return 0
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ management:
|
|||
include: "*"
|
||||
|
||||
rocksdb:
|
||||
# rocksdb total memory usage, force flush to disk when reaching this value
|
||||
# rocksdb 使用的总内存大小,达到该值强制写盘
|
||||
total_memory_size: 32000000000
|
||||
# memtable size used by rocksdb
|
||||
# rocksdb 使用的 memtable 大小
|
||||
write_buffer_size: 32000000
|
||||
# For each rocksdb, the number of memtables reaches this value for writing to disk.
|
||||
# 对于每个 rocksdb 来说,memtable 个数达到该值进行写盘
|
||||
min_write_buffer_number_to_merge: 16
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd 服务地址,多个 pd 地址用逗号分割
|
||||
address: localhost:8686
|
||||
|
||||
management:
|
||||
|
|
@ -30,24 +30,24 @@ management:
|
|||
include: "*"
|
||||
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc 的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8500
|
||||
netty-server:
|
||||
max-inbound-message-size: 1000MB
|
||||
raft:
|
||||
# raft cache queue size
|
||||
# raft 缓存队列大小
|
||||
disruptorBufferSize: 1024
|
||||
address: 127.0.0.1:8510
|
||||
max-log-file-size: 600000000000
|
||||
# Snapshot generation interval, in seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 1800
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8520
|
||||
|
||||
app:
|
||||
# Storage path, support multiple paths, separated by commas
|
||||
# 存储路径,支持多个路径,逗号分割
|
||||
data-path: ./storage
|
||||
#raft-path: ./storage
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
<!-- 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 -->
|
||||
<!--设置是否在生成java文件之前清空outputDirectory的文件,默认值为true,设置为false时也会覆盖同名文件-->
|
||||
<clearOutputDirectory>false</clearOutputDirectory>
|
||||
<!-- More configuration information can be found at https://www.xolstice.org/protobuf-maven-plugin/compile-mojo.html -->
|
||||
<!--更多配置信息可以查看https://www.xolstice.org/protobuf-maven-plugin/compile-mojo.html-->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<!-- When executing mvn compile, the following operations will be performed -->
|
||||
<!--在执行mvn compile的时候会执行以下操作-->
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<!-- Generate OuterClass class -->
|
||||
<!--生成OuterClass类-->
|
||||
<goal>compile</goal>
|
||||
<!-- Generate Grpc classes -->
|
||||
<!--生成Grpc类-->
|
||||
<goal>compile-custom</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
|
|
|||
|
|
@ -30,20 +30,20 @@ message ScanPartitionRequest{
|
|||
SCAN_VERTEX = 1;
|
||||
SCAN_EDGE = 2;
|
||||
}
|
||||
// Request parameters
|
||||
// 请求参数
|
||||
message Request{
|
||||
ScanType scan_type = 1;
|
||||
string graph_name = 2;
|
||||
uint32 partition_id = 3;
|
||||
uint32 start_code = 4;
|
||||
uint32 end_code = 5;
|
||||
// Filter conditions
|
||||
// 过滤条件
|
||||
string condition = 6;
|
||||
string table = 7;
|
||||
int64 limit = 8;
|
||||
int32 boundary = 9;
|
||||
bytes position = 10;
|
||||
// Return condition
|
||||
// 返回条件
|
||||
repeated int64 properties = 11;
|
||||
}
|
||||
|
||||
|
|
@ -54,14 +54,14 @@ message ScanPartitionRequest{
|
|||
RequestHeader header = 1;
|
||||
oneof request {
|
||||
Request scan_request = 2;
|
||||
// Each time a data packet is consumed, notify the server once, return the message sequence number
|
||||
// 每消费一个数据包,通知服务端一次,返回消息序号
|
||||
Reply reply_request = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message ScanResponse{
|
||||
ResponseHeader header = 1;
|
||||
// Message Sequence Number
|
||||
// 消息序号
|
||||
int32 seq_no = 2;
|
||||
repeated Vertex vertex = 3;
|
||||
repeated Edge edge = 4;
|
||||
|
|
@ -74,19 +74,19 @@ message Property{
|
|||
}
|
||||
|
||||
message Vertex{
|
||||
int64 label = 1; // Point type
|
||||
Variant id = 2; // Point ID
|
||||
repeated Property properties = 3; // Point properties
|
||||
int64 label = 1; // 点类型
|
||||
Variant id = 2; // 点ID
|
||||
repeated Property properties = 3; //点属性
|
||||
}
|
||||
|
||||
message Edge{
|
||||
int64 label = 1; // Edge type
|
||||
int64 label = 1; // 边类型
|
||||
int64 sourceLabel = 2;
|
||||
int64 targetLabel = 3;
|
||||
Variant source_id = 4; // Source point ID
|
||||
Variant target_id = 5; // Target point ID
|
||||
Variant source_id = 4; // 源点ID
|
||||
Variant target_id = 5; // 目标点ID
|
||||
|
||||
repeated Property properties = 6; // Edge properties
|
||||
repeated Property properties = 6; //边属性
|
||||
}
|
||||
|
||||
message Variant {
|
||||
|
|
@ -116,7 +116,7 @@ enum VariantType {
|
|||
|
||||
|
||||
message RequestHeader {
|
||||
// Sender ID.
|
||||
// 发送者 ID.
|
||||
uint64 sender_id = 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,10 +82,10 @@ enum ScanMethod {
|
|||
}
|
||||
|
||||
enum ScanOrderType{
|
||||
// Under batch interface, the requirement for return order
|
||||
ORDER_NONE = 0; // Allow unordered
|
||||
ORDER_WITHIN_VERTEX = 1; // Edges within a vertex will not be broken, but the order between different vertices is unordered.
|
||||
ORDER_STRICT = 2; // Ensure the original input point order
|
||||
// 批量接口下,返回顺序的要求
|
||||
ORDER_NONE = 0; // 允许无序
|
||||
ORDER_WITHIN_VERTEX = 1; // 一个点内的边不会被打断,单不同点之间为无序
|
||||
ORDER_STRICT = 2; // 保证原始的输入点顺序
|
||||
}
|
||||
|
||||
enum OpType {
|
||||
|
|
|
|||
|
|
@ -122,11 +122,11 @@ message PartitionLeader {
|
|||
|
||||
enum PartitionFaultType{
|
||||
PARTITION_FAULT_TYPE_UNKNOWN = 0;
|
||||
// Currently not the Leader, return the store where the Leader is located.
|
||||
// 当前不是Leader,返回Leader所在store
|
||||
PARTITION_FAULT_TYPE_NOT_LEADER = 1;
|
||||
// Wait for Leader timeout, possibly raft group creation failed
|
||||
// 等待Leader超时,可能raft group创建失败
|
||||
PARTITION_FAULT_TYPE_WAIT_LEADER_TIMEOUT = 2;
|
||||
// Partition does not belong to this machine
|
||||
// 分区不属于本机
|
||||
PARTITION_FAULT_TYPE_NOT_LOCAL = 3;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
|||
|
|
@ -49,14 +49,14 @@ public class AppConfig {
|
|||
@Value("${server.port}")
|
||||
private int restPort;
|
||||
|
||||
// Built-in pd mode, for standalone deployment
|
||||
//内置pd模式,用于单机部署
|
||||
@Value("${app.data-path: store}")
|
||||
private String dataPath;
|
||||
|
||||
@Value("${app.raft-path:}")
|
||||
private String raftPath;
|
||||
|
||||
// Built-in pd mode, for standalone deployment
|
||||
//内置pd模式,用于单机部署
|
||||
@Value("${app.fake-pd: false}")
|
||||
private boolean fakePd;
|
||||
@Autowired
|
||||
|
|
@ -97,7 +97,7 @@ public class AppConfig {
|
|||
if (raft.getDisruptorBufferSize() == 0) {
|
||||
int size = (int) (totalMemory / 1000 / 1000 / 1000);
|
||||
size = (int) Math.pow(2, Math.round(Math.log(size) / Math.log(2))) * 32;
|
||||
raft.setDisruptorBufferSize(size); // Increase one buffer every 32M
|
||||
raft.setDisruptorBufferSize(size); // 每32M增加一个buffer
|
||||
}
|
||||
|
||||
if (!rocksdb.containsKey("write_buffer_size") ||
|
||||
|
|
@ -213,7 +213,7 @@ public class AppConfig {
|
|||
@Value("${fake-pd.store-list:''}")
|
||||
private String storeList;
|
||||
@Value("${fake-pd.peers-list:''}")
|
||||
private String peersList; // fakePd mode, raft cluster initial configuration
|
||||
private String peersList; //fakePd模式下,raft集群初始配置
|
||||
@Value("${fake-pd.partition-count:3}")
|
||||
private int partitionCount;
|
||||
@Value("${fake-pd.shard-count:3}")
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class AppShutdownHook extends Thread {
|
|||
doSomethingForShutdown();
|
||||
|
||||
try {
|
||||
mainThread.join(); // Wait for mainThread to finish when a stop signal is received.
|
||||
mainThread.join(); //当收到停止信号时,等待mainThread的执行完成
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
System.out.println("Shut down complete.");
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class StoreNodeApplication {
|
|||
}
|
||||
|
||||
public static void start() {
|
||||
// Set the log location for the slot usage
|
||||
// 设置solt用到的日志位置
|
||||
String logPath = System.getProperty("logging.path");
|
||||
if (StringUtils.isBlank(logPath)) {
|
||||
System.setProperty("logging.path", "logs");
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* For testing only
|
||||
* 仅用于测试
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
|
|
@ -75,7 +75,7 @@ public class HgTestController {
|
|||
nodeService.getStoreEngine().destroyPartitionEngine(groupId, graphs);
|
||||
return "OK";
|
||||
} else {
|
||||
return "Partition not found";
|
||||
return "未找到分区";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class PartitionAPI {
|
|||
String graphName = partitionEntry.getKey();
|
||||
Partition pt = partitionEntry.getValue();
|
||||
PartitionInfo partition = new PartitionInfo(pt);
|
||||
// Here to open all the graphs, metric only returns the opened graph
|
||||
// 此处为了打开所有的图,metric只返回已打开的图
|
||||
businessHandler.getLatestSequenceNumber(graphName, pt.getId());
|
||||
partition.setMetric(
|
||||
businessHandler.getPartitionMetric(graphName, pt.getId(), accurate));
|
||||
|
|
@ -142,7 +142,7 @@ public class PartitionAPI {
|
|||
}
|
||||
|
||||
/**
|
||||
* Print all keys in the partition
|
||||
* 打印分区的所有key
|
||||
*/
|
||||
@GetMapping(value = "/partition/dump/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> dumpPartition(@PathVariable(value = "id") int id) throws
|
||||
|
|
@ -171,7 +171,7 @@ public class PartitionAPI {
|
|||
}
|
||||
|
||||
/**
|
||||
* Print all keys in the partition
|
||||
* 打印分区的所有key
|
||||
*/
|
||||
@GetMapping(value = "/partition/clean/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> cleanPartition(@PathVariable(value = "id") int id) throws
|
||||
|
|
@ -196,7 +196,7 @@ public class PartitionAPI {
|
|||
ArthasAgent.attach(configMap);
|
||||
// DashResponse retPose = new DashResponse();
|
||||
List<String> ret = new ArrayList<>();
|
||||
ret.add("Arthas started successfully");
|
||||
ret.add("Arthas 启动成功");
|
||||
return okMap("arthasstart", ret);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import io.grpc.stub.StreamObserver;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* Batch processing grpc callback wrapper class
|
||||
* 批量处理的grpc回调封装类
|
||||
*
|
||||
* @param <V>
|
||||
*/
|
||||
|
|
@ -95,7 +95,7 @@ class BatchGrpcClosure<V> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Not using counter latch
|
||||
* 不使用计数器latch
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -158,13 +158,13 @@ class BatchGrpcClosure<V> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Wait for the raft execution to complete, return the result to grpc
|
||||
* 等待raft执行结束,返回结果给grpc
|
||||
*/
|
||||
public void waitFinish(StreamObserver<V> observer, Function<List<V>, V> ok, long timeout) {
|
||||
try {
|
||||
countDownLatch.await(timeout, TimeUnit.MILLISECONDS);
|
||||
|
||||
if (errorStatus.isEmpty()) { // No error, merge results
|
||||
if (errorStatus.isEmpty()) { // 没有错误时,合并结果
|
||||
observer.onNext(ok.apply(results));
|
||||
} else {
|
||||
observer.onNext((V) FeedbackRes.newBuilder()
|
||||
|
|
@ -186,7 +186,7 @@ class BatchGrpcClosure<V> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Select one incorrect result from multiple results, if there are no errors, return the first one.
|
||||
* 从多个结果中选择一个错误的结果返回,如果没有错误,返回第一个
|
||||
*/
|
||||
public FeedbackRes selectError(List<FeedbackRes> results) {
|
||||
if (!CollectionUtils.isEmpty(results)) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ abstract class GrpcClosure<V> implements RaftClosure {
|
|||
private V result;
|
||||
|
||||
/**
|
||||
* Set the output result to raftClosure, for Follower, raftClosure is empty.
|
||||
* 设置输出结果给raftClosure,对于Follower来说,raftClosure为空
|
||||
*/
|
||||
public static <V> void setResult(RaftClosure raftClosure, V result) {
|
||||
GrpcClosure closure = (GrpcClosure) raftClosure;
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ public class HgStoreNodeService implements RaftTaskHandler {
|
|||
invoke(partId, methodId, CleanReq.parseFrom(input), response);
|
||||
break;
|
||||
default:
|
||||
return false; // Unhandled
|
||||
return false; // 未处理
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new HgStoreException(e.getMessage(), e);
|
||||
|
|
@ -214,7 +214,7 @@ public class HgStoreNodeService implements RaftTaskHandler {
|
|||
hgStoreSession.doClean(partId, (CleanReq) req, response);
|
||||
break;
|
||||
default:
|
||||
return false; // Unhandled
|
||||
return false; // 未处理
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,12 +130,12 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
|
||||
String graph = request.getHeader().getGraph();
|
||||
int partition = request.getPartition();
|
||||
// Send to different raft to execute
|
||||
// 发给不同的raft执行
|
||||
BatchGrpcClosure<FeedbackRes> closure = new BatchGrpcClosure<>(1);
|
||||
storeService.addRaftTask(HgStoreNodeService.CLEAN_OP, graph, partition,
|
||||
request,
|
||||
closure.newRaftClosure());
|
||||
// Waiting for the return result
|
||||
// 等待返回结果
|
||||
closure.waitFinish(responseObserver, r -> closure.selectError(r),
|
||||
appConfig.getRaft().getRpcTimeOut());
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
GraphMode graphMode = graphState.getMode();
|
||||
if (graphMode != null &&
|
||||
graphMode.getNumber() == GraphMode.ReadOnly_VALUE) {
|
||||
// When in read-only state, get the latest graph state from pd, the graph's read-only state will be updated in pd's notification.
|
||||
// 状态为只读时从pd获取最新的图状态,图只读状态会在pd的通知中更新
|
||||
Metapb.Graph pdGraph =
|
||||
pd.getPDClient().getGraph(graph);
|
||||
Metapb.GraphState pdGraphState =
|
||||
|
|
@ -237,13 +237,13 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
pdGraphState.getMode() != null &&
|
||||
pdGraphState.getMode().getNumber() ==
|
||||
GraphMode.ReadOnly_VALUE) {
|
||||
// Confirm that the current state stored in pd is also read-only, then inserting data is not allowed.
|
||||
// 确认pd中存储的当前状态也是只读,则不允许插入数据
|
||||
throw new PDException(-1,
|
||||
"the graph space size " +
|
||||
"has " +
|
||||
"reached the threshold");
|
||||
}
|
||||
// pd status is inconsistent with local cache, update local cache to the status in pd
|
||||
// pd状态与本地缓存不一致,本地缓存更新为pd中的状态
|
||||
managerGraph.setProtoObj(pdGraph);
|
||||
}
|
||||
}
|
||||
|
|
@ -262,12 +262,12 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
return;
|
||||
}
|
||||
|
||||
// Split data by partition
|
||||
// 按分区拆分数据
|
||||
Map<Integer, List<BatchEntry>> groups = new HashMap<>();
|
||||
list.forEach((entry) -> {
|
||||
Key startKey = entry.getStartKey();
|
||||
if (startKey.getCode() == HgStoreConst.SCAN_ALL_PARTITIONS_ID) {
|
||||
// All Leader partitions
|
||||
// 所有Leader分区
|
||||
List<Integer> ids =
|
||||
storeService.getGraphLeaderPartitionIds(graph);
|
||||
ids.forEach(id -> {
|
||||
|
|
@ -277,7 +277,7 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
groups.get(id).add(entry);
|
||||
});
|
||||
} else {
|
||||
// According to keyCode to query the belonging partition ID, group by partition ID
|
||||
// 根据keyCode查询所属分区ID,按分区ID分组
|
||||
Integer partitionId =
|
||||
pd.getPartitionByCode(graph, startKey.getCode())
|
||||
.getId();
|
||||
|
|
@ -288,7 +288,7 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
}
|
||||
});
|
||||
|
||||
// Send to different raft to execute
|
||||
// 发给不同的raft执行
|
||||
BatchGrpcClosure<FeedbackRes> closure =
|
||||
new BatchGrpcClosure<>(groups.size());
|
||||
groups.forEach((partition, entries) -> {
|
||||
|
|
@ -306,7 +306,7 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
|
||||
if (!graph.isEmpty()) {
|
||||
log.debug(" batch: waiting raft...");
|
||||
// Wait for the return result
|
||||
// 等待返回结果
|
||||
closure.waitFinish(observer, r -> closure.selectError(r),
|
||||
appConfig.getRaft().getRpcTimeOut());
|
||||
log.debug(" batch: ended waiting");
|
||||
|
|
@ -382,16 +382,16 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
}
|
||||
|
||||
String graph = request.getHeader().getGraph();
|
||||
// All Leader partitions
|
||||
// 所有Leader分区
|
||||
List<Integer> ids = storeService.getGraphLeaderPartitionIds(graph);
|
||||
// Split data by partition
|
||||
// 按分区拆分数据
|
||||
Map<Integer, TableReq> groups = new HashMap<>();
|
||||
// Split data by partition
|
||||
// 按分区拆分数据
|
||||
ids.forEach(id -> {
|
||||
groups.put(id, request);
|
||||
});
|
||||
|
||||
// Send to different raft for execution
|
||||
// 发给不同的raft执行
|
||||
BatchGrpcClosure<FeedbackRes> closure = new BatchGrpcClosure<>(groups.size());
|
||||
groups.forEach((partition, entries) -> {
|
||||
storeService.addRaftTask(HgStoreNodeService.TABLE_OP, graph, partition,
|
||||
|
|
@ -401,7 +401,7 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
|
||||
if (!groups.isEmpty()) {
|
||||
// log.info(" table waiting raft...");
|
||||
// Wait for the return result
|
||||
// 等待返回结果
|
||||
closure.waitFinish(observer, r -> closure.selectError(r),
|
||||
appConfig.getRaft().getRpcTimeOut());
|
||||
// log.info(" table ended waiting raft");
|
||||
|
|
@ -470,16 +470,16 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
}
|
||||
|
||||
String graph = request.getHeader().getGraph();
|
||||
// All Leader partitions
|
||||
// 所有Leader分区
|
||||
List<Integer> ids = storeService.getGraphLeaderPartitionIds(graph);
|
||||
// Split data by partition
|
||||
// 按分区拆分数据
|
||||
Map<Integer, GraphReq> groups = new HashMap<>();
|
||||
// Split data by partitioning
|
||||
// 按分区拆分数据
|
||||
ids.forEach(id -> {
|
||||
groups.put(id, request);
|
||||
});
|
||||
|
||||
// Send to different raft for execution
|
||||
// 发给不同的raft执行
|
||||
BatchGrpcClosure<FeedbackRes> closure = new BatchGrpcClosure<>(groups.size());
|
||||
groups.forEach((partition, entries) -> {
|
||||
storeService.addRaftTask(HgStoreNodeService.GRAPH_OP, graph, partition,
|
||||
|
|
@ -488,7 +488,7 @@ public class HgStoreSessionImpl extends HgStoreSessionGrpc.HgStoreSessionImplBas
|
|||
});
|
||||
|
||||
if (!groups.isEmpty()) {
|
||||
// Waiting for the return result
|
||||
// 等待返回结果
|
||||
closure.waitFinish(observer, r -> closure.selectError(r),
|
||||
appConfig.getRaft().getRpcTimeOut());
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class HgStoreWrapperEx {
|
|||
|
||||
public boolean doGraph(int partId, GraphMethod method, String graph) {
|
||||
boolean flag = true;
|
||||
if (method == GRAPH_METHOD_DELETE) {// Hand over to raft for execution, no processing here
|
||||
if (method == GRAPH_METHOD_DELETE) {// 交给 raft 执行,此处不处理
|
||||
flag = true;
|
||||
} else {
|
||||
throw new UnsupportedOperationException("GraphMethod: " + method.name());
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import com.alipay.sofa.jraft.util.Utils;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* Support parallel read batch query iterator
|
||||
* 支持平行读取的批量查询迭代器
|
||||
*/
|
||||
@Slf4j
|
||||
public class ParallelScanIterator implements ScanIterator {
|
||||
|
|
@ -86,7 +86,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
Math.max(1, Math.min(query.getConditionCount() / 16, maxWorkThreads));
|
||||
}
|
||||
this.maxInQueue = maxWorkThreads * 2;
|
||||
// Edge sorted requires a larger queue
|
||||
// 边有序需要更大的队列
|
||||
queue = new LinkedBlockingQueue<>(maxInQueue * 2);
|
||||
createScanner();
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
while (current == null && tryTimes < waitDataMaxTryTimes) {
|
||||
try {
|
||||
if (queue.size() != 0 || !finished) {
|
||||
current = queue.poll(100, TimeUnit.MILLISECONDS); // Regularly check if the client has been closed.
|
||||
current = queue.poll(100, TimeUnit.MILLISECONDS); //定期检查client是否被关闭了
|
||||
if (current == null && !finished) {
|
||||
wakeUpScanner();
|
||||
}
|
||||
|
|
@ -159,7 +159,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create Scanner
|
||||
* 创建扫描器
|
||||
*/
|
||||
private void createScanner() {
|
||||
synchronized (scanners) {
|
||||
|
|
@ -173,7 +173,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Wake up scanner
|
||||
* 唤醒扫描器
|
||||
*/
|
||||
private void wakeUpScanner() {
|
||||
synchronized (pauseScanners) {
|
||||
|
|
@ -187,7 +187,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sleep Scanner
|
||||
* 休眠扫描器
|
||||
*
|
||||
* @param scanner
|
||||
*/
|
||||
|
|
@ -209,10 +209,10 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add to queue, return whether the queue is full
|
||||
* 添加到队列,返回队列是否已满
|
||||
*
|
||||
* @param data
|
||||
* @return false: Queue is full
|
||||
* @return false: 队列已满
|
||||
*/
|
||||
private boolean putData(List<KV> data) {
|
||||
try {
|
||||
|
|
@ -238,7 +238,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
queueLock.unlock();
|
||||
}
|
||||
}
|
||||
// Data not ended, thread continues to execute
|
||||
// 数据未结束,线程继续执行
|
||||
return hasNext || this.queue.size() < maxInQueue;
|
||||
}
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
private volatile boolean closed = false;
|
||||
|
||||
private ScanIterator getIterator() {
|
||||
// Iterator has no data, or the point has reached the limit, switch to a new iterator.
|
||||
// 迭代器没有数据,或该点以达到limit,切换新的迭代器
|
||||
if (iterator == null || !iterator.hasNext() || counter >= limit) {
|
||||
if (iterator != null) {
|
||||
iterator.close();
|
||||
|
|
@ -343,7 +343,7 @@ public class ParallelScanIterator implements ScanIterator {
|
|||
if ((entriesSize >= batchSize || bodySize >= maxBodySize) ||
|
||||
(orderEdge && bodySize >= maxBodySize / 2)) {
|
||||
if (orderEdge) {
|
||||
// Sort the edges, ensure all edges of one point are consecutive, prevent other points from inserting.
|
||||
//边排序,保证一个点的所有边连续,阻止其他点插入
|
||||
canNext = putData(dataList, iterator != null && iterator.hasNext());
|
||||
} else {
|
||||
canNext = putData(dataList);
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ import io.grpc.stub.StreamObserver;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* Batch query processor, batch query data, stream back data.
|
||||
* 1. Server-side streaming data to the client
|
||||
* 2. The client returns the batch number to the server after consuming each batch of data.
|
||||
* 3. The server decides how much data to send based on the batch number, ensuring the uninterrupted transmission of data,
|
||||
* 批量查询处理器,批量查询数据,流式返回数据。
|
||||
* 1、服务端流式发送数据给客户端
|
||||
* 2、客户端每消费一批次数据,返回批次号给服务端
|
||||
* 3、服务端根据批次号决定发送多少数据,保证传送数据的不间断,
|
||||
*/
|
||||
@Slf4j
|
||||
public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
||||
|
|
@ -50,24 +50,24 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
static ByteBufferAllocator alloc =
|
||||
new ByteBufferAllocator(ParallelScanIterator.maxBodySize * 3 / 2, 1000);
|
||||
private final int maxInFlightCount = PropertyUtil.getInt("app.scan.stream.inflight", 16);
|
||||
private final int activeTimeout = PropertyUtil.getInt("app.scan.stream.timeout", 60); // unit: second
|
||||
private final int activeTimeout = PropertyUtil.getInt("app.scan.stream.timeout", 60); //单位秒
|
||||
private final StreamObserver<KvStream> sender;
|
||||
private final HgStoreWrapperEx wrapper;
|
||||
private final ThreadPoolExecutor executor;
|
||||
private final Object stateLock = new Object();
|
||||
private final Lock iteratorLock = new ReentrantLock();
|
||||
// Currently traversing iterator
|
||||
// 当前正在遍历的迭代器
|
||||
private ScanIterator iterator;
|
||||
// Next send sequence number
|
||||
// 下一次发送的序号
|
||||
private volatile int seqNo;
|
||||
// Client consumed sequence number
|
||||
// Client已消费的序号
|
||||
private volatile int clientSeqNo;
|
||||
// Number of entries sent
|
||||
// 已经发送的条目数
|
||||
private volatile long count;
|
||||
// Client requests the maximum number of entries to return
|
||||
// 客户端要求返回的最大条目数
|
||||
private volatile long limit;
|
||||
private ScanQueryRequest query;
|
||||
// Last read data time
|
||||
// 上次读取数据时间
|
||||
private long activeTime;
|
||||
private volatile State state;
|
||||
|
||||
|
|
@ -83,20 +83,20 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Receive messages sent by the client
|
||||
* Server starts a new thread to process messages, does not block the network.
|
||||
* 接收客户端发送的消息
|
||||
* 服务端另起线程处理消息,不阻塞网络
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
@Override
|
||||
public void onNext(ScanStreamBatchReq request) {
|
||||
switch (request.getQueryCase()) {
|
||||
case QUERY_REQUEST: // query conditions
|
||||
case QUERY_REQUEST: // 查询条件
|
||||
executor.execute(() -> {
|
||||
startQuery(request.getHeader().getGraph(), request.getQueryRequest());
|
||||
});
|
||||
break;
|
||||
case RECEIPT_REQUEST: // Message asynchronous response
|
||||
case RECEIPT_REQUEST: // 消息异步应答
|
||||
this.clientSeqNo = request.getReceiptRequest().getTimes();
|
||||
if (seqNo - clientSeqNo < maxInFlightCount) {
|
||||
synchronized (stateLock) {
|
||||
|
|
@ -111,7 +111,7 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case CANCEL_REQUEST: // close stream
|
||||
case CANCEL_REQUEST: // 关闭流
|
||||
closeQuery();
|
||||
break;
|
||||
default:
|
||||
|
|
@ -132,7 +132,7 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Generate iterator
|
||||
* 生成迭代器
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
|
|
@ -152,7 +152,7 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Generate iterator
|
||||
* 生成迭代器
|
||||
*/
|
||||
private void closeQuery() {
|
||||
setStateDone();
|
||||
|
|
@ -178,7 +178,7 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Send data
|
||||
* 发送数据
|
||||
*/
|
||||
private void sendEntries() {
|
||||
if (state == State.DONE || iterator == null) {
|
||||
|
|
@ -255,7 +255,7 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check for activity, if the client does not request data for a certain period of time, it is considered inactive, close the connection to release resources.
|
||||
* 检查是否活跃,超过一定时间客户端没有请求数据,认为已经不活跃,关闭连接释放资源
|
||||
*/
|
||||
public void checkActiveTimeout() {
|
||||
if ((System.currentTimeMillis() - activeTime) > activeTimeout * 1000L) {
|
||||
|
|
@ -265,7 +265,7 @@ public class ScanBatchResponse implements StreamObserver<ScanStreamBatchReq> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Task Status
|
||||
* 任务状态
|
||||
*/
|
||||
private enum State {
|
||||
IDLE,
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class ScanBatchResponseFactory {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if the Stream is active, and close the timed-out Stream in a timely manner.
|
||||
* 检查是否Stream是否活跃,超时的Stream及时关闭
|
||||
*/
|
||||
public void checkStreamActive() {
|
||||
streamObservers.forEach(streamObserver -> {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class ScanUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Support for multi-iterators with parallel reading
|
||||
* 支持并行读取的多迭代器
|
||||
*/
|
||||
static ScanIterator getParallelIterator(String graph, ScanQueryRequest request,
|
||||
HgStoreWrapperEx wrapper, ThreadPoolExecutor executor) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import io.grpc.stub.StreamObserver;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* graphpb.proto implementation class
|
||||
* graphpb.proto 实现类
|
||||
*/
|
||||
@Slf4j
|
||||
@GRpcService
|
||||
|
|
@ -67,9 +67,9 @@ public class GraphStoreImpl extends GraphStoreImplBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Streaming reply messages, each message with a seqNo
|
||||
* Client side should respond with a seqNo for each message consumed.
|
||||
* The server decides how many packets to send based on the client's seqNo.
|
||||
* 流式回复消息,每个消息带有seqNo
|
||||
* 客户端每消费一个消息,应答一个seqNo
|
||||
* 服务端根据客户端的seqNo决定发送几个数据包
|
||||
*
|
||||
* @param ro
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -71,17 +71,17 @@ public class ScanResponseObserver<T> implements
|
|||
private volatile Future<?> readTask;
|
||||
|
||||
/*
|
||||
* November 1, 2022
|
||||
* 1. onNext needs to be processed asynchronously to prevent the grpc call from being blocked.
|
||||
* 2. Do not read iterators or send data do not produce thread waiting.
|
||||
* 3. Before sending, try to prepare the data to be sent as much as possible.
|
||||
* 2022年11月1日
|
||||
* 1.onNext 需要进行异步处理,以防止grpc的调用阻塞
|
||||
* 2.不要读取迭代器或者发送数据不要产生线程等待
|
||||
* 3.在发送前,尽量准备好要发送的数据
|
||||
* */
|
||||
|
||||
/*
|
||||
* November 2, 2022
|
||||
* 1. Read the thread of rocksdb iterator read
|
||||
* 2. Perform data conversion and send to the blocking queue thread offer
|
||||
* 3. Thread for reading data from the blocking queue and sending, including waking up the reading and sending threads when no data is read
|
||||
* 2022年11月2日
|
||||
* 1.读取rocksdb迭代器的线程read
|
||||
* 2.进行数据转换并发送到阻塞队列的线程offer
|
||||
* 3.从阻塞队列读取数据,并发送的线程,包括在没有读取到数据的情况下唤醒读取和发送的线程send
|
||||
* */
|
||||
|
||||
public ScanResponseObserver(StreamObserver<ScanResponse> sender,
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class PdConfigureListener implements
|
|||
client.listen(TIMESTAMP_KEY, (Consumer<WatchResponse>) o -> {
|
||||
log.info("receive message to restart :" + o);
|
||||
try {
|
||||
// Prioritize updating the latest configuration file to avoid old files being loaded first when modifying parameters like ports.
|
||||
// 优先更新最新配置文件,以免修改像端口之类的参数导致旧文件被优先加载
|
||||
ScanPrefixResponse responseNew = client.scanPrefix(CONFIG_PREFIX);
|
||||
Map<String, String> kvsMapNew = responseNew.getKvsMap();
|
||||
String config = kvsMapNew.get(CONFIG_FIX_PREFIX);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public abstract class HgGrpc {
|
|||
String des,
|
||||
Throwable t) {
|
||||
if (t != null) {
|
||||
// To return complete exception information to the client
|
||||
// 为给client返回完整异常信息
|
||||
des = (des == null ? "" : des + ",") +
|
||||
Throwables.getStackTraceAsString(t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
|
||||
management:
|
||||
|
|
@ -33,6 +33,6 @@ logging:
|
|||
level:
|
||||
root: info
|
||||
rocksdb:
|
||||
# total memory size used by rocksdb
|
||||
# rocksdb 使用的总内存大小
|
||||
total_memory_size: 32000000000
|
||||
write_buffer_size: 32000000
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8500
|
||||
netty-server:
|
||||
|
|
@ -28,14 +28,14 @@ grpc:
|
|||
raft:
|
||||
address: 127.0.0.1:8510
|
||||
max-log-file-size: 600000000000
|
||||
# Snapshot generation interval, unit: seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 1800
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8520
|
||||
|
||||
app:
|
||||
# Storage path, support multiple paths, separated by commas
|
||||
# 存储路径,支持多个路径,逗号分割
|
||||
data-path: ./storage
|
||||
|
||||
spring:
|
||||
|
|
|
|||
|
|
@ -27,16 +27,16 @@ import java.util.concurrent.ThreadPoolExecutor;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* HgStore unit testing
|
||||
* 1. Test raft multi-copy storage entry
|
||||
* 2. Test snapshot synchronization
|
||||
* 3, test copy addition and subtraction
|
||||
* 4. Test single frame with log storage turned off
|
||||
* HgStore单元测试
|
||||
* 1、测试raft多副本入库
|
||||
* 2、测试快照同步
|
||||
* 3、测试副本增减
|
||||
* 4、测试单幅本关闭日志入库
|
||||
*/
|
||||
public class HgStoreNodeServiceTest {
|
||||
|
||||
String yml =
|
||||
"rocksdb:\n" + " # Total memory size used by rocksdb\n" + " total_memory_size: 32000000000\n" +
|
||||
"rocksdb:\n" + " # rocksdb 使用的总内存大小\n" + " total_memory_size: 32000000000\n" +
|
||||
" max_background_jobs: 8\n" + " max_subcompactions: 4\n" +
|
||||
" target_file_size_multiplier: 4\n" + " min_write_buffer_number_to_merge: 8\n" +
|
||||
" target_file_size_base: 512000000";
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#
|
||||
|
||||
rocksdb:
|
||||
# total memory size used by RocksDB
|
||||
# rocksdb 使用的总内存大小
|
||||
total_memory_size: 32000000000
|
||||
max_background_jobs: 8
|
||||
max_subcompactions: 4
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8500
|
||||
netty-server:
|
||||
|
|
@ -28,11 +28,11 @@ raft:
|
|||
# enable: false
|
||||
address: 127.0.0.1:8510
|
||||
data-path: ${app.data-path}/raft
|
||||
# Snapshot generation interval, unit: seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 30
|
||||
max-log-file-size: 60000000
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8520
|
||||
|
||||
app:
|
||||
|
|
@ -60,14 +60,14 @@ rocksdb:
|
|||
snapshot_path: ${app.data-path}/snapshot
|
||||
bloom_filter_bits_per_key: 10
|
||||
compression_per_level: "[none, zstd, zstd, zstd, zstd, zstd, zstd]"
|
||||
# fakePd configuration parameters
|
||||
#fakePd配置参数
|
||||
fake-pd:
|
||||
# fake-pd mode, store grpc cluster list
|
||||
# fake-pd模式下,store grpc集群列表
|
||||
store-list: 127.0.0.1:8500
|
||||
# fake-pd mode, set raft cluster list
|
||||
# fake-pd模式下,设置raft集群列表
|
||||
peers-list: 127.0.0.1:8510
|
||||
# Partition Count
|
||||
# 分区数量
|
||||
partition-count: 10
|
||||
# Number of replicas per partition
|
||||
# 每个分区副本数量
|
||||
shard-count: 3
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8501
|
||||
netty-server:
|
||||
|
|
@ -28,11 +28,11 @@ raft:
|
|||
# enable: false
|
||||
address: 127.0.0.1:8511
|
||||
useRocksDBSegmentLogStorage: false
|
||||
# Snapshot generation interval, in seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 300
|
||||
disruptorBufferSize: 128
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8521
|
||||
|
||||
app:
|
||||
|
|
@ -58,13 +58,13 @@ rocksdb:
|
|||
write_buffer_size: 2000000
|
||||
level0_file_num_compaction_trigger: 2
|
||||
bloom_filter_bits_per_key: 10
|
||||
# fakePd configuration parameters
|
||||
#fakePd配置参数
|
||||
fake-pd:
|
||||
# fake-pd mode, store grpc cluster list
|
||||
# fake-pd模式下,store grpc集群列表
|
||||
store-list: 127.0.0.1:8501,127.0.0.1:8502,127.0.0.1:8503
|
||||
# fake-pd mode, set raft cluster list
|
||||
# fake-pd模式下,设置raft集群列表
|
||||
peers-list: 127.0.0.1:8511,127.0.0.1:8512,127.0.0.1:8513
|
||||
# Partition Number
|
||||
# 分区数量
|
||||
partition-count: 10
|
||||
# Number of replicas per partition
|
||||
# 每个分区副本数量
|
||||
shard-count: 3
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8502
|
||||
netty-server:
|
||||
|
|
@ -28,11 +28,11 @@ raft:
|
|||
# enable: false
|
||||
address: 127.0.0.1:8512
|
||||
useRocksDBSegmentLogStorage: false
|
||||
# Snapshot generation interval, in seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 300
|
||||
disruptorBufferSize: 128
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8522
|
||||
|
||||
app:
|
||||
|
|
@ -57,13 +57,13 @@ management:
|
|||
rocksdb:
|
||||
db_max_alive_time: 120
|
||||
|
||||
# fakePd configuration parameters
|
||||
#fakePd配置参数
|
||||
fake-pd:
|
||||
# fake-pd mode, store grpc cluster list
|
||||
# fake-pd模式下,store grpc集群列表
|
||||
store-list: 127.0.0.1:8501,127.0.0.1:8502,127.0.0.1:8503
|
||||
# fake-pd mode, set raft cluster list
|
||||
# fake-pd模式下,设置raft集群列表
|
||||
peers-list: 127.0.0.1:8511,127.0.0.1:8512,127.0.0.1:8513
|
||||
# Partition Count
|
||||
# 分区数量
|
||||
partition-count: 10
|
||||
# Number of replicas per partition
|
||||
# 每个分区副本数量
|
||||
shard-count: 3
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8503
|
||||
netty-server:
|
||||
|
|
@ -29,11 +29,11 @@ raft:
|
|||
address: 127.0.0.1:8513
|
||||
snapshotLogIndexMargin: 1024
|
||||
useRocksDBSegmentLogStorage: false
|
||||
# Snapshot generation interval, in seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 300
|
||||
disruptorBufferSize: 128
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8523
|
||||
|
||||
app:
|
||||
|
|
@ -59,13 +59,13 @@ rocksdb:
|
|||
db_max_alive_time: 120
|
||||
|
||||
|
||||
# fakePd configuration parameters
|
||||
#fakePd配置参数
|
||||
fake-pd:
|
||||
# fake-pd mode, store grpc cluster list
|
||||
# fake-pd模式下,store grpc集群列表
|
||||
store-list: 127.0.0.1:8501,127.0.0.1:8502,127.0.0.1:8503
|
||||
# fake-pd mode, set raft cluster list
|
||||
# fake-pd模式下,设置raft集群列表
|
||||
peers-list: 127.0.0.1:8511,127.0.0.1:8512,127.0.0.1:8513
|
||||
# Partition Count
|
||||
# 分区数量
|
||||
partition-count: 10
|
||||
# Number of replicas per partition
|
||||
# 每个分区副本数量
|
||||
shard-count: 3
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8504
|
||||
netty-server:
|
||||
|
|
@ -28,10 +28,10 @@ raft:
|
|||
# enable: false
|
||||
address: 127.0.0.1:8514
|
||||
|
||||
# Snapshot generation interval, unit: seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 300
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8524
|
||||
|
||||
app:
|
||||
|
|
@ -56,13 +56,13 @@ management:
|
|||
rocksdb:
|
||||
|
||||
|
||||
# fakePd configuration parameters
|
||||
#fakePd配置参数
|
||||
fake-pd:
|
||||
# fake-pd mode, store grpc cluster list
|
||||
# fake-pd模式下,store grpc集群列表
|
||||
store-list: 127.0.0.1:8501,127.0.0.1:8502,127.0.0.1:8503
|
||||
# fake-pd mode, set raft cluster list
|
||||
# fake-pd模式下,设置raft集群列表
|
||||
peers-list: 127.0.0.1:8511,127.0.0.1:8512,127.0.0.1:8513
|
||||
# Partition Number
|
||||
# 分区数量
|
||||
partition-count: 3
|
||||
# Number of replicas per partition
|
||||
# 每个分区副本数量
|
||||
shard-count: 3
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8505
|
||||
netty-server:
|
||||
|
|
@ -28,10 +28,10 @@ raft:
|
|||
# enable: false
|
||||
address: 127.0.0.1:8515
|
||||
data-path: ${app.data-path}/raft
|
||||
# Snapshot generation interval, unit: seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 300
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8525
|
||||
|
||||
app:
|
||||
|
|
@ -58,13 +58,13 @@ rocksdb:
|
|||
wal_path: ${app.data-path}/db
|
||||
snapshot_path: ${app.data-path}/snapshot
|
||||
|
||||
# fakePd configuration parameters
|
||||
#fakePd配置参数
|
||||
fake-pd:
|
||||
# fake-pd mode, store grpc cluster list
|
||||
# fake-pd模式下,store grpc集群列表
|
||||
store-list: 127.0.0.1:8501,127.0.0.1:8502,127.0.0.1:8503
|
||||
# fake-pd mode, set raft cluster list
|
||||
# fake-pd模式下,设置raft集群列表
|
||||
peers-list: 127.0.0.1:8511,127.0.0.1:8512,127.0.0.1:8513
|
||||
# Partition Quantity
|
||||
# 分区数量
|
||||
partition-count: 3
|
||||
# Number of replicas per partition
|
||||
# 每个分区副本数量
|
||||
shard-count: 3
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#
|
||||
|
||||
pdserver:
|
||||
# PD service address, multiple PD addresses separated by commas
|
||||
# pd服务地址,多个pd地址用逗号分割
|
||||
address: localhost:8686
|
||||
grpc:
|
||||
# grpc service address
|
||||
# grpc的服务地址
|
||||
host: 127.0.0.1
|
||||
port: 8506
|
||||
netty-server:
|
||||
|
|
@ -28,10 +28,10 @@ raft:
|
|||
# enable: false
|
||||
address: 127.0.0.1:8516
|
||||
data-path: ${app.data-path}/raft
|
||||
# Snapshot generation interval, in seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 300
|
||||
server:
|
||||
# rest service address
|
||||
# rest 服务地址
|
||||
port: 8526
|
||||
|
||||
app:
|
||||
|
|
@ -58,13 +58,13 @@ rocksdb:
|
|||
wal_path: ${app.data-path}/db
|
||||
snapshot_path: ${app.data-path}/snapshot
|
||||
|
||||
# fakePd configuration parameters
|
||||
#fakePd配置参数
|
||||
fake-pd:
|
||||
# fake-pd mode, store grpc cluster list
|
||||
# fake-pd模式下,store grpc集群列表
|
||||
store-list: 127.0.0.1:8501,127.0.0.1:8502,127.0.0.1:8503
|
||||
# fake-pd mode, set raft cluster list
|
||||
# fake-pd模式下,设置raft集群列表
|
||||
peers-list: 127.0.0.1:8511,127.0.0.1:8512,127.0.0.1:8513
|
||||
# Partition Count
|
||||
# 分区数量
|
||||
partition-count: 3
|
||||
# Number of replicas per partition
|
||||
# 每个分区副本数量
|
||||
shard-count: 3
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.22</version>
|
||||
<scope>provided</scope>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public final class RocksDBFactory {
|
|||
watcher.dbSession.getRefCount(),
|
||||
(System.currentTimeMillis() - watcher.timestamp) / 1000);
|
||||
} else {
|
||||
// Force delete after timeout (30min)
|
||||
// 超时强制删除 (30min)
|
||||
watcher.dbSession.forceResetRefCount();
|
||||
}
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ public final class RocksDBFactory {
|
|||
}
|
||||
|
||||
/**
|
||||
* Release rocksdb object
|
||||
* 释放rocksdb对象
|
||||
*
|
||||
* @param dbName
|
||||
* @return
|
||||
|
|
@ -213,7 +213,7 @@ public final class RocksDBFactory {
|
|||
}
|
||||
|
||||
/**
|
||||
* Destroy the graph, and delete the data file.
|
||||
* 销毁图,并删除数据文件
|
||||
*
|
||||
* @param dbName
|
||||
*/
|
||||
|
|
@ -221,7 +221,7 @@ public final class RocksDBFactory {
|
|||
log.info("destroy {} 's rocksdb.", dbName);
|
||||
RocksDBSession dbSession = dbSessionMap.get(dbName);
|
||||
releaseGraphDB(dbName);
|
||||
// Add delete mark
|
||||
//增加删除标记
|
||||
if (dbSession != null) {
|
||||
destroyGraphDBs.add(new DBSessionWatcher(dbSession));
|
||||
rocksdbChangedListeners.forEach(listener -> {
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ public class RocksDBSession implements AutoCloseable, Cloneable {
|
|||
if (i == dbCount - 1) {
|
||||
latestDBPath = curDBPath;
|
||||
} else {
|
||||
// delete old db, do not delete files in the deletion queue
|
||||
// delete old db,在删除队列的文件不要删除
|
||||
if (!factory.findPathInRemovedList(curDBPath)) {
|
||||
try {
|
||||
FileUtils.deleteDirectory(new File(curDBPath));
|
||||
|
|
@ -373,7 +373,7 @@ public class RocksDBSession implements AutoCloseable, Cloneable {
|
|||
latestDBPath = Paths.get(parentFile.getPath(), defaultName).toString();
|
||||
}
|
||||
if (factory.findPathInRemovedList(latestDBPath)) {
|
||||
// Has been deleted, create a new directory
|
||||
// 已经被删除,创建新的目录
|
||||
latestDBPath =
|
||||
Paths.get(parentFile.getPath(), String.format("%s_%d", defaultName, version))
|
||||
.toString();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public interface SessionOperator {
|
|||
ScanIterator scan(String tableName, byte[] keyFrom, byte[] keyTo, int scanType);
|
||||
|
||||
/**
|
||||
* Scan all data in the specified cf range
|
||||
* 扫描所有cf指定范围的数据
|
||||
*/
|
||||
ScanIterator scanRaw(byte[] keyFrom, byte[] keyTo, long startSeqNum);
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ public interface SessionOperator {
|
|||
void deleteRange(String table, byte[] keyFrom, byte[] keyTo) throws DBStoreException;
|
||||
|
||||
/**
|
||||
* Delete all data specified by the cf range
|
||||
* 删除所有cf指定范围的数据
|
||||
*/
|
||||
void deleteRange(byte[] keyFrom, byte[] keyTo) throws DBStoreException;
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ public class SessionOperatorImpl implements SessionOperator {
|
|||
}
|
||||
|
||||
/**
|
||||
* commit throws an exception, you must call rollback, otherwise it will cause cfHandleReadLock not to be released.
|
||||
* commit抛出异常后一定要调用rollback,否则会造成cfHandleReadLock未释放
|
||||
*/
|
||||
@Override
|
||||
public Integer commit() throws DBStoreException {
|
||||
|
|
@ -302,13 +302,13 @@ public class SessionOperatorImpl implements SessionOperator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Traverse all data in the specified range of cf
|
||||
* TODO: rocksdb7.x does not support setStartSeqNum, switch to using Timestamp instead.
|
||||
* 遍历所有cf指定范围的数据
|
||||
* TODO: rocksdb7.x 不支持 setStartSeqNum,改为使用 Timestamp
|
||||
* refer: https://github.com/facebook/rocksdb/wiki/User-defined-Timestamp
|
||||
*/
|
||||
@Override
|
||||
public ScanIterator scanRaw(byte[] keyFrom, byte[] keyTo, long startSeqNum) {
|
||||
int kNumInternalBytes = 8; //internal key added 8-byte suffix
|
||||
int kNumInternalBytes = 8; //internal key 增加的8个字节后缀
|
||||
Snapshot snapshot = rocksdb().getSnapshot();
|
||||
Iterator<String> cfIterator = session.getTables().keySet().iterator();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
<properties>
|
||||
<!--maven.test.skip>true</maven.test.skip-->
|
||||
<lombok.version>1.18.20</lombok.version>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
|
@ -80,7 +79,8 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ import org.apache.hugegraph.store.util.HgStoreTestUtil;
|
|||
import org.junit.Assert;
|
||||
|
||||
/**
|
||||
* Using fake-pd, supporting unit tests for raft.
|
||||
* 使用fake-pd,支持raft的单元测试
|
||||
*/
|
||||
public class HgSessionManagerOneRaftFakePDTest {
|
||||
private static final Map<Integer, Long> leaderMap = new ConcurrentHashMap<>();
|
||||
private static final Map<Long, String> storeMap = new ConcurrentHashMap<>();
|
||||
|
||||
private static final int partitionCount = 3;
|
||||
// Need to be consistent with the store's application.yml fake-pd.partition-count
|
||||
// 需要与store的application.yml的fake-pd.partition-count保持一致
|
||||
private static final String[] storeAddress = {
|
||||
"127.0.0.1:8500"
|
||||
};
|
||||
|
|
@ -68,7 +68,7 @@ public class HgSessionManagerOneRaftFakePDTest {
|
|||
Arrays.equals(startKey, endKey)) {
|
||||
builder.add(leaderMap.get(startCode % partitionCount), startCode);
|
||||
} else {
|
||||
Assert.fail("OwnerKey converted to HashCode is no longer ordered, querying by OwnerKey range is meaningless");
|
||||
Assert.fail("OwnerKey转成HashCode后已经无序了, 按照OwnerKey范围查询没意义");
|
||||
builder.add(leaderMap.get(startCode % partitionCount), startCode);
|
||||
builder.add(leaderMap.get(endCode % partitionCount), endCode);
|
||||
}
|
||||
|
|
@ -174,8 +174,8 @@ public class HgSessionManagerOneRaftFakePDTest {
|
|||
}
|
||||
|
||||
// @Test
|
||||
// CAUTION: ONLY FOR LONG!
|
||||
// Note: Currently, only Merge operations can be performed on long type values.
|
||||
//CAUTION: ONLY FOR LONG!
|
||||
//注意:目前只可以对long类型value进行Merge操作。
|
||||
public void merge() {
|
||||
System.out.println("--- test merge (1+1=2)---");
|
||||
HgStoreSession session = getStoreSession();
|
||||
|
|
|
|||
|
|
@ -35,16 +35,16 @@ import org.apache.hugegraph.store.util.HgStoreTestUtil;
|
|||
import org.junit.Assert;
|
||||
|
||||
/**
|
||||
* Use fake-pd, support unit tests for raft RuntimeMethodHandle.op_Implicit(Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageResult)
|
||||
* 使用fake-pd,支持raft的单元测试
|
||||
*/
|
||||
public class HgSessionManagerRaftFakePDTest {
|
||||
private static final Map<Integer, Long> leaderMap = new ConcurrentHashMap<>();
|
||||
private static final Map<Long, String> storeMap = new ConcurrentHashMap<>();
|
||||
|
||||
private static final int partitionCount = 3;
|
||||
// Need to be consistent with the fake-pd.partition-count in the store's application.yml
|
||||
// 需要与store的application.yml的fake-pd.partition-count保持一致
|
||||
private static final String[] storeAddress =
|
||||
{ // Need to be consistent with the store's application.yml fake-pd.store-list
|
||||
{ // 需要与store的application.yml的fake-pd.store-list保持一致
|
||||
"127.0.0.1:8501", "127.0.0.1:8502", "127.0.0.1:8503"
|
||||
};
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ public class HgSessionManagerRaftFakePDTest {
|
|||
Arrays.equals(startKey, endKey)) {
|
||||
builder.add(leaderMap.get(startCode % partitionCount), startCode);
|
||||
} else {
|
||||
Assert.fail("OwnerKey converted to HashCode is no longer ordered, querying by OwnerKey range is meaningless");
|
||||
Assert.fail("OwnerKey转成HashCode后已经无序了, 按照OwnerKey范围查询没意义");
|
||||
builder.add(leaderMap.get(startCode % partitionCount), startCode);
|
||||
builder.add(leaderMap.get(endCode % partitionCount), endCode);
|
||||
}
|
||||
|
|
@ -216,8 +216,8 @@ public class HgSessionManagerRaftFakePDTest {
|
|||
}
|
||||
|
||||
// @Test
|
||||
// CAUTION: ONLY FOR LONG!
|
||||
// Note: Currently, only Merge operations can be performed on long type values.
|
||||
//CAUTION: ONLY FOR LONG!
|
||||
//注意:目前只可以对long类型value进行Merge操作。
|
||||
public void merge() {
|
||||
System.out.println("--- test merge (1+1=2)---");
|
||||
HgStoreSession session = getStoreSession();
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
|
||||
/**
|
||||
* Use pd, support unit tests for raft
|
||||
* 使用pd,支持raft的单元测试
|
||||
*/
|
||||
@Slf4j
|
||||
public class HgSessionManagerRaftPDTest {
|
||||
|
|
@ -262,8 +262,8 @@ public class HgSessionManagerRaftPDTest {
|
|||
}
|
||||
|
||||
// @Test
|
||||
// CAUTION: ONLY FOR LONG!
|
||||
// Note: Currently, only long type values can be merged.
|
||||
//CAUTION: ONLY FOR LONG!
|
||||
//注意:目前只可以对long类型value进行Merge操作。
|
||||
public void merge() {
|
||||
System.out.println("--- test merge (1+1=2)---");
|
||||
HgStoreSession session = getStoreSession();
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class HgSessionManagerTest {
|
|||
"unit-test"));
|
||||
|
||||
private static final int partitionCount = 10;
|
||||
// Need to be consistent with the store's application.yml fake-pd.partition-count
|
||||
// 需要与 store 的 application.yml 的 fake-pd.partition-count 保持一致
|
||||
|
||||
//private static String[] storeAddress = {"127.0.0.1:8500"};
|
||||
private static final String[] storeAddress =
|
||||
|
|
@ -91,7 +91,7 @@ public class HgSessionManagerTest {
|
|||
//log.info("leader-> {}",leaderMap.get(startCode / PARTITION_LENGTH));
|
||||
builder.add(leaderMap.get(startCode / PARTITION_LENGTH), startCode);
|
||||
} else {
|
||||
Assert.fail("OwnerKey converted to HashCode is already unordered, querying by OwnerKey range is meaningless");
|
||||
Assert.fail("OwnerKey 转成 HashCode 后已经无序了,按照 OwnerKey 范围查询没意义");
|
||||
builder.add(leaderMap.get(startCode / PARTITION_LENGTH), startCode);
|
||||
builder.add(leaderMap.get(endCode / PARTITION_LENGTH), endCode);
|
||||
}
|
||||
|
|
@ -172,8 +172,8 @@ public class HgSessionManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
// CAUTION: ONLY FOR LONG!
|
||||
// Note: Currently, only long type values can be merged.
|
||||
//CAUTION: ONLY FOR LONG!
|
||||
//注意:目前只可以对 long 类型 value 进行 Merge 操作。
|
||||
public void merge() {
|
||||
System.out.println("--- test merge (1+1=2)---");
|
||||
HgStoreSession session = getStoreSession();
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class PartitionEngineTest {
|
|||
.contains(peer))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// Add 6, 7
|
||||
// 新增 6、7
|
||||
Assert.assertEquals(2, addedNodes.size());
|
||||
addedNodes.clear();
|
||||
addedNodes.addAll(Arrays.asList(peers));
|
||||
|
|
@ -88,7 +88,7 @@ public class PartitionEngineTest {
|
|||
|
||||
addedNodes.forEach(s -> System.out.print(s + " "));
|
||||
System.out.println();
|
||||
// Delete 4, 5
|
||||
// 删除 4,5
|
||||
Assert.assertEquals(2, removedNodes.size());
|
||||
|
||||
removedNodes.clear();
|
||||
|
|
@ -98,7 +98,7 @@ public class PartitionEngineTest {
|
|||
Assert.assertEquals(2, removedNodes.size());
|
||||
removedNodes.forEach(s -> System.out.print(s + " "));
|
||||
System.out.println();
|
||||
// Intersection 5
|
||||
// 交集 5
|
||||
Assert.assertEquals(1, mixedPeer.size());
|
||||
oldPeers1.removeAll(Arrays.asList(learners));
|
||||
Assert.assertEquals(1, oldPeers1.size());
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import org.junit.Assert;
|
|||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Test modify copy number
|
||||
* 测试修改副本数
|
||||
*/
|
||||
public class ChangeShardNumTest extends HgStoreClientBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -240,8 +240,8 @@ public class HgSessionManagerRaftPDTest extends HgStoreClientBase {
|
|||
}
|
||||
|
||||
// @Test
|
||||
// CAUTION: ONLY FOR LONG!
|
||||
// Note: Currently, only long type values can be merged.
|
||||
// CAUTION: ONLY FOR LONG!
|
||||
// 注意:目前只可以对 long 类型 value 进行 Merge 操作。
|
||||
public void merge() {
|
||||
System.out.println("--- test merge (1+1=2)---");
|
||||
HgStoreSession session = getStoreSession();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
// ZipUtilsTest.class,
|
||||
// MiscUtilClassTest.class,
|
||||
// PartitionInstructionProcessorTest.class,
|
||||
// // Try to put it last
|
||||
// // 尽量放到最后
|
||||
// HgBusinessImplTest.class
|
||||
//})
|
||||
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@ public class HgCmdClientTest {
|
|||
}
|
||||
|
||||
public static Long getId() {
|
||||
// If needed longer or more redundant space, just use time * 10^n
|
||||
// Currently guaranteed to generate 10000 non-duplicate in 1 millisecond
|
||||
// 如果需要更长 或者更大冗余空间,只需要 time * 10^n 即可
|
||||
// 当前可保证 1 毫秒 生成 10000 条不重复
|
||||
Long time = Long.valueOf(new SimpleDateFormat("HHmmssSSS").format(new Date())) * 10000 +
|
||||
(long) (Math.random() * 100);
|
||||
// Long time = Long.valueOf(new SimpleDateFormat("MMddhhmmssSSS").format(new Date())
|
||||
|
|
@ -144,7 +144,7 @@ public class HgCmdClientTest {
|
|||
session.createTable(tableName);
|
||||
String createGraph = "create_graph";
|
||||
HgOwnerKey hgOwnerKey = toOwnerKey(createGraph);
|
||||
// Need to write data, then the graph will be created.
|
||||
// 需要写数据,才会创建图
|
||||
session.put(tableName,
|
||||
hgOwnerKey, createGraph.getBytes(StandardCharsets.UTF_8));
|
||||
Assert.assertEquals(createGraph, toStr(session.get(tableName, hgOwnerKey)));
|
||||
|
|
@ -215,7 +215,7 @@ public class HgCmdClientTest {
|
|||
session.createTable(tableName);
|
||||
String createGraph = "create_graph";
|
||||
HgOwnerKey hgOwnerKey = toOwnerKey(createGraph);
|
||||
// Need to write data, then the graph will be created.
|
||||
// 需要写数据,才会创建图
|
||||
session.put(tableName,
|
||||
hgOwnerKey, createGraph.getBytes(StandardCharsets.UTF_8));
|
||||
Assert.assertEquals(createGraph, toStr(session.get(tableName, hgOwnerKey)));
|
||||
|
|
@ -264,7 +264,7 @@ public class HgCmdClientTest {
|
|||
session.createTable(tableName);
|
||||
String createGraph = "create_graph";
|
||||
HgOwnerKey hgOwnerKey = toOwnerKey(createGraph);
|
||||
// Need to write data, then the graph will be created.
|
||||
// 需要写数据,才会创建图
|
||||
session.put(tableName,
|
||||
hgOwnerKey, createGraph.getBytes(StandardCharsets.UTF_8));
|
||||
Assert.assertEquals(createGraph, toStr(session.get(tableName, hgOwnerKey)));
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import com.alipay.sofa.jraft.util.StorageOptionsFactory;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* Use FakePd and FakePdOptions to initialize HgStoreEngine, the get functions of this class are available.
|
||||
* 使用 FakePd 和 FakePdOptions,初始化 HgStoreEngine,该类的各项 get 函数可用
|
||||
*/
|
||||
@Slf4j
|
||||
public class StoreEngineTestBase {
|
||||
|
|
@ -92,7 +92,7 @@ public class StoreEngineTestBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create partition 0's partition engine. The partition has 1 shard, as the leader, graph name: graph0.
|
||||
* 创建 分区为 0 的 partition engine. 该分区 1 个 shard,为 leader, graph name: graph0
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
# Initial store list, stores within the list are automatically activated.
|
||||
# 初始store列表,在列表内的store自动激活
|
||||
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 cluster
|
||||
# raft集群
|
||||
peers-list: 127.0.0.1:8610
|
||||
# raft rpc read-write timeout, unit in milliseconds
|
||||
# raft rpc读写超时时间,单位毫秒
|
||||
rpc-timeout: 10000
|
||||
# Snapshot generation interval, unit: seconds
|
||||
# 快照生成时间间隔,单位秒
|
||||
snapshotInterval: 30000
|
||||
metrics: true
|
||||
store:
|
||||
# store heartbeat timeout, if exceeds this time, consider the store temporarily unavailable, transfer Leader to another replica, in seconds
|
||||
# store心跳超时时间,超过该时间,认为store临时不可用,转移Leader到其他副本,单位秒
|
||||
keepAlive-timeout: 300
|
||||
# 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.
|
||||
# store下线时间。超过该时间,认为store永久不可用,分配副本到其他机器,单位秒
|
||||
max-down-time: 180000
|
||||
partition:
|
||||
# Default number of replicas per partition
|
||||
# 默认每个分区副本数
|
||||
default-shard-count: 3
|
||||
# Default maximum number of replicas per machine, initial number of partitions = store-max-shard-count * store-number / default-shard-count
|
||||
# 默认每机器最大副本数,初始分区数= 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.
|
||||
#客户端注册后,无心跳最长次数,超过后,之前的注册信息会被删除
|
||||
heartbeat-try-count: 3
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
HdrHistogram-2.1.12.jar
|
||||
HdrHistogram-2.1.9.jar
|
||||
LatencyUtils-2.0.3.jar
|
||||
ST4-4.0.8.jar
|
||||
accessors-smart-1.2.jar
|
||||
airline-0.8.jar
|
||||
android-json-0.0.20131108.vaadin1.jar
|
||||
|
|
@ -140,8 +144,6 @@ hamcrest-2.2.jar
|
|||
hamcrest-core-1.3.jar
|
||||
hanlp-portable-1.8.3.jar
|
||||
hbase-shaded-endpoint-2.0.6.jar
|
||||
HdrHistogram-2.1.12.jar
|
||||
HdrHistogram-2.1.9.jar
|
||||
hessian-3.3.6.jar
|
||||
hessian-3.3.7.jar
|
||||
hg-pd-client-1.5.0.jar
|
||||
|
|
@ -212,12 +214,12 @@ javassist-3.21.0-GA.jar
|
|||
javassist-3.24.0-GA.jar
|
||||
javassist-3.28.0-GA.jar
|
||||
javatuples-1.2.jar
|
||||
javax-websocket-client-impl-9.4.46.v20220331.jar
|
||||
javax-websocket-server-impl-9.4.46.v20220331.jar
|
||||
javax.activation-api-1.2.0.jar
|
||||
javax.annotation-api-1.3.2.jar
|
||||
javax.inject-1.jar
|
||||
javax.json-1.0.jar
|
||||
javax-websocket-client-impl-9.4.46.v20220331.jar
|
||||
javax-websocket-server-impl-9.4.46.v20220331.jar
|
||||
jaxb-api-2.3.1.jar
|
||||
jaxb-core-3.0.2.jar
|
||||
jaxb-impl-3.0.2.jar
|
||||
|
|
@ -260,8 +262,8 @@ jetty-util-9.4.46.v20220331.jar
|
|||
jetty-util-ajax-9.4.46.v20220331.jar
|
||||
jetty-webapp-9.4.46.v20220331.jar
|
||||
jetty-xml-9.4.46.v20220331.jar
|
||||
jffi-1.2.16.jar
|
||||
jffi-1.2.16-native.jar
|
||||
jffi-1.2.16.jar
|
||||
jflex-1.8.2.jar
|
||||
jieba-analysis-1.0.2.jar
|
||||
jjwt-api-0.11.5.jar
|
||||
|
|
@ -278,10 +280,10 @@ jraft-core-1.3.11.jar
|
|||
jraft-core-1.3.13.jar
|
||||
jraft-core-1.3.9.jar
|
||||
json-20210307.jar
|
||||
jsonassert-1.5.0.jar
|
||||
json-path-2.5.0.jar
|
||||
json-simple-1.1.jar
|
||||
json-smart-2.3.jar
|
||||
jsonassert-1.5.0.jar
|
||||
jsr305-3.0.1.jar
|
||||
jsr305-3.0.2.jar
|
||||
jul-to-slf4j-1.7.36.jar
|
||||
|
|
@ -312,7 +314,6 @@ kotlin-stdlib-1.6.20.jar
|
|||
kotlin-stdlib-common-1.5.31.jar
|
||||
kotlin-stdlib-jdk7-1.6.10.jar
|
||||
kotlin-stdlib-jdk8-1.6.10.jar
|
||||
LatencyUtils-2.0.3.jar
|
||||
listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
|
||||
log4j-api-2.15.0.jar
|
||||
log4j-api-2.17.0.jar
|
||||
|
|
@ -330,9 +331,7 @@ log4j-slf4j-impl-2.17.0.jar
|
|||
log4j-slf4j-impl-2.17.1.jar
|
||||
log4j-slf4j-impl-2.18.0.jar
|
||||
logging-interceptor-4.10.0.jar
|
||||
lombok-1.18.20.jar
|
||||
lombok-1.18.24.jar
|
||||
lombok-1.18.8.jar
|
||||
lombok-1.18.30.jar
|
||||
lookout-api-1.4.1.jar
|
||||
lucene-analyzers-common-8.11.2.jar
|
||||
lucene-analyzers-smartcn-8.11.2.jar
|
||||
|
|
@ -363,10 +362,10 @@ netty-buffer-4.1.52.Final.jar
|
|||
netty-buffer-4.1.72.Final.jar
|
||||
netty-codec-4.1.52.Final.jar
|
||||
netty-codec-4.1.72.Final.jar
|
||||
netty-codec-http2-4.1.52.Final.jar
|
||||
netty-codec-http2-4.1.72.Final.jar
|
||||
netty-codec-http-4.1.52.Final.jar
|
||||
netty-codec-http-4.1.72.Final.jar
|
||||
netty-codec-http2-4.1.52.Final.jar
|
||||
netty-codec-http2-4.1.72.Final.jar
|
||||
netty-codec-socks-4.1.52.Final.jar
|
||||
netty-codec-socks-4.1.72.Final.jar
|
||||
netty-common-4.1.52.Final.jar
|
||||
|
|
@ -414,20 +413,20 @@ powermock-module-junit4-2.0.0-RC.3.jar
|
|||
powermock-module-junit4-common-2.0.0-RC.3.jar
|
||||
powermock-module-junit4-rule-2.0.0-RC.3.jar
|
||||
powermock-reflect-2.0.0-RC.3.jar
|
||||
proto-google-common-protos-1.17.0.jar
|
||||
proto-google-common-protos-2.0.1.jar
|
||||
protobuf-java-3.11.0.jar
|
||||
protobuf-java-3.17.2.jar
|
||||
protobuf-java-3.21.7.jar
|
||||
protobuf-java-3.5.1.jar
|
||||
protobuf-java-util-3.17.2.jar
|
||||
proto-google-common-protos-1.17.0.jar
|
||||
proto-google-common-protos-2.0.1.jar
|
||||
protostuff-api-1.6.0.jar
|
||||
protostuff-collectionschema-1.6.0.jar
|
||||
protostuff-core-1.6.0.jar
|
||||
protostuff-runtime-1.6.0.jar
|
||||
psjava-0.1.19.jar
|
||||
reporter-config3-3.0.3.jar
|
||||
reporter-config-base-3.0.3.jar
|
||||
reporter-config3-3.0.3.jar
|
||||
rewriting-9.0-9.0.20190305.jar
|
||||
rocksdbjni-6.29.5.jar
|
||||
rocksdbjni-7.2.2.jar
|
||||
|
|
@ -444,9 +443,9 @@ sjk-cli-0.22.jar
|
|||
sjk-core-0.14.jar
|
||||
sjk-core-0.22.jar
|
||||
sjk-hflame-0.22.jar
|
||||
sjk-jfr-standalone-0.7.jar
|
||||
sjk-jfr5-0.5.jar
|
||||
sjk-jfr6-0.7.jar
|
||||
sjk-jfr-standalone-0.7.jar
|
||||
sjk-json-0.14.jar
|
||||
sjk-json-0.22.jar
|
||||
sjk-nps-0.9.jar
|
||||
|
|
@ -489,7 +488,6 @@ spring-expression-5.3.20.jar
|
|||
spring-jcl-5.3.20.jar
|
||||
spring-web-5.3.20.jar
|
||||
spring-webmvc-5.3.20.jar
|
||||
ST4-4.0.8.jar
|
||||
stream-2.5.2.jar
|
||||
swagger-annotations-1.5.18.jar
|
||||
swagger-annotations-jakarta-2.2.18.jar
|
||||
|
|
|
|||
10
pom.xml
10
pom.xml
|
|
@ -103,6 +103,16 @@
|
|||
<module>install-dist</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.30</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
|
|
|
|||
Loading…
Reference in New Issue