diff --git a/.gitignore b/.gitignore
index f7bcdbf5a..782c85270 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,6 +64,7 @@ output/
*.tar.gz
tree.txt
*.versionsBackup
+.flattened-pom.xml
# eclipse ignore
.settings/
diff --git a/hugegraph-api/pom.xml b/hugegraph-api/pom.xml
index d7f2ce7b3..bdf5c3e59 100644
--- a/hugegraph-api/pom.xml
+++ b/hugegraph-api/pom.xml
@@ -19,23 +19,28 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ org.apache.hugegraph
hugegraph
- com.baidu.hugegraph
- 0.13.0
+ ${revision}
+ ../pom.xml
4.0.0
hugegraph-api
+
+ 1.0.0
+
+
- com.baidu.hugegraph
+ org.apache.hugegraph
hugegraph-core
- ${project.version}
+ ${hugegraph-core-version}
- com.baidu.hugegraph
+ org.apache.hugegraph
hugegraph-rpc
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeFactoryAuthProxy.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeFactoryAuthProxy.java
deleted file mode 100644
index 2fd14536d..000000000
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeFactoryAuthProxy.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.auth;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeFactory;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.StandardHugeGraph;
-import com.baidu.hugegraph.backend.cache.CacheManager;
-import com.baidu.hugegraph.backend.tx.AbstractTransaction;
-import com.baidu.hugegraph.concurrent.LockManager;
-import com.baidu.hugegraph.license.LicenseVerifier;
-import com.baidu.hugegraph.metrics.ServerReporter;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.SchemaManager;
-import com.baidu.hugegraph.schema.builder.EdgeLabelBuilder;
-import com.baidu.hugegraph.schema.builder.IndexLabelBuilder;
-import com.baidu.hugegraph.schema.builder.PropertyKeyBuilder;
-import com.baidu.hugegraph.schema.builder.VertexLabelBuilder;
-import com.baidu.hugegraph.serializer.JsonSerializer;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.task.HugeTask;
-import com.baidu.hugegraph.task.StandardTaskScheduler;
-import com.baidu.hugegraph.task.TaskCallable;
-import com.baidu.hugegraph.task.TaskCallable.SysTaskCallable;
-import com.baidu.hugegraph.task.TaskManager;
-import com.baidu.hugegraph.traversal.optimize.HugeCountStepStrategy;
-import com.baidu.hugegraph.traversal.optimize.HugeGraphStepStrategy;
-import com.baidu.hugegraph.traversal.optimize.HugeVertexStepStrategy;
-import com.baidu.hugegraph.util.Reflection;
-import com.baidu.hugegraph.variables.HugeVariables;
-import com.google.common.collect.ImmutableSet;
-import org.apache.commons.configuration2.Configuration;
-
-public final class HugeFactoryAuthProxy {
-
- public static final String GRAPH_FACTORY =
- "gremlin.graph=com.baidu.hugegraph.auth.HugeFactoryAuthProxy";
-
- private static final Set PROTECT_METHODS = ImmutableSet.of(
- "instance");
-
- private static final Map GRAPHS = new HashMap<>();
-
- static {
- HugeGraphAuthProxy.setContext(HugeGraphAuthProxy.Context.admin());
- HugeFactoryAuthProxy.registerPrivateActions();
- }
-
- public static synchronized HugeGraph open(Configuration config) {
- /*
- * Inject authentication (replace HugeGraph with HugeGraphAuthProxy)
- * TODO: Add verify to StandardHugeGraph() to prevent dynamic creation
- */
- HugeGraph graph = HugeFactory.open(config);
- HugeGraph proxy = GRAPHS.get(graph);
- if (proxy == null) {
- proxy = new HugeGraphAuthProxy(graph);
- GRAPHS.put(graph, proxy);
- }
- return proxy;
- }
-
- private static void registerPrivateActions() {
- // Thread
- Reflection.registerFieldsToFilter(java.lang.Thread.class, "name", "priority", "threadQ", "eetop", "single_step", "daemon", "stillborn", "target", "group", "contextClassLoader", "inheritedAccessControlContext", "threadInitNumber", "threadLocals", "inheritableThreadLocals", "stackSize", "nativeParkEventPointer", "tid", "threadSeqNumber", "threadStatus", "parkBlocker", "blocker", "blockerLock", "EMPTY_STACK_TRACE", "SUBCLASS_IMPLEMENTATION_PERMISSION", "uncaughtExceptionHandler", "defaultUncaughtExceptionHandler", "threadLocalRandomSeed", "threadLocalRandomSecondarySeed");
- Reflection.registerMethodsToFilter(java.lang.Thread.class, "exit", "dispatchUncaughtException", "clone", "isInterrupted", "registerNatives", "init", "init", "nextThreadNum", "nextThreadID", "blockedOn", "start0", "isCCLOverridden", "auditSubclass", "dumpThreads", "getThreads", "processQueue", "setPriority0", "stop0", "suspend0", "resume0", "interrupt0", "setNativeName");
- Reflection.registerFieldsToFilter(java.lang.ThreadLocal.class, "threadLocalHashCode", "nextHashCode", "HASH_INCREMENT");
- Reflection.registerMethodsToFilter(java.lang.ThreadLocal.class, "access$400", "createInheritedMap", "nextHashCode", "initialValue", "setInitialValue", "getMap", "createMap", "childValue");
- Reflection.registerMethodsToFilter(java.lang.InheritableThreadLocal.class, "getMap", "createMap", "childValue");
-
- // HugeGraph
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.StandardAuthenticator.class, "graph");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.StandardAuthenticator.class, "initAdminUser", "inputPassword", "graph");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.ConfigAuthenticator.class, "tokens");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeFactoryAuthProxy.class, "PROTECT_METHODS");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.HugeFactoryAuthProxy.class, "genRegisterPrivateActions", "registerClass", "registerPrivateActions", "registerPrivateActions", "c");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeAuthenticator.User.class, "role", "client");
- Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.server.auth.AuthenticatedUser.class, "name");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.class, "LOG", "hugegraph", "taskScheduler", "authManager", "contexts", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.class, "lambda$0", "access$3", "access$4", "access$2", "access$5", "resetContext", "logUser", "verifyAdminPermission", "verifyStatusPermission", "verifyPermission", "verifySchemaPermission", "verifySchemaPermission", "verifySchemaPermission", "verifySchemaPermission", "verifyNamePermission", "verifyNameExistsPermission", "verifyElemPermission", "verifyElemPermission", "verifyElemPermission", "verifyElemPermission", "verifyResPermission", "verifyResPermission", "verifyUserPermission", "verifyUserPermission", "verifyUserPermission", "getContextString", "access$6", "access$7", "lambda$1", "lambda$2", "lambda$3", "lambda$4", "lambda$5", "lambda$6", "lambda$7", "lambda$8", "lambda$9", "lambda$10", "lambda$11", "lambda$12", "lambda$13", "lambda$14", "lambda$15", "lambda$16", "lambda$17", "lambda$18", "lambda$19", "lambda$20", "lambda$21", "lambda$22", "lambda$23", "lambda$24", "access$8", "access$9", "access$10", "setContext", "getContext");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.AuthManagerProxy.class, "authManager", "this$0");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.AuthManagerProxy.class, "currentUsername", "updateCreator");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.TaskSchedulerProxy.class, "taskScheduler", "this$0");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.TaskSchedulerProxy.class, "lambda$0", "lambda$1", "lambda$2", "verifyTaskPermission", "verifyTaskPermission", "verifyTaskPermission", "verifyTaskPermission", "hasTaskPermission");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.GraphTraversalSourceProxy.class, "this$0");
- Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.class, "connection", "graph", "strategies", "bytecode");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.TraversalStrategiesProxy.class, "REST_WOEKER", "serialVersionUID", "strategies", "this$0");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.TraversalStrategiesProxy.class, "translate");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.VariablesProxy.class, "variables", "this$0");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.Context.class, "ADMIN", "user");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.HugeGraphAuthProxy.ContextTask.class, "runner", "context");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.StandardHugeGraph.class, "LOG", "started", "closed", "mode", "variables", "name", "params", "configuration", "schemaEventHub", "graphEventHub", "indexEventHub", "writeRateLimiter", "readRateLimiter", "taskManager", "authManager", "features", "storeProvider", "tx", "ramtable", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.StandardHugeGraph.class, "lambda$0", "access$3", "access$4", "access$2", "access$5", "access$6", "access$7", "waitUntilAllTasksCompleted", "access$8", "loadStoreProvider", "graphTransaction", "schemaTransaction", "openSchemaTransaction", "checkGraphNotClosed", "openSystemTransaction", "openGraphTransaction", "systemTransaction", "access$9", "access$10", "access$11", "access$12", "access$13", "access$14", "access$15", "access$16", "access$17", "access$18", "serializer", "loadSchemaStore", "loadSystemStore", "loadGraphStore", "closeTx", "analyzer", "serverInfoManager", "reloadRamtable", "reloadRamtable", "access$19", "access$20", "access$21");
- Reflection.registerFieldsToFilter(loadClass("com.baidu.hugegraph.StandardHugeGraph$StandardHugeGraphParams"), "graph", "this$0");
- Reflection.registerMethodsToFilter(loadClass("com.baidu.hugegraph.StandardHugeGraph$StandardHugeGraphParams"), "access$1", "graph");
- Reflection.registerFieldsToFilter(loadClass("com.baidu.hugegraph.StandardHugeGraph$TinkerPopTransaction"), "refs", "opened", "transactions", "this$0", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(loadClass("com.baidu.hugegraph.StandardHugeGraph$TinkerPopTransaction"), "lambda$0", "access$3", "access$2", "lambda$1", "graphTransaction", "schemaTransaction", "systemTransaction", "access$1", "setOpened", "doCommit", "verifyOpened", "doRollback", "doClose", "destroyTransaction", "doOpen", "setClosed", "getOrNewTransaction", "access$0", "resetState");
- Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.class, "readWriteConsumerInternal", "closeConsumerInternal", "transactionListeners");
- Reflection.registerMethodsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.class, "doClose", "fireOnCommit", "fireOnRollback", "doReadWrite", "lambda$fireOnRollback$1", "lambda$fireOnCommit$0");
- Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.class, "g");
- Reflection.registerMethodsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.class, "doCommit", "doRollback", "doClose", "doOpen", "fireOnCommit", "fireOnRollback", "doReadWrite");
- Reflection.registerFieldsToFilter(loadClass("com.baidu.hugegraph.StandardHugeGraph$Txs"), "schemaTx", "systemTx", "graphTx", "openedTime", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(loadClass("com.baidu.hugegraph.StandardHugeGraph$Txs"), "access$2", "access$1", "access$0");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.backend.tx.GraphTransaction.class, "indexTx", "addedVertices", "removedVertices", "addedEdges", "removedEdges", "addedProps", "removedProps", "updatedVertices", "updatedEdges", "updatedOldestProps", "locksTable", "checkCustomVertexExist", "checkAdjacentVertexExist", "lazyLoadAdjacentVertex", "ignoreInvalidEntry", "commitPartOfAdjacentEdges", "batchSize", "pageSize", "verticesCapacity", "edgesCapacity", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.backend.tx.GraphTransaction.class, "lambda$0", "lambda$1", "lambda$2", "lambda$3", "lambda$4", "lambda$5", "lambda$6", "lambda$7", "lambda$8", "lambda$9", "lambda$10", "lambda$11", "lambda$12", "lambda$13", "lambda$14", "lambda$15", "lambda$16", "lambda$17", "lambda$18", "lambda$19", "access$1", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "indexTransaction", "indexTransaction", "beforeWrite", "prepareCommit", "verticesInTxSize", "edgesInTxSize", "checkTxVerticesCapacity", "checkTxEdgesCapacity", "verticesInTxUpdated", "verticesInTxRemoved", "removingEdgeOwner", "prepareDeletions", "prepareDeletions", "prepareUpdates", "prepareAdditions", "checkVertexExistIfCustomizedId", "checkAggregateProperty", "checkAggregateProperty", "checkNonnullProperty", "queryEdgesFromBackend", "commitPartOfEdgeDeletions", "optimizeQueries", "checkVertexLabel", "checkId", "queryVerticesFromBackend", "joinTxVertices", "joinTxEdges", "lockForUpdateProperty", "optimizeQuery", "verifyVerticesConditionQuery", "verifyEdgesConditionQuery", "indexQuery", "joinTxRecords", "propertyUpdated", "parseEntry", "traverseByLabel", "reset", "queryVerticesByIds", "filterUnmatchedRecords", "skipOffsetOrStopLimit", "filterExpiredResultFromFromBackend", "queryEdgesByIds", "matchEdgeSortKeys", "rightResultFromIndexQuery");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.backend.tx.IndexableTransaction.class, "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.backend.tx.IndexableTransaction.class, "indexTransaction", "commit2Backend", "reset");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.backend.tx.AbstractTransaction.class, "LOG", "ownerThread", "autoCommit", "closed", "committing", "committing2Backend", "graph", "store", "mutation", "serializer", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.backend.tx.AbstractTransaction.class, "beforeWrite", "prepareCommit", "params", "mutation", "commit2Backend", "autoCommit", "beforeRead", "afterWrite", "afterRead", "commitMutation2Backend", "checkOwnerThread", "doAction", "store", "reset");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.HugeFactory.class, "LOG", "NAME_REGEX", "graphs");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.HugeFactory.class, "lambda$0");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.schema.SchemaElement.class, "graph", "id", "name", "userdata", "status");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.structure.HugeVertex.class, "EMPTY_SET", "id", "label", "edges", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.structure.HugeVertex.class, "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "newProperty", "newProperty", "tx", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys", "checkIdLength", "onUpdateProperty", "ensureFilledProperties", "clone", "clone");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.structure.HugeElement.class, "EMPTY_MAP", "MAX_PROPERTIES", "graph", "properties", "expiredTime", "removed", "fresh", "propLoaded", "defaultValueUpdated", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Cardinality");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.structure.HugeElement.class, "removed", "addProperty", "newProperty", "tx", "onUpdateProperty", "ensureFilledProperties", "propLoaded", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Cardinality", "getIdValue", "fresh", "updateToDefaultValueIfNone", "copyProperties");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.structure.HugeEdge.class, "id", "label", "name", "sourceVertex", "targetVertex", "isOutEdge", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys", "$SWITCH_TABLE$org$apache$tinkerpop$gremlin$structure$Direction");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.structure.HugeEdge.class, "checkAdjacentVertexExist", "newProperty", "newProperty", "tx", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys", "onUpdateProperty", "ensureFilledProperties", "$SWITCH_TABLE$org$apache$tinkerpop$gremlin$structure$Direction", "clone", "clone");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.structure.HugeProperty.class, "owner", "pkey", "value");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.variables.HugeVariables.class, "LOG", "VARIABLES", "VARIABLE_KEY", "VARIABLE_TYPE", "BYTE_VALUE", "BOOLEAN_VALUE", "INTEGER_VALUE", "LONG_VALUE", "FLOAT_VALUE", "DOUBLE_VALUE", "STRING_VALUE", "LIST", "SET", "TYPES", "params", "graph");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.variables.HugeVariables.class, "createPropertyKey", "queryAllVariableVertices", "queryVariableVertex", "createVariableVertex", "removeVariableVertex", "extractSingleObject", "setProperty");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.schema.SchemaManager.class, "transaction", "graph");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.schema.SchemaManager.class, "lambda$0", "lambda$1", "lambda$2", "lambda$3", "checkExists");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.schema.builder.PropertyKeyBuilder.class, "id", "name", "dataType", "cardinality", "aggregateType", "checkExist", "userdata", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.schema.builder.PropertyKeyBuilder.class, "lambda$0", "checkStableVars", "checkAggregateType", "hasSameProperties");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.schema.builder.AbstractBuilder.class, "transaction", "graph");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.schema.builder.AbstractBuilder.class, "rebuildIndex", "graph", "checkSchemaName", "validOrGenerateId", "lockCheckAndCreateSchema", "propertyKeyOrNull", "checkSchemaIdIfRestoringMode", "vertexLabelOrNull", "edgeLabelOrNull", "indexLabelOrNull", "updateSchemaStatus");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.schema.builder.VertexLabelBuilder.class, "id", "name", "idStrategy", "properties", "primaryKeys", "nullableKeys", "ttl", "ttlStartTime", "enableLabelIndex", "userdata", "checkExist", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.schema.builder.VertexLabelBuilder.class, "lambda$0", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "checkStableVars", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action", "checkProperties", "checkNullableKeys", "checkIdStrategy", "checkPrimaryKeys", "hasSameProperties", "checkTtl", "checkUserdata", "mapPkId2Name", "mapPkId2Name");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.schema.builder.EdgeLabelBuilder.class, "id", "name", "sourceLabel", "targetLabel", "frequency", "properties", "sortKeys", "nullableKeys", "ttl", "ttlStartTime", "enableLabelIndex", "userdata", "checkExist", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.schema.builder.EdgeLabelBuilder.class, "lambda$0", "checkStableVars", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action", "checkProperties", "checkNullableKeys", "checkSortKeys", "checkRelation", "hasSameProperties", "checkTtl", "checkUserdata", "mapPkId2Name", "mapPkId2Name");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.schema.builder.IndexLabelBuilder.class, "id", "name", "baseType", "baseValue", "indexType", "indexFields", "userdata", "checkExist", "rebuild", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$DataType", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IndexType");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.schema.builder.IndexLabelBuilder.class, "lambda$0", "checkStableVars", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$DataType", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IndexType", "checkBaseType", "checkIndexType", "checkFields4Range", "loadElement", "checkFields", "checkRepeatIndex", "checkRepeatIndex", "checkRepeatIndex", "checkPrimaryKeyIndex", "checkRepeatRangeIndex", "checkRepeatSearchIndex", "checkRepeatSecondaryIndex", "checkRepeatShardIndex", "checkRepeatUniqueIndex", "removeSubIndex", "hasSubIndex", "allStringIndex", "oneNumericField", "hasSameProperties");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.task.TaskManager.class, "LOG", "SCHEDULE_PERIOD", "THREADS", "MANAGER", "schedulers", "taskExecutor", "taskDbExecutor", "serverInfoDbExecutor", "schedulerExecutor", "contexts", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.task.TaskManager.class, "lambda$0", "resetContext", "closeTaskTx", "setContext", "instance", "closeSchedulerTx", "notifyNewTask", "scheduleOrExecuteJob", "scheduleOrExecuteJobForGraph");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.task.StandardTaskScheduler.class, "LOG", "graph", "serverManager", "taskExecutor", "taskDbExecutor", "eventListener", "tasks", "taskTx", "NO_LIMIT", "PAGE_SIZE", "QUERY_INTERVAL", "MAX_PENDING_TASKS", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.task.StandardTaskScheduler.class, "lambda$0", "lambda$1", "lambda$2", "lambda$3", "lambda$4", "lambda$5", "lambda$6", "lambda$7", "tx", "listenChanges", "unlistenChanges", "submitTask", "queryTask", "queryTask", "queryTask", "call", "call", "remove", "sleep", "taskDone", "serverManager", "supportsPaging", "restore", "checkOnMasterNode", "waitUntilTaskCompleted", "scheduleTasks", "executeTasksOnWorker", "cancelTasksOnWorker");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.task.HugeTask.class, "LOG", "DECOMPRESS_RATIO", "scheduler", "callable", "type", "name", "id", "parent", "dependencies", "description", "context", "create", "server", "load", "status", "progress", "update", "retries", "input", "result", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.task.HugeTask.class, "property", "scheduler", "scheduler", "asArray", "checkPropertySize", "checkPropertySize", "checkDependenciesSuccess", "toOrderSet", "done", "callable", "setException", "set", "result", "status");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.task.TaskCallable.class, "LOG", "ERROR_COMMIT", "ERROR_MESSAGES", "task", "graph", "lastSaveTime", "saveInterval");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.task.TaskCallable.class, "graph", "closeTx", "cancelled", "done", "task", "save", "needSaveWithEx");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.task.TaskCallable.SysTaskCallable.class, "params");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.task.TaskCallable.SysTaskCallable.class, "params", "params");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.StandardAuthManager.class, "CACHE_EXPIRE", "graph", "eventListener", "usersCache", "users", "groups", "targets", "belong", "access", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.StandardAuthManager.class, "lambda$0", "listenChanges", "unlistenChanges", "invalidCache", "initSchemaIfNeeded", "rolePermission", "rolePermission", "rolePermission", "cache");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.SchemaDefine.class, "graph", "label");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.SchemaDefine.class, "schema", "createPropertyKey", "createPropertyKey", "createPropertyKey", "existEdgeLabel", "createRangeIndex", "unhideField", "hideField", "existVertexLabel", "initProperties");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.EntityManager.class, "graph", "label", "deser", "NO_LIMIT", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.EntityManager.class, "toList", "graph", "tx", "commitOrRollback", "unhideLabel", "queryById", "queryEntity", "constructVertex", "save", "query");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.auth.RelationshipManager.class, "graph", "label", "deser", "NO_LIMIT", "$assertionsDisabled");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.auth.RelationshipManager.class, "lambda$0", "toList", "graph", "tx", "commitOrRollback", "unhideLabel", "queryById", "queryRelationship", "newVertex", "save");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.backend.cache.CacheManager.class, "LOG", "INSTANCE", "TIMER_TICK_PERIOD", "LOG_TICK_COST_TIME", "caches", "timer");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.backend.cache.CacheManager.class, "access$0", "scheduleTimer", "instance");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.concurrent.LockManager.class, "INSTANCE", "lockGroupMap");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.concurrent.LockManager.class, "instance");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.license.LicenseVerifier.class, "LOG", "LICENSE_PARAM_PATH", "INSTANCE", "CHECK_INTERVAL", "lastCheckTime", "verifyParam", "manager");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.license.LicenseVerifier.class, "buildVerifyParam", "initLicenseParam", "verifyPublicCert", "instance");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.metrics.ServerReporter.class, "instance", "gauges", "counters", "histograms", "meters", "timers");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.metrics.ServerReporter.class, "instance", "instance");
- Reflection.registerFieldsToFilter(com.codahale.metrics.ScheduledReporter.class, "LOG", "FACTORY_ID", "registry", "executor", "shutdownExecutorOnStop", "disabledMetricAttributes", "scheduledFuture", "filter", "durationFactor", "durationUnit", "rateFactor", "rateUnit");
- Reflection.registerMethodsToFilter(com.codahale.metrics.ScheduledReporter.class, "convertDuration", "convertRate", "getRateUnit", "getDurationUnit", "isShutdownExecutorOnStop", "getDisabledMetricAttributes", "calculateRateUnit", "createDefaultExecutor", "lambda$start$0", "start");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.serializer.JsonSerializer.class, "LBUF_SIZE", "INSTANCE");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.serializer.JsonSerializer.class, "writeIterator", "instance");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.traversal.optimize.HugeVertexStepStrategy.class, "serialVersionUID", "INSTANCE");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.traversal.optimize.HugeVertexStepStrategy.class, "instance");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.traversal.optimize.HugeGraphStepStrategy.class, "serialVersionUID", "INSTANCE");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.traversal.optimize.HugeGraphStepStrategy.class, "instance");
- Reflection.registerFieldsToFilter(com.baidu.hugegraph.traversal.optimize.HugeCountStepStrategy.class, "serialVersionUID", "INSTANCE");
- Reflection.registerMethodsToFilter(com.baidu.hugegraph.traversal.optimize.HugeCountStepStrategy.class, "lambda$0", "instance");
-
- // Enable this line to generate registration statement
- //genRegisterPrivateActions();
- }
-
- @SuppressWarnings("unused")
- private static void genRegisterPrivateActions() {
- registerPrivateActions(Thread.class);
- registerPrivateActions(ThreadLocal.class);
- registerPrivateActions(InheritableThreadLocal.class);
-
- registerPrivateActions(StandardAuthenticator.class);
- registerPrivateActions(ConfigAuthenticator.class);
- registerPrivateActions(HugeFactoryAuthProxy.class);
- registerPrivateActions(HugeAuthenticator.User.class);
-
- registerPrivateActions(HugeGraphAuthProxy.class);
- registerPrivateActions(HugeGraphAuthProxy.AuthManagerProxy.class);
- registerPrivateActions(HugeGraphAuthProxy.TaskSchedulerProxy.class);
- registerPrivateActions(HugeGraphAuthProxy.GraphTraversalSourceProxy.class);
- registerPrivateActions(HugeGraphAuthProxy.TraversalStrategiesProxy.class);
- registerPrivateActions(HugeGraphAuthProxy.VariablesProxy.class);
- registerPrivateActions(HugeGraphAuthProxy.Context.class);
- registerPrivateActions(HugeGraphAuthProxy.ContextThreadPoolExecutor.class);
- registerPrivateActions(HugeGraphAuthProxy.ContextTask.class);
-
- for (Class> clazz : StandardHugeGraph.PROTECT_CLASSES) {
- registerPrivateActions(clazz);
- }
-
- registerPrivateActions(HugeFactory.class);
- registerPrivateActions(AbstractTransaction.class);
-
- registerPrivateActions(SchemaElement.class);
- registerPrivateActions(HugeVertex.class);
- registerPrivateActions(HugeEdge.class);
- registerPrivateActions(HugeProperty.class);
- registerPrivateActions(HugeVariables.class);
-
- registerPrivateActions(SchemaManager.class);
- registerPrivateActions(PropertyKeyBuilder.class);
- registerPrivateActions(VertexLabelBuilder.class);
- registerPrivateActions(EdgeLabelBuilder.class);
- registerPrivateActions(IndexLabelBuilder.class);
-
- registerPrivateActions(TaskManager.class);
- registerPrivateActions(StandardTaskScheduler.class);
- registerPrivateActions(HugeTask.class);
- registerPrivateActions(TaskCallable.class);
- registerPrivateActions(SysTaskCallable.class);
-
- registerPrivateActions(StandardAuthManager.class);
- registerPrivateActions(SchemaDefine.class);
- registerPrivateActions(EntityManager.class);
- registerPrivateActions(RelationshipManager.class);
-
- // Don't shield them because need to access by auth RPC
- //registerPrivateActions(HugeUser.class);
- //registerPrivateActions(RolePermission.class);
- //registerPrivateActions(HugeResource.class);
-
- registerPrivateActions(CacheManager.class);
- registerPrivateActions(LockManager.class);
- registerPrivateActions(LicenseVerifier.class);
- registerPrivateActions(ServerReporter.class);
- registerPrivateActions(JsonSerializer.class);
- registerPrivateActions(HugeVertexStepStrategy.class);
- registerPrivateActions(HugeGraphStepStrategy.class);
- registerPrivateActions(HugeCountStepStrategy.class);
- }
-
- private static void registerPrivateActions(Class> clazz) {
- while (clazz != Object.class) {
- List fields = new ArrayList<>();
- for (Field field : clazz.getDeclaredFields()) {
- if (!Modifier.isPublic(field.getModifiers())) {
- fields.add(field.getName());
- }
- }
- List methods = new ArrayList<>();
- for (Method method : clazz.getDeclaredMethods()) {
- if (!Modifier.isPublic(method.getModifiers()) ||
- PROTECT_METHODS.contains(method.getName())) {
- methods.add(method.getName());
- }
- }
- registerClass(clazz, fields, methods);
- clazz = clazz.getSuperclass();
- }
- }
-
- private static boolean registerClass(Class> clazz,
- List fields,
- List methods) {
- if (clazz.getName().startsWith("java") ||
- fields.isEmpty() && methods.isEmpty()) {
- return false;
- }
- final String[] array = new String[fields.size()];
- try {
- Reflection.registerFieldsToFilter(clazz, fields.toArray(array));
- Reflection.registerMethodsToFilter(clazz, methods.toArray(array));
- } catch (IllegalArgumentException e) {
- if (e.getMessage().contains("Filter already registered: class")) {
- return false;
- }
- throw e;
- }
-
- String code;
- code = String.format("Reflection.registerFieldsToFilter(%s.class, \"%s\");",
- clazz.getCanonicalName(), String.join("\", \"", fields));
- if (!fields.isEmpty()) {
- // CHECKSTYLE:OFF
- System.out.println(code);
- // CHECKSTYLE:ON
- }
-
- code = String.format("Reflection.registerMethodsToFilter(%s.class, \"%s\");",
- clazz.getCanonicalName(), String.join("\", \"", methods));
- if (!methods.isEmpty()) {
- // CHECKSTYLE:OFF
- System.out.println(code);
- // CHECKSTYLE:ON
- }
-
- return true;
- }
-
- private static Class> loadClass(String clazz) {
- try {
- return Class.forName(clazz);
- } catch (ClassNotFoundException e) {
- throw new HugeException(e.getMessage(), e);
- }
- }
-}
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java
index ab84acad2..e453ea1e7 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api;
+package org.apache.hugegraph.api;
import java.util.Collection;
import java.util.Map;
@@ -29,16 +29,16 @@ import jakarta.ws.rs.NotFoundException;
import jakarta.ws.rs.NotSupportedException;
import jakarta.ws.rs.core.MediaType;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
+import org.apache.hugegraph.metrics.MetricsUtil;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.metrics.MetricsUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.Meter;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/AccessAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/AccessAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java
index b616d6dd9..73e7eeb36 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/AccessAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.auth;
+package org.apache.hugegraph.api.auth;
import java.util.List;
@@ -35,19 +35,19 @@ import jakarta.ws.rs.core.Context;
import jakarta.inject.Singleton;
import jakarta.ws.rs.Path;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.auth.HugeAccess;
-import com.baidu.hugegraph.auth.HugePermission;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.auth.HugeAccess;
+import org.apache.hugegraph.auth.HugePermission;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/BelongAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/BelongAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java
index 0435c6088..94b48ef60 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/BelongAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.auth;
+package org.apache.hugegraph.api.auth;
import java.util.List;
@@ -35,18 +35,18 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import jakarta.inject.Singleton;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.auth.HugeBelong;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.auth.HugeBelong;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/GroupAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/GroupAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java
index 943a5d8bb..abfcfae64 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/GroupAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.auth;
+package org.apache.hugegraph.api.auth;
import java.util.List;
@@ -35,18 +35,18 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import jakarta.inject.Singleton;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.auth.HugeGroup;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.auth.HugeGroup;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/LoginAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java
similarity index 89%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/LoginAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java
index 08e190393..67c580d91 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/LoginAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.auth;
+package org.apache.hugegraph.api.auth;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.inject.Singleton;
@@ -36,19 +36,18 @@ import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.HttpHeaders;
import org.apache.commons.lang3.StringUtils;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.AuthenticationFilter;
-import com.baidu.hugegraph.api.filter.StatusFilter;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.auth.AuthConstant;
-import com.baidu.hugegraph.auth.UserWithRole;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.AuthenticationFilter;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.auth.AuthConstant;
+import org.apache.hugegraph.auth.UserWithRole;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
@@ -63,7 +62,7 @@ public class LoginAPI extends API {
@POST
@Timed
@Path("login")
- @Status(StatusFilter.Status.OK)
+ @Status(Status.OK)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON_WITH_CHARSET)
public String login(@Context GraphManager manager,
@@ -86,7 +85,7 @@ public class LoginAPI extends API {
@DELETE
@Timed
@Path("logout")
- @Status(StatusFilter.Status.OK)
+ @Status(Status.OK)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON_WITH_CHARSET)
public void logout(@Context GraphManager manager,
@@ -110,7 +109,7 @@ public class LoginAPI extends API {
@GET
@Timed
@Path("verify")
- @Status(StatusFilter.Status.OK)
+ @Status(Status.OK)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON_WITH_CHARSET)
public String verifyToken(@Context GraphManager manager,
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/ProjectAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/ProjectAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java
index 6ecbe8de5..ed9d5261c 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/ProjectAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.auth;
+package org.apache.hugegraph.api.auth;
import java.util.HashSet;
import java.util.List;
@@ -39,19 +39,19 @@ import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter;
-import com.baidu.hugegraph.auth.AuthManager;
-import com.baidu.hugegraph.auth.HugeProject;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.auth.AuthManager;
+import org.apache.hugegraph.auth.HugeProject;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -67,7 +67,7 @@ public class ProjectAPI extends API {
@POST
@Timed
- @StatusFilter.Status(StatusFilter.Status.CREATED)
+ @Status(Status.CREATED)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON_WITH_CHARSET)
public String create(@Context GraphManager manager,
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/TargetAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/TargetAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java
index c19facc8e..d836e1800 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/TargetAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.auth;
+package org.apache.hugegraph.api.auth;
import java.util.List;
import java.util.Map;
@@ -36,18 +36,18 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.auth.HugeTarget;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.auth.HugeTarget;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/UserAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/UserAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java
index ce4fe3b31..8dd863945 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/UserAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.auth;
+package org.apache.hugegraph.api.auth;
import java.util.List;
@@ -36,20 +36,20 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.commons.lang3.StringUtils;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.auth.HugeUser;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.auth.HugeUser;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
+import org.apache.hugegraph.util.StringEncoding;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/AuthenticationFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java
similarity index 95%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/AuthenticationFilter.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java
index 14a5690bc..33214190f 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/AuthenticationFilter.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.filter;
+package org.apache.hugegraph.api.filter;
import java.io.IOException;
import java.security.Principal;
@@ -45,14 +45,14 @@ import org.glassfish.grizzly.http.server.Request;
import org.glassfish.grizzly.utils.Charsets;
import org.slf4j.Logger;
-import com.baidu.hugegraph.auth.HugeAuthenticator;
-import com.baidu.hugegraph.auth.HugeAuthenticator.RequiredPerm;
-import com.baidu.hugegraph.auth.HugeAuthenticator.RolePerm;
-import com.baidu.hugegraph.auth.HugeAuthenticator.User;
-import com.baidu.hugegraph.auth.RolePermission;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.auth.HugeAuthenticator;
+import org.apache.hugegraph.auth.HugeAuthenticator.RequiredPerm;
+import org.apache.hugegraph.auth.HugeAuthenticator.RolePerm;
+import org.apache.hugegraph.auth.HugeAuthenticator.User;
+import org.apache.hugegraph.auth.RolePermission;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.google.common.collect.ImmutableList;
@Provider
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/CompressInterceptor.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java
similarity index 96%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/CompressInterceptor.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java
index b7c3f24cf..4a4c898c3 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/CompressInterceptor.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.filter;
+package org.apache.hugegraph.api.filter;
import java.io.IOException;
import java.io.OutputStream;
@@ -36,11 +36,12 @@ import jakarta.inject.Singleton;
import org.slf4j.Logger;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.api.filter.CompressInterceptor.Compress;
+import org.apache.hugegraph.util.Log;
@Provider
@Singleton
-@CompressInterceptor.Compress
+@Compress
public class CompressInterceptor implements WriterInterceptor {
public static final String GZIP = "gzip";
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/DecompressInterceptor.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java
similarity index 97%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/DecompressInterceptor.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java
index 496cf6ecd..6efbc43f5 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/DecompressInterceptor.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.filter;
+package org.apache.hugegraph.api.filter;
import java.io.IOException;
import java.lang.annotation.Retention;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/ExceptionFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java
similarity index 96%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/ExceptionFilter.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java
index 2b26f391b..fe9ac8dbb 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/ExceptionFilter.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.filter;
+package org.apache.hugegraph.api.filter;
import java.util.List;
import java.util.Map;
@@ -44,14 +44,14 @@ import jakarta.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.ext.Provider;
import org.apache.commons.lang3.StringUtils;
+import org.apache.hugegraph.config.ServerOptions;
import org.glassfish.hk2.api.MultiException;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.exception.HugeGremlinException;
-import com.baidu.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.exception.HugeGremlinException;
+import org.apache.hugegraph.exception.NotFoundException;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadDetectFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadDetectFilter.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java
index ba59f1ab8..f3e55c4ce 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadDetectFilter.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.filter;
+package org.apache.hugegraph.api.filter;
import java.util.List;
import java.util.Set;
@@ -31,11 +31,11 @@ import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.PathSegment;
import jakarta.ws.rs.ext.Provider;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.define.WorkLoad;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.define.WorkLoad;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.RateLimiter;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadReleaseFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadReleaseFilter.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java
index 210f996c1..6e8348997 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadReleaseFilter.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.filter;
+package org.apache.hugegraph.api.filter;
import jakarta.inject.Singleton;
import jakarta.ws.rs.container.ContainerRequestContext;
@@ -26,7 +26,7 @@ import jakarta.ws.rs.container.ContainerResponseFilter;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.ext.Provider;
-import com.baidu.hugegraph.define.WorkLoad;
+import org.apache.hugegraph.define.WorkLoad;
@Provider
@Singleton
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/StatusFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java
similarity index 97%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/StatusFilter.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java
index 3d93b9ef9..6bc89fc2f 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/StatusFilter.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.filter;
+package org.apache.hugegraph.api.filter;
import java.io.IOException;
import java.lang.annotation.Annotation;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/BatchAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java
similarity index 91%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/BatchAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java
index 515b1ca6b..b0b015b38 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/BatchAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java
@@ -17,27 +17,27 @@
* under the License.
*/
-package com.baidu.hugegraph.api.graph;
+package org.apache.hugegraph.api.graph;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.define.Checkable;
+import org.apache.hugegraph.define.UpdateStrategy;
+import org.apache.hugegraph.metrics.MetricsUtil;
+import org.apache.hugegraph.server.RestServer;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.define.UpdateStrategy;
-import com.baidu.hugegraph.metrics.MetricsUtil;
-import com.baidu.hugegraph.server.RestServer;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.Meter;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java
index 1f9e94741..08ee31aeb 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.graph;
+package org.apache.hugegraph.api.graph;
import java.util.ArrayList;
import java.util.HashMap;
@@ -46,31 +46,31 @@ import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.util.function.TriFunction;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.UpdateStrategy;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.CompressInterceptor.Compress;
-import com.baidu.hugegraph.api.filter.DecompressInterceptor.Decompress;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.EdgeId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.UpdateStrategy;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.optimize.QueryHolder;
-import com.baidu.hugegraph.traversal.optimize.TraversalUtil;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.CompressInterceptor.Compress;
+import org.apache.hugegraph.api.filter.DecompressInterceptor.Decompress;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.EdgeId;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.optimize.QueryHolder;
+import org.apache.hugegraph.traversal.optimize.TraversalUtil;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java
index 2adcee773..cb4854a85 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.graph;
+package org.apache.hugegraph.api.graph;
import java.util.ArrayList;
import java.util.Arrays;
@@ -45,31 +45,31 @@ import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.UpdateStrategy;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.CompressInterceptor.Compress;
-import com.baidu.hugegraph.api.filter.DecompressInterceptor.Decompress;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.SplicingIdGenerator;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.UpdateStrategy;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.optimize.QueryHolder;
-import com.baidu.hugegraph.traversal.optimize.Text;
-import com.baidu.hugegraph.traversal.optimize.TraversalUtil;
-import com.baidu.hugegraph.type.define.IdStrategy;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.CompressInterceptor.Compress;
+import org.apache.hugegraph.api.filter.DecompressInterceptor.Decompress;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.SplicingIdGenerator;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.optimize.QueryHolder;
+import org.apache.hugegraph.traversal.optimize.Text;
+import org.apache.hugegraph.traversal.optimize.TraversalUtil;
+import org.apache.hugegraph.type.define.IdStrategy;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/CypherAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/CypherAPI.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/CypherAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/CypherAPI.java
index 082ff6bc7..38410ee04 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/CypherAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/CypherAPI.java
@@ -17,14 +17,14 @@
* under the License.
*/
-package com.baidu.hugegraph.api.gremlin;
+package org.apache.hugegraph.api.gremlin;
import org.opencypher.gremlin.translation.TranslationFacade;
import org.slf4j.Logger;
-import com.baidu.hugegraph.api.filter.CompressInterceptor;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.api.filter.CompressInterceptor.Compress;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -49,7 +49,7 @@ public class CypherAPI extends GremlinQueryAPI {
@GET
@Timed
- @CompressInterceptor.Compress(buffer = (1024 * 40))
+ @Compress(buffer = (1024 * 40))
@Produces(APPLICATION_JSON_WITH_CHARSET)
public Response query(@PathParam("graph") String graph,
@Context HttpHeaders headers,
@@ -61,7 +61,7 @@ public class CypherAPI extends GremlinQueryAPI {
@POST
@Timed
- @CompressInterceptor.Compress
+ @Compress
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON_WITH_CHARSET)
public Response post(@PathParam("graph") String graph,
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java
index f1283f8f5..305b51e3b 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.gremlin;
+package org.apache.hugegraph.api.gremlin;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.ws.rs.Consumes;
@@ -31,9 +31,9 @@ import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.UriInfo;
-import com.baidu.hugegraph.api.filter.CompressInterceptor.Compress;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.metrics.MetricsUtil;
+import org.apache.hugegraph.api.filter.CompressInterceptor.Compress;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.metrics.MetricsUtil;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.annotation.Timed;
import jakarta.inject.Singleton;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinClient.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinClient.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java
index b2b2725f8..2dd54d4a3 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinClient.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.gremlin;
+package org.apache.hugegraph.api.gremlin;
import java.util.List;
import java.util.Map;
@@ -29,10 +29,10 @@ import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
-import com.baidu.hugegraph.api.filter.CompressInterceptor;
-import com.baidu.hugegraph.rest.AbstractRestClient;
-import com.baidu.hugegraph.testutil.Whitebox;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.api.filter.CompressInterceptor;
+import org.apache.hugegraph.rest.AbstractRestClient;
+import org.apache.hugegraph.testutil.Whitebox;
+import org.apache.hugegraph.util.E;
public class GremlinClient extends AbstractRestClient {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinQueryAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java
similarity index 93%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinQueryAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java
index 6aa0b8b98..0fd79bb24 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinQueryAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java
@@ -17,15 +17,15 @@
* under the License.
*/
-package com.baidu.hugegraph.api.gremlin;
+package org.apache.hugegraph.api.gremlin;
import java.util.Map;
import java.util.Set;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.exception.HugeGremlinException;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.exception.HugeGremlinException;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@@ -45,7 +45,7 @@ public class GremlinQueryAPI extends API {
"java.util.concurrent.TimeoutException",
"groovy.lang.",
"org.codehaus.",
- "com.baidu.hugegraph."
+ "org.apache.hugegraph."
);
@Context
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/AlgorithmAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java
similarity index 84%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/AlgorithmAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java
index b0e0d0692..baa07e191 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/AlgorithmAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java
@@ -17,23 +17,23 @@
* under the License.
*/
-package com.baidu.hugegraph.api.job;
+package org.apache.hugegraph.api.job;
import java.util.Map;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.server.RestServer;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.job.AlgorithmJob;
-import com.baidu.hugegraph.job.JobBuilder;
-import com.baidu.hugegraph.server.RestServer;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.job.AlgorithmJob;
+import org.apache.hugegraph.job.JobBuilder;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/ComputerAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java
similarity index 84%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/ComputerAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java
index f3825f893..8a2967bbd 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/ComputerAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.job;
+package org.apache.hugegraph.api.job;
import java.util.Map;
@@ -31,19 +31,19 @@ import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.job.ComputerJob;
-import com.baidu.hugegraph.job.JobBuilder;
-import com.baidu.hugegraph.task.HugeTask;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.job.ComputerJob;
+import org.apache.hugegraph.job.JobBuilder;
+import org.apache.hugegraph.task.HugeTask;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/GremlinAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/GremlinAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java
index 46039271a..5b1283e76 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/GremlinAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.job;
+package org.apache.hugegraph.api.job;
import java.nio.ByteBuffer;
import java.nio.charset.CharacterCodingException;
@@ -37,21 +37,21 @@ import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
+import org.apache.hugegraph.metrics.MetricsUtil;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.job.GremlinJob;
-import com.baidu.hugegraph.job.JobBuilder;
-import com.baidu.hugegraph.metrics.MetricsUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.job.GremlinJob;
+import org.apache.hugegraph.job.JobBuilder;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/RebuildAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java
similarity index 91%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/RebuildAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java
index fa5376ec8..54fa3bdc8 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/RebuildAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.job;
+package org.apache.hugegraph.api.job;
import java.util.Map;
@@ -30,14 +30,14 @@ import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
@@ -95,4 +95,4 @@ public class RebuildAPI extends API {
return ImmutableMap.of("task_id",
g.schema().indexLabel(name).rebuild());
}
-}
\ No newline at end of file
+}
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/TaskAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/TaskAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java
index bdd7bdc8d..e72fe5bfe 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/TaskAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.job;
+package org.apache.hugegraph.api.job;
import java.util.ArrayList;
import java.util.Arrays;
@@ -41,19 +41,19 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.groovy.util.Maps;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.page.PageInfo;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.task.HugeTask;
-import com.baidu.hugegraph.task.TaskScheduler;
-import com.baidu.hugegraph.task.TaskStatus;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.page.PageInfo;
+import org.apache.hugegraph.task.HugeTask;
+import org.apache.hugegraph.task.TaskScheduler;
+import org.apache.hugegraph.task.TaskStatus;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/tasks")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java
similarity index 90%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java
index 60ef91281..c37f41d4e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.metrics;
+package org.apache.hugegraph.api.metrics;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
@@ -33,18 +33,18 @@ import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.metrics.MetricsModule;
+import org.apache.hugegraph.metrics.ServerReporter;
+import org.apache.hugegraph.metrics.SystemMetrics;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.backend.store.BackendMetrics;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.metrics.MetricsModule;
-import com.baidu.hugegraph.metrics.ServerReporter;
-import com.baidu.hugegraph.metrics.SystemMetrics;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.store.BackendMetrics;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.Metric;
import com.codahale.metrics.annotation.Timed;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/GraphsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/GraphsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java
index d59a9afaa..82a3a32e2 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/GraphsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.profile;
+package org.apache.hugegraph.api.profile;
import java.io.File;
import java.util.HashSet;
@@ -42,19 +42,19 @@ import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.SecurityContext;
import org.apache.commons.lang3.StringUtils;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.auth.HugeAuthenticator.RequiredPerm;
-import com.baidu.hugegraph.auth.HugePermission;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.type.define.GraphReadMode;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.auth.HugeAuthenticator.RequiredPerm;
+import org.apache.hugegraph.auth.HugePermission;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.GraphReadMode;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/ProfileAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java
similarity index 97%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/ProfileAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java
index 5f20dc4be..4a04a0ebd 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/ProfileAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.profile;
+package org.apache.hugegraph.api.profile;
import java.util.ArrayList;
import java.util.List;
@@ -42,10 +42,10 @@ import org.glassfish.jersey.server.model.Parameter;
import org.glassfish.jersey.server.model.Resource;
import org.glassfish.jersey.server.model.ResourceMethod;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.version.CoreVersion;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.version.CoreVersion;
import com.codahale.metrics.annotation.Timed;
@Path("/")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/VersionAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java
similarity index 90%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/VersionAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java
index 0bf8fdcc9..90b6de6f5 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/VersionAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.profile;
+package org.apache.hugegraph.api.profile;
import java.util.Map;
@@ -28,9 +28,9 @@ import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.version.ApiVersion;
-import com.baidu.hugegraph.version.CoreVersion;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.version.ApiVersion;
+import org.apache.hugegraph.version.CoreVersion;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/raft/RaftAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/raft/RaftAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java
index d8cce6e26..2d7d29f48 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/raft/RaftAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.raft;
+package org.apache.hugegraph.api.raft;
import java.util.HashMap;
import java.util.List;
@@ -36,21 +36,21 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.store.raft.RaftAddPeerJob;
-import com.baidu.hugegraph.backend.store.raft.RaftGroupManager;
-import com.baidu.hugegraph.backend.store.raft.RaftRemovePeerJob;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.job.JobBuilder;
-import com.baidu.hugegraph.util.DateUtil;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.store.raft.RaftAddPeerJob;
+import org.apache.hugegraph.backend.store.raft.RaftGroupManager;
+import org.apache.hugegraph.backend.store.raft.RaftRemovePeerJob;
+import org.apache.hugegraph.job.JobBuilder;
+import org.apache.hugegraph.util.DateUtil;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/EdgeLabelAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/EdgeLabelAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java
index b173c3687..931995d57 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/EdgeLabelAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.schema;
+package org.apache.hugegraph.api.schema;
import java.util.ArrayList;
import java.util.List;
@@ -38,20 +38,20 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.Userdata;
-import com.baidu.hugegraph.type.define.Frequency;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.Userdata;
+import org.apache.hugegraph.type.define.Frequency;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/IndexLabelAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/IndexLabelAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java
index 2f77ca021..b03ce48d0 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/IndexLabelAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.schema;
+package org.apache.hugegraph.api.schema;
import java.util.ArrayList;
import java.util.List;
@@ -38,22 +38,22 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.Userdata;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.type.define.IndexType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.Userdata;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.IndexType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/PropertyKeyAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/PropertyKeyAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java
index 845733b8d..427be8815 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/PropertyKeyAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.schema;
+package org.apache.hugegraph.api.schema;
import java.util.ArrayList;
import java.util.List;
@@ -38,25 +38,25 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.Userdata;
-import com.baidu.hugegraph.type.define.AggregateType;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.type.define.WriteType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.Userdata;
+import org.apache.hugegraph.type.define.AggregateType;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.DataType;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.WriteType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/SchemaAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java
similarity index 89%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/SchemaAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java
index 0fbdf402a..3d0a189d9 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/SchemaAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.schema;
+package org.apache.hugegraph.api.schema;
import java.util.LinkedHashMap;
import java.util.List;
@@ -32,13 +32,13 @@ import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.schema.SchemaManager;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.schema.SchemaManager;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/schema")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/VertexLabelAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/VertexLabelAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java
index e52419eda..72f990d43 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/VertexLabelAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.schema;
+package org.apache.hugegraph.api.schema;
import java.util.ArrayList;
import java.util.List;
@@ -38,20 +38,20 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.Checkable;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.StatusFilter.Status;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.Checkable;
-import com.baidu.hugegraph.schema.Userdata;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.type.define.IdStrategy;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.StatusFilter.Status;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.Userdata;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.IdStrategy;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AdamicAdarAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java
similarity index 81%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AdamicAdarAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java
index efd74cab2..3ed537c41 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AdamicAdarAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 HugeGraph Authors
+ * Copyright 2017 HugeGraph Authors
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.inject.Singleton;
@@ -32,16 +32,16 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.PredictionTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.traversal.algorithm.PredictionTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AllShortestPathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java
similarity index 82%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AllShortestPathsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java
index 2b8660f90..d1d156bc5 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AllShortestPathsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import java.util.List;
@@ -36,16 +36,16 @@ import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.ShortestPathTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableList;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CountAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java
similarity index 86%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CountAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java
index 3a0ebb2e6..a9fd3c1c4 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CountAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_SKIP_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_SKIP_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT;
import java.util.ArrayList;
import java.util.List;
@@ -35,18 +35,18 @@ import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.algorithm.CountTraverser;
-import com.baidu.hugegraph.traversal.algorithm.steps.EdgeStep;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.algorithm.CountTraverser;
+import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CrosspointsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java
similarity index 80%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CrosspointsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java
index 53daf2f1d..e9f8f729e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CrosspointsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.inject.Singleton;
@@ -35,16 +35,16 @@ import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.PathsTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.PathsTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/crosspoints")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedCrosspointsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
similarity index 90%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
index c1699e9bd..3e6933b5c 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import java.util.ArrayList;
import java.util.HashSet;
@@ -40,18 +40,18 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedPathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedPathsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java
index 4e525f287..8042770b8 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedPathsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_SAMPLE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_WEIGHT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_SAMPLE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_WEIGHT;
import java.util.ArrayList;
import java.util.HashSet;
@@ -42,19 +42,19 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.CustomizePathsTraverser;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.steps.WeightedEdgeStep;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.CustomizePathsTraverser;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/EdgesAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java
similarity index 85%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/EdgesAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java
index 200d0b1ae..f51c30f77 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/EdgesAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PAGE_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PAGE_LIMIT;
import java.util.Iterator;
import java.util.List;
@@ -35,19 +35,19 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.CompressInterceptor.Compress;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.store.Shard;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.CompressInterceptor.Compress;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.store.Shard;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/edges")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/FusiformSimilarityAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java
similarity index 88%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/FusiformSimilarityAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java
index 8e659c101..2b8980ba9 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/FusiformSimilarityAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT;
import java.util.Iterator;
@@ -37,17 +37,17 @@ import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.FusiformSimilarityTraverser;
-import com.baidu.hugegraph.traversal.algorithm.FusiformSimilarityTraverser.SimilarsMap;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser;
+import org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser.SimilarsMap;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/JaccardSimilarityAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java
similarity index 85%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/JaccardSimilarityAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java
index 3a31cf4eb..92d9bb27d 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/JaccardSimilarityAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_LIMIT;
import java.util.Map;
@@ -37,20 +37,20 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.algorithm.steps.EdgeStep;
-import com.baidu.hugegraph.traversal.algorithm.JaccardSimilarTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep;
+import org.apache.hugegraph.traversal.algorithm.JaccardSimilarTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KneighborAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KneighborAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java
index 31fd626f8..eaa95bf2b 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KneighborAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import java.util.HashSet;
import java.util.Iterator;
@@ -40,23 +40,23 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.KneighborTraverser;
-import com.baidu.hugegraph.traversal.algorithm.records.KneighborRecords;
-import com.baidu.hugegraph.traversal.algorithm.steps.EdgeStep;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.KneighborTraverser;
+import org.apache.hugegraph.traversal.algorithm.records.KneighborRecords;
+import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KoutAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KoutAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
index 11a069cf8..26be5eb49 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KoutAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import java.util.HashSet;
import java.util.Iterator;
@@ -41,23 +41,23 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.KoutTraverser;
-import com.baidu.hugegraph.traversal.algorithm.records.KoutRecords;
-import com.baidu.hugegraph.traversal.algorithm.steps.EdgeStep;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.KoutTraverser;
+import org.apache.hugegraph.traversal.algorithm.records.KoutRecords;
+import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/MultiNodeShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
index dcf9d715f..7f0ff8e4f 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
import java.util.HashSet;
import java.util.Iterator;
@@ -36,17 +36,17 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.steps.EdgeStep;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java
index 7361c27a1..8ae22bf80 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEPTH;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEPTH;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import java.util.ArrayList;
import java.util.List;
@@ -36,17 +36,17 @@ import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.algorithm.NeighborRankTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.algorithm.NeighborRankTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java
similarity index 86%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PathsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java
index c227c283e..1bd1e2782 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PathsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEPTH;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEPTH;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import java.util.Collection;
import java.util.HashSet;
@@ -42,21 +42,21 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.CollectionPathsTraverser;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.PathsTraverser;
-import com.baidu.hugegraph.traversal.algorithm.steps.EdgeStep;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.PathsTraverser;
+import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java
index 96c17e9e8..407713a81 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEPTH;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEPTH;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT;
import java.util.Map;
@@ -36,15 +36,15 @@ import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.PersonalRankTraverser;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.PersonalRankTraverser;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RaysAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java
similarity index 79%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RaysAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java
index c2b78f43d..8d088ab2b 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RaysAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.inject.Singleton;
@@ -33,18 +33,18 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.SubGraphTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.SubGraphTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/rays")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ResourceAllocationAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java
similarity index 81%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ResourceAllocationAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java
index 1705c2c84..ffe0fcf4f 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ResourceAllocationAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 HugeGraph Authors
+ * Copyright 2017 HugeGraph Authors
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.inject.Singleton;
@@ -32,16 +32,16 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.PredictionTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.traversal.algorithm.PredictionTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RingsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java
similarity index 80%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RingsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java
index 057420816..ce1d16a38 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RingsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.inject.Singleton;
@@ -33,18 +33,18 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.SubGraphTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.SubGraphTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/rings")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SameNeighborsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java
similarity index 81%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SameNeighborsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java
index 1653e040e..05374c542 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SameNeighborsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import java.util.Set;
@@ -36,15 +36,15 @@ import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.SameNeighborTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.traversal.algorithm.SameNeighborTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/sameneighbors")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java
similarity index 83%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ShortestPathAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java
index f64e369b2..0a04b7b8b 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import java.util.List;
@@ -34,18 +34,18 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.ShortestPathTraverser;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableList;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SingleSourceShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
similarity index 80%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
index 6e0b612ea..07991abf5 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import java.util.Iterator;
@@ -36,19 +36,19 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/singlesourceshortestpath")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TemplatePathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java
similarity index 89%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TemplatePathsAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java
index fdc8eca28..e18ffde1b 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TemplatePathsAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
import java.util.ArrayList;
import java.util.HashSet;
@@ -38,17 +38,17 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.TemplatePathsTraverser;
-import com.baidu.hugegraph.traversal.algorithm.steps.RepeatEdgeStep;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.TemplatePathsTraverser;
+import org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TraverserAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java
similarity index 86%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TraverserAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java
index 62c4cc46a..cfb564045 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TraverserAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java
@@ -17,17 +17,17 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import java.util.List;
import java.util.Map;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.traversal.algorithm.steps.EdgeStep;
-import com.baidu.hugegraph.type.define.Directions;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep;
+import org.apache.hugegraph.type.define.Directions;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/Vertices.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/Vertices.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java
index 4c0a0f568..2d2ed81e6 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/Vertices.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
import java.util.ArrayList;
import java.util.Iterator;
@@ -27,14 +27,14 @@ import java.util.Set;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.traversal.optimize.TraversalUtil;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.traversal.optimize.TraversalUtil;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.E;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Vertices {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/VerticesAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java
similarity index 86%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/VerticesAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java
index 56b10d8f4..7b2c8914e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/VerticesAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PAGE_LIMIT;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PAGE_LIMIT;
import java.util.Iterator;
import java.util.List;
@@ -35,19 +35,19 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.filter.CompressInterceptor.Compress;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.store.Shard;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.filter.CompressInterceptor.Compress;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.store.Shard;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/vertices")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/WeightedShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java
similarity index 81%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/WeightedShortestPathAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java
index 65dfdf52a..cf55dc6d7 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/WeightedShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.api.traversers;
+package org.apache.hugegraph.api.traversers;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
-import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY;
+import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import java.util.Iterator;
@@ -35,20 +35,20 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.api.graph.EdgeAPI;
-import com.baidu.hugegraph.api.graph.VertexAPI;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.api.graph.EdgeAPI;
+import org.apache.hugegraph.api.graph.VertexAPI;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
@Path("graphs/{graph}/traversers/weightedshortestpath")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/variables/VariablesAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/api/variables/VariablesAPI.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java
index ab931ff12..f3cc9dcbc 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/variables/VariablesAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.api.variables;
+package org.apache.hugegraph.api.variables;
import java.util.Map;
import java.util.Optional;
@@ -34,13 +34,13 @@ import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
+import org.apache.hugegraph.core.GraphManager;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/ConfigAuthenticator.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/auth/ConfigAuthenticator.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java
index 5e230c033..1ec64365e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/ConfigAuthenticator.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.net.InetAddress;
import java.util.HashMap;
@@ -27,10 +27,10 @@ import java.util.Objects;
import org.apache.commons.lang.NotImplementedException;
import org.apache.tinkerpop.gremlin.groovy.jsr223.dsl.credential.CredentialGraphTokens;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.util.E;
public class ConfigAuthenticator implements HugeAuthenticator {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/ContextGremlinServer.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/auth/ContextGremlinServer.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java
index 0db3fdf92..1f6fcffb2 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/ContextGremlinServer.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
@@ -32,15 +32,15 @@ import org.apache.tinkerpop.gremlin.server.util.ThreadFactoryUtil;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.auth.HugeGraphAuthProxy.Context;
-import com.baidu.hugegraph.auth.HugeGraphAuthProxy.ContextThreadPoolExecutor;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.testutil.Whitebox;
-import com.baidu.hugegraph.util.Events;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.auth.HugeGraphAuthProxy.Context;
+import org.apache.hugegraph.auth.HugeGraphAuthProxy.ContextThreadPoolExecutor;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.testutil.Whitebox;
+import org.apache.hugegraph.util.Events;
+import org.apache.hugegraph.util.Log;
/**
* GremlinServer with custom ServerGremlinExecutor, which can pass Context
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java
similarity index 96%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java
index 66c6a935e..9bbb66ba5 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.HashMap;
import java.util.List;
@@ -29,17 +29,17 @@ import org.apache.tinkerpop.gremlin.server.auth.AuthenticationException;
import org.apache.tinkerpop.gremlin.server.auth.Authenticator;
import org.apache.tinkerpop.shaded.jackson.annotation.JsonProperty;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.auth.HugeGraphAuthProxy.Context;
-import com.baidu.hugegraph.auth.SchemaDefine.AuthElement;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.OptionSpace;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.type.Nameable;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.auth.HugeGraphAuthProxy.Context;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.OptionSpace;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.type.Nameable;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
public interface HugeAuthenticator extends Authenticator {
@@ -491,7 +491,7 @@ public interface HugeAuthenticator extends Authenticator {
String[] actionKV = ownerAndAction[1].split("=", 2);
E.checkState(actionKV.length == 2,
"Bad permission format: '%s'", permission);
- E.checkState(actionKV[0].equals(StandardAuthenticator.KEY_ACTION),
+ E.checkState(actionKV[0].equals(KEY_ACTION),
"Bad permission format: '%s'", permission);
requiredPerm.action(actionKV[1]);
diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java
new file mode 100644
index 000000000..9ab148803
--- /dev/null
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java
@@ -0,0 +1,339 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.auth;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeFactory;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.StandardHugeGraph;
+import org.apache.hugegraph.backend.cache.CacheManager;
+import org.apache.hugegraph.backend.tx.AbstractTransaction;
+import org.apache.hugegraph.concurrent.LockManager;
+import org.apache.hugegraph.license.LicenseVerifier;
+import org.apache.hugegraph.metrics.ServerReporter;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.SchemaManager;
+import org.apache.hugegraph.backend.tx.GraphTransaction;
+import org.apache.hugegraph.backend.tx.IndexableTransaction;
+import org.apache.hugegraph.schema.builder.EdgeLabelBuilder;
+import org.apache.hugegraph.schema.builder.IndexLabelBuilder;
+import org.apache.hugegraph.schema.builder.PropertyKeyBuilder;
+import org.apache.hugegraph.schema.builder.VertexLabelBuilder;
+import org.apache.hugegraph.serializer.JsonSerializer;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.task.HugeTask;
+import org.apache.hugegraph.task.StandardTaskScheduler;
+import org.apache.hugegraph.task.TaskCallable;
+import org.apache.hugegraph.task.TaskCallable.SysTaskCallable;
+import org.apache.hugegraph.task.TaskManager;
+import org.apache.hugegraph.schema.builder.AbstractBuilder;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.traversal.optimize.HugeCountStepStrategy;
+import org.apache.hugegraph.traversal.optimize.HugeGraphStepStrategy;
+import org.apache.hugegraph.traversal.optimize.HugeVertexStepStrategy;
+import org.apache.hugegraph.util.Reflection;
+import org.apache.hugegraph.variables.HugeVariables;
+import com.google.common.collect.ImmutableSet;
+import org.apache.commons.configuration2.Configuration;
+
+public final class HugeFactoryAuthProxy {
+
+ public static final String GRAPH_FACTORY =
+ "gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy";
+
+ private static final Set PROTECT_METHODS = ImmutableSet.of(
+ "instance");
+
+ private static final Map GRAPHS = new HashMap<>();
+
+ static {
+ HugeGraphAuthProxy.setContext(HugeGraphAuthProxy.Context.admin());
+ HugeFactoryAuthProxy.registerPrivateActions();
+ }
+
+ public static synchronized HugeGraph open(Configuration config) {
+ /*
+ * Inject authentication (replace HugeGraph with HugeGraphAuthProxy)
+ * TODO: Add verify to StandardHugeGraph() to prevent dynamic creation
+ */
+ HugeGraph graph = HugeFactory.open(config);
+ HugeGraph proxy = GRAPHS.get(graph);
+ if (proxy == null) {
+ proxy = new HugeGraphAuthProxy(graph);
+ GRAPHS.put(graph, proxy);
+ }
+ return proxy;
+ }
+
+ private static void registerPrivateActions() {
+ // Thread
+ Reflection.registerFieldsToFilter(java.lang.Thread.class, "name", "priority", "threadQ", "eetop", "single_step", "daemon", "stillborn", "target", "group", "contextClassLoader", "inheritedAccessControlContext", "threadInitNumber", "threadLocals", "inheritableThreadLocals", "stackSize", "nativeParkEventPointer", "tid", "threadSeqNumber", "threadStatus", "parkBlocker", "blocker", "blockerLock", "EMPTY_STACK_TRACE", "SUBCLASS_IMPLEMENTATION_PERMISSION", "uncaughtExceptionHandler", "defaultUncaughtExceptionHandler", "threadLocalRandomSeed", "threadLocalRandomSecondarySeed");
+ Reflection.registerMethodsToFilter(java.lang.Thread.class, "exit", "dispatchUncaughtException", "clone", "isInterrupted", "registerNatives", "init", "init", "nextThreadNum", "nextThreadID", "blockedOn", "start0", "isCCLOverridden", "auditSubclass", "dumpThreads", "getThreads", "processQueue", "setPriority0", "stop0", "suspend0", "resume0", "interrupt0", "setNativeName");
+ Reflection.registerFieldsToFilter(java.lang.ThreadLocal.class, "threadLocalHashCode", "nextHashCode", "HASH_INCREMENT");
+ Reflection.registerMethodsToFilter(java.lang.ThreadLocal.class, "access$400", "createInheritedMap", "nextHashCode", "initialValue", "setInitialValue", "getMap", "createMap", "childValue");
+ Reflection.registerMethodsToFilter(java.lang.InheritableThreadLocal.class, "getMap", "createMap", "childValue");
+
+ // HugeGraph
+ Reflection.registerFieldsToFilter(StandardAuthenticator.class, "graph");
+ Reflection.registerMethodsToFilter(StandardAuthenticator.class, "initAdminUser", "inputPassword", "graph");
+ Reflection.registerFieldsToFilter(ConfigAuthenticator.class, "tokens");
+ Reflection.registerFieldsToFilter(HugeFactoryAuthProxy.class, "PROTECT_METHODS");
+ Reflection.registerMethodsToFilter(HugeFactoryAuthProxy.class, "genRegisterPrivateActions", "registerClass", "registerPrivateActions", "registerPrivateActions", "c");
+ Reflection.registerFieldsToFilter(HugeAuthenticator.User.class, "role", "client");
+ Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.server.auth.AuthenticatedUser.class, "name");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.class, "LOG", "hugegraph", "taskScheduler", "authManager", "contexts", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(HugeGraphAuthProxy.class, "lambda$0", "access$3", "access$4", "access$2", "access$5", "resetContext", "logUser", "verifyAdminPermission", "verifyStatusPermission", "verifyPermission", "verifySchemaPermission", "verifySchemaPermission", "verifySchemaPermission", "verifySchemaPermission", "verifyNamePermission", "verifyNameExistsPermission", "verifyElemPermission", "verifyElemPermission", "verifyElemPermission", "verifyElemPermission", "verifyResPermission", "verifyResPermission", "verifyUserPermission", "verifyUserPermission", "verifyUserPermission", "getContextString", "access$6", "access$7", "lambda$1", "lambda$2", "lambda$3", "lambda$4", "lambda$5", "lambda$6", "lambda$7", "lambda$8", "lambda$9", "lambda$10", "lambda$11", "lambda$12", "lambda$13", "lambda$14", "lambda$15", "lambda$16", "lambda$17", "lambda$18", "lambda$19", "lambda$20", "lambda$21", "lambda$22", "lambda$23", "lambda$24", "access$8", "access$9", "access$10", "setContext", "getContext");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.AuthManagerProxy.class, "authManager", "this$0");
+ Reflection.registerMethodsToFilter(HugeGraphAuthProxy.AuthManagerProxy.class, "currentUsername", "updateCreator");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.TaskSchedulerProxy.class, "taskScheduler", "this$0");
+ Reflection.registerMethodsToFilter(HugeGraphAuthProxy.TaskSchedulerProxy.class, "lambda$0", "lambda$1", "lambda$2", "verifyTaskPermission", "verifyTaskPermission", "verifyTaskPermission", "verifyTaskPermission", "hasTaskPermission");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.GraphTraversalSourceProxy.class, "this$0");
+ Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.class, "connection", "graph", "strategies", "bytecode");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.TraversalStrategiesProxy.class, "REST_WOEKER", "serialVersionUID", "strategies", "this$0");
+ Reflection.registerMethodsToFilter(HugeGraphAuthProxy.TraversalStrategiesProxy.class, "translate");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.VariablesProxy.class, "variables", "this$0");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.Context.class, "ADMIN", "user");
+ Reflection.registerFieldsToFilter(HugeGraphAuthProxy.ContextTask.class, "runner", "context");
+ Reflection.registerFieldsToFilter(StandardHugeGraph.class, "LOG", "started", "closed", "mode", "variables", "name", "params", "configuration", "schemaEventHub", "graphEventHub", "indexEventHub", "writeRateLimiter", "readRateLimiter", "taskManager", "authManager", "features", "storeProvider", "tx", "ramtable", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(StandardHugeGraph.class, "lambda$0", "access$3", "access$4", "access$2", "access$5", "access$6", "access$7", "waitUntilAllTasksCompleted", "access$8", "loadStoreProvider", "graphTransaction", "schemaTransaction", "openSchemaTransaction", "checkGraphNotClosed", "openSystemTransaction", "openGraphTransaction", "systemTransaction", "access$9", "access$10", "access$11", "access$12", "access$13", "access$14", "access$15", "access$16", "access$17", "access$18", "serializer", "loadSchemaStore", "loadSystemStore", "loadGraphStore", "closeTx", "analyzer", "serverInfoManager", "reloadRamtable", "reloadRamtable", "access$19", "access$20", "access$21");
+ Reflection.registerFieldsToFilter(loadClass("org.apache.hugegraph.StandardHugeGraph$StandardHugeGraphParams"), "graph", "this$0");
+ Reflection.registerMethodsToFilter(loadClass("org.apache.hugegraph.StandardHugeGraph$StandardHugeGraphParams"), "access$1", "graph");
+ Reflection.registerFieldsToFilter(loadClass("org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction"), "refs", "opened", "transactions", "this$0", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(loadClass("org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction"), "lambda$0", "access$3", "access$2", "lambda$1", "graphTransaction", "schemaTransaction", "systemTransaction", "access$1", "setOpened", "doCommit", "verifyOpened", "doRollback", "doClose", "destroyTransaction", "doOpen", "setClosed", "getOrNewTransaction", "access$0", "resetState");
+ Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.class, "readWriteConsumerInternal", "closeConsumerInternal", "transactionListeners");
+ Reflection.registerMethodsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.class, "doClose", "fireOnCommit", "fireOnRollback", "doReadWrite", "lambda$fireOnRollback$1", "lambda$fireOnCommit$0");
+ Reflection.registerFieldsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.class, "g");
+ Reflection.registerMethodsToFilter(org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.class, "doCommit", "doRollback", "doClose", "doOpen", "fireOnCommit", "fireOnRollback", "doReadWrite");
+ Reflection.registerFieldsToFilter(loadClass("org.apache.hugegraph.StandardHugeGraph$Txs"), "schemaTx", "systemTx", "graphTx", "openedTime", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(loadClass("org.apache.hugegraph.StandardHugeGraph$Txs"), "access$2", "access$1", "access$0");
+ Reflection.registerFieldsToFilter(GraphTransaction.class, "indexTx", "addedVertices", "removedVertices", "addedEdges", "removedEdges", "addedProps", "removedProps", "updatedVertices", "updatedEdges", "updatedOldestProps", "locksTable", "checkCustomVertexExist", "checkAdjacentVertexExist", "lazyLoadAdjacentVertex", "ignoreInvalidEntry", "commitPartOfAdjacentEdges", "batchSize", "pageSize", "verticesCapacity", "edgesCapacity", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy");
+ Reflection.registerMethodsToFilter(GraphTransaction.class, "lambda$0", "lambda$1", "lambda$2", "lambda$3", "lambda$4", "lambda$5", "lambda$6", "lambda$7", "lambda$8", "lambda$9", "lambda$10", "lambda$11", "lambda$12", "lambda$13", "lambda$14", "lambda$15", "lambda$16", "lambda$17", "lambda$18", "lambda$19", "access$1", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "indexTransaction", "indexTransaction", "beforeWrite", "prepareCommit", "verticesInTxSize", "edgesInTxSize", "checkTxVerticesCapacity", "checkTxEdgesCapacity", "verticesInTxUpdated", "verticesInTxRemoved", "removingEdgeOwner", "prepareDeletions", "prepareDeletions", "prepareUpdates", "prepareAdditions", "checkVertexExistIfCustomizedId", "checkAggregateProperty", "checkAggregateProperty", "checkNonnullProperty", "queryEdgesFromBackend", "commitPartOfEdgeDeletions", "optimizeQueries", "checkVertexLabel", "checkId", "queryVerticesFromBackend", "joinTxVertices", "joinTxEdges", "lockForUpdateProperty", "optimizeQuery", "verifyVerticesConditionQuery", "verifyEdgesConditionQuery", "indexQuery", "joinTxRecords", "propertyUpdated", "parseEntry", "traverseByLabel", "reset", "queryVerticesByIds", "filterUnmatchedRecords", "skipOffsetOrStopLimit", "filterExpiredResultFromFromBackend", "queryEdgesByIds", "matchEdgeSortKeys", "rightResultFromIndexQuery");
+ Reflection.registerFieldsToFilter(IndexableTransaction.class, "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(IndexableTransaction.class, "indexTransaction", "commit2Backend", "reset");
+ Reflection.registerFieldsToFilter(AbstractTransaction.class, "LOG", "ownerThread", "autoCommit", "closed", "committing", "committing2Backend", "graph", "store", "mutation", "serializer", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(AbstractTransaction.class, "beforeWrite", "prepareCommit", "params", "mutation", "commit2Backend", "autoCommit", "beforeRead", "afterWrite", "afterRead", "commitMutation2Backend", "checkOwnerThread", "doAction", "store", "reset");
+ Reflection.registerFieldsToFilter(HugeFactory.class, "LOG", "NAME_REGEX", "graphs");
+ Reflection.registerMethodsToFilter(HugeFactory.class, "lambda$0");
+ Reflection.registerFieldsToFilter(SchemaElement.class, "graph", "id", "name", "userdata", "status");
+ Reflection.registerFieldsToFilter(HugeVertex.class, "EMPTY_SET", "id", "label", "edges", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys");
+ Reflection.registerMethodsToFilter(HugeVertex.class, "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "newProperty", "newProperty", "tx", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys", "checkIdLength", "onUpdateProperty", "ensureFilledProperties", "clone", "clone");
+ Reflection.registerFieldsToFilter(HugeElement.class, "EMPTY_MAP", "MAX_PROPERTIES", "graph", "properties", "expiredTime", "removed", "fresh", "propLoaded", "defaultValueUpdated", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Cardinality");
+ Reflection.registerMethodsToFilter(HugeElement.class, "removed", "addProperty", "newProperty", "tx", "onUpdateProperty", "ensureFilledProperties", "propLoaded", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Cardinality", "getIdValue", "fresh", "updateToDefaultValueIfNone", "copyProperties");
+ Reflection.registerFieldsToFilter(HugeEdge.class, "id", "label", "name", "sourceVertex", "targetVertex", "isOutEdge", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys", "$SWITCH_TABLE$org$apache$tinkerpop$gremlin$structure$Direction");
+ Reflection.registerMethodsToFilter(HugeEdge.class, "checkAdjacentVertexExist", "newProperty", "newProperty", "tx", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$HugeKeys", "onUpdateProperty", "ensureFilledProperties", "$SWITCH_TABLE$org$apache$tinkerpop$gremlin$structure$Direction", "clone", "clone");
+ Reflection.registerFieldsToFilter(HugeProperty.class, "owner", "pkey", "value");
+ Reflection.registerFieldsToFilter(HugeVariables.class, "LOG", "VARIABLES", "VARIABLE_KEY", "VARIABLE_TYPE", "BYTE_VALUE", "BOOLEAN_VALUE", "INTEGER_VALUE", "LONG_VALUE", "FLOAT_VALUE", "DOUBLE_VALUE", "STRING_VALUE", "LIST", "SET", "TYPES", "params", "graph");
+ Reflection.registerMethodsToFilter(HugeVariables.class, "createPropertyKey", "queryAllVariableVertices", "queryVariableVertex", "createVariableVertex", "removeVariableVertex", "extractSingleObject", "setProperty");
+ Reflection.registerFieldsToFilter(SchemaManager.class, "transaction", "graph");
+ Reflection.registerMethodsToFilter(SchemaManager.class, "lambda$0", "lambda$1", "lambda$2", "lambda$3", "checkExists");
+ Reflection.registerFieldsToFilter(PropertyKeyBuilder.class, "id", "name", "dataType", "cardinality", "aggregateType", "checkExist", "userdata", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(PropertyKeyBuilder.class, "lambda$0", "checkStableVars", "checkAggregateType", "hasSameProperties");
+ Reflection.registerFieldsToFilter(AbstractBuilder.class, "transaction", "graph");
+ Reflection.registerMethodsToFilter(AbstractBuilder.class, "rebuildIndex", "graph", "checkSchemaName", "validOrGenerateId", "lockCheckAndCreateSchema", "propertyKeyOrNull", "checkSchemaIdIfRestoringMode", "vertexLabelOrNull", "edgeLabelOrNull", "indexLabelOrNull", "updateSchemaStatus");
+ Reflection.registerFieldsToFilter(VertexLabelBuilder.class, "id", "name", "idStrategy", "properties", "primaryKeys", "nullableKeys", "ttl", "ttlStartTime", "enableLabelIndex", "userdata", "checkExist", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy");
+ Reflection.registerMethodsToFilter(VertexLabelBuilder.class, "lambda$0", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IdStrategy", "checkStableVars", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action", "checkProperties", "checkNullableKeys", "checkIdStrategy", "checkPrimaryKeys", "hasSameProperties", "checkTtl", "checkUserdata", "mapPkId2Name", "mapPkId2Name");
+ Reflection.registerFieldsToFilter(EdgeLabelBuilder.class, "id", "name", "sourceLabel", "targetLabel", "frequency", "properties", "sortKeys", "nullableKeys", "ttl", "ttlStartTime", "enableLabelIndex", "userdata", "checkExist", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action");
+ Reflection.registerMethodsToFilter(EdgeLabelBuilder.class, "lambda$0", "checkStableVars", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$Action", "checkProperties", "checkNullableKeys", "checkSortKeys", "checkRelation", "hasSameProperties", "checkTtl", "checkUserdata", "mapPkId2Name", "mapPkId2Name");
+ Reflection.registerFieldsToFilter(IndexLabelBuilder.class, "id", "name", "baseType", "baseValue", "indexType", "indexFields", "userdata", "checkExist", "rebuild", "$assertionsDisabled", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$DataType", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IndexType");
+ Reflection.registerMethodsToFilter(IndexLabelBuilder.class, "lambda$0", "checkStableVars", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$DataType", "$SWITCH_TABLE$com$baidu$hugegraph$type$define$IndexType", "checkBaseType", "checkIndexType", "checkFields4Range", "loadElement", "checkFields", "checkRepeatIndex", "checkRepeatIndex", "checkRepeatIndex", "checkPrimaryKeyIndex", "checkRepeatRangeIndex", "checkRepeatSearchIndex", "checkRepeatSecondaryIndex", "checkRepeatShardIndex", "checkRepeatUniqueIndex", "removeSubIndex", "hasSubIndex", "allStringIndex", "oneNumericField", "hasSameProperties");
+ Reflection.registerFieldsToFilter(TaskManager.class, "LOG", "SCHEDULE_PERIOD", "THREADS", "MANAGER", "schedulers", "taskExecutor", "taskDbExecutor", "serverInfoDbExecutor", "schedulerExecutor", "contexts", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(TaskManager.class, "lambda$0", "resetContext", "closeTaskTx", "setContext", "instance", "closeSchedulerTx", "notifyNewTask", "scheduleOrExecuteJob", "scheduleOrExecuteJobForGraph");
+ Reflection.registerFieldsToFilter(StandardTaskScheduler.class, "LOG", "graph", "serverManager", "taskExecutor", "taskDbExecutor", "eventListener", "tasks", "taskTx", "NO_LIMIT", "PAGE_SIZE", "QUERY_INTERVAL", "MAX_PENDING_TASKS", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(StandardTaskScheduler.class, "lambda$0", "lambda$1", "lambda$2", "lambda$3", "lambda$4", "lambda$5", "lambda$6", "lambda$7", "tx", "listenChanges", "unlistenChanges", "submitTask", "queryTask", "queryTask", "queryTask", "call", "call", "remove", "sleep", "taskDone", "serverManager", "supportsPaging", "restore", "checkOnMasterNode", "waitUntilTaskCompleted", "scheduleTasks", "executeTasksOnWorker", "cancelTasksOnWorker");
+ Reflection.registerFieldsToFilter(HugeTask.class, "LOG", "DECOMPRESS_RATIO", "scheduler", "callable", "type", "name", "id", "parent", "dependencies", "description", "context", "create", "server", "load", "status", "progress", "update", "retries", "input", "result", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(HugeTask.class, "property", "scheduler", "scheduler", "asArray", "checkPropertySize", "checkPropertySize", "checkDependenciesSuccess", "toOrderSet", "done", "callable", "setException", "set", "result", "status");
+ Reflection.registerFieldsToFilter(TaskCallable.class, "LOG", "ERROR_COMMIT", "ERROR_MESSAGES", "task", "graph", "lastSaveTime", "saveInterval");
+ Reflection.registerMethodsToFilter(TaskCallable.class, "graph", "closeTx", "cancelled", "done", "task", "save", "needSaveWithEx");
+ Reflection.registerFieldsToFilter(TaskCallable.SysTaskCallable.class, "params");
+ Reflection.registerMethodsToFilter(TaskCallable.SysTaskCallable.class, "params", "params");
+ Reflection.registerFieldsToFilter(StandardAuthManager.class, "CACHE_EXPIRE", "graph", "eventListener", "usersCache", "users", "groups", "targets", "belong", "access", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(StandardAuthManager.class, "lambda$0", "listenChanges", "unlistenChanges", "invalidCache", "initSchemaIfNeeded", "rolePermission", "rolePermission", "rolePermission", "cache");
+ Reflection.registerFieldsToFilter(SchemaDefine.class, "graph", "label");
+ Reflection.registerMethodsToFilter(SchemaDefine.class, "schema", "createPropertyKey", "createPropertyKey", "createPropertyKey", "existEdgeLabel", "createRangeIndex", "unhideField", "hideField", "existVertexLabel", "initProperties");
+ Reflection.registerFieldsToFilter(EntityManager.class, "graph", "label", "deser", "NO_LIMIT", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(EntityManager.class, "toList", "graph", "tx", "commitOrRollback", "unhideLabel", "queryById", "queryEntity", "constructVertex", "save", "query");
+ Reflection.registerFieldsToFilter(RelationshipManager.class, "graph", "label", "deser", "NO_LIMIT", "$assertionsDisabled");
+ Reflection.registerMethodsToFilter(RelationshipManager.class, "lambda$0", "toList", "graph", "tx", "commitOrRollback", "unhideLabel", "queryById", "queryRelationship", "newVertex", "save");
+ Reflection.registerFieldsToFilter(CacheManager.class, "LOG", "INSTANCE", "TIMER_TICK_PERIOD", "LOG_TICK_COST_TIME", "caches", "timer");
+ Reflection.registerMethodsToFilter(CacheManager.class, "access$0", "scheduleTimer", "instance");
+ Reflection.registerFieldsToFilter(org.apache.hugegraph.concurrent.LockManager.class, "INSTANCE", "lockGroupMap");
+ Reflection.registerMethodsToFilter(org.apache.hugegraph.concurrent.LockManager.class, "instance");
+ Reflection.registerFieldsToFilter(LicenseVerifier.class, "LOG", "LICENSE_PARAM_PATH", "INSTANCE", "CHECK_INTERVAL", "lastCheckTime", "verifyParam", "manager");
+ Reflection.registerMethodsToFilter(LicenseVerifier.class, "buildVerifyParam", "initLicenseParam", "verifyPublicCert", "instance");
+ Reflection.registerFieldsToFilter(ServerReporter.class, "instance", "gauges", "counters", "histograms", "meters", "timers");
+ Reflection.registerMethodsToFilter(ServerReporter.class, "instance", "instance");
+ Reflection.registerFieldsToFilter(com.codahale.metrics.ScheduledReporter.class, "LOG", "FACTORY_ID", "registry", "executor", "shutdownExecutorOnStop", "disabledMetricAttributes", "scheduledFuture", "filter", "durationFactor", "durationUnit", "rateFactor", "rateUnit");
+ Reflection.registerMethodsToFilter(com.codahale.metrics.ScheduledReporter.class, "convertDuration", "convertRate", "getRateUnit", "getDurationUnit", "isShutdownExecutorOnStop", "getDisabledMetricAttributes", "calculateRateUnit", "createDefaultExecutor", "lambda$start$0", "start");
+ Reflection.registerFieldsToFilter(JsonSerializer.class, "LBUF_SIZE", "INSTANCE");
+ Reflection.registerMethodsToFilter(JsonSerializer.class, "writeIterator", "instance");
+ Reflection.registerFieldsToFilter(HugeVertexStepStrategy.class, "serialVersionUID", "INSTANCE");
+ Reflection.registerMethodsToFilter(HugeVertexStepStrategy.class, "instance");
+ Reflection.registerFieldsToFilter(HugeGraphStepStrategy.class, "serialVersionUID", "INSTANCE");
+ Reflection.registerMethodsToFilter(HugeGraphStepStrategy.class, "instance");
+ Reflection.registerFieldsToFilter(HugeCountStepStrategy.class, "serialVersionUID", "INSTANCE");
+ Reflection.registerMethodsToFilter(HugeCountStepStrategy.class, "lambda$0", "instance");
+
+ // Enable this line to generate registration statement
+ //genRegisterPrivateActions();
+ }
+
+ @SuppressWarnings("unused")
+ private static void genRegisterPrivateActions() {
+ registerPrivateActions(Thread.class);
+ registerPrivateActions(ThreadLocal.class);
+ registerPrivateActions(InheritableThreadLocal.class);
+
+ registerPrivateActions(StandardAuthenticator.class);
+ registerPrivateActions(ConfigAuthenticator.class);
+ registerPrivateActions(HugeFactoryAuthProxy.class);
+ registerPrivateActions(HugeAuthenticator.User.class);
+
+ registerPrivateActions(HugeGraphAuthProxy.class);
+ registerPrivateActions(HugeGraphAuthProxy.AuthManagerProxy.class);
+ registerPrivateActions(HugeGraphAuthProxy.TaskSchedulerProxy.class);
+ registerPrivateActions(HugeGraphAuthProxy.GraphTraversalSourceProxy.class);
+ registerPrivateActions(HugeGraphAuthProxy.TraversalStrategiesProxy.class);
+ registerPrivateActions(HugeGraphAuthProxy.VariablesProxy.class);
+ registerPrivateActions(HugeGraphAuthProxy.Context.class);
+ registerPrivateActions(HugeGraphAuthProxy.ContextThreadPoolExecutor.class);
+ registerPrivateActions(HugeGraphAuthProxy.ContextTask.class);
+
+ for (Class> clazz : StandardHugeGraph.PROTECT_CLASSES) {
+ registerPrivateActions(clazz);
+ }
+
+ registerPrivateActions(HugeFactory.class);
+ registerPrivateActions(AbstractTransaction.class);
+
+ registerPrivateActions(SchemaElement.class);
+ registerPrivateActions(HugeVertex.class);
+ registerPrivateActions(HugeEdge.class);
+ registerPrivateActions(HugeProperty.class);
+ registerPrivateActions(HugeVariables.class);
+
+ registerPrivateActions(SchemaManager.class);
+ registerPrivateActions(PropertyKeyBuilder.class);
+ registerPrivateActions(VertexLabelBuilder.class);
+ registerPrivateActions(EdgeLabelBuilder.class);
+ registerPrivateActions(IndexLabelBuilder.class);
+
+ registerPrivateActions(TaskManager.class);
+ registerPrivateActions(StandardTaskScheduler.class);
+ registerPrivateActions(HugeTask.class);
+ registerPrivateActions(TaskCallable.class);
+ registerPrivateActions(SysTaskCallable.class);
+
+ registerPrivateActions(StandardAuthManager.class);
+ registerPrivateActions(SchemaDefine.class);
+ registerPrivateActions(EntityManager.class);
+ registerPrivateActions(RelationshipManager.class);
+
+ // Don't shield them because need to access by auth RPC
+ //registerPrivateActions(HugeUser.class);
+ //registerPrivateActions(RolePermission.class);
+ //registerPrivateActions(HugeResource.class);
+
+ registerPrivateActions(CacheManager.class);
+ registerPrivateActions(LockManager.class);
+ registerPrivateActions(LicenseVerifier.class);
+ registerPrivateActions(ServerReporter.class);
+ registerPrivateActions(JsonSerializer.class);
+ registerPrivateActions(HugeVertexStepStrategy.class);
+ registerPrivateActions(HugeGraphStepStrategy.class);
+ registerPrivateActions(HugeCountStepStrategy.class);
+ }
+
+ private static void registerPrivateActions(Class> clazz) {
+ while (clazz != Object.class) {
+ List fields = new ArrayList<>();
+ for (Field field : clazz.getDeclaredFields()) {
+ if (!Modifier.isPublic(field.getModifiers())) {
+ fields.add(field.getName());
+ }
+ }
+ List methods = new ArrayList<>();
+ for (Method method : clazz.getDeclaredMethods()) {
+ if (!Modifier.isPublic(method.getModifiers()) ||
+ PROTECT_METHODS.contains(method.getName())) {
+ methods.add(method.getName());
+ }
+ }
+ registerClass(clazz, fields, methods);
+ clazz = clazz.getSuperclass();
+ }
+ }
+
+ private static boolean registerClass(Class> clazz,
+ List fields,
+ List methods) {
+ if (clazz.getName().startsWith("java") ||
+ fields.isEmpty() && methods.isEmpty()) {
+ return false;
+ }
+ final String[] array = new String[fields.size()];
+ try {
+ Reflection.registerFieldsToFilter(clazz, fields.toArray(array));
+ Reflection.registerMethodsToFilter(clazz, methods.toArray(array));
+ } catch (IllegalArgumentException e) {
+ if (e.getMessage().contains("Filter already registered: class")) {
+ return false;
+ }
+ throw e;
+ }
+
+ String code;
+ code = String.format("Reflection.registerFieldsToFilter(%s.class, \"%s\");",
+ clazz.getCanonicalName(), String.join("\", \"", fields));
+ if (!fields.isEmpty()) {
+ // CHECKSTYLE:OFF
+ System.out.println(code);
+ // CHECKSTYLE:ON
+ }
+
+ code = String.format("Reflection.registerMethodsToFilter(%s.class, \"%s\");",
+ clazz.getCanonicalName(), String.join("\", \"", methods));
+ if (!methods.isEmpty()) {
+ // CHECKSTYLE:OFF
+ System.out.println(code);
+ // CHECKSTYLE:ON
+ }
+
+ return true;
+ }
+
+ private static Class> loadClass(String clazz) {
+ try {
+ return Class.forName(clazz);
+ } catch (ClassNotFoundException e) {
+ throw new HugeException(e.getMessage(), e);
+ }
+ }
+}
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java
similarity index 96%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java
index 8fac1fdf1..331c58004 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.time.Duration;
import java.util.ArrayList;
@@ -59,50 +59,50 @@ import org.apache.tinkerpop.gremlin.structure.io.Io;
import org.slf4j.Logger;
import com.alipay.remoting.rpc.RpcServer;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.auth.HugeAuthenticator.RolePerm;
-import com.baidu.hugegraph.auth.HugeAuthenticator.User;
-import com.baidu.hugegraph.auth.SchemaDefine.AuthElement;
-import com.baidu.hugegraph.backend.cache.Cache;
-import com.baidu.hugegraph.backend.cache.CacheManager;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendStoreInfo;
-import com.baidu.hugegraph.backend.store.raft.RaftGroupManager;
-import com.baidu.hugegraph.config.AuthOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.TypedOption;
-import com.baidu.hugegraph.exception.NotSupportException;
-import com.baidu.hugegraph.iterator.FilterIterator;
-import com.baidu.hugegraph.iterator.MapperIterator;
-import com.baidu.hugegraph.rpc.RpcServiceConfig4Client;
-import com.baidu.hugegraph.rpc.RpcServiceConfig4Server;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.SchemaLabel;
-import com.baidu.hugegraph.schema.SchemaManager;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.structure.HugeFeatures;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.task.HugeTask;
-import com.baidu.hugegraph.task.TaskManager;
-import com.baidu.hugegraph.task.TaskScheduler;
-import com.baidu.hugegraph.task.TaskStatus;
-import com.baidu.hugegraph.traversal.optimize.HugeScriptTraversal;
-import com.baidu.hugegraph.type.HugeType;
-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;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.util.RateLimiter;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.auth.HugeAuthenticator.RolePerm;
+import org.apache.hugegraph.auth.HugeAuthenticator.User;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
+import org.apache.hugegraph.backend.cache.Cache;
+import org.apache.hugegraph.backend.cache.CacheManager;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendStoreInfo;
+import org.apache.hugegraph.backend.store.raft.RaftGroupManager;
+import org.apache.hugegraph.config.AuthOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.TypedOption;
+import org.apache.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.iterator.FilterIterator;
+import org.apache.hugegraph.iterator.MapperIterator;
+import org.apache.hugegraph.rpc.RpcServiceConfig4Client;
+import org.apache.hugegraph.rpc.RpcServiceConfig4Server;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.SchemaLabel;
+import org.apache.hugegraph.schema.SchemaManager;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.structure.HugeFeatures;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.task.HugeTask;
+import org.apache.hugegraph.task.TaskManager;
+import org.apache.hugegraph.task.TaskScheduler;
+import org.apache.hugegraph.task.TaskStatus;
+import org.apache.hugegraph.traversal.optimize.HugeScriptTraversal;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.Nameable;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.GraphReadMode;
+import org.apache.hugegraph.type.define.NodeRole;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
+import org.apache.hugegraph.util.RateLimiter;
import jakarta.ws.rs.ForbiddenException;
import jakarta.ws.rs.NotAuthorizedException;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/StandardAuthenticator.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/auth/StandardAuthenticator.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java
index 6006aad92..747be14fb 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/StandardAuthenticator.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.io.Console;
import java.net.InetAddress;
@@ -28,14 +28,14 @@ import org.apache.commons.lang.NotImplementedException;
import org.apache.commons.lang.StringUtils;
import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.rpc.RpcClientProviderWithAuth;
-import com.baidu.hugegraph.util.ConfigUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.rpc.RpcClientProviderWithAuth;
+import org.apache.hugegraph.util.ConfigUtil;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.StringEncoding;
public class StandardAuthenticator implements HugeAuthenticator {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java
similarity index 87%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java
index 580173bd9..0d35b1000 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java
@@ -1,23 +1,23 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Copyright 2017 HugeGraph Authors
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import static io.netty.handler.codec.http.HttpHeaderNames.CONNECTION;
import static io.netty.handler.codec.http.HttpHeaderNames.UPGRADE;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java
index c132edcd2..cd202263a 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.config;
+package org.apache.hugegraph.config;
-import static com.baidu.hugegraph.config.OptionChecker.allowValues;
-import static com.baidu.hugegraph.config.OptionChecker.disallowEmpty;
-import static com.baidu.hugegraph.config.OptionChecker.nonNegativeInt;
-import static com.baidu.hugegraph.config.OptionChecker.positiveInt;
-import static com.baidu.hugegraph.config.OptionChecker.rangeInt;
+import static org.apache.hugegraph.config.OptionChecker.allowValues;
+import static org.apache.hugegraph.config.OptionChecker.disallowEmpty;
+import static org.apache.hugegraph.config.OptionChecker.nonNegativeInt;
+import static org.apache.hugegraph.config.OptionChecker.positiveInt;
+import static org.apache.hugegraph.config.OptionChecker.rangeInt;
public class ServerOptions extends OptionHolder {
@@ -197,8 +197,8 @@ public class ServerOptions extends OptionHolder {
new ConfigOption<>(
"auth.authenticator",
"The class path of authenticator implementation. " +
- "e.g., com.baidu.hugegraph.auth.StandardAuthenticator, " +
- "or com.baidu.hugegraph.auth.ConfigAuthenticator.",
+ "e.g., org.apache.hugegraph.auth.StandardAuthenticator, " +
+ "or org.apache.hugegraph.auth.ConfigAuthenticator.",
null,
""
);
@@ -207,7 +207,7 @@ public class ServerOptions extends OptionHolder {
new ConfigOption<>(
"auth.graph_store",
"The name of graph used to store authentication information, " +
- "like users, only for com.baidu.hugegraph.auth.StandardAuthenticator.",
+ "like users, only for org.apache.hugegraph.auth.StandardAuthenticator.",
disallowEmpty(),
"hugegraph"
);
@@ -216,7 +216,7 @@ public class ServerOptions extends OptionHolder {
new ConfigOption<>(
"auth.admin_token",
"Token for administrator operations, " +
- "only for com.baidu.hugegraph.auth.ConfigAuthenticator.",
+ "only for org.apache.hugegraph.auth.ConfigAuthenticator.",
disallowEmpty(),
"162f7848-0b6d-4faf-b557-3a0797869c55"
);
@@ -225,7 +225,7 @@ public class ServerOptions extends OptionHolder {
new ConfigListOption<>(
"auth.user_tokens",
"The map of user tokens with name and password, " +
- "only for com.baidu.hugegraph.auth.ConfigAuthenticator.",
+ "only for org.apache.hugegraph.auth.ConfigAuthenticator.",
disallowEmpty(),
"hugegraph:9fd95c9c-711b-415b-b85f-d4df46ba5c31"
);
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java b/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java
similarity index 92%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java
index 1446c3234..26bfaad83 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.core;
+package org.apache.hugegraph.core;
import java.util.Collections;
import java.util.HashSet;
@@ -35,44 +35,44 @@ import org.apache.tinkerpop.gremlin.server.util.MetricManager;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Transaction;
import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
+import org.apache.hugegraph.auth.HugeFactoryAuthProxy;
+import org.apache.hugegraph.auth.HugeGraphAuthProxy;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.license.LicenseVerifier;
+import org.apache.hugegraph.metrics.MetricsUtil;
+import org.apache.hugegraph.metrics.ServerReporter;
+import org.apache.hugegraph.serializer.JsonSerializer;
+import org.apache.hugegraph.serializer.Serializer;
+import org.apache.hugegraph.server.RestServer;
import org.slf4j.Logger;
import com.alipay.sofa.rpc.config.ServerConfig;
-import com.baidu.hugegraph.HugeFactory;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.auth.AuthManager;
-import com.baidu.hugegraph.auth.HugeAuthenticator;
-import com.baidu.hugegraph.auth.HugeFactoryAuthProxy;
-import com.baidu.hugegraph.auth.HugeGraphAuthProxy;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.cache.Cache;
-import com.baidu.hugegraph.backend.cache.CacheManager;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.store.BackendStoreInfo;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.config.TypedOption;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.exception.NotSupportException;
-import com.baidu.hugegraph.license.LicenseVerifier;
-import com.baidu.hugegraph.metrics.MetricsUtil;
-import com.baidu.hugegraph.metrics.ServerReporter;
-import com.baidu.hugegraph.rpc.RpcClientProvider;
-import com.baidu.hugegraph.rpc.RpcConsumerConfig;
-import com.baidu.hugegraph.rpc.RpcProviderConfig;
-import com.baidu.hugegraph.rpc.RpcServer;
-import com.baidu.hugegraph.serializer.JsonSerializer;
-import com.baidu.hugegraph.serializer.Serializer;
-import com.baidu.hugegraph.server.RestServer;
-import com.baidu.hugegraph.task.TaskManager;
-import com.baidu.hugegraph.testutil.Whitebox;
-import com.baidu.hugegraph.type.define.NodeRole;
-import com.baidu.hugegraph.util.ConfigUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeFactory;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.auth.AuthManager;
+import org.apache.hugegraph.auth.HugeAuthenticator;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.cache.Cache;
+import org.apache.hugegraph.backend.cache.CacheManager;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.store.BackendStoreInfo;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.TypedOption;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.rpc.RpcClientProvider;
+import org.apache.hugegraph.rpc.RpcConsumerConfig;
+import org.apache.hugegraph.rpc.RpcProviderConfig;
+import org.apache.hugegraph.rpc.RpcServer;
+import org.apache.hugegraph.task.TaskManager;
+import org.apache.hugegraph.testutil.Whitebox;
+import org.apache.hugegraph.type.define.NodeRole;
+import org.apache.hugegraph.util.ConfigUtil;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Events;
+import org.apache.hugegraph.util.Log;
public final class GraphManager {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/Checkable.java b/hugegraph-api/src/main/java/org/apache/hugegraph/define/Checkable.java
similarity index 96%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/define/Checkable.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/define/Checkable.java
index 387bf12b7..402323bf8 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/Checkable.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/define/Checkable.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.define;
+package org.apache.hugegraph.define;
public interface Checkable {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/UpdateStrategy.java b/hugegraph-api/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java
similarity index 98%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/define/UpdateStrategy.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java
index ab0fdb762..9a4caa283 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/UpdateStrategy.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.define;
+package org.apache.hugegraph.define;
import java.math.BigDecimal;
import java.util.Collection;
@@ -26,8 +26,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.NumericUtil;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.NumericUtil;
import com.google.common.collect.Sets;
public enum UpdateStrategy {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/WorkLoad.java b/hugegraph-api/src/main/java/org/apache/hugegraph/define/WorkLoad.java
similarity index 97%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/define/WorkLoad.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/define/WorkLoad.java
index d30d7a108..72f8031c5 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/define/WorkLoad.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/define/WorkLoad.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.define;
+package org.apache.hugegraph.define;
import java.util.concurrent.atomic.AtomicInteger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifier.java b/hugegraph-api/src/main/java/org/apache/hugegraph/license/LicenseVerifier.java
similarity index 95%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifier.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/license/LicenseVerifier.java
index 6b3ab4ab1..b9bf66510 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifier.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/license/LicenseVerifier.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.license;
+package org.apache.hugegraph.license;
import java.io.IOException;
import java.io.InputStream;
@@ -27,10 +27,10 @@ import java.time.Instant;
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.util.Log;
import com.fasterxml.jackson.databind.ObjectMapper;
public class LicenseVerifier {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifyManager.java b/hugegraph-api/src/main/java/org/apache/hugegraph/license/LicenseVerifyManager.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifyManager.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/license/LicenseVerifyManager.java
index a4aeb8649..1e67b7fbc 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifyManager.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/license/LicenseVerifyManager.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.license;
+package org.apache.hugegraph.license;
import java.lang.management.ManagementFactory;
import java.net.InetAddress;
@@ -27,16 +27,16 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.util.VersionUtil;
-import com.baidu.hugegraph.version.CoreVersion;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
+import org.apache.hugegraph.util.VersionUtil;
+import org.apache.hugegraph.version.CoreVersion;
import com.sun.management.OperatingSystemMXBean;
public class LicenseVerifyManager {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/MetricsModule.java b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java
similarity index 98%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/MetricsModule.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java
index ceb500651..a0c2a9ec3 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/MetricsModule.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java
@@ -1,4 +1,6 @@
/*
+ * Copyright 2017 HugeGraph Authors
+ *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
@@ -15,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.metrics;
+package org.apache.hugegraph.metrics;
import java.io.IOException;
import java.util.Arrays;
@@ -44,7 +46,7 @@ import com.codahale.metrics.Timer;
public class MetricsModule extends Module {
private static final Version VERSION = new Version(1, 1, 0, "",
- "com.baidu.hugegraph",
+ "org.apache.hugegraph",
"hugegraph-api");
@SuppressWarnings("rawtypes")
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/MetricsUtil.java b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java
similarity index 98%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/MetricsUtil.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java
index 95e3ddedd..c9e707c23 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/MetricsUtil.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.metrics;
+package org.apache.hugegraph.metrics;
import org.apache.tinkerpop.gremlin.server.util.MetricManager;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/ServerReporter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java
similarity index 98%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/ServerReporter.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java
index 956235edd..b6fb5cb68 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/ServerReporter.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.metrics;
+package org.apache.hugegraph.metrics;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
@@ -27,7 +27,7 @@ import java.util.Map;
import java.util.SortedMap;
import java.util.concurrent.TimeUnit;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.util.E;
import com.codahale.metrics.Counter;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Histogram;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/SystemMetrics.java b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java
similarity index 98%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/SystemMetrics.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java
index 8d6c56fb0..7f47c65a1 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/metrics/SystemMetrics.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.metrics;
+package org.apache.hugegraph.metrics;
import java.lang.management.ClassLoadingMXBean;
import java.lang.management.GarbageCollectorMXBean;
@@ -30,7 +30,7 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils;
-import com.baidu.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.Bytes;
public class SystemMetrics {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/rpc/RpcClientProviderWithAuth.java b/hugegraph-api/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java
similarity index 88%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/rpc/RpcClientProviderWithAuth.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java
index 59376d0b8..ae74a52e4 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/rpc/RpcClientProviderWithAuth.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.rpc;
+package org.apache.hugegraph.rpc;
import com.alipay.sofa.rpc.common.utils.StringUtils;
-import com.baidu.hugegraph.auth.AuthManager;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.auth.AuthManager;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.util.E;
public class RpcClientProviderWithAuth extends RpcClientProvider {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/JsonSerializer.java b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java
similarity index 90%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/JsonSerializer.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java
index 03d6cd88c..4ac335b21 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/JsonSerializer.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.serializer;
+package org.apache.hugegraph.serializer;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
@@ -31,24 +31,24 @@ import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.api.API;
-import com.baidu.hugegraph.auth.SchemaDefine.AuthElement;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.page.PageInfo;
-import com.baidu.hugegraph.iterator.Metadatable;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser.CrosspointsPaths;
-import com.baidu.hugegraph.traversal.algorithm.FusiformSimilarityTraverser.SimilarsMap;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths;
-import com.baidu.hugegraph.traversal.optimize.TraversalUtil;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.api.API;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.page.PageInfo;
+import org.apache.hugegraph.iterator.Metadatable;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser.CrosspointsPaths;
+import org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser.SimilarsMap;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths;
+import org.apache.hugegraph.traversal.optimize.TraversalUtil;
+import org.apache.hugegraph.util.JsonUtil;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/Serializer.java b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java
similarity index 78%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/Serializer.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java
index e5b1c1bce..70268c985 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/Serializer.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.serializer;
+package org.apache.hugegraph.serializer;
import java.util.Collection;
import java.util.Iterator;
@@ -27,18 +27,18 @@ import java.util.Map;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import com.baidu.hugegraph.auth.SchemaDefine.AuthElement;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser.CrosspointsPaths;
-import com.baidu.hugegraph.traversal.algorithm.FusiformSimilarityTraverser.SimilarsMap;
-import com.baidu.hugegraph.traversal.algorithm.HugeTraverser;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight;
-import com.baidu.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser.CrosspointsPaths;
+import org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser.SimilarsMap;
+import org.apache.hugegraph.traversal.algorithm.HugeTraverser;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight;
+import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths;
public interface Serializer {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/ApplicationConfig.java b/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java
similarity index 94%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/server/ApplicationConfig.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java
index 22e8d66e0..b6071954e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/ApplicationConfig.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.server;
+package org.apache.hugegraph.server;
import org.apache.tinkerpop.gremlin.server.util.MetricManager;
import org.glassfish.hk2.api.Factory;
@@ -31,13 +31,13 @@ import org.glassfish.jersey.server.monitoring.ApplicationEventListener;
import org.glassfish.jersey.server.monitoring.RequestEvent;
import org.glassfish.jersey.server.monitoring.RequestEventListener;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.core.GraphManager;
-import com.baidu.hugegraph.define.WorkLoad;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.version.CoreVersion;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.core.GraphManager;
+import org.apache.hugegraph.define.WorkLoad;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.version.CoreVersion;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.jersey3.InstrumentedResourceMethodApplicationListener;
@@ -61,7 +61,7 @@ import jakarta.ws.rs.ApplicationPath;
public class ApplicationConfig extends ResourceConfig {
public ApplicationConfig(HugeConfig conf, EventHub hub) {
- packages("com.baidu.hugegraph.api");
+ packages("org.apache.hugegraph.api");
// Register Jackson to support json
register(org.glassfish.jersey.jackson.JacksonFeature.class);
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/RestServer.java b/hugegraph-api/src/main/java/org/apache/hugegraph/server/RestServer.java
similarity index 96%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/server/RestServer.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/server/RestServer.java
index a50c92ad4..6bf4daeb9 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/RestServer.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/server/RestServer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.server;
+package org.apache.hugegraph.server;
import java.io.IOException;
import java.net.URI;
@@ -38,12 +38,12 @@ import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
import org.glassfish.jersey.server.ResourceConfig;
import org.slf4j.Logger;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.ServerOptions;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.version.ApiVersion;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.ServerOptions;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
+import org.apache.hugegraph.version.ApiVersion;
public class RestServer {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/version/ApiVersion.java b/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java
similarity index 97%
rename from hugegraph-api/src/main/java/com/baidu/hugegraph/version/ApiVersion.java
rename to hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java
index dc43e93b1..7265d3b6b 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/version/ApiVersion.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.version;
+package org.apache.hugegraph.version;
-import com.baidu.hugegraph.util.VersionUtil;
-import com.baidu.hugegraph.util.VersionUtil.Version;
+import org.apache.hugegraph.util.VersionUtil;
+import org.apache.hugegraph.util.VersionUtil.Version;
public final class ApiVersion {
diff --git a/hugegraph-cassandra/pom.xml b/hugegraph-cassandra/pom.xml
index 9d77189f0..1104d6f14 100644
--- a/hugegraph-cassandra/pom.xml
+++ b/hugegraph-cassandra/pom.xml
@@ -19,19 +19,24 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ org.apache.hugegraph
hugegraph
- com.baidu.hugegraph
- 0.13.0
+ ${revision}
+ ../pom.xml
4.0.0
hugegraph-cassandra
+
+ 1.0.0
+
+
- com.baidu.hugegraph
+ org.apache.hugegraph
hugegraph-core
- ${project.version}
+ ${hugegraph-core-version}
org.apache.cassandra
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraBackendEntry.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java
similarity index 85%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraBackendEntry.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java
index 8607737e7..5a9c62836 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraBackendEntry.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.serializer.TableBackendEntry;
-import com.baidu.hugegraph.type.HugeType;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.serializer.TableBackendEntry;
+import org.apache.hugegraph.type.HugeType;
public class CassandraBackendEntry extends TableBackendEntry {
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraEntryIterator.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java
similarity index 95%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraEntryIterator.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java
index 4c466f382..48d0ca2ad 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraEntryIterator.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java
@@ -17,17 +17,17 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.util.Iterator;
import java.util.List;
import java.util.function.BiFunction;
-import com.baidu.hugegraph.backend.page.PageState;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntryIterator;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.page.PageState;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntryIterator;
+import org.apache.hugegraph.util.E;
import com.datastax.driver.core.ExecutionInfo;
import com.datastax.driver.core.PagingState;
import com.datastax.driver.core.ResultSet;
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraFeatures.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java
similarity index 96%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraFeatures.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java
index 8e6729f0a..b918ee3d3 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraFeatures.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendFeatures;
public class CassandraFeatures implements BackendFeatures {
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraMetrics.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java
similarity index 95%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraMetrics.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java
index f385c0a73..4429e315d 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraMetrics.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.io.IOException;
import java.lang.management.MemoryUsage;
@@ -37,17 +37,17 @@ import org.apache.cassandra.tools.nodetool.Compact;
import org.apache.tinkerpop.gremlin.util.NumberHelper;
import org.slf4j.Logger;
-import com.baidu.hugegraph.backend.store.BackendMetrics;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.backend.store.BackendTable;
-import com.baidu.hugegraph.backend.store.cassandra.CassandraTables.Edge;
-import com.baidu.hugegraph.backend.store.cassandra.CassandraTables.Vertex;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.testutil.Whitebox;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.util.UnitUtil;
+import org.apache.hugegraph.backend.store.BackendMetrics;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.backend.store.BackendTable;
+import org.apache.hugegraph.backend.store.cassandra.CassandraTables.Edge;
+import org.apache.hugegraph.backend.store.cassandra.CassandraTables.Vertex;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.testutil.Whitebox;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.Log;
+import org.apache.hugegraph.util.UnitUtil;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Host;
import com.google.common.collect.ImmutableList;
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraOptions.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java
similarity index 90%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraOptions.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java
index 9cde04457..dbeb32f95 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraOptions.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java
@@ -17,16 +17,16 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
-import static com.baidu.hugegraph.config.OptionChecker.allowValues;
-import static com.baidu.hugegraph.config.OptionChecker.disallowEmpty;
-import static com.baidu.hugegraph.config.OptionChecker.positiveInt;
-import static com.baidu.hugegraph.config.OptionChecker.rangeInt;
+import static org.apache.hugegraph.config.OptionChecker.allowValues;
+import static org.apache.hugegraph.config.OptionChecker.disallowEmpty;
+import static org.apache.hugegraph.config.OptionChecker.positiveInt;
+import static org.apache.hugegraph.config.OptionChecker.rangeInt;
-import com.baidu.hugegraph.config.ConfigListOption;
-import com.baidu.hugegraph.config.ConfigOption;
-import com.baidu.hugegraph.config.OptionHolder;
+import org.apache.hugegraph.config.ConfigListOption;
+import org.apache.hugegraph.config.ConfigOption;
+import org.apache.hugegraph.config.OptionHolder;
public class CassandraOptions extends OptionHolder {
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraSerializer.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java
similarity index 86%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraSerializer.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java
index 85d8496df..f2b6d22b5 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraSerializer.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@@ -26,27 +26,27 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.id.IdUtil;
-import com.baidu.hugegraph.backend.serializer.BytesBuffer;
-import com.baidu.hugegraph.backend.serializer.TableBackendEntry;
-import com.baidu.hugegraph.backend.serializer.TableSerializer;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.structure.HugeIndex;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.id.IdUtil;
+import org.apache.hugegraph.backend.serializer.BytesBuffer;
+import org.apache.hugegraph.backend.serializer.TableBackendEntry;
+import org.apache.hugegraph.backend.serializer.TableSerializer;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.structure.HugeIndex;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.DataType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.JsonUtil;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraSessionPool.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java
similarity index 96%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraSessionPool.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java
index 495eef83b..1df3aadc1 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraSessionPool.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java
@@ -17,17 +17,17 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.store.BackendSession.AbstractBackendSession;
-import com.baidu.hugegraph.backend.store.BackendSessionPool;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.store.BackendSession.AbstractBackendSession;
+import org.apache.hugegraph.backend.store.BackendSessionPool;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.util.E;
import com.datastax.driver.core.BatchStatement;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Cluster.Builder;
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraShard.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
similarity index 91%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraShard.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
index b0e970b96..03bb64519 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraShard.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
@@ -1,22 +1,23 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.util.ArrayList;
import java.util.Collections;
@@ -43,9 +44,9 @@ import org.apache.cassandra.dht.Range;
import org.apache.cassandra.dht.Token;
import org.apache.cassandra.dht.Token.TokenFactory;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.store.Shard;
-import com.baidu.hugegraph.util.Bytes;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.store.Shard;
+import org.apache.hugegraph.util.Bytes;
import com.datastax.driver.core.Host;
import com.datastax.driver.core.Metadata;
import com.datastax.driver.core.ResultSet;
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStore.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java
similarity index 96%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStore.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java
index 147664312..43fe35a67 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStore.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.util.ArrayList;
import java.util.Collection;
@@ -30,23 +30,23 @@ import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.serializer.MergeIterator;
-import com.baidu.hugegraph.backend.store.AbstractBackendStore;
-import com.baidu.hugegraph.backend.store.BackendAction;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendMutation;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.exception.ConnectionException;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.serializer.MergeIterator;
+import org.apache.hugegraph.backend.store.AbstractBackendStore;
+import org.apache.hugegraph.backend.store.BackendAction;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendMutation;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.exception.ConnectionException;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.KeyspaceMetadata;
import com.datastax.driver.core.Session;
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStoreProvider.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java
similarity index 84%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStoreProvider.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java
index b5898e94f..3c602e092 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraStoreProvider.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java
@@ -17,14 +17,14 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
-import com.baidu.hugegraph.backend.store.AbstractBackendStoreProvider;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.cassandra.CassandraStore.CassandraGraphStore;
-import com.baidu.hugegraph.backend.store.cassandra.CassandraStore.CassandraSchemaStore;
-import com.baidu.hugegraph.backend.store.cassandra.CassandraStore.CassandraSystemStore;
-import com.baidu.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.backend.store.AbstractBackendStoreProvider;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.cassandra.CassandraStore.CassandraGraphStore;
+import org.apache.hugegraph.backend.store.cassandra.CassandraStore.CassandraSchemaStore;
+import org.apache.hugegraph.backend.store.cassandra.CassandraStore.CassandraSystemStore;
+import org.apache.hugegraph.config.HugeConfig;
public class CassandraStoreProvider extends AbstractBackendStoreProvider {
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTable.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java
similarity index 95%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTable.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java
index 8f3d38284..9f639ac5e 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTable.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.util.ArrayList;
import java.util.Collection;
@@ -32,27 +32,27 @@ import java.util.function.Function;
import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
import org.slf4j.Logger;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.page.PageState;
-import com.baidu.hugegraph.backend.query.Aggregate;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.Condition.Relation;
-import com.baidu.hugegraph.backend.query.IdQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.Query.Order;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendTable;
-import com.baidu.hugegraph.backend.store.Shard;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.exception.NotSupportException;
-import com.baidu.hugegraph.iterator.ExtendableIterator;
-import com.baidu.hugegraph.iterator.WrappedIterator;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.CopyUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.page.PageState;
+import org.apache.hugegraph.backend.query.Aggregate;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.Condition.Relation;
+import org.apache.hugegraph.backend.query.IdQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.query.Query.Order;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendTable;
+import org.apache.hugegraph.backend.store.Shard;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.iterator.ExtendableIterator;
+import org.apache.hugegraph.iterator.WrappedIterator;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.CopyUtil;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.datastax.driver.core.ColumnDefinitions.Definition;
import com.datastax.driver.core.DataType;
import com.datastax.driver.core.PagingState;
diff --git a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTables.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java
similarity index 98%
rename from hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTables.java
rename to hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java
index c94dd69ee..2c3a0ca99 100644
--- a/hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraTables.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java
@@ -17,25 +17,25 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.cassandra;
+package org.apache.hugegraph.backend.store.cassandra;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.EdgeId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.id.IdUtil;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntryIterator;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.EdgeId;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.id.IdUtil;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntryIterator;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.E;
import com.datastax.driver.core.DataType;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Row;
diff --git a/hugegraph-core/pom.xml b/hugegraph-core/pom.xml
index 08bc783aa..52c710ac0 100644
--- a/hugegraph-core/pom.xml
+++ b/hugegraph-core/pom.xml
@@ -19,9 +19,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.baidu.hugegraph
+ org.apache.hugegraph
hugegraph
- 0.13.0
+ ${revision}
../pom.xml
hugegraph-core
@@ -48,7 +48,7 @@
- com.baidu.hugegraph
+ org.apache.hugegraph
hugegraph-common
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Nameable.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Nameable.java
deleted file mode 100644
index eb8e474e4..000000000
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/type/Nameable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2017 JanusGraph Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.baidu.hugegraph.type;
-
-/**
- * Represents an entity that can be uniquely identified by a String name.
- *
- * @author Matthias Broecheler (me@matthiasb.com)
- */
-public interface Nameable {
- /**
- * Returns the unique name of this entity.
- *
- * @return Name of this entity.
- */
- String name();
-
-}
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeException.java b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeException.java
similarity index 98%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/HugeException.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/HugeException.java
index 2d67691eb..5b9b34565 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeException.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeException.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph;
+package org.apache.hugegraph;
import java.io.InterruptedIOException;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeFactory.java b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/HugeFactory.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java
index c74d8df86..fc726a4d1 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeFactory.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph;
+package org.apache.hugegraph;
import java.io.File;
import java.net.URL;
@@ -30,16 +30,16 @@ import org.apache.commons.configuration2.Configuration;
import org.apache.commons.configuration2.PropertiesConfiguration;
import org.apache.commons.configuration2.builder.fluent.Configurations;
import org.apache.commons.configuration2.ex.ConfigurationException;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.task.TaskManager;
+import org.apache.hugegraph.type.define.SerialEnum;
import org.slf4j.Logger;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.task.TaskManager;
-import com.baidu.hugegraph.traversal.algorithm.OltpTraverser;
-import com.baidu.hugegraph.type.define.SerialEnum;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.traversal.algorithm.OltpTraverser;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
public class HugeFactory {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeGraph.java b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java
similarity index 84%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/HugeGraph.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java
index 18d9f795e..91c450ff4 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeGraph.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java
@@ -17,13 +17,26 @@
* under the License.
*/
-package com.baidu.hugegraph;
+package org.apache.hugegraph;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import org.apache.hugegraph.auth.AuthManager;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendStoreInfo;
+import org.apache.hugegraph.backend.store.raft.RaftGroupManager;
+import org.apache.hugegraph.rpc.RpcServiceConfig4Client;
+import org.apache.hugegraph.rpc.RpcServiceConfig4Server;
+import org.apache.hugegraph.task.TaskScheduler;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.GraphReadMode;
+import org.apache.hugegraph.type.define.NodeRole;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -32,32 +45,19 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import com.alipay.remoting.rpc.RpcServer;
-import com.baidu.hugegraph.auth.AuthManager;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendStoreInfo;
-import com.baidu.hugegraph.backend.store.raft.RaftGroupManager;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.TypedOption;
-import com.baidu.hugegraph.rpc.RpcServiceConfig4Client;
-import com.baidu.hugegraph.rpc.RpcServiceConfig4Server;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.SchemaLabel;
-import com.baidu.hugegraph.schema.SchemaManager;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeFeatures;
-import com.baidu.hugegraph.task.TaskScheduler;
-import com.baidu.hugegraph.traversal.optimize.HugeCountStepStrategy;
-import com.baidu.hugegraph.traversal.optimize.HugeGraphStepStrategy;
-import com.baidu.hugegraph.traversal.optimize.HugeVertexStepStrategy;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.type.define.GraphReadMode;
-import com.baidu.hugegraph.type.define.NodeRole;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.TypedOption;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.SchemaLabel;
+import org.apache.hugegraph.schema.SchemaManager;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeFeatures;
+import org.apache.hugegraph.traversal.optimize.HugeCountStepStrategy;
+import org.apache.hugegraph.traversal.optimize.HugeGraphStepStrategy;
+import org.apache.hugegraph.traversal.optimize.HugeVertexStepStrategy;
/**
* Graph interface for Gremlin operations
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeGraphParams.java b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraphParams.java
similarity index 71%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/HugeGraphParams.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraphParams.java
index 3fbdc00bd..0e696fb9a 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeGraphParams.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraphParams.java
@@ -17,21 +17,21 @@
* under the License.
*/
-package com.baidu.hugegraph;
+package org.apache.hugegraph;
-import com.baidu.hugegraph.analyzer.Analyzer;
-import com.baidu.hugegraph.backend.LocalCounter;
-import com.baidu.hugegraph.backend.serializer.AbstractSerializer;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.ram.RamTable;
-import com.baidu.hugegraph.backend.tx.GraphTransaction;
-import com.baidu.hugegraph.backend.tx.SchemaTransaction;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.task.ServerInfoManager;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.type.define.GraphReadMode;
+import org.apache.hugegraph.backend.LocalCounter;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.ram.RamTable;
+import org.apache.hugegraph.backend.tx.GraphTransaction;
+import org.apache.hugegraph.backend.tx.SchemaTransaction;
+import org.apache.hugegraph.task.ServerInfoManager;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.GraphReadMode;
+import org.apache.hugegraph.analyzer.Analyzer;
+import org.apache.hugegraph.backend.serializer.AbstractSerializer;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.event.EventHub;
import com.google.common.util.concurrent.RateLimiter;
/**
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java b/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
index 53baaa780..22504c267 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph;
+package org.apache.hugegraph;
import java.util.Collection;
import java.util.Iterator;
@@ -27,6 +27,37 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.hugegraph.auth.AuthManager;
+import org.apache.hugegraph.auth.StandardAuthManager;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.LocalCounter;
+import org.apache.hugegraph.backend.cache.Cache;
+import org.apache.hugegraph.backend.cache.CacheNotifier;
+import org.apache.hugegraph.backend.cache.CacheNotifier.GraphCacheNotifier;
+import org.apache.hugegraph.backend.cache.CacheNotifier.SchemaCacheNotifier;
+import org.apache.hugegraph.backend.cache.CachedGraphTransaction;
+import org.apache.hugegraph.backend.cache.CachedSchemaTransaction;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.id.SnowflakeIdGenerator;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.raft.RaftBackendStoreProvider;
+import org.apache.hugegraph.backend.store.raft.RaftGroupManager;
+import org.apache.hugegraph.backend.store.ram.RamTable;
+import org.apache.hugegraph.backend.tx.GraphTransaction;
+import org.apache.hugegraph.backend.tx.SchemaTransaction;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.io.HugeGraphIoRegistry;
+import org.apache.hugegraph.rpc.RpcServiceConfig4Client;
+import org.apache.hugegraph.rpc.RpcServiceConfig4Server;
+import org.apache.hugegraph.task.ServerInfoManager;
+import org.apache.hugegraph.task.TaskManager;
+import org.apache.hugegraph.task.TaskScheduler;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.type.define.GraphReadMode;
+import org.apache.hugegraph.type.define.NodeRole;
+import org.apache.hugegraph.util.*;
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -37,73 +68,40 @@ import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.io.Io;
import org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+import org.apache.hugegraph.util.ConfigUtil;
+import org.apache.hugegraph.util.Events;
+import org.apache.hugegraph.util.LockUtil;
import org.slf4j.Logger;
import com.alipay.remoting.rpc.RpcServer;
-import com.baidu.hugegraph.analyzer.Analyzer;
-import com.baidu.hugegraph.analyzer.AnalyzerFactory;
-import com.baidu.hugegraph.auth.AuthManager;
-import com.baidu.hugegraph.auth.StandardAuthManager;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.LocalCounter;
-import com.baidu.hugegraph.backend.cache.Cache;
-import com.baidu.hugegraph.backend.cache.CacheNotifier;
-import com.baidu.hugegraph.backend.cache.CacheNotifier.GraphCacheNotifier;
-import com.baidu.hugegraph.backend.cache.CacheNotifier.SchemaCacheNotifier;
-import com.baidu.hugegraph.backend.cache.CachedGraphTransaction;
-import com.baidu.hugegraph.backend.cache.CachedSchemaTransaction;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.id.SnowflakeIdGenerator;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.serializer.AbstractSerializer;
-import com.baidu.hugegraph.backend.serializer.SerializerFactory;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendProviderFactory;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.BackendStoreInfo;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.backend.store.raft.RaftBackendStoreProvider;
-import com.baidu.hugegraph.backend.store.raft.RaftGroupManager;
-import com.baidu.hugegraph.backend.store.ram.RamTable;
-import com.baidu.hugegraph.backend.tx.GraphTransaction;
-import com.baidu.hugegraph.backend.tx.SchemaTransaction;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.TypedOption;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.event.EventListener;
-import com.baidu.hugegraph.exception.NotAllowException;
-import com.baidu.hugegraph.io.HugeGraphIoRegistry;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.rpc.RpcServiceConfig4Client;
-import com.baidu.hugegraph.rpc.RpcServiceConfig4Server;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.SchemaLabel;
-import com.baidu.hugegraph.schema.SchemaManager;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeEdgeProperty;
-import com.baidu.hugegraph.structure.HugeFeatures;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.structure.HugeVertexProperty;
-import com.baidu.hugegraph.task.ServerInfoManager;
-import com.baidu.hugegraph.task.TaskManager;
-import com.baidu.hugegraph.task.TaskScheduler;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.type.define.GraphReadMode;
-import com.baidu.hugegraph.type.define.NodeRole;
-import com.baidu.hugegraph.util.ConfigUtil;
-import com.baidu.hugegraph.util.DateUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
-import com.baidu.hugegraph.util.LockUtil;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.variables.HugeVariables;
+import org.apache.hugegraph.analyzer.Analyzer;
+import org.apache.hugegraph.analyzer.AnalyzerFactory;
+import org.apache.hugegraph.backend.serializer.AbstractSerializer;
+import org.apache.hugegraph.backend.serializer.SerializerFactory;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendProviderFactory;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.BackendStoreInfo;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.TypedOption;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.event.EventListener;
+import org.apache.hugegraph.exception.NotAllowException;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.SchemaLabel;
+import org.apache.hugegraph.schema.SchemaManager;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeEdgeProperty;
+import org.apache.hugegraph.structure.HugeFeatures;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.structure.HugeVertexProperty;
+import org.apache.hugegraph.variables.HugeVariables;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.RateLimiter;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/Analyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/Analyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java
index 8cc137221..695c65d0c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/Analyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.util.Set;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/AnalyzerFactory.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/AnalyzerFactory.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java
index 3d6ead94c..e0f254e8f 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/AnalyzerFactory.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.backend.serializer.SerializerFactory;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.backend.serializer.SerializerFactory;
public class AnalyzerFactory {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/AnsjAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/AnsjAnalyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java
index 179cc97e1..5f77a0b0a 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/AnsjAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.util.List;
import java.util.Set;
@@ -29,8 +29,8 @@ import org.ansj.splitWord.analysis.IndexAnalysis;
import org.ansj.splitWord.analysis.NlpAnalysis;
import org.ansj.splitWord.analysis.ToAnalysis;
-import com.baidu.hugegraph.config.ConfigException;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.config.ConfigException;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
/**
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/HanLPAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/HanLPAnalyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java
index 2e282065d..680e397fd 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/HanLPAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.config.ConfigException;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.config.ConfigException;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
import com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment;
import com.hankcs.hanlp.seg.NShort.NShortSegment;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/IKAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/IKAnalyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java
index 6cf2c0ff0..df537da78 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/IKAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java
@@ -17,18 +17,18 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.io.StringReader;
import java.util.List;
import java.util.Set;
+import org.apache.hugegraph.HugeException;
import org.wltea.analyzer.core.IKSegmenter;
import org.wltea.analyzer.core.Lexeme;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.config.ConfigException;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.config.ConfigException;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
/**
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/JcsegAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/JcsegAnalyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java
index b4ccb7b70..a51d5b4de 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/JcsegAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java
@@ -17,21 +17,21 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.io.StringReader;
import java.util.List;
import java.util.Set;
+import org.apache.hugegraph.HugeException;
import org.lionsoul.jcseg.ISegment;
import org.lionsoul.jcseg.IWord;
import org.lionsoul.jcseg.dic.ADictionary;
import org.lionsoul.jcseg.dic.DictionaryFactory;
import org.lionsoul.jcseg.segmenter.SegmenterConfig;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.config.ConfigException;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.config.ConfigException;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
/**
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/JiebaAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/JiebaAnalyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java
index 0e0a72b4c..b8e7680db 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/JiebaAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.config.ConfigException;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.config.ConfigException;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
import com.huaban.analysis.jieba.JiebaSegmenter;
import com.huaban.analysis.jieba.SegToken;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/MMSeg4JAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/MMSeg4JAnalyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java
index 1bc63f1ad..6fb768a70 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/MMSeg4JAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java
@@ -17,15 +17,15 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.io.StringReader;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.config.ConfigException;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.config.ConfigException;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.chenlb.mmseg4j.ComplexSeg;
import com.chenlb.mmseg4j.Dictionary;
import com.chenlb.mmseg4j.MMSeg;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/SmartCNAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/SmartCNAnalyzer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java
index ad5a07962..0c8814512 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/analyzer/SmartCNAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java
@@ -17,18 +17,18 @@
* under the License.
*/
-package com.baidu.hugegraph.analyzer;
+package org.apache.hugegraph.analyzer;
import java.io.Reader;
import java.io.StringReader;
import java.util.Set;
+import org.apache.hugegraph.HugeException;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.InsertionOrderUtil;
/**
* Reference from https://my.oschina.net/apdplat/blog/412921
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthConstant.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthConstant.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthConstant.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthConstant.java
index 59379481c..bf6116254 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthConstant.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthConstant.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
public interface AuthConstant {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthManager.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java
index 393913874..509294993 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthManager.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java
@@ -17,15 +17,15 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.List;
import java.util.Set;
import javax.security.sasl.AuthenticationException;
-import com.baidu.hugegraph.auth.SchemaDefine.AuthElement;
-import com.baidu.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
public interface AuthManager {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/EntityManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/EntityManager.java
similarity index 87%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/EntityManager.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/EntityManager.java
index 0ff8c0ca2..670ce0717 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/EntityManager.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/EntityManager.java
@@ -17,33 +17,33 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.backend.tx.GraphTransaction;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.HugeKeys;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Entity;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.backend.tx.GraphTransaction;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.iterator.MapperIterator;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Entity;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.iterator.MapperIterator;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.util.E;
import com.google.common.collect.ImmutableMap;
public class EntityManager {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeAccess.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeAccess.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeAccess.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeAccess.java
index e5e321498..71bba568c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeAccess.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeAccess.java
@@ -17,23 +17,23 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.type.define.DataType;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.T;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Relationship;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Relationship;
+import org.apache.hugegraph.util.E;
public class HugeAccess extends Relationship {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeBelong.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeBelong.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeBelong.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeBelong.java
index f2d94d638..968fed163 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeBelong.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeBelong.java
@@ -17,21 +17,21 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.EdgeLabel;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.T;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Relationship;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Relationship;
public class HugeBelong extends Relationship {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeGroup.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeGroup.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeGroup.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeGroup.java
index 9b15afee8..0a366ee93 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeGroup.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeGroup.java
@@ -17,22 +17,22 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.VertexLabel;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Entity;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Entity;
+import org.apache.hugegraph.util.E;
public class HugeGroup extends Entity {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugePermission.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugePermission.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugePermission.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugePermission.java
index 761429305..68bc45035 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugePermission.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugePermission.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
-import com.baidu.hugegraph.type.define.SerialEnum;
+import org.apache.hugegraph.type.define.SerialEnum;
public enum HugePermission implements SerialEnum {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeProject.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeProject.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeProject.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeProject.java
index b10af0f7e..b4e8a4e5d 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeProject.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeProject.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.ArrayList;
import java.util.Collections;
@@ -27,18 +27,18 @@ import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.DataType;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Entity;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Entity;
+import org.apache.hugegraph.util.E;
public class HugeProject extends Entity {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeResource.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeResource.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeResource.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeResource.java
index bdfb07025..f534dfb15 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeResource.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeResource.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.io.IOException;
import java.util.List;
@@ -25,6 +25,9 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
+import org.apache.hugegraph.type.Nameable;
+import org.apache.hugegraph.type.Typeable;
+import org.apache.hugegraph.util.JsonUtil;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.Property;
import org.apache.tinkerpop.shaded.jackson.annotation.JsonProperty;
@@ -38,13 +41,10 @@ import org.apache.tinkerpop.shaded.jackson.databind.deser.std.StdDeserializer;
import org.apache.tinkerpop.shaded.jackson.databind.module.SimpleModule;
import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
-import com.baidu.hugegraph.HugeException;
-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.Nameable;
-import com.baidu.hugegraph.type.Typeable;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.traversal.optimize.TraversalUtil;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeTarget.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeTarget.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeTarget.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeTarget.java
index ed01fcb82..53f95d4d5 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeTarget.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeTarget.java
@@ -17,24 +17,24 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.util.JsonUtil;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Entity;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Entity;
+import org.apache.hugegraph.util.E;
import com.google.common.collect.ImmutableList;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeUser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeUser.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeUser.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeUser.java
index a5777bd70..0fd08c1b4 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeUser.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeUser.java
@@ -17,22 +17,22 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.VertexLabel;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Entity;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Entity;
+import org.apache.hugegraph.util.E;
public class HugeUser extends Entity {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/RelationshipManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java
similarity index 88%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/RelationshipManager.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java
index 667927d02..4ee087059 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/RelationshipManager.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java
@@ -17,36 +17,36 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.backend.tx.GraphTransaction;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.type.define.HugeKeys;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.SchemaDefine.Relationship;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.backend.tx.GraphTransaction;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.iterator.MapperIterator;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.SchemaDefine.Relationship;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.iterator.MapperIterator;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.util.E;
import com.google.common.collect.ImmutableMap;
public class RelationshipManager {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceObject.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceObject.java
similarity index 91%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceObject.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceObject.java
index 4737bfa87..aab868b3b 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceObject.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceObject.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
-import com.baidu.hugegraph.auth.SchemaDefine.AuthElement;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.type.Nameable;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.type.Nameable;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.util.E;
public class ResourceObject {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceType.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceType.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceType.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceType.java
index 104691c6d..d8caa69fd 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/ResourceType.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceType.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
-import com.baidu.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.HugeType;
public enum ResourceType {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/RolePermission.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RolePermission.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/RolePermission.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/RolePermission.java
index 1c35b7e8f..b9397757f 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/RolePermission.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RolePermission.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.io.IOException;
import java.util.ArrayList;
@@ -27,6 +27,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.TreeMap;
+import org.apache.hugegraph.util.JsonUtil;
import org.apache.tinkerpop.shaded.jackson.annotation.JsonProperty;
import org.apache.tinkerpop.shaded.jackson.core.JsonGenerator;
import org.apache.tinkerpop.shaded.jackson.core.JsonParser;
@@ -38,8 +39,7 @@ import org.apache.tinkerpop.shaded.jackson.databind.deser.std.StdDeserializer;
import org.apache.tinkerpop.shaded.jackson.databind.module.SimpleModule;
import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.E;
public class RolePermission {
@@ -91,11 +91,11 @@ public class RolePermission {
mergedResources.addAll(resources);
}
- protected Map>> map() {
+ public Map>> map() {
return Collections.unmodifiableMap(this.roles);
}
- protected boolean contains(RolePermission other) {
+ public boolean contains(RolePermission other) {
for (Map.Entry>> e1 :
other.roles.entrySet()) {
String g = e1.getKey();
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/SchemaDefine.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/SchemaDefine.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java
index 12ed87ce0..d733ffda9 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/SchemaDefine.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.io.Serializable;
import java.util.Date;
@@ -25,23 +25,24 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import org.apache.hugegraph.auth.HugeTarget.P;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaManager;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.Nameable;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.DataType;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph.Hidden;
import org.apache.tinkerpop.gremlin.structure.Property;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.HugeTarget.P;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaManager;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.util.E;
public abstract class SchemaDefine {
@@ -242,7 +243,7 @@ public abstract class SchemaDefine {
// NOTE: travis-ci fails if class Entity implements Nameable
public abstract static class Entity extends AuthElement
- implements com.baidu.hugegraph.type.Nameable {
+ implements org.apache.hugegraph.type.Nameable {
private static final long serialVersionUID = 4113319546914811762L;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/StandardAuthManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/StandardAuthManager.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java
index cb71e6bc7..8b42ced71 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/StandardAuthManager.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.time.Duration;
import java.util.ArrayList;
@@ -33,23 +33,23 @@ import jakarta.ws.rs.ForbiddenException;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
+import org.apache.hugegraph.backend.cache.Cache;
+import org.apache.hugegraph.backend.cache.CacheManager;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.config.AuthOptions;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.LockUtil;
+import org.apache.hugegraph.util.StringEncoding;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.auth.HugeUser.P;
-import com.baidu.hugegraph.auth.SchemaDefine.AuthElement;
-import com.baidu.hugegraph.backend.cache.Cache;
-import com.baidu.hugegraph.backend.cache.CacheManager;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.config.AuthOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.LockUtil;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.auth.HugeUser.P;
+import org.apache.hugegraph.auth.SchemaDefine.AuthElement;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/TokenGenerator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/TokenGenerator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java
index ef73d890d..96c255f4f 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/TokenGenerator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
import java.nio.charset.StandardCharsets;
import java.util.Date;
@@ -26,8 +26,8 @@ import java.util.Map;
import javax.crypto.SecretKey;
import jakarta.ws.rs.NotAuthorizedException;
-import com.baidu.hugegraph.config.AuthOptions;
-import com.baidu.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.AuthOptions;
+import org.apache.hugegraph.config.HugeConfig;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/UserWithRole.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/UserWithRole.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/auth/UserWithRole.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/auth/UserWithRole.java
index ee1a84c18..3c5bd391a 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/UserWithRole.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/UserWithRole.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.auth;
+package org.apache.hugegraph.auth;
-import com.baidu.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.Id;
public class UserWithRole {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/BackendException.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/BackendException.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/BackendException.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/BackendException.java
index ce60d12cd..e403f31de 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/BackendException.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/BackendException.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.backend;
+package org.apache.hugegraph.backend;
-import com.baidu.hugegraph.HugeException;
+import org.apache.hugegraph.HugeException;
public class BackendException extends HugeException {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/LocalCounter.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/LocalCounter.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/LocalCounter.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/LocalCounter.java
index 4fb065c85..bc3458aa0 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/LocalCounter.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/LocalCounter.java
@@ -17,15 +17,15 @@
* under the License.
*/
-package com.baidu.hugegraph.backend;
+package org.apache.hugegraph.backend;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.type.HugeType;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.type.HugeType;
public class LocalCounter {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/Transaction.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/Transaction.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java
index bbf20a2b3..cc4c12dba 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/Transaction.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend;
+package org.apache.hugegraph.backend;
public interface Transaction {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/AbstractCache.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java
similarity index 98%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/AbstractCache.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java
index b9a79864b..7bb05765d 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/AbstractCache.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicReference;
@@ -26,8 +26,8 @@ import java.util.function.Function;
import org.slf4j.Logger;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.util.Log;
public abstract class AbstractCache implements Cache {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/Cache.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/Cache.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java
index f7f98efcd..619df1ba3 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/Cache.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.util.function.Consumer;
import java.util.function.Function;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CacheManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CacheManager.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java
index 1963a268f..1caff0625 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CacheManager.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.util.Collections;
import java.util.Map;
@@ -28,10 +28,10 @@ import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
public class CacheManager {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CacheNotifier.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java
similarity index 89%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CacheNotifier.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java
index 784d8e691..48c0f273d 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CacheNotifier.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.type.HugeType;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.type.HugeType;
public interface CacheNotifier extends AutoCloseable {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedBackendStore.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java
similarity index 89%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedBackendStore.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java
index 9060f9396..71228b437 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedBackendStore.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java
@@ -17,21 +17,21 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.util.Iterator;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendMutation;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.backend.store.SystemSchemaStore;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendMutation;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.backend.store.SystemSchemaStore;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.StringEncoding;
/**
* This class is unused now, just for debug or test
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedGraphTransaction.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedGraphTransaction.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java
index 7a2a852cc..f817f1534 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedGraphTransaction.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.lang.reflect.Array;
import java.util.ArrayList;
@@ -27,30 +27,30 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.backend.cache.CachedBackendStore.QueryId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.IdQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.backend.store.BackendMutation;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.ram.RamTable;
-import com.baidu.hugegraph.backend.tx.GraphTransaction;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.event.EventListener;
-import com.baidu.hugegraph.exception.NotSupportException;
-import com.baidu.hugegraph.iterator.ExtendableIterator;
-import com.baidu.hugegraph.iterator.ListIterator;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
+import org.apache.hugegraph.backend.cache.CachedBackendStore.QueryId;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendMutation;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.ram.RamTable;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.IdQuery;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.backend.tx.GraphTransaction;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.event.EventListener;
+import org.apache.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.iterator.ExtendableIterator;
+import org.apache.hugegraph.iterator.ListIterator;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Events;
import com.google.common.collect.ImmutableSet;
public final class CachedGraphTransaction extends GraphTransaction {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedSchemaTransaction.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedSchemaTransaction.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java
index 07eac8a8b..e5b305c1e 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/CachedSchemaTransaction.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.util.ArrayList;
import java.util.List;
@@ -25,20 +25,20 @@ import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.ram.IntObjectMap;
-import com.baidu.hugegraph.backend.tx.SchemaTransaction;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.event.EventListener;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.ram.IntObjectMap;
+import org.apache.hugegraph.backend.tx.SchemaTransaction;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.event.EventListener;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Events;
import com.google.common.collect.ImmutableSet;
public final class CachedSchemaTransaction extends SchemaTransaction {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/LevelCache.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/LevelCache.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java
index 287f0b85a..9c2e25208 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/LevelCache.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java
@@ -17,14 +17,14 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.util.Iterator;
import java.util.function.Consumer;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.iterator.ExtendableIterator;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.iterator.ExtendableIterator;
+import org.apache.hugegraph.util.E;
public final class LevelCache extends AbstractCache {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/OffheapCache.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/OffheapCache.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java
index 835448795..e04e0c7b8 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/OffheapCache.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.nio.ByteBuffer;
import java.util.Collection;
@@ -26,28 +26,28 @@ import java.util.Iterator;
import java.util.List;
import java.util.function.Consumer;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn;
import org.caffinitas.ohc.CacheSerializer;
import org.caffinitas.ohc.CloseableIterator;
import org.caffinitas.ohc.Eviction;
import org.caffinitas.ohc.OHCache;
import org.caffinitas.ohc.OHCacheBuilder;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.serializer.AbstractSerializer;
-import com.baidu.hugegraph.backend.serializer.BinaryBackendEntry;
-import com.baidu.hugegraph.backend.serializer.BinarySerializer;
-import com.baidu.hugegraph.backend.serializer.BytesBuffer;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.serializer.AbstractSerializer;
+import org.apache.hugegraph.backend.serializer.BinaryBackendEntry;
+import org.apache.hugegraph.backend.serializer.BinarySerializer;
+import org.apache.hugegraph.backend.serializer.BytesBuffer;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.DataType;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
public class OffheapCache extends AbstractCache {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/RamCache.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java
similarity index 98%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/RamCache.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java
index 459de43e8..98e5c4a6d 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/RamCache.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.cache;
+package org.apache.hugegraph.backend.cache;
import java.util.Iterator;
import java.util.LinkedList;
@@ -27,10 +27,10 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.locks.Lock;
import java.util.function.Consumer;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.concurrent.KeyLock;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.concurrent.KeyLock;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.util.E;
public class RamCache extends AbstractCache {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/EdgeId.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/EdgeId.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java
index f7a98d69e..173d7132c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/EdgeId.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java
@@ -17,16 +17,16 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.id;
+package org.apache.hugegraph.backend.id;
-import com.baidu.hugegraph.exception.NotFoundException;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.exception.NotFoundException;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.StringEncoding;
/**
* Class used to format and parse id of edge, the edge id consists of:
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/Id.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/Id.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/Id.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/Id.java
index 06cf053cf..2c6082b9b 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/Id.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/Id.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.id;
+package org.apache.hugegraph.backend.id;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.util.E;
public interface Id extends Comparable {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdGenerator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdGenerator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java
index 4c93e8a21..183006faa 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdGenerator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java
@@ -17,18 +17,18 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.id;
+package org.apache.hugegraph.backend.id;
import java.util.Objects;
import java.util.UUID;
-import com.baidu.hugegraph.backend.id.Id.IdType;
-import com.baidu.hugegraph.backend.serializer.BytesBuffer;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.LongEncoding;
-import com.baidu.hugegraph.util.NumericUtil;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.backend.id.Id.IdType;
+import org.apache.hugegraph.backend.serializer.BytesBuffer;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.LongEncoding;
+import org.apache.hugegraph.util.NumericUtil;
+import org.apache.hugegraph.util.StringEncoding;
public abstract class IdGenerator {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdUtil.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdUtil.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java
index befc7485b..9d936923c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdUtil.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java
@@ -17,14 +17,14 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.id;
+package org.apache.hugegraph.backend.id;
import java.nio.ByteBuffer;
import org.apache.commons.lang3.StringUtils;
-import com.baidu.hugegraph.backend.id.Id.IdType;
-import com.baidu.hugegraph.backend.serializer.BytesBuffer;
+import org.apache.hugegraph.backend.id.Id.IdType;
+import org.apache.hugegraph.backend.serializer.BytesBuffer;
public final class IdUtil {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/SnowflakeIdGenerator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/SnowflakeIdGenerator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java
index 615e0e4ee..752f4e899 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/SnowflakeIdGenerator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java
@@ -17,22 +17,22 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.id;
+package org.apache.hugegraph.backend.id;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.util.TimeUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
+import org.apache.hugegraph.util.TimeUtil;
public class SnowflakeIdGenerator extends IdGenerator {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/SplicingIdGenerator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java
similarity index 98%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/SplicingIdGenerator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java
index e013bbb5c..af3275e56 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/SplicingIdGenerator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.id;
+package org.apache.hugegraph.backend.id;
import java.util.Arrays;
import java.util.List;
-import com.baidu.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.structure.HugeVertex;
public class SplicingIdGenerator extends IdGenerator {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java
index c8660a4f7..598e32afd 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -25,15 +25,15 @@ import java.util.Set;
import java.util.function.Function;
import org.apache.commons.lang.NotImplementedException;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.iterator.CIter;
-import com.baidu.hugegraph.iterator.Metadatable;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.iterator.CIter;
+import org.apache.hugegraph.iterator.Metadatable;
+import org.apache.hugegraph.util.E;
public abstract class IdHolder {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolderList.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolderList.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java
index 773483f8b..21d9a444b 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolderList.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
import java.util.ArrayList;
import java.util.Collection;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.util.E;
public class IdHolderList extends ArrayList {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageEntryIterator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageEntryIterator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java
index 48af1097c..51febe887 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageEntryIterator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java
@@ -17,17 +17,17 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
import java.util.NoSuchElementException;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.query.QueryResults;
import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.exception.NotSupportException;
-import com.baidu.hugegraph.iterator.CIter;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.iterator.CIter;
+import org.apache.hugegraph.util.E;
public class PageEntryIterator implements CIter {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageIds.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageIds.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageIds.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageIds.java
index 8ca4b1c0f..037a1a0a5 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageIds.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageIds.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
import java.util.Set;
-import com.baidu.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.Id;
import com.google.common.collect.ImmutableSet;
public final class PageIds {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageInfo.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java
similarity index 91%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageInfo.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java
index ef42ce02c..326c8220c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageInfo.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java
@@ -17,16 +17,16 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
import java.util.Iterator;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.backend.serializer.BytesBuffer;
-import com.baidu.hugegraph.iterator.Metadatable;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.backend.serializer.BytesBuffer;
+import org.apache.hugegraph.iterator.Metadatable;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.StringEncoding;
public final class PageInfo {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageState.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageState.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageState.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageState.java
index a6e2aa44a..0d2ec4d78 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/PageState.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageState.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.serializer.BytesBuffer;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.serializer.BytesBuffer;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.StringEncoding;
public class PageState {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/QueryList.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/QueryList.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/QueryList.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/QueryList.java
index 1f5dd533d..fe986f6ea 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/QueryList.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/QueryList.java
@@ -17,23 +17,23 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.page.IdHolder.BatchIdHolder;
-import com.baidu.hugegraph.backend.page.IdHolder.FixedIdHolder;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.ConditionQuery.OptimizedType;
-import com.baidu.hugegraph.backend.query.IdQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.ConditionQuery.OptimizedType;
+import org.apache.hugegraph.backend.query.IdQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.page.IdHolder.BatchIdHolder;
+import org.apache.hugegraph.backend.page.IdHolder.FixedIdHolder;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
public final class QueryList {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/SortByCountIdHolderList.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/SortByCountIdHolderList.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java
index 994e6657c..eeeb0ab61 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/SortByCountIdHolderList.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java
@@ -17,18 +17,18 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.page;
+package org.apache.hugegraph.backend.page;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.page.IdHolder.FixedIdHolder;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.util.CollectionUtil;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.page.IdHolder.FixedIdHolder;
+import org.apache.hugegraph.util.CollectionUtil;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableSet;
public class SortByCountIdHolderList extends IdHolderList {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Aggregate.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java
similarity index 98%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Aggregate.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java
index a5e5041e3..c53c0b68a 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Aggregate.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.util.Iterator;
import java.util.function.BiFunction;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/BatchConditionQuery.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/BatchConditionQuery.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java
index 1f3a8bb49..5b02fdcd9 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/BatchConditionQuery.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java
@@ -17,17 +17,17 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
-import com.baidu.hugegraph.backend.query.Condition.RelationType;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.backend.query.Condition.RelationType;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
public class BatchConditionQuery extends ConditionQuery {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Condition.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java
similarity index 98%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Condition.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java
index 1e6632440..7c07bc201 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Condition.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.util.ArrayList;
import java.util.Collection;
@@ -31,15 +31,15 @@ import java.util.function.BiPredicate;
import org.apache.commons.lang.ArrayUtils;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.store.Shard;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.DateUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.NumericUtil;
+import org.apache.hugegraph.backend.store.Shard;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.DateUtil;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.NumericUtil;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java
index 0def61cf2..3ee6938f7 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -26,27 +26,26 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.SplicingIdGenerator;
-import com.baidu.hugegraph.backend.query.Condition.Relation;
-import com.baidu.hugegraph.backend.query.Condition.RelationType;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.CollectionUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.LongEncoding;
-import com.baidu.hugegraph.util.NumericUtil;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.SplicingIdGenerator;
+import org.apache.hugegraph.backend.query.Condition.Relation;
+import org.apache.hugegraph.backend.query.Condition.RelationType;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.CollectionUtil;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.LongEncoding;
+import org.apache.hugegraph.util.NumericUtil;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQueryFlatten.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQueryFlatten.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java
index c0bd718df..487270ed7 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQueryFlatten.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.util.ArrayList;
import java.util.Arrays;
@@ -28,13 +28,13 @@ import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Condition.Relation;
-import com.baidu.hugegraph.backend.query.Condition.SyspropRelation;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.NumericUtil;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Condition.Relation;
+import org.apache.hugegraph.backend.query.Condition.SyspropRelation;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.NumericUtil;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -461,7 +461,7 @@ public final class ConditionQueryFlatten {
}
private static Relation selectRelation(Relation first, Relation second,
- boolean high) {
+ boolean high) {
if (first == null) {
return second;
}
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdPrefixQuery.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdPrefixQuery.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java
index 4c9c6e05f..99eaca461 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdPrefixQuery.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
public final class IdPrefixQuery extends Query {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdQuery.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdQuery.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java
index 874296b8a..b99ef2f50 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdQuery.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java
@@ -17,18 +17,18 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdRangeQuery.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdRangeQuery.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java
index 340f14ba8..a1e0b1344 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdRangeQuery.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
public final class IdRangeQuery extends Query {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java
index 317699ebf..5c96297a9 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.util.Collection;
import java.util.Collections;
@@ -25,18 +25,18 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Aggregate.AggregateFunc;
-import com.baidu.hugegraph.exception.LimitExceedException;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.CollectionType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.CollectionUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.collection.IdSet;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Aggregate.AggregateFunc;
+import org.apache.hugegraph.exception.LimitExceedException;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.CollectionType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.CollectionUtil;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.collection.IdSet;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/QueryResults.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/QueryResults.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java
index c1cf47aa1..9ec4baf97 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/QueryResults.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.query;
+package org.apache.hugegraph.backend.query;
import java.util.Collection;
import java.util.Collections;
@@ -30,16 +30,16 @@ import java.util.function.Function;
import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.iterator.CIter;
-import com.baidu.hugegraph.iterator.FlatMapperIterator;
-import com.baidu.hugegraph.iterator.ListIterator;
-import com.baidu.hugegraph.iterator.MapperIterator;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.type.Idfiable;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.iterator.CIter;
+import org.apache.hugegraph.iterator.FlatMapperIterator;
+import org.apache.hugegraph.iterator.ListIterator;
+import org.apache.hugegraph.iterator.MapperIterator;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.type.Idfiable;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
public class QueryResults {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/AbstractSerializer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java
similarity index 86%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/AbstractSerializer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java
index 47245c22c..10f882312 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/AbstractSerializer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java
@@ -17,16 +17,16 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.IdQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.type.HugeType;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.IdQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.config.HugeConfig;
public abstract class AbstractSerializer
implements GraphSerializer, SchemaSerializer {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryBackendEntry.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryBackendEntry.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java
index b540296b8..4ca31050b 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryBackendEntry.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@@ -26,12 +26,12 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntryIterator;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntryIterator;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
public class BinaryBackendEntry implements BackendEntry {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryEntryIterator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryEntryIterator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java
index e75ad6d05..f920592c0 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryEntryIterator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java
@@ -17,16 +17,16 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.function.BiFunction;
-import com.baidu.hugegraph.backend.page.PageState;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntry.BackendIterator;
-import com.baidu.hugegraph.backend.store.BackendEntryIterator;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.page.PageState;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntry.BackendIterator;
+import org.apache.hugegraph.backend.store.BackendEntryIterator;
+import org.apache.hugegraph.util.E;
public class BinaryEntryIterator extends BackendEntryIterator {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryScatterSerializer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java
similarity index 81%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryScatterSerializer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java
index 2b190f1b6..573204a5c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryScatterSerializer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java
@@ -17,19 +17,19 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.structure.HugeVertexProperty;
-import com.baidu.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.structure.HugeVertexProperty;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.config.HugeConfig;
public class BinaryScatterSerializer extends BinarySerializer {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java
index 9bf6c7842..ed2a5ffb6 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.Arrays;
import java.util.Collection;
@@ -27,51 +27,49 @@ import java.util.Map;
import org.apache.commons.lang.NotImplementedException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.EdgeId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.page.PageState;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.Condition.RangeConditions;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.IdPrefixQuery;
-import com.baidu.hugegraph.backend.query.IdRangeQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.serializer.BinaryBackendEntry.BinaryId;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeEdgeProperty;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.structure.HugeIndex;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.structure.HugeVertexProperty;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.AggregateType;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.type.define.Frequency;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.type.define.IdStrategy;
-import com.baidu.hugegraph.type.define.IndexType;
-import com.baidu.hugegraph.type.define.SchemaStatus;
-import com.baidu.hugegraph.type.define.SerialEnum;
-import com.baidu.hugegraph.type.define.WriteType;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.NumericUtil;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.EdgeId;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.page.PageState;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.*;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.Condition.RangeConditions;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.IdPrefixQuery;
+import org.apache.hugegraph.backend.query.IdRangeQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.serializer.BinaryBackendEntry.BinaryId;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeEdgeProperty;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.structure.HugeIndex;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.structure.HugeVertexProperty;
+import org.apache.hugegraph.type.define.AggregateType;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.DataType;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.type.define.Frequency;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.type.define.IdStrategy;
+import org.apache.hugegraph.type.define.IndexType;
+import org.apache.hugegraph.type.define.SchemaStatus;
+import org.apache.hugegraph.type.define.SerialEnum;
+import org.apache.hugegraph.type.define.WriteType;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.StringEncoding;
public class BinarySerializer extends AbstractSerializer {
@@ -873,7 +871,7 @@ public class BinarySerializer extends AbstractSerializer {
parsedEntry = new BinaryBackendEntry(originEntry.type(), new BinaryId(buffer.bytes(),
BytesBuffer.wrap(buffer.bytes()).readEdgeId()));
- for (BackendEntry.BackendColumn col : originEntry.columns()) {
+ for (BackendColumn col : originEntry.columns()) {
parsedEntry.column(buffer.bytes(), col.value);
}
return parsedEntry;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BytesBuffer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BytesBuffer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java
index 4cda2cb33..0c1f433f4 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BytesBuffer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.io.OutputStream;
import java.nio.Buffer;
@@ -27,20 +27,19 @@ import java.util.Collection;
import java.util.Date;
import java.util.UUID;
-import com.baidu.hugegraph.backend.id.EdgeId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.Id.IdType;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.serializer.BinaryBackendEntry.BinaryId;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.util.Blob;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.KryoUtil;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.backend.id.EdgeId;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.Id.IdType;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.DataType;
+import org.apache.hugegraph.util.*;
+import org.apache.hugegraph.backend.serializer.BinaryBackendEntry.BinaryId;
+import org.apache.hugegraph.util.Blob;
+import org.apache.hugegraph.util.KryoUtil;
+import org.apache.hugegraph.util.StringEncoding;
/**
* class BytesBuffer is a util for read/write binary
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/GraphSerializer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java
similarity index 71%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/GraphSerializer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java
index 166fcb22c..471d989c2 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/GraphSerializer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java
@@ -17,19 +17,19 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeEdgeProperty;
-import com.baidu.hugegraph.structure.HugeIndex;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.structure.HugeVertexProperty;
-import com.baidu.hugegraph.type.HugeType;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeEdgeProperty;
+import org.apache.hugegraph.structure.HugeIndex;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.structure.HugeVertexProperty;
public interface GraphSerializer {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/MergeIterator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/MergeIterator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java
index 162c62b87..688795808 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/MergeIterator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java
@@ -17,15 +17,15 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.function.BiFunction;
-import com.baidu.hugegraph.iterator.WrappedIterator;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.iterator.WrappedIterator;
+import org.apache.hugegraph.util.E;
public class MergeIterator extends WrappedIterator {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/SchemaSerializer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java
similarity index 80%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/SchemaSerializer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java
index 045f065da..1396cd1c8 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/SchemaSerializer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java
@@ -17,14 +17,14 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.VertexLabel;
public interface SchemaSerializer {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/SerializerFactory.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/SerializerFactory.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java
index 995c5b4da..869cecdb0 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/SerializerFactory.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.config.HugeConfig;
public class SerializerFactory {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java
index cfa9b169e..48b489c37 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.ArrayList;
import java.util.Collection;
@@ -30,11 +30,11 @@ import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.lang3.NotImplementedException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.HugeKeys;
public class TableBackendEntry implements BackendEntry {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableSerializer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableSerializer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java
index 7a56fe50a..2e51519bb 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableSerializer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java
@@ -17,51 +17,51 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.EdgeId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.id.IdUtil;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.SchemaLabel;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeEdgeProperty;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.structure.HugeIndex;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.structure.HugeVertexProperty;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.AggregateType;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.type.define.Frequency;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.type.define.IdStrategy;
-import com.baidu.hugegraph.type.define.IndexType;
-import com.baidu.hugegraph.type.define.SchemaStatus;
-import com.baidu.hugegraph.type.define.SerialEnum;
-import com.baidu.hugegraph.type.define.WriteType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.EdgeId;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.id.IdUtil;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.SchemaLabel;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeEdgeProperty;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.structure.HugeIndex;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.structure.HugeVertexProperty;
+import org.apache.hugegraph.type.define.AggregateType;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.DataType;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.type.define.Frequency;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.type.define.IdStrategy;
+import org.apache.hugegraph.type.define.IndexType;
+import org.apache.hugegraph.type.define.SchemaStatus;
+import org.apache.hugegraph.type.define.SerialEnum;
+import org.apache.hugegraph.type.define.WriteType;
+import org.apache.hugegraph.util.E;
public abstract class TableSerializer extends AbstractSerializer {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextBackendEntry.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextBackendEntry.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java
index 8f313d93c..ee14aaaf4 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextBackendEntry.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.ArrayList;
import java.util.Collection;
@@ -29,13 +29,13 @@ import java.util.NavigableMap;
import java.util.Set;
import java.util.concurrent.ConcurrentSkipListMap;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.JsonUtil;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.util.StringEncoding;
public class TextBackendEntry implements BackendEntry, Cloneable {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java
index 68f130a9a..e95ad4d04 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.serializer;
+package org.apache.hugegraph.backend.serializer;
import java.util.ArrayList;
import java.util.Arrays;
@@ -25,50 +25,49 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
-import com.baidu.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraph;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.config.HugeConfig;
import org.apache.commons.lang.NotImplementedException;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraph;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.EdgeId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.id.IdUtil;
-import com.baidu.hugegraph.backend.id.SplicingIdGenerator;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.Condition.RangeConditions;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.IdPrefixQuery;
-import com.baidu.hugegraph.backend.query.IdRangeQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeEdgeProperty;
-import com.baidu.hugegraph.structure.HugeElement;
-import com.baidu.hugegraph.structure.HugeIndex;
-import com.baidu.hugegraph.structure.HugeIndex.IdWithExpiredTime;
-import com.baidu.hugegraph.structure.HugeProperty;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.structure.HugeVertexProperty;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.AggregateType;
-import com.baidu.hugegraph.type.define.Cardinality;
-import com.baidu.hugegraph.type.define.DataType;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.type.define.Frequency;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.type.define.IdStrategy;
-import com.baidu.hugegraph.type.define.IndexType;
-import com.baidu.hugegraph.type.define.SchemaStatus;
-import com.baidu.hugegraph.type.define.WriteType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.backend.id.EdgeId;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.id.IdUtil;
+import org.apache.hugegraph.backend.id.SplicingIdGenerator;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.IdPrefixQuery;
+import org.apache.hugegraph.backend.query.IdRangeQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.schema.EdgeLabel;
+import org.apache.hugegraph.schema.IndexLabel;
+import org.apache.hugegraph.schema.PropertyKey;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.schema.VertexLabel;
+import org.apache.hugegraph.structure.HugeEdge;
+import org.apache.hugegraph.structure.HugeEdgeProperty;
+import org.apache.hugegraph.structure.HugeElement;
+import org.apache.hugegraph.structure.HugeIndex;
+import org.apache.hugegraph.structure.HugeIndex.IdWithExpiredTime;
+import org.apache.hugegraph.structure.HugeProperty;
+import org.apache.hugegraph.structure.HugeVertex;
+import org.apache.hugegraph.structure.HugeVertexProperty;
+import org.apache.hugegraph.type.define.AggregateType;
+import org.apache.hugegraph.type.define.Cardinality;
+import org.apache.hugegraph.type.define.DataType;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.type.define.Frequency;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.type.define.IdStrategy;
+import org.apache.hugegraph.type.define.IndexType;
+import org.apache.hugegraph.type.define.SchemaStatus;
+import org.apache.hugegraph.type.define.WriteType;
+import org.apache.hugegraph.util.E;
import com.google.common.collect.ImmutableMap;
public class TextSerializer extends AbstractSerializer {
@@ -459,7 +458,7 @@ public class TextSerializer extends AbstractSerializer {
List end = new ArrayList<>(start);
- RangeConditions range = new RangeConditions(sortValues);
+ Condition.RangeConditions range = new Condition.RangeConditions(sortValues);
if (range.keyMin() != null) {
start.add((String) range.keyMin());
}
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/AbstractBackendStore.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/AbstractBackendStore.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java
index 5e3ea6b07..9bb563a88 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/AbstractBackendStore.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java
@@ -17,10 +17,10 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
-import com.baidu.hugegraph.exception.ConnectionException;
-import com.baidu.hugegraph.type.HugeType;
+import org.apache.hugegraph.exception.ConnectionException;
+import org.apache.hugegraph.type.HugeType;
public abstract class AbstractBackendStore
implements BackendStore {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/AbstractBackendStoreProvider.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/AbstractBackendStoreProvider.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java
index c94a25fcd..e0fa6cbc5 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/AbstractBackendStoreProvider.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java
@@ -17,24 +17,24 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Future;
+import org.apache.hugegraph.backend.store.raft.StoreSnapshotFile;
import org.slf4j.Logger;
import com.alipay.remoting.rpc.RpcServer;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.store.raft.StoreSnapshotFile;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.event.EventListener;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.event.EventListener;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Events;
+import org.apache.hugegraph.util.Log;
public abstract class AbstractBackendStoreProvider
implements BackendStoreProvider {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendAction.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendAction.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java
index 8ace65d1d..c647d06fe 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendAction.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
-import com.baidu.hugegraph.type.define.Action;
+import org.apache.hugegraph.type.define.Action;
public class BackendAction {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java
index 38393d9f9..2765f6280 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java
@@ -17,19 +17,19 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.iterator.WrappedIterator;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.Idfiable;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.iterator.WrappedIterator;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.Idfiable;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.StringEncoding;
public interface BackendEntry extends Idfiable {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntryIterator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntryIterator.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java
index 151b7fa8a..c56161d6a 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntryIterator.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java
@@ -17,19 +17,19 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.NoSuchElementException;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.page.PageInfo;
-import com.baidu.hugegraph.backend.page.PageState;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.exception.LimitExceedException;
-import com.baidu.hugegraph.exception.NotSupportException;
-import com.baidu.hugegraph.iterator.CIter;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.page.PageInfo;
+import org.apache.hugegraph.backend.page.PageState;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.exception.LimitExceedException;
+import org.apache.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.iterator.CIter;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
import org.slf4j.Logger;
public abstract class BackendEntryIterator implements CIter {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendFeatures.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendFeatures.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java
index c1dac2780..48ac5e9b9 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendFeatures.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
public interface BackendFeatures {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendMetrics.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendMetrics.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java
index 1a103f154..42bb8199f 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendMetrics.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Map;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendMutation.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendMutation.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java
index e371b3ad7..1e84fe6bf 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendMutation.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.ArrayList;
import java.util.Iterator;
@@ -25,14 +25,14 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.iterator.ExtendableIterator;
-import com.baidu.hugegraph.perf.PerfUtil.Watched;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Action;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.iterator.ExtendableIterator;
+import org.apache.hugegraph.perf.PerfUtil.Watched;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Action;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
public class BackendMutation {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendProviderFactory.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendProviderFactory.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java
index c8d22450a..16ee99cb4 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendProviderFactory.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java
@@ -17,20 +17,20 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.store.memory.InMemoryDBStoreProvider;
-import com.baidu.hugegraph.backend.store.raft.RaftBackendStoreProvider;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.store.memory.InMemoryDBStoreProvider;
+import org.apache.hugegraph.backend.store.raft.RaftBackendStoreProvider;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.util.Log;
public class BackendProviderFactory {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendSession.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendSession.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java
index 65258bfea..323ddcd52 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendSession.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
-import com.baidu.hugegraph.backend.store.BackendStore.TxState;
+import org.apache.hugegraph.backend.store.BackendStore.TxState;
/**
* interface Session for backend store
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendSessionPool.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendSessionPool.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java
index 50fd3f884..d12f87629 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendSessionPool.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -27,9 +27,9 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.util.Log;
public abstract class BackendSessionPool {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStore.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStore.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java
index 828f35cc6..7e45b4e07 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStore.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java
@@ -17,17 +17,17 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Iterator;
import java.util.Map;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
public interface BackendStore {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStoreInfo.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStoreInfo.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java
index 3c7f9dc4d..5ed81d214 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStoreInfo.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
-import com.baidu.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.config.HugeConfig;
import org.slf4j.Logger;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.util.Log;
public class BackendStoreInfo {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStoreProvider.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java
similarity index 91%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStoreProvider.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java
index 490fbb12e..bcdb1a302 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendStoreProvider.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import com.alipay.remoting.rpc.RpcServer;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.event.EventListener;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.event.EventListener;
public interface BackendStoreProvider {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendTable.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java
similarity index 96%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendTable.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java
index 6fb564df0..f38177664 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendTable.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -25,16 +25,16 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.serializer.BytesBuffer;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.Directions;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.NumericUtil;
-import com.baidu.hugegraph.util.StringEncoding;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.serializer.BytesBuffer;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.NumericUtil;
+import org.apache.hugegraph.util.StringEncoding;
import com.google.common.collect.ImmutableList;
public abstract class BackendTable {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/MetaDispatcher.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/MetaDispatcher.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java
index c6d705493..eb88e3fe9 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/MetaDispatcher.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import com.baidu.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.exception.NotSupportException;
public class MetaDispatcher {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/MetaHandler.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/MetaHandler.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java
index 1436f0bd7..e1df2b08b 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/MetaHandler.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
public interface MetaHandler {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/Shard.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/Shard.java
similarity index 97%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/Shard.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/Shard.java
index 261844a06..d6d54ddca 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/Shard.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/Shard.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
/**
* Shard is used for backend storage (like cassandra, hbase) scanning
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/SystemSchemaStore.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/SystemSchemaStore.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java
index cd1424ef9..d67fda86a 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/SystemSchemaStore.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java
@@ -17,14 +17,14 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Map;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.type.define.CollectionType;
-import com.baidu.hugegraph.util.collection.CollectionFactory;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.schema.SchemaElement;
+import org.apache.hugegraph.type.define.CollectionType;
+import org.apache.hugegraph.util.collection.CollectionFactory;
/**
* The system schema will be initialized when server started, and the
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/TableDefine.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/TableDefine.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java
index ee952bfa6..be0676808 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/TableDefine.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store;
+package org.apache.hugegraph.backend.store;
import java.util.Arrays;
import java.util.Collection;
@@ -26,8 +26,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableMap;
public class TableDefine {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBStore.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBStore.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java
index ead055353..79ac8d538 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBStore.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java
@@ -17,30 +17,31 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.memory;
+package org.apache.hugegraph.backend.store.memory;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.LocalCounter;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.serializer.TextBackendEntry;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.Action;
import org.slf4j.Logger;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.LocalCounter;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.serializer.TextBackendEntry;
-import com.baidu.hugegraph.backend.store.AbstractBackendStore;
-import com.baidu.hugegraph.backend.store.BackendAction;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendMutation;
-import com.baidu.hugegraph.backend.store.BackendSession;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.store.AbstractBackendStore;
+import org.apache.hugegraph.backend.store.BackendAction;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendMutation;
+import org.apache.hugegraph.backend.store.BackendSession;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.util.Log;
/**
* NOTE:
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java
similarity index 86%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java
index d9eef07dc..ccbf1c007 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java
@@ -17,18 +17,18 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.memory;
+package org.apache.hugegraph.backend.store.memory;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import com.baidu.hugegraph.backend.store.AbstractBackendStoreProvider;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.memory.InMemoryDBStore.InMemoryGraphStore;
-import com.baidu.hugegraph.backend.store.memory.InMemoryDBStore.InMemorySchemaStore;
-import com.baidu.hugegraph.backend.store.memory.InMemoryDBStore.InMemorySystemStore;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.util.Events;
+import org.apache.hugegraph.backend.store.AbstractBackendStoreProvider;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.util.Events;
+import org.apache.hugegraph.backend.store.memory.InMemoryDBStore.InMemoryGraphStore;
+import org.apache.hugegraph.backend.store.memory.InMemoryDBStore.InMemorySchemaStore;
+import org.apache.hugegraph.backend.store.memory.InMemoryDBStore.InMemorySystemStore;
+import org.apache.hugegraph.config.HugeConfig;
public class InMemoryDBStoreProvider extends AbstractBackendStoreProvider {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTable.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java
similarity index 91%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTable.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java
index 228048858..0ebb2a58f 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTable.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.memory;
+package org.apache.hugegraph.backend.store.memory;
import java.util.ArrayList;
import java.util.Collection;
@@ -27,28 +27,28 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.serializer.TextBackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendSession;
+import org.apache.hugegraph.backend.store.BackendTable;
+import org.apache.hugegraph.backend.store.Shard;
+import org.apache.hugegraph.exception.NotSupportException;
+import org.apache.hugegraph.type.HugeType;
import org.slf4j.Logger;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Aggregate;
-import com.baidu.hugegraph.backend.query.Aggregate.AggregateFunc;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.IdPrefixQuery;
-import com.baidu.hugegraph.backend.query.IdRangeQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.backend.serializer.TextBackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendSession;
-import com.baidu.hugegraph.backend.store.BackendTable;
-import com.baidu.hugegraph.backend.store.Shard;
-import com.baidu.hugegraph.exception.NotSupportException;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.query.Aggregate;
+import org.apache.hugegraph.backend.query.Aggregate.AggregateFunc;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.IdPrefixQuery;
+import org.apache.hugegraph.backend.query.IdRangeQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.Log;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTables.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTables.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java
index 96251b748..aa37998eb 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryDBTables.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.memory;
+package org.apache.hugegraph.backend.store.memory;
import java.util.ArrayList;
import java.util.Arrays;
@@ -31,26 +31,26 @@ import java.util.NavigableMap;
import java.util.SortedMap;
import java.util.concurrent.ConcurrentSkipListMap;
-import com.baidu.hugegraph.backend.id.EdgeId;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.id.IdGenerator;
-import com.baidu.hugegraph.backend.query.Condition;
-import com.baidu.hugegraph.backend.query.Condition.RangeConditions;
-import com.baidu.hugegraph.backend.query.ConditionQuery;
-import com.baidu.hugegraph.backend.query.IdQuery;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.query.QueryResults;
-import com.baidu.hugegraph.backend.serializer.TextBackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn;
-import com.baidu.hugegraph.backend.store.BackendSession;
-import com.baidu.hugegraph.iterator.ExtendableIterator;
-import com.baidu.hugegraph.structure.HugeIndex;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.HugeKeys;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.InsertionOrderUtil;
-import com.baidu.hugegraph.util.NumericUtil;
+import org.apache.hugegraph.backend.id.EdgeId;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.id.IdGenerator;
+import org.apache.hugegraph.backend.serializer.TextBackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn;
+import org.apache.hugegraph.backend.store.BackendSession;
+import org.apache.hugegraph.structure.HugeIndex;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.HugeKeys;
+import org.apache.hugegraph.backend.query.Condition;
+import org.apache.hugegraph.backend.query.Condition.RangeConditions;
+import org.apache.hugegraph.backend.query.ConditionQuery;
+import org.apache.hugegraph.backend.query.IdQuery;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.query.QueryResults;
+import org.apache.hugegraph.iterator.ExtendableIterator;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.InsertionOrderUtil;
+import org.apache.hugegraph.util.NumericUtil;
import com.google.common.collect.ImmutableList;
public class InMemoryDBTables {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryMetrics.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryMetrics.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java
index ab03cd4e2..3a7b784bc 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/memory/InMemoryMetrics.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.memory;
+package org.apache.hugegraph.backend.store.memory;
import java.util.Map;
-import com.baidu.hugegraph.backend.store.BackendMetrics;
+import org.apache.hugegraph.backend.store.BackendMetrics;
import com.google.common.collect.ImmutableMap;
public class InMemoryMetrics implements BackendMetrics {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftAddPeerJob.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftAddPeerJob.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java
index 0fd1d49c3..5993d3f81 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftAddPeerJob.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.Map;
-import com.baidu.hugegraph.job.SysJob;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.job.SysJob;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
public class RaftAddPeerJob extends SysJob {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftBackendStore.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftBackendStore.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java
index 8dacb8fef..36658d1c8 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftBackendStore.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.ArrayList;
import java.util.Iterator;
@@ -29,20 +29,20 @@ import org.slf4j.Logger;
import com.alipay.sofa.jraft.Status;
import com.alipay.sofa.jraft.closure.ReadIndexClosure;
import com.alipay.sofa.jraft.util.BytesUtil;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendEntry;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendMutation;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.backend.store.SystemSchemaStore;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.StoreAction;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.StoreType;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendEntry;
+import org.apache.hugegraph.backend.store.BackendFeatures;
+import org.apache.hugegraph.backend.store.BackendMutation;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.backend.store.SystemSchemaStore;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.StoreAction;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.StoreType;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Log;
public class RaftBackendStore implements BackendStore {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftBackendStoreProvider.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftBackendStoreProvider.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java
index 695da68b2..bbc7ea2dc 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftBackendStoreProvider.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.Set;
import java.util.concurrent.Future;
@@ -25,18 +25,18 @@ import java.util.concurrent.Future;
import org.slf4j.Logger;
import com.alipay.remoting.rpc.RpcServer;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.StoreAction;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.StoreType;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.event.EventListener;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.StoreAction;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.StoreType;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.event.EventListener;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Events;
+import org.apache.hugegraph.util.Log;
import com.google.common.collect.ImmutableSet;
public class RaftBackendStoreProvider implements BackendStoreProvider {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftClosure.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftClosure.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java
index d81559ea4..4866dde7b 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftClosure.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
@@ -29,8 +29,8 @@ import org.slf4j.Logger;
import com.alipay.sofa.jraft.Closure;
import com.alipay.sofa.jraft.Status;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.util.Log;
public class RaftClosure implements Closure {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftContext.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java
similarity index 92%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftContext.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java
index bb1297b2f..92ca6c14c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftContext.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.io.File;
import java.io.IOException;
@@ -32,6 +32,8 @@ import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
import org.apache.commons.io.FileUtils;
+import org.apache.hugegraph.backend.store.raft.rpc.ListPeersProcessor;
+import org.apache.hugegraph.backend.store.raft.rpc.RpcForwarder;
import org.slf4j.Logger;
import com.alipay.sofa.jraft.NodeManager;
@@ -45,29 +47,27 @@ import com.alipay.sofa.jraft.rpc.RpcServer;
import com.alipay.sofa.jraft.rpc.impl.BoltRpcServer;
import com.alipay.sofa.jraft.util.NamedThreadFactory;
import com.alipay.sofa.jraft.util.ThreadPoolUtil;
-import com.baidu.hugegraph.HugeException;
-import com.baidu.hugegraph.HugeGraphParams;
-import com.baidu.hugegraph.backend.cache.Cache;
-import com.baidu.hugegraph.backend.id.Id;
-import com.baidu.hugegraph.backend.query.Query;
-import com.baidu.hugegraph.backend.store.BackendAction;
-import com.baidu.hugegraph.backend.store.BackendMutation;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.backend.store.raft.rpc.ListPeersProcessor;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.StoreType;
-import com.baidu.hugegraph.backend.store.raft.rpc.RpcForwarder;
-import com.baidu.hugegraph.backend.store.raft.rpc.SetLeaderProcessor;
-import com.baidu.hugegraph.backend.store.raft.rpc.StoreCommandProcessor;
-import com.baidu.hugegraph.config.CoreOptions;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.event.EventHub;
-import com.baidu.hugegraph.type.HugeType;
-import com.baidu.hugegraph.type.define.GraphMode;
-import com.baidu.hugegraph.util.Bytes;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.HugeException;
+import org.apache.hugegraph.HugeGraphParams;
+import org.apache.hugegraph.backend.cache.Cache;
+import org.apache.hugegraph.backend.id.Id;
+import org.apache.hugegraph.backend.query.Query;
+import org.apache.hugegraph.backend.store.BackendAction;
+import org.apache.hugegraph.backend.store.BackendMutation;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.backend.store.BackendStoreProvider;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.StoreType;
+import org.apache.hugegraph.backend.store.raft.rpc.SetLeaderProcessor;
+import org.apache.hugegraph.backend.store.raft.rpc.StoreCommandProcessor;
+import org.apache.hugegraph.config.CoreOptions;
+import org.apache.hugegraph.config.HugeConfig;
+import org.apache.hugegraph.event.EventHub;
+import org.apache.hugegraph.type.HugeType;
+import org.apache.hugegraph.type.define.GraphMode;
+import org.apache.hugegraph.util.Bytes;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.Events;
+import org.apache.hugegraph.util.Log;
public final class RaftContext {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftException.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java
similarity index 94%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftException.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java
index 0511d1333..9e4176419 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftException.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
-import com.baidu.hugegraph.HugeException;
+import org.apache.hugegraph.HugeException;
public class RaftException extends HugeException {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManager.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java
index 7a786863b..c4d10374c 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManager.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.List;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManagerImpl.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java
similarity index 91%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManagerImpl.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java
index a00040371..fe8e988d1 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftGroupManagerImpl.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.List;
import java.util.stream.Collectors;
@@ -25,13 +25,13 @@ import java.util.stream.Collectors;
import com.alipay.sofa.jraft.Node;
import com.alipay.sofa.jraft.Status;
import com.alipay.sofa.jraft.entity.PeerId;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.ListPeersRequest;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.ListPeersResponse;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.SetLeaderRequest;
-import com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.SetLeaderResponse;
-import com.baidu.hugegraph.backend.store.raft.rpc.RpcForwarder;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.backend.store.raft.rpc.RpcForwarder;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.ListPeersRequest;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.ListPeersResponse;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.SetLeaderRequest;
+import org.apache.hugegraph.backend.store.raft.rpc.RaftRequests.SetLeaderResponse;
+import org.apache.hugegraph.util.E;
import com.google.protobuf.Message;
public class RaftGroupManagerImpl implements RaftGroupManager {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftNode.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java
similarity index 98%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftNode.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java
index 53ad9bcbb..a762dbb3b 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftNode.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.io.IOException;
import java.nio.ByteBuffer;
@@ -39,9 +39,9 @@ import com.alipay.sofa.jraft.error.RaftError;
import com.alipay.sofa.jraft.option.NodeOptions;
import com.alipay.sofa.jraft.rpc.RpcServer;
import com.alipay.sofa.jraft.util.BytesUtil;
-import com.baidu.hugegraph.backend.BackendException;
-import com.baidu.hugegraph.util.LZ4Util;
-import com.baidu.hugegraph.util.Log;
+import org.apache.hugegraph.backend.BackendException;
+import org.apache.hugegraph.util.LZ4Util;
+import org.apache.hugegraph.util.Log;
public final class RaftNode {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftRemovePeerJob.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java
similarity index 90%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftRemovePeerJob.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java
index eed62515d..f04d785f7 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftRemovePeerJob.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.Map;
-import com.baidu.hugegraph.job.SysJob;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.JsonUtil;
+import org.apache.hugegraph.job.SysJob;
+import org.apache.hugegraph.util.E;
+import org.apache.hugegraph.util.JsonUtil;
public class RaftRemovePeerJob extends SysJob {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftResult.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java
similarity index 95%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftResult.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java
index 5f26993ff..2ef0396db 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftResult.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java
@@ -17,12 +17,12 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
import java.util.function.Supplier;
import com.alipay.sofa.jraft.Status;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.util.E;
public final class RaftResult {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftStoreClosure.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java
similarity index 93%
rename from hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftStoreClosure.java
rename to hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java
index f468b961a..640bb3d50 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/raft/RaftStoreClosure.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package com.baidu.hugegraph.backend.store.raft;
+package org.apache.hugegraph.backend.store.raft;
-import com.baidu.hugegraph.util.E;
+import org.apache.hugegraph.util.E;
public class RaftStoreClosure extends RaftClosure