diff --git a/BUILDING.md b/BUILDING.md index 56b89fdc54..3ac025a691 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -37,7 +37,7 @@ To find the Java binary in your environment, run the appropriate command for you To build without executing tests: 1. Click on "File" -> "Open", choose your project location. -2. Open maven view by click "View" -> "Tool Windows" -> "Maven Porjects". +2. Open maven view by click "View" -> "Tool Windows" -> "Maven Projects". 3. Choose root module "hugegraph: Distributed Graph Database", unfold the menu of "Lifecycle". 4. Click the "Toggle 'Skip Tests' Mode" button which is located on the top diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd267bd25e..69379ba50f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ Before submitting the code, we need to do some preparation: 5. Sign the HugeGraph CLA: [https://cla-assistant.io/hugegraph/hugegraph](https://cla-assistant.io/hugegraph/hugegraph) -Optional: You can use [Github desktop](https://desktop.github.com/) to greatly simplify the commit and update process. +Optional: You can use [GitHub desktop](https://desktop.github.com/) to greatly simplify the commit and update process. ## 2. Create an Issue on GitHub @@ -150,7 +150,7 @@ And push it to GitHub fork repo again: git push -f origin bugfix-branch:bugfix-branch ``` -Github will automatically update the Pull Request after we push it, just wait for code review. +GitHub will automatically update the Pull Request after we push it, just wait for code review. Any question please contact to us through [hugegraph@googlegroups.com](mailto:hugegraph@googlegroups.com) or [other contact information](https://hugegraph.github.io/hugegraph-doc/). diff --git a/README.md b/README.md index d8e7e813d5..1f59fd1fa2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![Build Status](https://github.com/hugegraph/hugegraph/actions/workflows/ci.yml/badge.svg)](https://github.com/hugegraph/hugegraph/actions/workflows/ci.yml) [![Codecov](https://codecov.io/gh/hugegraph/hugegraph/branch/master/graph/badge.svg)](https://codecov.io/gh/hugegraph/hugegraph) -[![Github Releases Downloads](https://img.shields.io/github/downloads/hugegraph/hugegraph/total.svg)](https://github.com/hugegraph/hugegraph/releases) +[![GitHub Releases Downloads](https://img.shields.io/github/downloads/hugegraph/hugegraph/total.svg)](https://github.com/hugegraph/hugegraph/releases) HugeGraph is a fast-speed and highly-scalable [graph database](https://en.wikipedia.org/wiki/Graph_database). Billions of vertices and edges can be easily stored into and queried from HugeGraph due to its excellent OLTP ability. As compliance to [Apache TinkerPop 3](https://tinkerpop.apache.org/) framework, various complicated graph queries can be accomplished through [Gremlin](https://tinkerpop.apache.org/gremlin.html)(a powerful graph traversal language). diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java index 91fbef80cf..0ecee3f9e5 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java @@ -143,9 +143,9 @@ protected static void checkUpdatingBody(Checkable body) { } protected static void checkCreatingBody( - Collection bodys) { - E.checkArgumentNotNull(bodys, "The request body can't be empty"); - for (Checkable body : bodys) { + Collection bodies) { + E.checkArgumentNotNull(bodies, "The request body can't be empty"); + for (Checkable body : bodies) { E.checkArgument(body != null, "The batch body can't contain null record"); body.checkCreate(true); @@ -153,9 +153,9 @@ protected static void checkCreatingBody( } protected static void checkUpdatingBody( - Collection bodys) { - E.checkArgumentNotNull(bodys, "The request body can't be empty"); - for (Checkable body : bodys) { + Collection bodies) { + E.checkArgumentNotNull(bodies, "The request body can't be empty"); + for (Checkable body : bodies) { E.checkArgumentNotNull(body, "The batch body can't contain null record"); body.checkUpdate(); diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java index b97b69c377..362bb95bf2 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java @@ -37,7 +37,7 @@ import com.baidu.hugegraph.config.HugeConfig; import com.baidu.hugegraph.config.OptionSpace; import com.baidu.hugegraph.config.ServerOptions; -import com.baidu.hugegraph.type.Namifiable; +import com.baidu.hugegraph.type.Nameable; import com.baidu.hugegraph.util.E; import com.baidu.hugegraph.util.JsonUtil; @@ -432,7 +432,7 @@ public ResourceType resource() { } public ResourceObject resourceObject() { - Namifiable elem = HugeResource.NameObject.ANY; + Nameable elem = HugeResource.NameObject.ANY; return ResourceObject.of(this.owner, this.resource, elem); } diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java index 31bcf7960a..3add4ab17e 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java @@ -93,7 +93,7 @@ import com.baidu.hugegraph.task.TaskStatus; import com.baidu.hugegraph.traversal.optimize.HugeScriptTraversal; import com.baidu.hugegraph.type.HugeType; -import com.baidu.hugegraph.type.Namifiable; +import com.baidu.hugegraph.type.Nameable; import com.baidu.hugegraph.type.define.GraphMode; import com.baidu.hugegraph.type.define.GraphReadMode; import com.baidu.hugegraph.type.define.NodeRole; @@ -790,7 +790,7 @@ private void verifyPermission(HugePermission actionPerm, */ verifyResPermission(actionPerm, true, () -> { String graph = this.hugegraph.name(); - Namifiable elem = HugeResource.NameObject.ANY; + Nameable elem = HugeResource.NameObject.ANY; return ResourceObject.of(graph, resType, elem); }); } @@ -869,7 +869,7 @@ private void verifyNamePermission(HugePermission actionPerm, ResourceType resType, String name) { verifyResPermission(actionPerm, true, () -> { String graph = this.hugegraph.name(); - Namifiable elem = HugeResource.NameObject.of(name); + Nameable elem = HugeResource.NameObject.of(name); return ResourceObject.of(graph, resType, elem); }); } @@ -1105,7 +1105,7 @@ private HugeTask verifyTaskPermission(HugePermission actionPerm, Object r = verifyResPermission(actionPerm, throwIfNoPerm, () -> { String graph = HugeGraphAuthProxy.this.hugegraph.name(); String name = task.id().toString(); - Namifiable elem = HugeResource.NameObject.of(name); + Nameable elem = HugeResource.NameObject.of(name); return ResourceObject.of(graph, ResourceType.TASK, elem); }, () -> { return hasTaskPermission(task); diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/UpdateStrategy.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/define/UpdateStrategy.java index deb314d28d..ab0fdb7620 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/UpdateStrategy.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/define/UpdateStrategy.java @@ -36,7 +36,7 @@ public enum UpdateStrategy { SUM { @Override Object updatePropertyValue(Object oldProperty, Object newProperty) { - // TODO: Improve preformance? (like write a method in common module) + // TODO: Improve performance? (like write a method in common module) BigDecimal oldNumber = new BigDecimal(oldProperty.toString()); BigDecimal newNumber = new BigDecimal(newProperty.toString()); return oldNumber.add(newNumber); diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/version/ApiVersion.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/version/ApiVersion.java index 8710f50d6c..d9fb63d0fd 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/version/ApiVersion.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/version/ApiVersion.java @@ -30,7 +30,7 @@ public final class ApiVersion { * version 0.2: * [0.2] HugeGraph-527: First add the version to the hugegraph module * [0.3] HugeGraph-525: Add versions check of components and api - * [0.4] HugeGraph-162: Add schema builder to seperate client and + * [0.4] HugeGraph-162: Add schema builder to separate client and * inner interface. * [0.5] HugeGraph-498: Support three kind of id strategy * diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStore.java b/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStore.java index 6ad3ee4819..0f37c92f89 100644 --- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStore.java +++ b/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStore.java @@ -310,7 +310,7 @@ public Iterator query(Query query) { iterators.add(table.query(this.session(), q)); } entries = new MergeIterator<>(entries, iterators, - BackendEntry::mergable); + BackendEntry::mergeable); } return entries; } diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTable.java b/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTable.java index 8fa3693ee9..299f5eea0f 100644 --- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTable.java +++ b/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTable.java @@ -90,10 +90,10 @@ protected void registerMetaHandlers() { E.checkArgument(args.length == 1, "The args count of %s must be 1", meta); long splitSize = (long) args[0]; - CassandraShard spliter = new CassandraShard(session, + CassandraShard splitter = new CassandraShard(session, session.keyspace(), this.table()); - return spliter.getSplits(0, splitSize); + return splitter.getSplits(0, splitSize); }); } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeResource.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeResource.java index e0b5e6993e..bdfb070254 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeResource.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeResource.java @@ -42,8 +42,8 @@ import com.baidu.hugegraph.auth.SchemaDefine.AuthElement; import com.baidu.hugegraph.structure.HugeElement; import com.baidu.hugegraph.traversal.optimize.TraversalUtil; -import com.baidu.hugegraph.type.Namifiable; -import com.baidu.hugegraph.type.Typifiable; +import com.baidu.hugegraph.type.Nameable; +import com.baidu.hugegraph.type.Typeable; import com.baidu.hugegraph.util.JsonUtil; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; @@ -124,7 +124,7 @@ public boolean filter(ResourceObject resourceObject) { return this.filter((AuthElement) resourceObject.operated()); } if (resType.isSchema() || CHECK_NAME_RESS.contains(resType)) { - return this.filter((Namifiable) resourceObject.operated()); + return this.filter((Nameable) resourceObject.operated()); } } @@ -137,15 +137,15 @@ public boolean filter(ResourceObject resourceObject) { private boolean filter(AuthElement element) { assert this.type.match(element.type()); - if (element instanceof Namifiable) { - return this.filter((Namifiable) element); + if (element instanceof Nameable) { + return this.filter((Nameable) element); } return true; } - private boolean filter(Namifiable element) { - assert !(element instanceof Typifiable) || this.type.match( - ResourceType.from(((Typifiable) element).type())); + private boolean filter(Nameable element) { + assert !(element instanceof Typeable) || this.type.match( + ResourceType.from(((Typeable) element).type())); return this.matchLabel(element.name()); } @@ -248,7 +248,7 @@ public String toString() { public static boolean allowed(ResourceObject resourceObject) { // Allowed to access system(hidden) schema by anyone if (resourceObject.type().isSchema()) { - Namifiable schema = (Namifiable) resourceObject.operated(); + Nameable schema = (Nameable) resourceObject.operated(); return Hidden.isHidden(schema.name()); } @@ -264,7 +264,7 @@ public static List parseResources(String resources) { return JsonUtil.fromJson(resources, type); } - public static class NameObject implements Namifiable { + public static class NameObject implements Nameable { public static final NameObject ANY = new NameObject("*"); diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceObject.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceObject.java index bdff3b38d4..4737bfa87f 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceObject.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceObject.java @@ -22,7 +22,7 @@ import com.baidu.hugegraph.auth.SchemaDefine.AuthElement; import com.baidu.hugegraph.schema.SchemaElement; import com.baidu.hugegraph.structure.HugeElement; -import com.baidu.hugegraph.type.Namifiable; +import com.baidu.hugegraph.type.Nameable; import com.baidu.hugegraph.util.E; public class ResourceObject { @@ -89,7 +89,7 @@ public static ResourceObject of(String graph, } public static ResourceObject of(String graph, ResourceType type, - Namifiable elem) { + Nameable elem) { return new ResourceObject<>(graph, type, elem); } } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/SchemaDefine.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/SchemaDefine.java index e131de8b93..3ffc1d883a 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/SchemaDefine.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/SchemaDefine.java @@ -240,9 +240,9 @@ protected Object[] asArray(List list) { protected abstract Object[] asArray(); } - // NOTE: travis-ci fails if class Entity implements Namifiable + // NOTE: travis-ci fails if class Entity implements Nameable public static abstract class Entity extends AuthElement - implements com.baidu.hugegraph.type.Namifiable { + implements com.baidu.hugegraph.type.Nameable { private static final long serialVersionUID = 4113319546914811762L; diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryBackendEntry.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryBackendEntry.java index 6c33e6d802..96e5d2026e 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryBackendEntry.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryBackendEntry.java @@ -163,7 +163,7 @@ public void merge(BackendEntry other) { } @Override - public boolean mergable(BackendEntry other) { + public boolean mergeable(BackendEntry other) { if (!(other instanceof BinaryBackendEntry)) { return false; } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java index a87c134fa2..496b3ef7ee 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java @@ -275,7 +275,7 @@ public void merge(BackendEntry other) { } @Override - public boolean mergable(BackendEntry other) { + public boolean mergeable(BackendEntry other) { if (!(other instanceof TableBackendEntry)) { return false; } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextBackendEntry.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextBackendEntry.java index 98c428642d..9d8239857b 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextBackendEntry.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextBackendEntry.java @@ -278,7 +278,7 @@ public void merge(BackendEntry other) { } @Override - public boolean mergable(BackendEntry other) { + public boolean mergeable(BackendEntry other) { if (!(other instanceof TextBackendEntry)) { return false; } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java index 21ad278779..3485172a3a 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java @@ -161,7 +161,7 @@ private void parseProperty(String colName, String colValue, } else { if (!(value instanceof Collection)) { throw new BackendException( - "Invalid value of non-sigle property: %s", colValue); + "Invalid value of non-single property: %s", colValue); } for (Object v : (Collection) value) { v = JsonUtil.castNumber(v, pkey.dataType().clazz()); diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java index 9b9b8e8e62..2bc2bc75a2 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java @@ -90,7 +90,7 @@ public boolean equals(Object obj) { public void columns(BackendColumn... columns); public void merge(BackendEntry other); - public boolean mergable(BackendEntry other); + public boolean mergeable(BackendEntry other); public void clear(); diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendTable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendTable.java index dde22bffe1..334194741d 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendTable.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendTable.java @@ -120,9 +120,9 @@ public static final String joinTableName(String prefix, String table) { public abstract void eliminate(Session session, Entry entry); - /****************************** ShardSpliter ******************************/ + /****************************** ShardSplitter ******************************/ - public static abstract class ShardSpliter { + public static abstract class ShardSplitter { // The min shard size should >= 1M to prevent too many number of shards protected static final int MIN_SHARD_SIZE = (int) Bytes.MB; @@ -142,7 +142,7 @@ public static abstract class ShardSpliter { private final String table; - public ShardSpliter(String table) { + public ShardSplitter(String table) { this.table = table; } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTable.java index 8fdbd43fbe..7d5583dffd 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTable.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTable.java @@ -57,18 +57,18 @@ public class InMemoryDBTable extends BackendTable store; - private final InMemoryShardSpliter shardSpliter; + private final InMemoryShardSplitter shardSplitter; public InMemoryDBTable(HugeType type) { super(type.name()); this.store = new ConcurrentHashMap<>(); - this.shardSpliter = new InMemoryShardSpliter(this.table()); + this.shardSplitter = new InMemoryShardSplitter(this.table()); } public InMemoryDBTable(HugeType type, Map store) { super(type.name()); this.store = store; - this.shardSpliter = new InMemoryShardSpliter(this.table()); + this.shardSplitter = new InMemoryShardSplitter(this.table()); } @Override @@ -77,7 +77,7 @@ protected void registerMetaHandlers() { E.checkArgument(args.length == 1, "The args count of %s must be 1", meta); long splitSize = (long) args[0]; - return this.shardSpliter.getSplits(session, splitSize); + return this.shardSplitter.getSplits(session, splitSize); }); } @@ -328,9 +328,9 @@ private static boolean matchCondition(BackendEntry item, Condition c) { return false; } - private class InMemoryShardSpliter extends ShardSpliter { + private class InMemoryShardSplitter extends ShardSplitter { - public InMemoryShardSpliter(String table) { + public InMemoryShardSplitter(String table) { super(table); } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManagerImpl.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManagerImpl.java index 6034a71c9b..d1b15b634e 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManagerImpl.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManagerImpl.java @@ -84,7 +84,7 @@ public String transferLeaderTo(String endpoint) { Status status = this.raftNode.node().transferLeadershipTo(peerId); if (!status.isOk()) { throw new BackendException( - "Failed to transafer leader to '%s', raft error: %s", + "Failed to transfer leader to '%s', raft error: %s", endpoint, status.getErrorMsg()); } return peerId.toString(); diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreSerializer.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreSerializer.java index 262b3fe69c..c64f9e2ff3 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreSerializer.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreSerializer.java @@ -80,7 +80,7 @@ public static byte[] writeMutation(BackendMutation mutation) { buffer.write(entry.type().code()); // write id buffer.writeBytes(entry.id().asBytes()); - // wirte subId + // write subId if (entry.subId() != null) { buffer.writeId(entry.subId()); } else { diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreStateMachine.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreStateMachine.java index 0a7647cf3e..73b1cd7c24 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreStateMachine.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/StoreStateMachine.java @@ -90,7 +90,7 @@ public void onApply(Iterator iter) { future.get(); } } catch (Throwable e) { - String title = "StateMachine occured critical error"; + String title = "StateMachine occurred critical error"; LOG.error("{}", title, e); Status status = new Status(RaftError.ESTATEMACHINE, "%s: %s", title, e.getMessage()); @@ -204,7 +204,7 @@ public boolean onSnapshotLoad(SnapshotReader reader) { return false; } /* - * Snapshot load occured in RaftNode constructor, specifically at step + * Snapshot load occurred in RaftNode constructor, specifically at step * `this.node = this.initRaftNode()`, at this time the NodeImpl is null * in RaftNode so we can't call `this.node().nodeId()` */ diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/ram/RamTable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/ram/RamTable.java index e78d341f7c..8c6b4d8cb6 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/ram/RamTable.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/ram/RamTable.java @@ -356,7 +356,7 @@ private void vertexAdjPosition(long vertex, int position) { assert vertex < Integer.MAX_VALUE; this.verticesHigh.put(vertex, position); } else { - throw new HugeException("Out of vertices capaticy %s", + throw new HugeException("Out of vertices capacity %s", this.verticesCapacity); } } @@ -369,7 +369,7 @@ private int vertexAdjPosition(long vertex) { assert vertex < Integer.MAX_VALUE; return this.verticesHigh.get(vertex); } else { - throw new HugeException("Out of vertices capaticy %s: %s", + throw new HugeException("Out of vertices capacity %s: %s", this.verticesCapacity, vertex); } } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphTransaction.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphTransaction.java index 0adbaa3124..b599da8a5b 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphTransaction.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphTransaction.java @@ -1393,7 +1393,7 @@ private Query optimizeQuery(ConditionQuery query) { query, keys, HugeKeys.SORT_VALUES); query.query(conditions); /* - * Reset all userprop since transfered to sort-keys, ignore other + * Reset all userprop since transferred to sort-keys, ignore other * userprop(if exists) that it will be filtered by queryEdges(Query) */ query.resetUserpropConditions(); @@ -1544,7 +1544,7 @@ private void checkNonnullProperty(HugeVertex vertex) { Collection missed = CollectionUtils.subtract(nonNullKeys, keys); HugeGraph graph = this.graph(); E.checkArgument(false, "All non-null property keys %s of " + - "vertex label '%s' must be setted, missed keys %s", + "vertex label '%s' must be set, missed keys %s", graph.mapPkId2Name(nonNullKeys), vertexLabel.name(), graph.mapPkId2Name(missed)); } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/config/AuthOptions.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/config/AuthOptions.java index b80ec4cc90..f8b59e3c7e 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/config/AuthOptions.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/config/AuthOptions.java @@ -42,7 +42,7 @@ public static synchronized AuthOptions instance() { public static final ConfigOption AUTHENTICATOR = new ConfigOption<>( "auth.authenticator", - "The class path of authenticator implemention. " + + "The class path of authenticator implementation. " + "e.g., com.baidu.hugegraph.auth.StandardAuthenticator, " + "or com.baidu.hugegraph.auth.ConfigAuthenticator.", null, diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/config/CoreOptions.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/config/CoreOptions.java index 6580091ec9..e5be7e6347 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/config/CoreOptions.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/config/CoreOptions.java @@ -182,7 +182,7 @@ public static synchronized CoreOptions instance() { public static final ConfigOption RAFT_BACKEND_THREADS = new ConfigOption<>( "raft.backend_threads", - "The thread number used to apply task to bakcend.", + "The thread number used to apply task to backend.", rangeInt(0, Integer.MAX_VALUE), CPUS ); @@ -575,7 +575,7 @@ public static synchronized CoreOptions instance() { public static final ConfigOption SNOWFLAKE_DATACENTER_ID = new ConfigOption<>( - "snowflake.datecenter_id", + "snowflake.datacenter_id", "The datacenter id of snowflake id generator.", disallowEmpty(), 0L diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/io/HugeGraphSONModule.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/io/HugeGraphSONModule.java index 3539a075a2..b38caec912 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/io/HugeGraphSONModule.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/io/HugeGraphSONModule.java @@ -411,7 +411,7 @@ public void writePropertiesField(Collection> properties, "for vertex '%s'", key, val, property.element()); } }; - // End wirte properties + // End write properties generator.writeEndObject(); } } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/PropertyKey.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/PropertyKey.java index d300abd179..b38070b073 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/PropertyKey.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/PropertyKey.java @@ -33,7 +33,7 @@ import com.baidu.hugegraph.exception.NotSupportException; import com.baidu.hugegraph.schema.builder.SchemaBuilder; import com.baidu.hugegraph.type.HugeType; -import com.baidu.hugegraph.type.Propfiable; +import com.baidu.hugegraph.type.Propertiable; import com.baidu.hugegraph.type.define.AggregateType; import com.baidu.hugegraph.type.define.Cardinality; import com.baidu.hugegraph.type.define.DataType; @@ -41,7 +41,7 @@ import com.baidu.hugegraph.util.E; import com.baidu.hugegraph.util.LongEncoding; -public class PropertyKey extends SchemaElement implements Propfiable { +public class PropertyKey extends SchemaElement implements Propertiable { private DataType dataType; private Cardinality cardinality; diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaElement.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaElement.java index 5d38f6c272..5b37e91e35 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaElement.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaElement.java @@ -28,13 +28,13 @@ import com.baidu.hugegraph.HugeGraph; import com.baidu.hugegraph.backend.id.Id; import com.baidu.hugegraph.backend.id.IdGenerator; -import com.baidu.hugegraph.type.Namifiable; -import com.baidu.hugegraph.type.Typifiable; +import com.baidu.hugegraph.type.Nameable; +import com.baidu.hugegraph.type.Typeable; import com.baidu.hugegraph.type.define.SchemaStatus; import com.baidu.hugegraph.util.E; import com.google.common.base.Objects; -public abstract class SchemaElement implements Namifiable, Typifiable, +public abstract class SchemaElement implements Nameable, Typeable, Cloneable { public static final int MAX_PRIMITIVE_SYS_ID = 32; diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaLabel.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaLabel.java index 6d8a468c41..354fb88606 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaLabel.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/schema/SchemaLabel.java @@ -29,13 +29,13 @@ import com.baidu.hugegraph.backend.id.Id; import com.baidu.hugegraph.backend.id.IdGenerator; import com.baidu.hugegraph.type.HugeType; -import com.baidu.hugegraph.type.Indexfiable; -import com.baidu.hugegraph.type.Propfiable; +import com.baidu.hugegraph.type.Indexable; +import com.baidu.hugegraph.type.Propertiable; import com.baidu.hugegraph.util.E; import com.google.common.base.Objects; public abstract class SchemaLabel extends SchemaElement - implements Indexfiable, Propfiable { + implements Indexable, Propertiable { private final Set properties; private final Set nullableKeys; diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java index 5767cba554..fa4aa7f79f 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java @@ -64,7 +64,7 @@ public class HugeSecurityManager extends SecurityManager { "com.github.benmanes.caffeine.cache.BoundedLocalCache" ); - private static final Set WHITE_SYSTEM_PROPERTYS = ImmutableSet.of( + private static final Set WHITE_SYSTEM_PROPERTIES = ImmutableSet.of( "line.separator", "file.separator", "java.specification.version", // Sofa @@ -350,7 +350,7 @@ public void checkPropertiesAccess() { @Override public void checkPropertyAccess(String key) { if (!callFromAcceptClassLoaders() && callFromGremlin() && - !WHITE_SYSTEM_PROPERTYS.contains(key) && !callFromBackendHbase() && + !WHITE_SYSTEM_PROPERTIES.contains(key) && !callFromBackendHbase() && !callFromSnapshot() && !callFromRaft() && !callFromSofaRpc()) { throw newSecurityException( diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/GraphType.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/GraphType.java index 6c9da576f2..c93cfac69d 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/GraphType.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/GraphType.java @@ -19,8 +19,8 @@ package com.baidu.hugegraph.structure; -import com.baidu.hugegraph.type.Namifiable; -import com.baidu.hugegraph.type.Typifiable; +import com.baidu.hugegraph.type.Nameable; +import com.baidu.hugegraph.type.Typeable; -public interface GraphType extends Namifiable, Typifiable { +public interface GraphType extends Nameable, Typeable { } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeVertex.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeVertex.java index f3570c3ebc..5de8e59d19 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeVertex.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeVertex.java @@ -295,7 +295,7 @@ public HugeEdge constructEdge(String label, HugeVertex vertex, // Check sortKeys List keys = this.graph().mapPkName2Id(elemKeys.keys()); E.checkArgument(keys.containsAll(edgeLabel.sortKeys()), - "The sort key(s) must be setted for the edge " + + "The sort key(s) must be set for the edge " + "with label: '%s'", edgeLabel.name()); // Check whether passed all non-null props @@ -307,7 +307,7 @@ public HugeEdge constructEdge(String label, HugeVertex vertex, @SuppressWarnings("unchecked") Collection missed = CollectionUtils.subtract(nonNullKeys, keys); E.checkArgument(false, "All non-null property keys: %s " + - "of edge label '%s' must be setted, " + + "of edge label '%s' must be set, " + "but missed keys: %s", this.graph().mapPkId2Name(nonNullKeys), edgeLabel.name(), diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/TraversalUtil.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/TraversalUtil.java index 311db733e1..2361d686fa 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/TraversalUtil.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/TraversalUtil.java @@ -697,8 +697,8 @@ private static V validPropertyValue(V value, PropertyKey pkey) { return validValue; } - public static void retriveSysprop(List hasContainers, - Function func) { + public static void retrieveSysprop(List hasContainers, + Function func) { for (Iterator iter = hasContainers.iterator(); iter.hasNext();) { HasContainer container = iter.next(); diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Indexfiable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Indexable.java similarity index 96% rename from hugegraph-core/src/main/java/com/baidu/hugegraph/type/Indexfiable.java rename to hugegraph-core/src/main/java/com/baidu/hugegraph/type/Indexable.java index a70f195cf9..6085e52353 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Indexfiable.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Indexable.java @@ -23,7 +23,7 @@ import com.baidu.hugegraph.backend.id.Id; -public interface Indexfiable { +public interface Indexable { public Set indexLabels(); } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Namifiable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Nameable.java similarity index 96% rename from hugegraph-core/src/main/java/com/baidu/hugegraph/type/Namifiable.java rename to hugegraph-core/src/main/java/com/baidu/hugegraph/type/Nameable.java index f7910ab765..8d4ba418c2 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Namifiable.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Nameable.java @@ -19,7 +19,7 @@ * * @author Matthias Broecheler (me@matthiasb.com) */ -public interface Namifiable { +public interface Nameable { /** * Returns the unique name of this entity. * diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Propfiable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Propertiable.java similarity index 96% rename from hugegraph-core/src/main/java/com/baidu/hugegraph/type/Propfiable.java rename to hugegraph-core/src/main/java/com/baidu/hugegraph/type/Propertiable.java index 15a845307f..666633b1a7 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Propfiable.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Propertiable.java @@ -23,7 +23,7 @@ import com.baidu.hugegraph.backend.id.Id; -public interface Propfiable { +public interface Propertiable { public Set properties(); } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Typifiable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Typeable.java similarity index 96% rename from hugegraph-core/src/main/java/com/baidu/hugegraph/type/Typifiable.java rename to hugegraph-core/src/main/java/com/baidu/hugegraph/type/Typeable.java index 09c171d386..c807857327 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Typifiable.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Typeable.java @@ -19,7 +19,7 @@ package com.baidu.hugegraph.type; -public interface Typifiable { +public interface Typeable { // Return schema/data type public HugeType type(); diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/define/HugeKeys.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/define/HugeKeys.java index db54062cac..fe006f3a3d 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/define/HugeKeys.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/define/HugeKeys.java @@ -26,7 +26,7 @@ public enum HugeKeys { /* Column names of schema type (common) */ ID(1, "id"), NAME(2, "name"), - TIMESTANMP(3, "timestamp"), + TIMESTAMP(3, "timestamp"), SCHEMA_TYPE(4, "schema_type"), USER_DATA(10, "user_data"), diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java index c1fb3fb3ad..348266993f 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java @@ -71,7 +71,7 @@ public static void checkGremlinConfig(String conf) { } public static Map scanGraphsDir(String graphsDirPath) { - LOG.info("Scaning option 'graphs' directory '{}'", graphsDirPath); + LOG.info("Scanning option 'graphs' directory '{}'", graphsDirPath); File graphsDir = new File(graphsDirPath); E.checkArgument(graphsDir.exists() && graphsDir.isDirectory(), "Please ensure the path '%s' of option 'graphs' " + diff --git a/hugegraph-dist/src/assembly/static/bin/hugegraph b/hugegraph-dist/src/assembly/static/bin/hugegraph index 09b3381316..4714b59e64 100644 --- a/hugegraph-dist/src/assembly/static/bin/hugegraph +++ b/hugegraph-dist/src/assembly/static/bin/hugegraph @@ -97,8 +97,8 @@ status() { # Get status of HugeGraphServer to ensure it is alive get_status() { - HTPP_CODE=`curl -I -s -w "%{http_code}" -o /dev/null $DETECT_URL` - if [ $HTPP_CODE = 200 ]; then + HTTP_CODE=`curl -I -s -w "%{http_code}" -o /dev/null $DETECT_URL` + if [ $HTTP_CODE = 200 ]; then return 0 else return 1 diff --git a/hugegraph-dist/src/assembly/travis/mysql.cnf b/hugegraph-dist/src/assembly/travis/mysql.cnf index 44c8aceeea..2add851e75 100644 --- a/hugegraph-dist/src/assembly/travis/mysql.cnf +++ b/hugegraph-dist/src/assembly/travis/mysql.cnf @@ -6,7 +6,7 @@ character_set_server="utf8" collation_server="utf8_bin" # Ensure operations involving astral characters fail loudly, -# rather than mysql silently replacing each each byte of the +# rather than mysql silently replacing each byte of the # original character with a U+FFFD replacement character. # See bug 1275425. sql_mode="NO_ENGINE_SUBSTITUTION,STRICT_ALL_TABLES" diff --git a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example2.java b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example2.java index 7be6470b03..28588c0912 100644 --- a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example2.java +++ b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example2.java @@ -57,9 +57,9 @@ public static void traversal(final HugeGraph graph) { GraphTraversalSource g = graph.traversal(); - GraphTraversal vertexs = g.V(); + GraphTraversal vertices = g.V(); System.out.println(">>>> query all vertices: size=" + - vertexs.toList().size()); + vertices.toList().size()); List edges = g.E().toList(); System.out.println(">>>> query all edges: size=" + diff --git a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample1.java b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample1.java index 1349f1c816..83a385d310 100644 --- a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample1.java +++ b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample1.java @@ -90,10 +90,10 @@ protected void testInsert(GraphManager graph, int times, int multiple) { Random random = new Random(); int age = random.nextInt(70); String name = "P" + random.nextInt(); - Vertex vetex = graph.addVertex(T.label, "person", - "name", name, "age", age); - personIds.add(vetex.id()); - LOG.debug("Add person: {}", vetex); + Vertex vertex = graph.addVertex(T.label, "person", + "name", name, "age", age); + personIds.add(vertex.id()); + LOG.debug("Add person: {}", vertex); } LOG.debug("============== random software vertex ============"); @@ -101,11 +101,11 @@ protected void testInsert(GraphManager graph, int times, int multiple) { Random random = new Random(); int price = random.nextInt(10000) + 1; String name = "S" + random.nextInt(); - Vertex vetex = graph.addVertex(T.label, "software", - "name", name, "lang", "java", - "price", price); - softwareIds.add(vetex.id()); - LOG.debug("Add software: {}", vetex); + Vertex vertex = graph.addVertex(T.label, "software", + "name", name, "lang", "java", + "price", price); + softwareIds.add(vertex.id()); + LOG.debug("Add software: {}", vertex); } LOG.debug("========== random knows & created edges =========="); diff --git a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample2.java b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample2.java index b543a7797a..fb17ba85bf 100644 --- a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample2.java +++ b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExample2.java @@ -79,16 +79,16 @@ protected void testInsert(GraphManager graph, int times, int multiple) { for (int time = 0; time < times; time++) { LOG.debug("============== random person vertex ==============="); for (int i = 0; i < PERSON_NUM * multiple; i++) { - Vertex vetex = graph.addVertex(T.label, "person"); - personIds.add(vetex.id()); - LOG.debug("Add person: {}", vetex); + Vertex vertex = graph.addVertex(T.label, "person"); + personIds.add(vertex.id()); + LOG.debug("Add person: {}", vertex); } LOG.debug("============== random software vertex ============"); for (int i = 0; i < SOFTWARE_NUM * multiple; i++) { - Vertex vetex = graph.addVertex(T.label, "software"); - softwareIds.add(vetex.id()); - LOG.debug("Add software: {}", vetex); + Vertex vertex = graph.addVertex(T.label, "software"); + softwareIds.add(vertex.id()); + LOG.debug("Add software: {}", vertex); } LOG.debug("========== random knows & created edges =========="); diff --git a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExampleBase.java b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExampleBase.java index 61a91b50e8..ab87559f8d 100644 --- a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExampleBase.java +++ b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExampleBase.java @@ -222,14 +222,14 @@ protected void testQueryVertex(GraphManager graph, continue; } - LOG.debug("Qeury vertex {}: {}", i, id); + LOG.debug("Query vertex {}: {}", i, id); Vertex vertex = graph.queryVertex(id); if (!vertex.id().equals(id)) { - LOG.warn("Qeury vertex by id {} returned {}", id, vertex); + LOG.warn("Query vertex by id {} returned {}", id, vertex); } total++; } - LOG.debug("Qeury vertices with thread({}): {}", thread, total); + LOG.debug("Query vertices with thread({}): {}", thread, total); } protected void testQueryEdge(GraphManager graph, @@ -248,7 +248,7 @@ protected void testQueryEdge(GraphManager graph, continue; } - LOG.debug("Qeury vertex {}: {}", i, id); + LOG.debug("Query vertex {}: {}", i, id); Iterator edges = graph.queryVertexEdge(id, Directions.OUT); while (edges.hasNext()) { totalE++; @@ -256,7 +256,7 @@ protected void testQueryEdge(GraphManager graph, } totalV++; } - LOG.debug("Qeury edges of vertices({}) with thread({}): {}", + LOG.debug("Query edges of vertices({}) with thread({}): {}", totalV, thread, totalE); } diff --git a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/TaskExample.java b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/TaskExample.java index c30d1a8ea0..8fd7a49ca4 100644 --- a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/TaskExample.java +++ b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/TaskExample.java @@ -98,7 +98,7 @@ public static class TestTask extends TaskCallable { @Override public Integer call() throws Exception { - System.out.println(">>>> runing task with parameter: " + + System.out.println(">>>> running task with parameter: " + this.task().input()); for (int i = this.task().progress(); i <= 100 && this.run; i++) { System.out.println(">>>> progress " + i); diff --git a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java index be4b3187c3..5037749c49 100644 --- a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java +++ b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java @@ -87,7 +87,7 @@ public class HbaseSessions extends BackendSessionPool { private static final String COPROCESSOR_AGGR = "org.apache.hadoop.hbase.coprocessor.AggregateImplementation"; - private static final long SCANNER_CACHEING = 1000L; + private static final long SCANNER_CACHING = 1000L; private final String namespace; private Connection hbase; @@ -113,7 +113,7 @@ private AggregationClient aggregationClient() { hConfig = HBaseConfiguration.create(hConfig); long timeout = this.config().get(HbaseOptions.AGGR_TIMEOUT); hConfig.setLong("hbase.rpc.timeout", timeout * 1000L); - hConfig.setLong("hbase.client.scanner.caching", SCANNER_CACHEING); + hConfig.setLong("hbase.client.scanner.caching", SCANNER_CACHING); return new AggregationClient(hConfig); } @@ -373,11 +373,11 @@ public default R scan(String table, byte[] prefix) { } /** - * Scan records by multi rowkey prefixs from a table + * Scan records by multi rowkey prefixes from a table */ - public default R scan(String table, Set prefixs) { + public default R scan(String table, Set prefixes) { FilterList orFilters = new FilterList(Operator.MUST_PASS_ONE); - for (byte[] prefix : prefixs) { + for (byte[] prefix : prefixes) { FilterList andFilters = new FilterList(Operator.MUST_PASS_ALL); List ranges = new ArrayList<>(); ranges.add(new RowRange(prefix, true, null, true)); diff --git a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseTable.java b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseTable.java index 20fc6c218b..43a5c008f5 100644 --- a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseTable.java +++ b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseTable.java @@ -77,11 +77,11 @@ public class HbaseTable extends BackendTable { protected static final byte[] CF = "f".getBytes(); - private final HbaseShardSpliter shardSpliter; + private final HbaseShardSplitter shardSplitter; public HbaseTable(String table) { super(table); - this.shardSpliter = new HbaseShardSpliter(this.table()); + this.shardSplitter = new HbaseShardSplitter(this.table()); } public static List cfs() { @@ -94,7 +94,7 @@ protected void registerMetaHandlers() { E.checkArgument(args.length == 1, "The args count of %s must be 1", meta); long splitSize = (long) args[0]; - return this.shardSpliter.getSplits(session, splitSize); + return this.shardSplitter.getSplits(session, splitSize); }); } @@ -245,8 +245,8 @@ protected R queryByCond(HbaseSession session, ConditionQuery query) { protected R queryByRange(HbaseSession session, Shard shard, String page) { - byte[] start = this.shardSpliter.position(shard.start()); - byte[] end = this.shardSpliter.position(shard.end()); + byte[] start = this.shardSplitter.position(shard.start()); + byte[] end = this.shardSplitter.position(shard.end()); if (page != null && !page.isEmpty()) { byte[] position = PageState.fromString(page).position(); E.checkArgument(start == null || @@ -286,9 +286,9 @@ protected void parseRowColumns(Result row, BackendEntry entry, Query query) } } - private static class HbaseShardSpliter extends ShardSpliter { + private static class HbaseShardSplitter extends ShardSplitter { - public HbaseShardSpliter(String table) { + public HbaseShardSplitter(String table) { super(table); } diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSerializer.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSerializer.java index 8d9f703c51..adb3bb41fe 100644 --- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSerializer.java +++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSerializer.java @@ -128,7 +128,7 @@ protected void formatProperties(HugeElement element, protected void parseProperties(HugeElement element, TableBackendEntry.Row row) { String properties = row.column(HugeKeys.PROPERTIES); - // Query edge will wraped by a vertex, whose properties is empty + // Query edge will wrapped by a vertex, whose properties is empty if (properties.isEmpty()) { return; } diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTable.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTable.java index 5942712e76..f872b6f56a 100644 --- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTable.java +++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTable.java @@ -65,14 +65,14 @@ public abstract class MysqlTable private String insertTemplateTtl; private String deleteTemplate; - private final MysqlShardSpliter shardSpliter; + private final MysqlShardSplitter shardSplitter; public MysqlTable(String table) { super(table); this.insertTemplate = null; this.insertTemplateTtl = null; this.deleteTemplate = null; - this.shardSpliter = new MysqlShardSpliter(this.table()); + this.shardSplitter = new MysqlShardSplitter(this.table()); } @Override @@ -81,7 +81,7 @@ protected void registerMetaHandlers() { E.checkArgument(args.length == 1, "The args count of %s must be 1", meta); long splitSize = (long) args[0]; - return this.shardSpliter.getSplits(session, splitSize); + return this.shardSplitter.getSplits(session, splitSize); }); } @@ -445,8 +445,8 @@ protected StringBuilder queryByRange(ConditionQuery query, Shard shard = (Shard) scan.value(); String page = query.page(); - if (MysqlShardSpliter.START.equals(shard.start()) && - MysqlShardSpliter.END.equals(shard.end()) && + if (MysqlShardSplitter.START.equals(shard.start()) && + MysqlShardSplitter.END.equals(shard.end()) && (page == null || page.isEmpty())) { this.wrapLimit(select, query); return select; @@ -459,7 +459,7 @@ protected StringBuilder queryByRange(ConditionQuery query, this.wrapPage(select, query, true); // < end WhereBuilder where = this.newWhereBuilder(false); - if (!MysqlShardSpliter.END.equals(shard.end())) { + if (!MysqlShardSplitter.END.equals(shard.end())) { where.and(); where.lt(formatKey(partitionKey), shard.end()); } @@ -468,12 +468,12 @@ protected StringBuilder queryByRange(ConditionQuery query, // >= start WhereBuilder where = this.newWhereBuilder(); boolean hasStart = false; - if (!MysqlShardSpliter.START.equals(shard.start())) { + if (!MysqlShardSplitter.START.equals(shard.start())) { where.gte(formatKey(partitionKey), shard.start()); hasStart = true; } // < end - if (!MysqlShardSpliter.END.equals(shard.end())) { + if (!MysqlShardSplitter.END.equals(shard.end())) { if (hasStart) { where.and(); } @@ -698,14 +698,14 @@ public static List formatKeys(List keys) { return names; } - private static class MysqlShardSpliter extends ShardSpliter { + private static class MysqlShardSplitter extends ShardSplitter { private static final String BASE64 = "0123456789=?ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz"; private static final int COUNT = 64; - public MysqlShardSpliter(String table) { + public MysqlShardSplitter(String table) { super(table); } diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java index 5a7fd7da19..24dd11b8b9 100644 --- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java +++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java @@ -192,8 +192,8 @@ public WhereBuilder and(List clauses) { int size = clauses.size(); int i = 0; - for (StringBuilder cluase : clauses) { - this.builder.append(cluase); + for (StringBuilder clause : clauses) { + this.builder.append(clause); if (++i != size) { this.builder.append(" AND "); } @@ -204,7 +204,7 @@ public WhereBuilder and(List clauses) { /** * Concat as: key in (value1, value2...) * @param key the key to be concatted with 'IN' operator - * @param values the values to be concated with ',' and wappred by '()' + * @param values the values to be concated with ',' and wrapped by '()' * @return WhereBuilder */ public WhereBuilder in(String key, List values) { diff --git a/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloOptions.java b/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloOptions.java index b2bac23b2c..7fcd53daac 100644 --- a/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloOptions.java +++ b/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloOptions.java @@ -86,7 +86,7 @@ public static synchronized PaloOptions instance() { public static final ConfigOption PALO_POLL_INTERVAL = new ConfigOption<>( "palo.poll_interval", - "The execution peroid of the background thread that " + + "The execution period of the background thread that " + "check whether need to load file data into Palo.", rangeInt(5, Integer.MAX_VALUE), 5 diff --git a/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlSessions.java b/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlSessions.java index 24eaf869fb..35cad1a58b 100644 --- a/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlSessions.java +++ b/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlSessions.java @@ -72,7 +72,7 @@ public void createDatabase() { try { conn.createStatement().execute(sql); } catch (PSQLException e) { - // CockroackDB not support 'template' arg of CREATE DATABASE + // CockroachDB not support 'template' arg of CREATE DATABASE if (e.getMessage().contains("syntax error at or near " + "\"template\"")) { sql = String.format(COCKROACH_DB_CREATE, this.database()); diff --git a/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBStore.java b/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBStore.java index c041888871..2db4547c81 100644 --- a/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBStore.java +++ b/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBStore.java @@ -505,7 +505,7 @@ public Iterator query(Query query) { iterators.add(table.query(this.session(HugeType.OLAP), q)); } entries = new MergeIterator<>(entries, iterators, - BackendEntry::mergable); + BackendEntry::mergeable); } return entries; } finally { diff --git a/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTable.java b/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTable.java index 576b9e3352..639e69debe 100644 --- a/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTable.java +++ b/hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTable.java @@ -62,11 +62,11 @@ public class RocksDBTable extends BackendTable { private static final Logger LOG = Log.logger(RocksDBStore.class); - private final RocksDBShardSpliter shardSpliter; + private final RocksDBShardSplitter shardSplitter; public RocksDBTable(String database, String table) { super(String.format("%s+%s", database, table)); - this.shardSpliter = new RocksDBShardSpliter(this.table()); + this.shardSplitter = new RocksDBShardSplitter(this.table()); } @Override @@ -75,7 +75,7 @@ protected void registerMetaHandlers() { E.checkArgument(args.length == 1, "The args count of %s must be 1", meta); long splitSize = (long) args[0]; - return this.shardSpliter.getSplits(session, splitSize); + return this.shardSplitter.getSplits(session, splitSize); }); } @@ -261,8 +261,8 @@ protected BackendColumnIterator queryByCond(Session session, protected BackendColumnIterator queryByRange(Session session, Shard shard, String page) { - byte[] start = this.shardSpliter.position(shard.start()); - byte[] end = this.shardSpliter.position(shard.end()); + byte[] start = this.shardSplitter.position(shard.start()); + byte[] end = this.shardSplitter.position(shard.end()); if (page != null && !page.isEmpty()) { byte[] position = PageState.fromString(page).position(); E.checkArgument(start == null || @@ -271,7 +271,7 @@ protected BackendColumnIterator queryByRange(Session session, Shard shard, start = position; } if (start == null) { - start = ShardSpliter.START_BYTES; + start = ShardSplitter.START_BYTES; } int type = Session.SCAN_GTE_BEGIN; if (end != null) { @@ -304,14 +304,14 @@ protected static final long sizeOfBackendEntry(BackendEntry entry) { return BinaryEntryIterator.sizeOfEntry(entry); } - private static class RocksDBShardSpliter extends ShardSpliter { + private static class RocksDBShardSplitter extends ShardSplitter { private static final String MEM_SIZE = "rocksdb.size-all-mem-tables"; private static final String SST_SIZE = "rocksdb.total-sst-files-size"; private static final String NUM_KEYS = "rocksdb.estimate-num-keys"; - public RocksDBShardSpliter(String table) { + public RocksDBShardSplitter(String table) { super(table); } diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/api/BaseApiTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/api/BaseApiTest.java index 9a67432de5..7ccb75b723 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/api/BaseApiTest.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/api/BaseApiTest.java @@ -448,7 +448,7 @@ protected static Map listAllVertexName2Ids() { List vertices = readList(content, "vertices", Map.class); - Map vertextName2Ids = new HashMap<>(); + Map vertexName2Ids = new HashMap<>(); for (Map vertex : vertices) { Map properties = (Map) vertex.get("properties"); if (properties == null || @@ -466,10 +466,10 @@ protected static Map listAllVertexName2Ids() { continue; } - vertextName2Ids.put(name, id); + vertexName2Ids.put(name, id); } - return vertextName2Ids; + return vertexName2Ids; } protected static String id2Json(String params) { diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/core/EdgeCoreTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/core/EdgeCoreTest.java index 51147737b4..123e6d1dfc 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/core/EdgeCoreTest.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/core/EdgeCoreTest.java @@ -2634,7 +2634,7 @@ public void testQueryEdgesByIdWithGraphAPI() { } @Test - public void testQueryEdgesByIdWithGraphAPIAndNotCommitedUpdate() { + public void testQueryEdgesByIdWithGraphAPIAndNotCommittedUpdate() { HugeGraph graph = graph(); init18Edges(); @@ -2655,7 +2655,7 @@ public void testQueryEdgesByIdWithGraphAPIAndNotCommitedUpdate() { } @Test - public void testQueryEdgesByIdWithGraphAPIAndNotCommitedRemoved() { + public void testQueryEdgesByIdWithGraphAPIAndNotCommittedRemoved() { HugeGraph graph = graph(); init18Edges(); @@ -3310,7 +3310,7 @@ public void testQueryAdjacentVerticesOfEdgesWithInvalidVertexLabel() Assert.assertEquals("designer", vertices.get(0).label()); Assert.assertThrows(HugeException.class, () -> { - // try to override vertex designer-456 wirh programmer-456 + // try to override vertex designer-456 with programmer-456 graph.addVertex(T.label, "programmer", T.id, "456", "name", "marko", "age", 20, "city", "Beijing"); graph.tx().commit(); @@ -3326,7 +3326,7 @@ public void testQueryAdjacentVerticesOfEdgesWithInvalidVertexLabel() "checkCustomVertexExist", false); params().graphEventHub().notify(Events.CACHE, "clear", null).get(); try { - // override vertex designer-456 wirh programmer-456 + // override vertex designer-456 with programmer-456 graph.addVertex(T.label, "programmer", T.id, "456", "name", "marko", "age", 21, "city", "Beijing"); graph.tx().commit(); @@ -5147,8 +5147,8 @@ public void testScanEdgeInPaging() { query.scan(String.valueOf(Long.MIN_VALUE), String.valueOf(Long.MAX_VALUE)); } else { - query.scan(BackendTable.ShardSpliter.START, - BackendTable.ShardSpliter.END); + query.scan(BackendTable.ShardSplitter.START, + BackendTable.ShardSplitter.END); } query.limit(1); diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/core/MultiGraphsTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/core/MultiGraphsTest.java index 7000d31c8d..a63b29548e 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/core/MultiGraphsTest.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/core/MultiGraphsTest.java @@ -63,7 +63,7 @@ public void testCreateMultiGraphs() { graph.initBackend(); graph.clearBackend(); } - destoryGraphs(graphs); + destroyGraphs(graphs); } @Test @@ -184,7 +184,7 @@ public void testCopySchemaWithMultiGraphs() { for (HugeGraph graph : graphs) { graph.clearBackend(); } - destoryGraphs(graphs); + destroyGraphs(graphs); } @Test @@ -211,7 +211,7 @@ public void testCopySchemaWithMultiGraphsWithConflict() { for (HugeGraph graph : graphs) { graph.clearBackend(); } - destoryGraphs(graphs); + destroyGraphs(graphs); } @Test @@ -273,7 +273,7 @@ public void testCreateGraphsWithSameName() { g2.clearBackend(); g3.clearBackend(); - destoryGraphs(ImmutableList.of(g1, g2, g3)); + destroyGraphs(ImmutableList.of(g1, g2, g3)); } @Test @@ -301,7 +301,7 @@ public void testCreateGraphsWithDifferentNameDifferentBackends() { g2.clearBackend(); graph.clearBackend(); - destoryGraphs(ImmutableList.of(g1, g2, graph)); + destroyGraphs(ImmutableList.of(g1, g2, graph)); } @Test @@ -343,7 +343,7 @@ public void testCreateGraphsWithMultiDisksForRocksDB() { root.getMessage()); }); - destoryGraphs(ImmutableList.of(g1)); + destroyGraphs(ImmutableList.of(g1)); } private static List openGraphs(String... graphNames) { @@ -355,7 +355,7 @@ private static List openGraphs(String... graphNames) { return graphs; } - private static void destoryGraphs(List graphs) { + private static void destroyGraphs(List graphs) { for (HugeGraph graph : graphs) { try { graph.close(); diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/core/VertexCoreTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/core/VertexCoreTest.java index 674f0e1ec5..2fdb5fcb5b 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/core/VertexCoreTest.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/core/VertexCoreTest.java @@ -231,7 +231,7 @@ public void testAddVertexWithInvalidPropertyType() { } @Test - public void testAddVertexWithInvalidPropertValueOfInt() { + public void testAddVertexWithInvalidPropertyValueOfInt() { HugeGraph graph = graph(); SchemaManager schema = graph.schema(); @@ -256,7 +256,7 @@ public void testAddVertexWithInvalidPropertValueOfInt() { } @Test - public void testAddVertexWithInvalidPropertValueOfLong() { + public void testAddVertexWithInvalidPropertyValueOfLong() { HugeGraph graph = graph(); SchemaManager schema = graph.schema(); @@ -276,7 +276,7 @@ public void testAddVertexWithInvalidPropertValueOfLong() { } @Test - public void testAddVertexWithInvalidPropertValueOfFloat() { + public void testAddVertexWithInvalidPropertyValueOfFloat() { HugeGraph graph = graph(); SchemaManager schema = graph.schema(); @@ -298,7 +298,7 @@ public void testAddVertexWithInvalidPropertValueOfFloat() { } @Test - public void testAddVertexWithInvalidPropertValueOfDouble() { + public void testAddVertexWithInvalidPropertyValueOfDouble() { HugeGraph graph = graph(); SchemaManager schema = graph.schema(); @@ -2952,7 +2952,7 @@ public void testQueryByIdWithGraphAPI() { } @Test - public void testQueryByIdWithGraphAPIAndNotCommitedUpdate() { + public void testQueryByIdWithGraphAPIAndNotCommittedUpdate() { HugeGraph graph = graph(); init10Vertices(); @@ -2975,7 +2975,7 @@ public void testQueryByIdWithGraphAPIAndNotCommitedUpdate() { } @Test - public void testQueryByIdWithGraphAPIAndNotCommitedRemoved() { + public void testQueryByIdWithGraphAPIAndNotCommittedRemoved() { HugeGraph graph = graph(); init10Vertices(); @@ -3692,7 +3692,7 @@ public void testQueryByIntPropUsingBetweenAfterPropOverride() { .remove(); // avoid merge property mode graph.tx().commit(); - // qeury again after commit + // query again after commit vertices = graph.traversal().V().hasLabel("person") .has("age", P.between(-1, 21)).toList(); Assert.assertEquals(3, vertices.size()); @@ -7408,8 +7408,8 @@ public void testScanVertexInPaging() { query.scan(String.valueOf(Long.MIN_VALUE), String.valueOf(Long.MAX_VALUE)); } else { - query.scan(BackendTable.ShardSpliter.START, - BackendTable.ShardSpliter.END); + query.scan(BackendTable.ShardSplitter.START, + BackendTable.ShardSplitter.END); } query.limit(1); @@ -7835,7 +7835,7 @@ public void testQueryByPageWithCapacityAndNoLimit() { Assert.assertThrows(IllegalArgumentException.class, () -> { /* * When query vertices/edge in page, the limit will be regard - * as page size, it shoudn't exceed capacity + * as page size, it shouldn't exceed capacity */ g.V().has("~page", "").limit(capacity + 1).toList(); }); diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/cassandra/CassandraTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/cassandra/CassandraTest.java index 31e236909b..b9dcab3913 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/cassandra/CassandraTest.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/cassandra/CassandraTest.java @@ -49,7 +49,7 @@ public void teardown() { } @Test - public void testParseRepilcaWithSimpleStrategy() { + public void testParseReplicaWithSimpleStrategy() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -73,7 +73,7 @@ public void testParseRepilcaWithSimpleStrategy() { } @Test - public void testParseRepilcaWithNetworkTopologyStrategy() { + public void testParseReplicaWithNetworkTopologyStrategy() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -98,7 +98,7 @@ public void testParseRepilcaWithNetworkTopologyStrategy() { } @Test - public void testParseRepilcaWithSimpleStrategyAndEmptyReplica() { + public void testParseReplicaWithSimpleStrategyAndEmptyReplica() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -117,7 +117,7 @@ public void testParseRepilcaWithSimpleStrategyAndEmptyReplica() { } @Test - public void testParseRepilcaWithSimpleStrategyAndDoubleReplica() { + public void testParseReplicaWithSimpleStrategyAndDoubleReplica() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -136,7 +136,7 @@ public void testParseRepilcaWithSimpleStrategyAndDoubleReplica() { } @Test - public void testParseRepilcaWithSimpleStrategyAndStringReplica() { + public void testParseReplicaWithSimpleStrategyAndStringReplica() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -155,7 +155,7 @@ public void testParseRepilcaWithSimpleStrategyAndStringReplica() { } @Test - public void testParseRepilcaWithNetworkTopologyStrategyAndStringReplica() { + public void testParseReplicaWithNetworkTopologyStrategyAndStringReplica() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -174,7 +174,7 @@ public void testParseRepilcaWithNetworkTopologyStrategyAndStringReplica() { } @Test - public void testParseRepilcaWithNetworkTopologyStrategyWithoutDatacenter() { + public void testParseReplicaWithNetworkTopologyStrategyWithoutDatacenter() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -193,7 +193,7 @@ public void testParseRepilcaWithNetworkTopologyStrategyWithoutDatacenter() { } @Test - public void testParseRepilcaWithNetworkTopologyStrategyAndEmptyReplica() { + public void testParseReplicaWithNetworkTopologyStrategyAndEmptyReplica() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); @@ -212,7 +212,7 @@ public void testParseRepilcaWithNetworkTopologyStrategyAndEmptyReplica() { } @Test - public void testParseRepilcaWithNetworkTopologyStrategyAndDoubleReplica() { + public void testParseReplicaWithNetworkTopologyStrategyAndDoubleReplica() { String strategy = CassandraOptions.CASSANDRA_STRATEGY.name(); String replica = CassandraOptions.CASSANDRA_REPLICATION.name(); diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/RangeTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/RangeTest.java index d7b16b5f3a..45c63dd6ea 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/RangeTest.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/RangeTest.java @@ -26,7 +26,7 @@ import org.junit.Before; import org.junit.Test; -import com.baidu.hugegraph.backend.store.BackendTable.ShardSpliter.Range; +import com.baidu.hugegraph.backend.store.BackendTable.ShardSplitter.Range; import com.baidu.hugegraph.backend.store.Shard; import com.baidu.hugegraph.testutil.Assert; diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/util/StringEncodingTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/util/StringEncodingTest.java index a127e7cfc9..6eb5ce9c6f 100644 Binary files a/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/util/StringEncodingTest.java and b/hugegraph-test/src/main/java/com/baidu/hugegraph/unit/util/StringEncodingTest.java differ