forked from hugegraph/hugegraph-sync
refact: remove inner info
Change-Id: I72b468d3aa247ba969eb28a155576a773f2ea084
This commit is contained in:
parent
a90fc30cde
commit
34d7516618
|
|
@ -22,9 +22,6 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/2/15
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class AppConfig {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/2/14
|
||||
* 2022/2/14
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import io.grpc.stub.StreamObserver;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author zhangyingjie
|
||||
* @date 2022/11/1
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import org.apache.hugegraph.store.cli.util.HgCliUtil;
|
|||
import org.apache.hugegraph.store.client.HgStoreNodeManager;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/2/28
|
||||
* 2022/2/28
|
||||
*/
|
||||
public class HgStoreCommitter {
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import org.apache.hugegraph.store.client.util.MetricX;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/2/14
|
||||
* 2022/2/14
|
||||
*/
|
||||
@Slf4j
|
||||
public class HgStoreScanner {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import org.apache.hugegraph.store.client.util.HgStoreClientConst;
|
|||
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/2/14
|
||||
* 2022/2/14
|
||||
*/
|
||||
public class HgCliUtil {
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store.cli.util;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/1/29
|
||||
* 2022/1/29
|
||||
*/
|
||||
public class HgMetricX {
|
||||
private long start;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
package org.apache.hugegraph.store;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public interface HgKvEntry {
|
||||
byte[] key();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.io.Closeable;
|
|||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/21
|
||||
* created on 2021/10/21
|
||||
*/
|
||||
public interface HgKvIterator<E> extends Iterator<E>, HgSeekAble, Closeable {
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2022/03/10
|
||||
* created on 2022/03/10
|
||||
*/
|
||||
public interface HgKvOrderedIterator<E> extends HgKvIterator<E>, Comparable<HgKvOrderedIterator> {
|
||||
long getSequence();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/24
|
||||
* created on 2021/10/24
|
||||
*/
|
||||
public interface HgKvPagingIterator<E> extends HgKvIterator<E>, HgPageSize {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import org.apache.hugegraph.store.client.grpc.KvCloseableIterator;
|
|||
import org.apache.hugegraph.store.grpc.stream.ScanStreamReq;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
* @version 0.2.0
|
||||
*/
|
||||
public interface HgKvStore {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ import java.util.Arrays;
|
|||
import org.apache.hugegraph.store.client.util.HgStoreClientUtil;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/14
|
||||
* created on 2021/10/14
|
||||
*
|
||||
* @version 1.3.0 add canceled assert
|
||||
*/
|
||||
public class HgOwnerKey implements Serializable {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ package org.apache.hugegraph.store;
|
|||
|
||||
/**
|
||||
* Return the amount of records returned by one query in pageable-query.
|
||||
*
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/24
|
||||
* <p>
|
||||
* created on 2021/10/24
|
||||
*/
|
||||
public interface HgPageSize {
|
||||
long getPageSize();
|
||||
|
|
|
|||
|
|
@ -17,18 +17,16 @@
|
|||
|
||||
package org.apache.hugegraph.store;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public final class HgPrivate {
|
||||
|
||||
private static final HgPrivate instance = new HgPrivate();
|
||||
private static final HgPrivate INSTANCE = new HgPrivate();
|
||||
|
||||
private HgPrivate() {
|
||||
}
|
||||
|
||||
static HgPrivate of() {
|
||||
return instance;
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ import org.apache.hugegraph.store.client.util.HgAssert;
|
|||
import org.apache.hugegraph.store.grpc.common.ScanOrderType;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/3/4
|
||||
* 2022/3/4
|
||||
*
|
||||
* @version 0.5.0
|
||||
*/
|
||||
public interface HgScanQuery {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2022/03/11
|
||||
* created on 2022/03/11
|
||||
*/
|
||||
public interface HgSeekAble {
|
||||
byte[] position();
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ import org.apache.hugegraph.store.client.HgStoreSessionProvider;
|
|||
* Maintain HgStoreSession instances.
|
||||
* // TODO: Holding more than one HgSessionManager is available,if you want to connect multi
|
||||
* HgStore-clusters.
|
||||
*
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
@ThreadSafe
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ package org.apache.hugegraph.store;
|
|||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface HgSessionProvider {
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ import org.apache.hugegraph.store.client.HgStoreSessionProvider;
|
|||
* Maintain HgStoreSession instances.
|
||||
* // TODO: Holding more than one HgSessionManager is available,if you want to connect multi
|
||||
* HgStore-clusters.
|
||||
*
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
@ThreadSafe
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@ package org.apache.hugegraph.store;
|
|||
|
||||
import org.apache.hugegraph.store.client.type.HgStoreClientException;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public interface HgStoreSession extends HgKvStore {
|
||||
|
||||
void beginTx();
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
package org.apache.hugegraph.store;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public interface HgTkvEntry {
|
||||
String table();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
package org.apache.hugegraph.store;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public interface HgTokvEntry {
|
||||
String table();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* Immutable Object Pattern
|
||||
*
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/26
|
||||
* <p>
|
||||
* created on 2021/10/26
|
||||
*/
|
||||
public final class HgNodePartition {
|
||||
private final Long nodeId;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ import java.util.Set;
|
|||
import javax.annotation.concurrent.NotThreadSafe;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/26
|
||||
* created on 2021/10/26
|
||||
*
|
||||
* @version 1.0.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store.client;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/26
|
||||
* created on 2021/10/26
|
||||
*/
|
||||
public class HgPrivate {
|
||||
private final static HgPrivate instance = new HgPrivate();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ package org.apache.hugegraph.store.client;
|
|||
import org.apache.hugegraph.store.HgStoreSession;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/11
|
||||
* created on 2021/10/11
|
||||
*
|
||||
* @version 0.2.0
|
||||
*/
|
||||
public interface HgStoreNode {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store.client;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/11
|
||||
* created on 2021/10/11
|
||||
*/
|
||||
public interface HgStoreNodeBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ package org.apache.hugegraph.store.client;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
public final class HgStoreNodeCandidates {
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
/**
|
||||
* // TODO: Mapping to Store-Node-Cluster, one to one.
|
||||
* <p>
|
||||
* created on 2021/10/11
|
||||
*
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/11
|
||||
* @version 0.2.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
package org.apache.hugegraph.store.client;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public interface HgStoreNodeNotifier {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ package org.apache.hugegraph.store.client;
|
|||
import org.apache.hugegraph.store.client.util.HgStoreClientConst;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public interface HgStoreNodePartitioner {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store.client;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/27
|
||||
* created on 2021/10/27
|
||||
*/
|
||||
public interface HgStoreNodeProvider {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ package org.apache.hugegraph.store.client;
|
|||
import org.apache.hugegraph.store.HgStoreSession;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/11
|
||||
* created on 2021/10/11
|
||||
*
|
||||
* @version 0.1.0
|
||||
*/
|
||||
public interface HgStoreNodeSession extends HgStoreSession {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.hugegraph.store.client.type.HgNodeStatus;
|
|||
import org.apache.hugegraph.store.client.util.HgAssert;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2021/11/16
|
||||
* 2021/11/16
|
||||
*/
|
||||
@NotThreadSafe
|
||||
public class HgStoreNotice {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import org.apache.hugegraph.store.HgSessionProvider;
|
|||
import org.apache.hugegraph.store.HgStoreSession;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
@ThreadSafe
|
||||
public class HgStoreSessionProvider implements HgSessionProvider {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import java.util.Objects;
|
|||
import org.apache.hugegraph.store.HgTkvEntry;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/14
|
||||
* created on 2021/10/14
|
||||
*/
|
||||
class HgTkvEntryImpl implements HgTkvEntry {
|
||||
private final String table;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import org.apache.hugegraph.store.HgOwnerKey;
|
|||
import org.apache.hugegraph.store.HgTokvEntry;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/14
|
||||
* created on 2021/10/14
|
||||
*/
|
||||
class HgTokvEntryImpl implements HgTokvEntry {
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
import org.apache.hugegraph.store.HgStoreSession;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
@ThreadSafe
|
||||
public final class MultiNodeSessionFactory {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import org.apache.hugegraph.store.HgOwnerKey;
|
|||
import org.apache.hugegraph.store.HgStoreSession;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/26
|
||||
* created on 2021/10/26
|
||||
*/
|
||||
@ThreadSafe
|
||||
class NodeTkv {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2021/11/18
|
||||
* 2021/11/18
|
||||
*/
|
||||
@Slf4j
|
||||
@NotThreadSafe
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ import org.apache.hugegraph.store.term.HgTriple;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2022/01/19
|
||||
* created on 2022/01/19
|
||||
*
|
||||
* @version 0.6.0 added batch scan on 2022/03/03
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -31,8 +31,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
/**
|
||||
* Proxy iterator orderly, to switch next one will happen when the current one is empty.
|
||||
* <p>
|
||||
* created on 2022/03/10
|
||||
*
|
||||
* @author lynn.bond@hotmail.com created on 2022/03/10
|
||||
* @version 0.1.0
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ import org.apache.hugegraph.store.HgKvPagingIterator;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/24
|
||||
* created on 2021/10/24
|
||||
*
|
||||
* @version 0.1.1
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ import org.apache.hugegraph.store.HgKvEntry;
|
|||
import org.apache.hugegraph.store.HgKvIterator;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/21
|
||||
* created on 2021/10/21
|
||||
*
|
||||
* @version 0.1.0
|
||||
*/
|
||||
class TopWorkIteratorProxy implements HgKvIterator {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import io.grpc.stub.AbstractAsyncStub;
|
|||
import io.grpc.stub.AbstractBlockingStub;
|
||||
|
||||
/**
|
||||
* @author zhangyingjie
|
||||
* @date 2023/3/28
|
||||
**/
|
||||
public abstract class AbstractGrpcClient {
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ import java.util.Arrays;
|
|||
|
||||
import org.apache.hugegraph.store.HgKvEntry;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
class GrpcKvEntryImpl implements HgKvEntry {
|
||||
private final byte[] key;
|
||||
private final byte[] value;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ import org.apache.hugegraph.store.grpc.common.Kv;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/20
|
||||
* created on 2021/10/20
|
||||
*
|
||||
* @version 0.2.1
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.hugegraph.store.client.HgStoreNodeManager;
|
|||
import org.apache.hugegraph.store.client.util.HgAssert;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
public class GrpcStoreNodeBuilder implements HgStoreNodeBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import org.apache.hugegraph.store.client.HgStoreNode;
|
|||
import org.apache.hugegraph.store.client.HgStoreNodeManager;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/11
|
||||
* created on 2021/10/11
|
||||
*/
|
||||
class GrpcStoreNodeImpl implements HgStoreNode {
|
||||
private final GrpcStoreSessionClient sessionClient;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ import com.google.protobuf.UnsafeByteOperations;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2022/01/19
|
||||
* created on 2022/01/19
|
||||
*
|
||||
* @version 0.6.0 added batch get on 2022/04/06
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ import io.grpc.ManagedChannel;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/11/18
|
||||
* created on 2021/11/18
|
||||
*
|
||||
* @version 0.5.0
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ import io.grpc.stub.AbstractBlockingStub;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/19
|
||||
* created on 2021/10/19
|
||||
*
|
||||
* @version 1.1.1 added synchronized in getChannel.
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import io.grpc.Status;
|
|||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/1/19
|
||||
* 2022/1/19
|
||||
*/
|
||||
final class GrpcUtil {
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2022/04/08
|
||||
* created on 2022/04/08
|
||||
*/
|
||||
@Slf4j
|
||||
@NotThreadSafe
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
/**
|
||||
* 批量流式查询客户端实现类
|
||||
* <p>
|
||||
* created on 2022/07/23
|
||||
*
|
||||
* @author YanJinbing created on 2022/07/23
|
||||
* @version 3.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ import io.grpc.stub.StreamObserver;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2022/03/23
|
||||
* created on 2022/03/23
|
||||
*
|
||||
* @version 5.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import com.google.protobuf.ByteString;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2022/04/23
|
||||
* created on 2022/04/23
|
||||
*/
|
||||
@Slf4j
|
||||
@NotThreadSafe
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.io.Closeable;
|
|||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/3/16
|
||||
* 2022/3/16
|
||||
*/
|
||||
public interface KvCloseableIterator<T> extends Iterator<T>, Closeable {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/4/6
|
||||
* 2022/4/6
|
||||
*/
|
||||
class KvListIterator<T> implements KvCloseableIterator {
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import com.google.protobuf.ByteString;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/12/1
|
||||
* created on 2021/12/1
|
||||
*/
|
||||
@Slf4j
|
||||
@NotThreadSafe
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ import io.grpc.stub.StreamObserver;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/21
|
||||
* created on 2021/10/21
|
||||
*
|
||||
* @version 0.6.1 lynn.bond@hotamil.com on 2022/04/05
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ import com.google.protobuf.util.JsonFormat;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2021/11/18
|
||||
* 2021/11/18
|
||||
*
|
||||
* @version 0.3.0 on 2022/01/27
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import org.apache.hugegraph.store.grpc.common.Header;
|
|||
import com.google.protobuf.ByteString;
|
||||
|
||||
/**
|
||||
* @author zhangyingjie
|
||||
* @date 2022/10/8
|
||||
**/
|
||||
public class ScanUtil {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import org.apache.hugegraph.store.HgSeekAble;
|
|||
import org.apache.hugegraph.store.client.util.HgAssert;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/3/11
|
||||
* 2022/3/11
|
||||
*/
|
||||
class SeekAbleIterator<E> implements Iterator, HgSeekAble {
|
||||
private final Iterator<E> iterator;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import java.util.function.Supplier;
|
|||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2021/12/1
|
||||
* 2021/12/1
|
||||
*/
|
||||
@ThreadSafe
|
||||
final class SwitchingExecutor {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store.client.type;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/26
|
||||
* created on 2021/10/26
|
||||
*/
|
||||
public enum HgNodeStatus {
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
package org.apache.hugegraph.store.client.type;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/27
|
||||
* created on 2021/10/27
|
||||
*/
|
||||
public class HgStoreClientException extends RuntimeException {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2021/11/22
|
||||
* 2021/11/22
|
||||
*/
|
||||
@Slf4j
|
||||
public final class ExecutorPool {
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ import java.util.Collection;
|
|||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public final class HgAssert {
|
||||
public static void isTrue(boolean expression, String message) {
|
||||
if (message == null) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ import org.apache.hugegraph.store.client.type.HgStoreClientException;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/3/15
|
||||
* 2022/3/15
|
||||
*
|
||||
* @version 0.1.0
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import java.util.PropertyResourceBundle;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2021/11/29
|
||||
* 2021/11/29
|
||||
*/
|
||||
@Slf4j
|
||||
public final class HgStoreClientConfig {
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ import java.util.List;
|
|||
import org.apache.hugegraph.store.HgKvStore;
|
||||
import org.apache.hugegraph.store.HgOwnerKey;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public final class HgStoreClientConst {
|
||||
public final static String DEFAULT_NODE_CLUSTER_ID = "default-node-cluster";
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import org.apache.hugegraph.store.client.type.HgStoreClientException;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/14
|
||||
* created on 2021/10/14
|
||||
*/
|
||||
@Slf4j
|
||||
public final class HgStoreClientUtil {
|
||||
|
|
|
|||
|
|
@ -20,9 +20,7 @@ package org.apache.hugegraph.store.client.util;
|
|||
import java.nio.ByteBuffer;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public final class HgUuid {
|
||||
|
||||
private static String encode(UUID uuid) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ package org.apache.hugegraph.store.client.util;
|
|||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com on 2022/1/29
|
||||
* 2022/1/29
|
||||
*/
|
||||
public class MetricX {
|
||||
public static AtomicLong iteratorSum = new AtomicLong();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.hugegraph.store.HgStoreSession;
|
|||
import org.junit.Assert;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
public class HgStoreNodeSessionTest {
|
||||
private static final HgStoreNodeManager nodeManager = HgStoreNodeManager.getInstance();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import org.apache.hugegraph.store.HgStoreSession;
|
|||
import org.junit.Assert;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
public class HgStoreNodeStreamTest {
|
||||
private static final HgStoreNodeManager nodeManager = HgStoreNodeManager.getInstance();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import org.apache.hugegraph.store.client.util.MetricX;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/12
|
||||
* created on 2021/10/12
|
||||
*/
|
||||
@Slf4j
|
||||
public class HgStoreTestUtil {
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* Copy from javafx.util:Pair
|
||||
*
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/15
|
||||
* <p>
|
||||
* created on 2021/10/15
|
||||
*/
|
||||
public class HgPair<K, V> implements Serializable {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ package org.apache.hugegraph.store.term;
|
|||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/19
|
||||
* created on 2021/10/19
|
||||
*/
|
||||
public class HgTriple<X, Y, Z> {
|
||||
private final X x;
|
||||
|
|
|
|||
|
|
@ -64,8 +64,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
/**
|
||||
* The core class of the storage engine, initializing PD client and raft client
|
||||
*
|
||||
* @author YanJinbing
|
||||
*/
|
||||
@Slf4j
|
||||
public class HgStoreEngine implements Lifecycle<HgStoreEngineOptions>, HgStoreStateListener {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import org.apache.tinkerpop.gremlin.structure.Edge;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author zhangyingjie
|
||||
* @date 2022/10/26
|
||||
**/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory;
|
|||
* @projectName: hugegraph-store
|
||||
* @package: org.apache.hugegraph.store.business
|
||||
* @className: HgBusinessHandler
|
||||
* @author: tyzer
|
||||
* @description:
|
||||
* @date: 2021/10/19 19:07
|
||||
* @version: 1.0
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
* @projectName: hugegraph-store
|
||||
* @package: org.apache.hugegraph.store.business
|
||||
* @className: HgBusinessImpl
|
||||
* @author: tyzer
|
||||
* @description: TODO
|
||||
* @date: 2021/10/19 19:17
|
||||
* @version: 1.0
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ import com.google.protobuf.Descriptors;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author zhangyingjie
|
||||
* @date 2022/10/26
|
||||
**/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ import org.apache.hugegraph.rocksdb.access.ScanIterator;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/11/2
|
||||
* created on 2021/11/2
|
||||
*
|
||||
* @version 1.1.0 implements position method to pass partition-id on 2022/03/10
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import org.apache.hugegraph.type.define.DataType;
|
|||
import org.apache.hugegraph.type.define.SerialEnum;
|
||||
|
||||
/**
|
||||
* @author zhangyingjie
|
||||
* @date 2022/9/23
|
||||
**/
|
||||
public class SelectIterator implements ScanIterator {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import lombok.Data;
|
|||
* @projectName: hugegraph-store
|
||||
* @package: org.apache.hugegraph.store.partitions
|
||||
* @className: Partition
|
||||
* @author: tyzer
|
||||
* @description: TODO
|
||||
* @date: 2021/10/19 18:16
|
||||
* @version: 1.0
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import org.apache.hugegraph.pd.grpc.Metapb;
|
|||
* @projectName: hugegraph-store
|
||||
* @package: org.apache.hugegraph.store.partitions
|
||||
* @className: PartitionRole
|
||||
* @author: tyzer
|
||||
* @description: TODO
|
||||
* @date: 2021/10/19 18:18
|
||||
* @version: 1.0
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import lombok.Data;
|
|||
* @projectName: hugegraph-store
|
||||
* @package: org.apache.hugegraph.store.core
|
||||
* @className: HgStoreNode
|
||||
* @author: tyzer
|
||||
* @description: TODO
|
||||
* @date: 2021/10/19 19:44
|
||||
* @version: 1.0
|
||||
|
|
|
|||
|
|
@ -55,24 +55,17 @@ public class RaftRocksdbOptions {
|
|||
|
||||
private static void registerRaftRocksdbConfig(HugeConfig options) {
|
||||
Cache blockCache = new LRUCache(SizeUnit.GB);
|
||||
BlockBasedTableConfig tableConfig = new BlockBasedTableConfig() //
|
||||
.setIndexType(
|
||||
IndexType.kTwoLevelIndexSearch) //
|
||||
.setPartitionFilters(
|
||||
true) //
|
||||
.setMetadataBlockSize(
|
||||
8 * SizeUnit.KB) //
|
||||
.setCacheIndexAndFilterBlocks(
|
||||
options.get(
|
||||
RocksDBOptions.PUT_FILTER_AND_INDEX_IN_CACHE)) //
|
||||
.setCacheIndexAndFilterBlocksWithHighPriority(
|
||||
true) //
|
||||
.setPinL0FilterAndIndexBlocksInCache(
|
||||
options.get(
|
||||
RocksDBOptions.PIN_L0_FILTER_AND_INDEX_IN_CACHE)) //
|
||||
.setBlockSize(
|
||||
4 * SizeUnit.KB)//
|
||||
.setBlockCache(blockCache);
|
||||
BlockBasedTableConfig tableConfig = new BlockBasedTableConfig()
|
||||
.setIndexType(IndexType.kTwoLevelIndexSearch)
|
||||
.setPartitionFilters(true) //
|
||||
.setMetadataBlockSize(8 * SizeUnit.KB) //
|
||||
.setCacheIndexAndFilterBlocks(
|
||||
options.get(RocksDBOptions.PUT_FILTER_AND_INDEX_IN_CACHE))
|
||||
.setCacheIndexAndFilterBlocksWithHighPriority(true)
|
||||
.setPinL0FilterAndIndexBlocksInCache(
|
||||
options.get(RocksDBOptions.PIN_L0_FILTER_AND_INDEX_IN_CACHE))
|
||||
.setBlockSize(4 * SizeUnit.KB)
|
||||
.setBlockCache(blockCache);
|
||||
|
||||
StorageOptionsFactory.registerRocksDBTableFormatConfig(RocksDBLogStorage.class,
|
||||
tableConfig);
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
/**
|
||||
* 内置PD服务,用于单机部署或开发调试
|
||||
*
|
||||
* @author liyan75
|
||||
*/
|
||||
@Slf4j
|
||||
public class FakePdServiceProvider implements PdProvider {
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ import com.alipay.sofa.jraft.util.Utils;
|
|||
|
||||
/**
|
||||
* Raft 状态机
|
||||
*
|
||||
* @author Yanjinbing
|
||||
*/
|
||||
|
||||
public class HgStoreStateMachine extends StateMachineAdapter {
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
package org.apache.hugegraph.store.util;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com
|
||||
*/
|
||||
|
||||
public final class Asserts {
|
||||
public static void isTrue(boolean expression, String message) {
|
||||
if (message == null) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lynn.bond@hotmail.com created on 2021/10/22
|
||||
* created on 2021/10/22
|
||||
*/
|
||||
public final class HgStoreConst {
|
||||
public final static byte[] EMPTY_BYTES = new byte[0];
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ package org.apache.hugegraph.store.util;
|
|||
* @projectName: hugegraph-store
|
||||
* @package: org.apache.hugegraph.store
|
||||
* @className: HgCoreServiceException
|
||||
* @author: tyzer
|
||||
* @description: TODO
|
||||
* @date: 2021/10/22 9:44
|
||||
* @version: 1.0
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@
|
|||
|
||||
package org.apache.hugegraph.store.util;
|
||||
|
||||
/**
|
||||
* @author YanJinbing
|
||||
*/
|
||||
public interface Lifecycle<T> {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author dominicwilliams
|
||||
* Updated by RoshanF on 12/28/2015.
|
||||
*/
|
||||
public class ManualResetEvent {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import java.util.Arrays;
|
|||
* @projectName: hugegraph-store
|
||||
* @package: org.apache.hugegraph.store.util
|
||||
* @className: UnsafeUtf8Util
|
||||
* @author: jraft
|
||||
* @description:
|
||||
* @date: 2021/10/21 11:48
|
||||
* @version: 1.0
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue