diff --git a/README.md b/README.md index 3d669ebad..5196b4328 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![codecov](https://codecov.io/gh/hugegraph/hugegraph-common/branch/master/graph/badge.svg)](https://codecov.io/gh/hugegraph/hugegraph-common) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.baidu.hugegraph/hugegraph-common/badge.svg)](https://mvnrepository.com/artifact/com.baidu.hugegraph/hugegraph-common) +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.hugegraph/hugegraph-common/badge.svg)](https://mvnrepository.com/artifact/org.apache.hugegraph/hugegraph-common) hugegraph-commons is a common module for [HugeGraph](https://github.com/hugegraph/hugegraph) and its peripheral components. hugegraph-commons encapsulates locks, configurations, events, iterators, rest and some diff --git a/hugegraph-common/README.md b/hugegraph-common/README.md index d3115240d..ca2f80d75 100644 --- a/hugegraph-common/README.md +++ b/hugegraph-common/README.md @@ -3,7 +3,7 @@ [![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![Build Status](https://travis-ci.org/hugegraph/hugegraph-common.svg?branch=master)](https://travis-ci.org/hugegraph/hugegraph-common) [![codecov](https://codecov.io/gh/hugegraph/hugegraph-common/branch/master/graph/badge.svg)](https://codecov.io/gh/hugegraph/hugegraph-common) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.baidu.hugegraph/hugegraph-common/badge.svg)](https://mvnrepository.com/artifact/com.baidu.hugegraph/hugegraph-common) +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.hugegraph/hugegraph-common/badge.svg)](https://mvnrepository.com/artifact/org.apache.hugegraph/hugegraph-common) hugegraph-common is a common module for [HugeGraph](https://github.com/hugegraph/hugegraph) and its peripheral components. hugegraph-common encapsulates locks, configurations, events, iterators, rest and some diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/AtomicLock.java b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/AtomicLock.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/AtomicLock.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/AtomicLock.java index 831606515..7c9a4c0aa 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/AtomicLock.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/AtomicLock.java @@ -17,14 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.concurrent; +package org.apache.hugegraph.concurrent; import java.util.concurrent.atomic.AtomicReference; +import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -import com.baidu.hugegraph.util.Log; - public class AtomicLock { private static final Logger LOG = Log.logger(LockManager.class); diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/BarrierEvent.java b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/BarrierEvent.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/BarrierEvent.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/BarrierEvent.java index b6ccab932..1c89d11d0 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/BarrierEvent.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/BarrierEvent.java @@ -18,14 +18,14 @@ * under the License. */ -package com.baidu.hugegraph.concurrent; +package org.apache.hugegraph.concurrent; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; public class BarrierEvent { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/KeyLock.java b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/KeyLock.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/KeyLock.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/KeyLock.java index dd8781b47..eda012b87 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/KeyLock.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/KeyLock.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.concurrent; +package org.apache.hugegraph.concurrent; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.locks.Lock; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.Striped; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/LockGroup.java b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/LockGroup.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/LockGroup.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/LockGroup.java index 7d29c98ed..17b7347cd 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/LockGroup.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/LockGroup.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.concurrent; +package org.apache.hugegraph.concurrent; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/LockManager.java b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/LockManager.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/LockManager.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/LockManager.java index 299b0011a..d2c60980d 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/LockManager.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/LockManager.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.concurrent; +package org.apache.hugegraph.concurrent; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/PausableScheduledThreadPool.java b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/PausableScheduledThreadPool.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/PausableScheduledThreadPool.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/PausableScheduledThreadPool.java index fb5a5f131..e5dba9fee 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/PausableScheduledThreadPool.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/PausableScheduledThreadPool.java @@ -17,16 +17,15 @@ * under the License. */ -package com.baidu.hugegraph.concurrent; +package org.apache.hugegraph.concurrent; import java.util.List; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory; +import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -import com.baidu.hugegraph.util.Log; - public class PausableScheduledThreadPool extends ScheduledThreadPoolExecutor { private static final Logger LOG = Log.logger( diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/RowLock.java b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/RowLock.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/RowLock.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/RowLock.java index d70d3b573..1eb18f649 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/concurrent/RowLock.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/concurrent/RowLock.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.concurrent; +package org.apache.hugegraph.concurrent; import java.util.ArrayList; import java.util.Collections; @@ -29,7 +29,7 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; public class RowLock> { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigConvOption.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigConvOption.java similarity index 95% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigConvOption.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigConvOption.java index f67d0e478..5966176c2 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigConvOption.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigConvOption.java @@ -17,11 +17,11 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.util.function.Function; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; import com.google.common.base.Predicate; public class ConfigConvOption extends TypedOption { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigException.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigException.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigException.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigException.java index aab2efb39..cd7981368 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigException.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigException.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; public class ConfigException extends RuntimeException { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigListConvOption.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigListConvOption.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigListConvOption.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigListConvOption.java index 151fbf92c..32351b4fa 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigListConvOption.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigListConvOption.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Function; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; import com.google.common.base.Predicate; public class ConfigListConvOption extends TypedOption, List> { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigListOption.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigListOption.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigListOption.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigListOption.java index ff114ccb7..7bba7ec2f 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigListOption.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigListOption.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Function; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; import com.google.common.base.Predicate; public class ConfigListOption extends ConfigOption> { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigOption.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigOption.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigOption.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigOption.java index cb958744b..d85d508af 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/ConfigOption.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/ConfigOption.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import com.google.common.base.Predicate; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/HugeConfig.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/HugeConfig.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/HugeConfig.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/HugeConfig.java index 69f78744f..b25153d4f 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/HugeConfig.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/HugeConfig.java @@ -17,15 +17,15 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; -import com.baidu.hugegraph.util.E; -import com.baidu.hugegraph.util.Log; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; import org.apache.commons.configuration2.Configuration; import org.apache.commons.configuration2.FileBasedConfiguration; import org.apache.commons.configuration2.PropertiesConfiguration; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionChecker.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionChecker.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionChecker.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionChecker.java index f3e116f41..551fe93c8 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionChecker.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionChecker.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.lang.reflect.Array; import java.util.Arrays; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionHolder.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionHolder.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionHolder.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionHolder.java index e5c5be6a6..39c0dad94 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionHolder.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionHolder.java @@ -17,17 +17,16 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.lang.reflect.Field; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -import com.baidu.hugegraph.util.Log; - public class OptionHolder { private static final Logger LOG = Log.logger(HugeConfig.class); diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionSpace.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionSpace.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionSpace.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionSpace.java index 8c1128c1f..0c4d94aaa 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/OptionSpace.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/OptionSpace.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -27,11 +27,10 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -import com.baidu.hugegraph.util.E; -import com.baidu.hugegraph.util.Log; - public final class OptionSpace { private static final Logger LOG = Log.logger(OptionSpace.class); diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/TypedOption.java b/hugegraph-common/src/main/java/org/apache/hugegraph/config/TypedOption.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/config/TypedOption.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/config/TypedOption.java index cd5841bf7..59ed9da3a 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/config/TypedOption.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/config/TypedOption.java @@ -17,17 +17,17 @@ * under the License. */ -package com.baidu.hugegraph.config; +package org.apache.hugegraph.config; import java.lang.reflect.Method; import java.util.List; import java.util.Set; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; import org.apache.commons.configuration.PropertyConverter; import org.slf4j.Logger; -import com.baidu.hugegraph.util.E; -import com.baidu.hugegraph.util.Log; import com.google.common.base.Joiner; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableSet; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/date/SafeDateFormat.java b/hugegraph-common/src/main/java/org/apache/hugegraph/date/SafeDateFormat.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/date/SafeDateFormat.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/date/SafeDateFormat.java index 68cd0089e..0deba51e6 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/date/SafeDateFormat.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/date/SafeDateFormat.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.date; +package org.apache.hugegraph.date; import java.util.Date; import java.util.TimeZone; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/event/Event.java b/hugegraph-common/src/main/java/org/apache/hugegraph/event/Event.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/event/Event.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/event/Event.java index 733fd204e..fccc1cd8e 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/event/Event.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/event/Event.java @@ -17,12 +17,12 @@ * under the License. */ -package com.baidu.hugegraph.event; +package org.apache.hugegraph.event; import java.util.Arrays; import java.util.Collections; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; public class Event extends java.util.EventObject { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/event/EventHub.java b/hugegraph-common/src/main/java/org/apache/hugegraph/event/EventHub.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/event/EventHub.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/event/EventHub.java index 5bd08706a..0e426fcb8 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/event/EventHub.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/event/EventHub.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.event; +package org.apache.hugegraph.event; import java.util.Collections; import java.util.List; @@ -31,12 +31,12 @@ import javax.annotation.Nullable; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.ExecutorUtil; +import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -import com.baidu.hugegraph.iterator.ExtendableIterator; -import com.baidu.hugegraph.util.E; -import com.baidu.hugegraph.util.ExecutorUtil; -import com.baidu.hugegraph.util.Log; +import org.apache.hugegraph.iterator.ExtendableIterator; import com.google.common.collect.ImmutableList; public class EventHub { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/event/EventListener.java b/hugegraph-common/src/main/java/org/apache/hugegraph/event/EventListener.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/event/EventListener.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/event/EventListener.java index 71148b24a..a0deb4c03 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/event/EventListener.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/event/EventListener.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.event; +package org.apache.hugegraph.event; public interface EventListener extends java.util.EventListener { /** diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/func/TriFunction.java b/hugegraph-common/src/main/java/org/apache/hugegraph/func/TriFunction.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/func/TriFunction.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/func/TriFunction.java index 555a0ee46..b381d42e7 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/func/TriFunction.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/func/TriFunction.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.func; +package org.apache.hugegraph.func; public interface TriFunction { public R apply(T1 v1, T2 v2, T3 v3); diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/BatchMapperIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/BatchMapperIterator.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/BatchMapperIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/BatchMapperIterator.java index 283fc4504..79f9e87bd 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/BatchMapperIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/BatchMapperIterator.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; import java.util.List; import java.util.function.Function; -import com.baidu.hugegraph.util.E; -import com.baidu.hugegraph.util.InsertionOrderUtil; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.InsertionOrderUtil; import com.google.common.collect.ImmutableList; public class BatchMapperIterator extends WrappedIterator { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/CIter.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/CIter.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/CIter.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/CIter.java index 35eda4527..fdaa8dc61 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/CIter.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/CIter.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/ExtendableIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/ExtendableIterator.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/ExtendableIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/ExtendableIterator.java index d9985edc5..d4e690f83 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/ExtendableIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/ExtendableIterator.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Deque; import java.util.Iterator; import java.util.concurrent.ConcurrentLinkedDeque; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; public class ExtendableIterator extends WrappedIterator { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FilterIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FilterIterator.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FilterIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FilterIterator.java index 1dfc3abe7..8b546efea 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FilterIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FilterIterator.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; import java.util.function.Function; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FlatMapperFilterIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FlatMapperFilterIterator.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FlatMapperFilterIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FlatMapperFilterIterator.java index a222319b1..fe552326a 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FlatMapperFilterIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FlatMapperFilterIterator.java @@ -17,12 +17,12 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; import java.util.function.Function; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; public class FlatMapperFilterIterator extends FlatMapperIterator { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FlatMapperIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FlatMapperIterator.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FlatMapperIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FlatMapperIterator.java index 6b4cd9855..92cd451e9 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/FlatMapperIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FlatMapperIterator.java @@ -17,12 +17,12 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; import java.util.function.Function; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; public class FlatMapperIterator extends WrappedIterator { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/LimitIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/LimitIterator.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/LimitIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/LimitIterator.java index 671168bbb..6a166af79 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/LimitIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/LimitIterator.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; import java.util.function.Function; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/ListIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/ListIterator.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/ListIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/ListIterator.java index f21a43646..9ca190f12 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/ListIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/ListIterator.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; -import com.baidu.hugegraph.util.InsertionOrderUtil; +import org.apache.hugegraph.util.InsertionOrderUtil; public class ListIterator extends WrappedIterator { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/MapperIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/MapperIterator.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/MapperIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/MapperIterator.java index c02d17c27..9d523b5fb 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/MapperIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/MapperIterator.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; import java.util.function.Function; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/Metadatable.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/Metadatable.java similarity index 95% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/Metadatable.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/Metadatable.java index 4b6d2071c..2f7d81f3f 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/Metadatable.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/Metadatable.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; public interface Metadatable { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/WrappedIterator.java b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/WrappedIterator.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/WrappedIterator.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/iterator/WrappedIterator.java index 21c4e9ee7..6eb2f59f0 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/iterator/WrappedIterator.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/iterator/WrappedIterator.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.iterator; +package org.apache.hugegraph.iterator; import java.util.Iterator; import java.util.NoSuchElementException; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseCommonParam.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseCommonParam.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseCommonParam.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseCommonParam.java index 2d1f45c61..6cb5b8940 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseCommonParam.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseCommonParam.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; import java.util.Date; import java.util.List; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseCreateParam.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseCreateParam.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseCreateParam.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseCreateParam.java index 7cf69f838..c14b2403b 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseCreateParam.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseCreateParam.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseExtraParam.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseExtraParam.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseExtraParam.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseExtraParam.java index 0c3337f1a..361acb5de 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseExtraParam.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseExtraParam.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseInstallParam.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseInstallParam.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseInstallParam.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseInstallParam.java index 4a5237bd7..462029f34 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseInstallParam.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseInstallParam.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseManager.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseManager.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseManager.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseManager.java index 892919c80..737889998 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseManager.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseManager.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; public interface LicenseManager { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseManagerFactory.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseManagerFactory.java similarity index 91% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseManagerFactory.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseManagerFactory.java index cf38c773e..c14ddca23 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseManagerFactory.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseManagerFactory.java @@ -17,11 +17,11 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; import org.apache.commons.lang.NotImplementedException; -import com.baidu.hugegraph.license.LicenseManager.VerifyCallback; +import org.apache.hugegraph.license.LicenseManager.VerifyCallback; public class LicenseManagerFactory { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseParams.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseParams.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseParams.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseParams.java index dad9cf7cb..dcc4146d6 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/LicenseParams.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseParams.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; import java.util.Date; import java.util.List; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/MachineInfo.java b/hugegraph-common/src/main/java/org/apache/hugegraph/license/MachineInfo.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/license/MachineInfo.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/license/MachineInfo.java index 9b9a96ca6..63d09de9a 100755 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/license/MachineInfo.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/license/MachineInfo.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.license; +package org.apache.hugegraph.license; import java.net.InetAddress; import java.net.NetworkInterface; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/LightStopwatch.java b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/LightStopwatch.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/perf/LightStopwatch.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/perf/LightStopwatch.java index b57ae378a..1f63de73c 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/LightStopwatch.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/LightStopwatch.java @@ -17,11 +17,11 @@ * under the License. */ -package com.baidu.hugegraph.perf; +package org.apache.hugegraph.perf; import java.util.List; -import com.baidu.hugegraph.perf.PerfUtil.FastMap; +import org.apache.hugegraph.perf.PerfUtil.FastMap; public final class LightStopwatch implements Stopwatch { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/NormalStopwatch.java b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/NormalStopwatch.java similarity index 95% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/perf/NormalStopwatch.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/perf/NormalStopwatch.java index 7011bcab7..8b8aa0693 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/NormalStopwatch.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/NormalStopwatch.java @@ -17,17 +17,15 @@ * under the License. */ -package com.baidu.hugegraph.perf; +package org.apache.hugegraph.perf; import java.util.List; import java.util.function.BiFunction; +import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -import com.baidu.hugegraph.perf.PerfUtil.FastMap; -import com.baidu.hugegraph.perf.PerfUtil.LocalStack; -import com.baidu.hugegraph.testutil.Whitebox; -import com.baidu.hugegraph.util.Log; +import org.apache.hugegraph.testutil.Whitebox; public final class NormalStopwatch implements Stopwatch { @@ -51,7 +49,7 @@ public final class NormalStopwatch implements Stopwatch { private final String name; private final Path parent; private final Path id; - private final FastMap children; + private final PerfUtil.FastMap children; public NormalStopwatch(String name, Stopwatch parent) { this(name, parent.id()); @@ -62,7 +60,7 @@ public NormalStopwatch(String name, Path parent) { this.name = name; this.parent = parent; this.id = Stopwatch.id(parent, name); - this.children = new FastMap<>(); + this.children = new PerfUtil.FastMap<>(); } @Override @@ -254,7 +252,7 @@ public String toString() { protected static void initEachWastedLost() { int times = 100000000; - LocalStack callStack = Whitebox.getInternalState( + PerfUtil.LocalStack callStack = Whitebox.getInternalState( PerfUtil.instance(), "callStack"); long baseStart = PerfUtil.now(); diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/PerfUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/PerfUtil.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/perf/PerfUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/perf/PerfUtil.java index e8ea2eaad..62bd713e8 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/PerfUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/PerfUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.perf; +package org.apache.hugegraph.perf; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -39,11 +39,12 @@ import org.slf4j.Logger; -import com.baidu.hugegraph.func.TriFunction; -import com.baidu.hugegraph.perf.Stopwatch.Path; -import com.baidu.hugegraph.testutil.Assert.ThrowableConsumer; -import com.baidu.hugegraph.util.Log; -import com.baidu.hugegraph.util.ReflectionUtil; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; +import org.apache.hugegraph.util.ReflectionUtil; +import org.apache.hugegraph.func.TriFunction; +import org.apache.hugegraph.testutil.Assert.ThrowableConsumer; +import org.apache.hugegraph.perf.Stopwatch.Path; import com.google.common.reflect.ClassPath.ClassInfo; import javassist.CannotCompileException; @@ -128,7 +129,7 @@ public static void useLightStopwatch(boolean yes) { boolean empty = instance == null || instance.empty(); String message = "Please call clear() before switching " + "light-stopwatch due to there is dirty watch"; - com.baidu.hugegraph.util.E.checkArgument(empty, message); + E.checkArgument(empty, message); } LIGHT_WATCH = yes; } @@ -207,7 +208,7 @@ public boolean empty() { public void clear() { String error = "Can't be cleared when the call has not ended yet"; - com.baidu.hugegraph.util.E.checkState(this.callStack.empty(), error); + E.checkState(this.callStack.empty(), error); this.stopwatches.clear(); this.root.clear(); @@ -273,9 +274,9 @@ public void profileClass(String... classes) throws Throwable { private void profile(CtMethod ctMethod) throws CannotCompileException, ClassNotFoundException { final String START = - "com.baidu.hugegraph.perf.PerfUtil.instance().start(\"%s\");"; + "org.apache.hugegraph.perf.PerfUtil.instance().start(\"%s\");"; final String END = - "com.baidu.hugegraph.perf.PerfUtil.instance().end(\"%s\");"; + "org.apache.hugegraph.perf.PerfUtil.instance().end(\"%s\");"; Watched annotation = (Watched) ctMethod.getAnnotation(Watched.class); diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/Stopwatch.java b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/Stopwatch.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/perf/Stopwatch.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/perf/Stopwatch.java index a015a089b..074869d9a 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/perf/Stopwatch.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/perf/Stopwatch.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.perf; +package org.apache.hugegraph.perf; import java.util.List; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/AbstractRestClient.java b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/rest/AbstractRestClient.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java index d6b1b7125..bf156b8ef 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/AbstractRestClient.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rest; +package org.apache.hugegraph.rest; import java.io.IOException; import java.net.URI; @@ -31,6 +31,8 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.ExecutorUtil; import jakarta.ws.rs.client.Client; import jakarta.ws.rs.client.ClientRequestContext; import jakarta.ws.rs.client.ClientRequestFilter; @@ -63,8 +65,6 @@ import org.glassfish.jersey.message.GZipEncoder; import org.glassfish.jersey.uri.UriComponent; -import com.baidu.hugegraph.util.E; -import com.baidu.hugegraph.util.ExecutorUtil; import com.google.common.collect.ImmutableMap; import javax.net.ssl.HostnameVerifier; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/ClientException.java b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/ClientException.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/rest/ClientException.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/rest/ClientException.java index d5fd2075d..0188a3a26 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/ClientException.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/ClientException.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rest; +package org.apache.hugegraph.rest; public class ClientException extends RuntimeException { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/RestClient.java b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestClient.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/rest/RestClient.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestClient.java index a60aeeee7..3e095d535 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/RestClient.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestClient.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rest; +package org.apache.hugegraph.rest; import java.util.Map; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/RestResult.java b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestResult.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/rest/RestResult.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestResult.java index 88ba49edb..440deabe4 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/RestResult.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestResult.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rest; +package org.apache.hugegraph.rest; import java.io.IOException; import java.util.ArrayList; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/SerializeException.java b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/SerializeException.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/rest/SerializeException.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/rest/SerializeException.java index 65bfa95bf..eedac9074 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/rest/SerializeException.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/SerializeException.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rest; +package org.apache.hugegraph.rest; public class SerializeException extends ClientException { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/testutil/Assert.java b/hugegraph-common/src/main/java/org/apache/hugegraph/testutil/Assert.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/testutil/Assert.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/testutil/Assert.java index 333002d60..284c5721f 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/testutil/Assert.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/testutil/Assert.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.testutil; +package org.apache.hugegraph.testutil; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/testutil/Whitebox.java b/hugegraph-common/src/main/java/org/apache/hugegraph/testutil/Whitebox.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/testutil/Whitebox.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/testutil/Whitebox.java index 826ab01e8..db92f6241 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/testutil/Whitebox.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/testutil/Whitebox.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.testutil; +package org.apache.hugegraph.testutil; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -25,7 +25,7 @@ import java.util.Arrays; import java.util.Objects; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; import com.google.common.primitives.Primitives; public class Whitebox { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/Bytes.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/Bytes.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/Bytes.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/Bytes.java index df19c22be..43f091cb8 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/Bytes.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/Bytes.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.util.Arrays; import java.util.Comparator; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/CheckSocket.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/CheckSocket.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java index c0dfc8984..992438820 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/CheckSocket.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.io.IOException; import java.net.InetAddress; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/CollectionUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/CollectionUtil.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/CollectionUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/CollectionUtil.java index 6b6d63845..c1f3404ed 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/CollectionUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/CollectionUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.lang.reflect.Array; import java.util.ArrayDeque; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/DateUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/DateUtil.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/DateUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/DateUtil.java index a3f117aaf..b34ebb15a 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/DateUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/DateUtil.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.util.Date; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import com.baidu.hugegraph.date.SafeDateFormat; +import org.apache.hugegraph.date.SafeDateFormat; import com.google.common.collect.ImmutableMap; public final class DateUtil { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/E.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/E.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/E.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/E.java index 340b7bc7a..52acdd387 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/E.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/E.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.util.Collection; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/ExecutorUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/ExecutorUtil.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/ExecutorUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/ExecutorUtil.java index 087f8d00f..1058c9861 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/ExecutorUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/ExecutorUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -26,7 +26,7 @@ import org.apache.commons.lang3.concurrent.BasicThreadFactory; -import com.baidu.hugegraph.concurrent.PausableScheduledThreadPool; +import org.apache.hugegraph.concurrent.PausableScheduledThreadPool; public final class ExecutorUtil { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/HashUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/HashUtil.java similarity index 97% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/HashUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/HashUtil.java index b2091bee9..443295e12 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/HashUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/HashUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.nio.charset.Charset; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/InsertionOrderUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/InsertionOrderUtil.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/InsertionOrderUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/InsertionOrderUtil.java index bfe911468..929cd6c85 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/InsertionOrderUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/InsertionOrderUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.util.ArrayList; import java.util.LinkedHashMap; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/Log.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/Log.java similarity index 96% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/Log.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/Log.java index 6507cf018..1192e9db1 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/Log.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/Log.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/LongEncoding.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/LongEncoding.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/LongEncoding.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/LongEncoding.java index 0383cd79e..3488445f7 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/LongEncoding.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/LongEncoding.java @@ -15,7 +15,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; /** * Utility class for encoding longs in strings based on: diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/NumericUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/NumericUtil.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/NumericUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/NumericUtil.java index b07138acb..d9dd19045 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/NumericUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/NumericUtil.java @@ -15,7 +15,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.math.BigDecimal; import java.nio.ByteBuffer; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/OrderLimitMap.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/OrderLimitMap.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/OrderLimitMap.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/OrderLimitMap.java index 0c22f459f..e286ca934 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/OrderLimitMap.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/OrderLimitMap.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.util.HashMap; import java.util.Map; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/ReflectionUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/ReflectionUtil.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/ReflectionUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/ReflectionUtil.java index c9092ff67..853086912 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/ReflectionUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/ReflectionUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.io.IOException; import java.lang.annotation.Annotation; @@ -26,7 +26,7 @@ import java.util.LinkedList; import java.util.List; -import com.baidu.hugegraph.iterator.ExtendableIterator; +import org.apache.hugegraph.iterator.ExtendableIterator; import com.google.common.collect.Lists; import com.google.common.reflect.ClassPath; import com.google.common.reflect.ClassPath.ClassInfo; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/StringUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/StringUtil.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/StringUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/StringUtil.java index f7dcbb98a..d71751005 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/StringUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/StringUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; public final class StringUtil { diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/TimeUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/TimeUtil.java similarity index 98% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/TimeUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/TimeUtil.java index 35696f0de..69394df87 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/TimeUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/TimeUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.time.Duration; import java.util.Date; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/UnitUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/UnitUtil.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/UnitUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/UnitUtil.java index 069ab0007..e21ed9e60 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/UnitUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/UnitUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.math.BigDecimal; import java.time.Duration; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/VersionUtil.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/VersionUtil.java similarity index 99% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/util/VersionUtil.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/util/VersionUtil.java index 94e4d3ade..57c9eb7cc 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/util/VersionUtil.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/VersionUtil.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.util; +package org.apache.hugegraph.util; import java.io.BufferedReader; import java.io.IOException; diff --git a/hugegraph-common/src/main/java/com/baidu/hugegraph/version/CommonVersion.java b/hugegraph-common/src/main/java/org/apache/hugegraph/version/CommonVersion.java similarity index 86% rename from hugegraph-common/src/main/java/com/baidu/hugegraph/version/CommonVersion.java rename to hugegraph-common/src/main/java/org/apache/hugegraph/version/CommonVersion.java index e75c1838e..8dfbc13e0 100644 --- a/hugegraph-common/src/main/java/com/baidu/hugegraph/version/CommonVersion.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/version/CommonVersion.java @@ -17,15 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.version; +package org.apache.hugegraph.version; -import com.baidu.hugegraph.util.VersionUtil.Version; +import org.apache.hugegraph.util.VersionUtil.Version; public class CommonVersion { public static final String NAME = "hugegraph-common"; // The second parameter of Version.of() is for all-in-one JAR - public static final Version VERSION = Version.of(CommonVersion.class, - "2.1.2"); + public static final Version VERSION = Version.of(CommonVersion.class, "1.0.0"); } diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/UnitTestSuite.java b/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/UnitTestSuite.java deleted file mode 100644 index 012038ecd..000000000 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/UnitTestSuite.java +++ /dev/null @@ -1,127 +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.unit; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -import com.baidu.hugegraph.testutil.AssertTest; -import com.baidu.hugegraph.testutil.WhiteboxTest; -import com.baidu.hugegraph.unit.concurrent.AtomicLockTest; -import com.baidu.hugegraph.unit.concurrent.BarrierEventTest; -import com.baidu.hugegraph.unit.concurrent.KeyLockTest; -import com.baidu.hugegraph.unit.concurrent.LockGroupTest; -import com.baidu.hugegraph.unit.concurrent.LockManagerTest; -import com.baidu.hugegraph.unit.concurrent.PausableScheduledThreadPoolTest; -import com.baidu.hugegraph.unit.concurrent.RowLockTest; -import com.baidu.hugegraph.unit.config.HugeConfigTest; -import com.baidu.hugegraph.unit.config.OptionSpaceTest; -import com.baidu.hugegraph.unit.date.SafeDateFormatTest; -import com.baidu.hugegraph.unit.event.EventHubTest; -import com.baidu.hugegraph.unit.iterator.BatchMapperIteratorTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest; -import com.baidu.hugegraph.unit.iterator.FilterIteratorTest; -import com.baidu.hugegraph.unit.iterator.FlatMapperFilterIteratorTest; -import com.baidu.hugegraph.unit.iterator.FlatMapperIteratorTest; -import com.baidu.hugegraph.unit.iterator.LimitIteratorTest; -import com.baidu.hugegraph.unit.iterator.ListIteratorTest; -import com.baidu.hugegraph.unit.iterator.MapperIteratorTest; -import com.baidu.hugegraph.unit.license.LicenseExtraParamTest; -import com.baidu.hugegraph.unit.license.LicenseCreateParamTest; -import com.baidu.hugegraph.unit.license.LicenseInstallParamTest; -import com.baidu.hugegraph.unit.license.LicenseParamsTest; -import com.baidu.hugegraph.unit.license.MachineInfoTest; -import com.baidu.hugegraph.unit.perf.PerfUtilTest; -import com.baidu.hugegraph.unit.perf.StopwatchTest; -import com.baidu.hugegraph.unit.rest.RestClientTest; -import com.baidu.hugegraph.unit.rest.RestResultTest; -import com.baidu.hugegraph.unit.util.BytesTest; -import com.baidu.hugegraph.unit.util.CollectionUtilTest; -import com.baidu.hugegraph.unit.util.DateUtilTest; -import com.baidu.hugegraph.unit.util.EcheckTest; -import com.baidu.hugegraph.unit.util.HashUtilTest; -import com.baidu.hugegraph.unit.util.InsertionOrderUtilTest; -import com.baidu.hugegraph.unit.util.LogTest; -import com.baidu.hugegraph.unit.util.LongEncodingTest; -import com.baidu.hugegraph.unit.util.NumericUtilTest; -import com.baidu.hugegraph.unit.util.OrderLimitMapTest; -import com.baidu.hugegraph.unit.util.ReflectionUtilTest; -import com.baidu.hugegraph.unit.util.StringUtilTest; -import com.baidu.hugegraph.unit.util.TimeUtilTest; -import com.baidu.hugegraph.unit.util.UnitUtilTest; -import com.baidu.hugegraph.unit.util.VersionUtilTest; -import com.baidu.hugegraph.unit.version.VersionTest; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - LockManagerTest.class, - LockGroupTest.class, - AtomicLockTest.class, - KeyLockTest.class, - RowLockTest.class, - PausableScheduledThreadPoolTest.class, - - HugeConfigTest.class, - OptionSpaceTest.class, - SafeDateFormatTest.class, - BarrierEventTest.class, - EventHubTest.class, - PerfUtilTest.class, - StopwatchTest.class, - RestClientTest.class, - RestResultTest.class, - VersionTest.class, - - ExtendableIteratorTest.class, - FilterIteratorTest.class, - LimitIteratorTest.class, - MapperIteratorTest.class, - FlatMapperIteratorTest.class, - FlatMapperFilterIteratorTest.class, - ListIteratorTest.class, - BatchMapperIteratorTest.class, - - BytesTest.class, - CollectionUtilTest.class, - EcheckTest.class, - HashUtilTest.class, - InsertionOrderUtilTest.class, - LogTest.class, - NumericUtilTest.class, - ReflectionUtilTest.class, - StringUtilTest.class, - TimeUtilTest.class, - VersionUtilTest.class, - LongEncodingTest.class, - OrderLimitMapTest.class, - DateUtilTest.class, - UnitUtilTest.class, - - LicenseExtraParamTest.class, - LicenseCreateParamTest.class, - LicenseInstallParamTest.class, - LicenseParamsTest.class, - MachineInfoTest.class, - - AssertTest.class, - WhiteboxTest.class -}) -public class UnitTestSuite { -} diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/testutil/AssertTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/testutil/AssertTest.java similarity index 99% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/testutil/AssertTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/testutil/AssertTest.java index 91b7ee4bf..7116adc8b 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/testutil/AssertTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/testutil/AssertTest.java @@ -17,11 +17,11 @@ * under the License. */ -package com.baidu.hugegraph.testutil; +package org.apache.hugegraph.testutil; import org.junit.Test; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.BaseUnitTest; public class AssertTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/testutil/WhiteboxTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/testutil/WhiteboxTest.java similarity index 99% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/testutil/WhiteboxTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/testutil/WhiteboxTest.java index 6375c0dcc..f6ebf6dd4 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/testutil/WhiteboxTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/testutil/WhiteboxTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.testutil; +package org.apache.hugegraph.testutil; import org.junit.Test; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/BaseUnitTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/BaseUnitTest.java similarity index 96% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/BaseUnitTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/BaseUnitTest.java index 707b61919..cd09b8006 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/BaseUnitTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/BaseUnitTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit; +package org.apache.hugegraph.unit; import java.util.ArrayList; import java.util.List; @@ -26,11 +26,10 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; +import org.apache.hugegraph.util.TimeUtil; import org.junit.AfterClass; import org.junit.BeforeClass; -import com.baidu.hugegraph.util.TimeUtil; - public class BaseUnitTest { @BeforeClass diff --git a/hugegraph-common/src/test/java/org/apache/hugegraph/unit/UnitTestSuite.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/UnitTestSuite.java new file mode 100644 index 000000000..05219878c --- /dev/null +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/UnitTestSuite.java @@ -0,0 +1,127 @@ +/* + * 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.unit; + +import org.apache.hugegraph.testutil.AssertTest; +import org.apache.hugegraph.testutil.WhiteboxTest; +import org.apache.hugegraph.unit.config.HugeConfigTest; +import org.apache.hugegraph.unit.config.OptionSpaceTest; +import org.apache.hugegraph.unit.event.EventHubTest; +import org.apache.hugegraph.unit.version.VersionTest; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +import org.apache.hugegraph.unit.concurrent.AtomicLockTest; +import org.apache.hugegraph.unit.concurrent.BarrierEventTest; +import org.apache.hugegraph.unit.concurrent.KeyLockTest; +import org.apache.hugegraph.unit.concurrent.LockGroupTest; +import org.apache.hugegraph.unit.concurrent.LockManagerTest; +import org.apache.hugegraph.unit.concurrent.PausableScheduledThreadPoolTest; +import org.apache.hugegraph.unit.concurrent.RowLockTest; +import org.apache.hugegraph.unit.date.SafeDateFormatTest; +import org.apache.hugegraph.unit.iterator.BatchMapperIteratorTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest; +import org.apache.hugegraph.unit.iterator.FilterIteratorTest; +import org.apache.hugegraph.unit.iterator.FlatMapperFilterIteratorTest; +import org.apache.hugegraph.unit.iterator.FlatMapperIteratorTest; +import org.apache.hugegraph.unit.iterator.LimitIteratorTest; +import org.apache.hugegraph.unit.iterator.ListIteratorTest; +import org.apache.hugegraph.unit.iterator.MapperIteratorTest; +import org.apache.hugegraph.unit.license.LicenseExtraParamTest; +import org.apache.hugegraph.unit.license.LicenseCreateParamTest; +import org.apache.hugegraph.unit.license.LicenseInstallParamTest; +import org.apache.hugegraph.unit.license.LicenseParamsTest; +import org.apache.hugegraph.unit.license.MachineInfoTest; +import org.apache.hugegraph.unit.perf.PerfUtilTest; +import org.apache.hugegraph.unit.perf.StopwatchTest; +import org.apache.hugegraph.unit.rest.RestClientTest; +import org.apache.hugegraph.unit.rest.RestResultTest; +import org.apache.hugegraph.unit.util.BytesTest; +import org.apache.hugegraph.unit.util.CollectionUtilTest; +import org.apache.hugegraph.unit.util.DateUtilTest; +import org.apache.hugegraph.unit.util.EcheckTest; +import org.apache.hugegraph.unit.util.HashUtilTest; +import org.apache.hugegraph.unit.util.InsertionOrderUtilTest; +import org.apache.hugegraph.unit.util.LogTest; +import org.apache.hugegraph.unit.util.LongEncodingTest; +import org.apache.hugegraph.unit.util.NumericUtilTest; +import org.apache.hugegraph.unit.util.OrderLimitMapTest; +import org.apache.hugegraph.unit.util.ReflectionUtilTest; +import org.apache.hugegraph.unit.util.StringUtilTest; +import org.apache.hugegraph.unit.util.TimeUtilTest; +import org.apache.hugegraph.unit.util.UnitUtilTest; +import org.apache.hugegraph.unit.util.VersionUtilTest; + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + LockManagerTest.class, + LockGroupTest.class, + AtomicLockTest.class, + KeyLockTest.class, + RowLockTest.class, + PausableScheduledThreadPoolTest.class, + + HugeConfigTest.class, + OptionSpaceTest.class, + SafeDateFormatTest.class, + BarrierEventTest.class, + EventHubTest.class, + PerfUtilTest.class, + StopwatchTest.class, + RestClientTest.class, + RestResultTest.class, + VersionTest.class, + + ExtendableIteratorTest.class, + FilterIteratorTest.class, + LimitIteratorTest.class, + MapperIteratorTest.class, + FlatMapperIteratorTest.class, + FlatMapperFilterIteratorTest.class, + ListIteratorTest.class, + BatchMapperIteratorTest.class, + + BytesTest.class, + CollectionUtilTest.class, + EcheckTest.class, + HashUtilTest.class, + InsertionOrderUtilTest.class, + LogTest.class, + NumericUtilTest.class, + ReflectionUtilTest.class, + StringUtilTest.class, + TimeUtilTest.class, + VersionUtilTest.class, + LongEncodingTest.class, + OrderLimitMapTest.class, + DateUtilTest.class, + UnitUtilTest.class, + + LicenseExtraParamTest.class, + LicenseCreateParamTest.class, + LicenseInstallParamTest.class, + LicenseParamsTest.class, + MachineInfoTest.class, + + AssertTest.class, + WhiteboxTest.class +}) +public class UnitTestSuite { +} diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/AtomicLockTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/AtomicLockTest.java similarity index 91% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/AtomicLockTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/AtomicLockTest.java index 225fe4296..02265ad19 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/AtomicLockTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/AtomicLockTest.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.unit.concurrent; +package org.apache.hugegraph.unit.concurrent; import org.junit.Test; -import com.baidu.hugegraph.concurrent.AtomicLock; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.concurrent.AtomicLock; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class AtomicLockTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/BarrierEventTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/BarrierEventTest.java similarity index 98% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/BarrierEventTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/BarrierEventTest.java index c81aa3d1f..c40a2f2ea 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/BarrierEventTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/BarrierEventTest.java @@ -1,4 +1,4 @@ -package com.baidu.hugegraph.unit.concurrent; +package org.apache.hugegraph.unit.concurrent; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; @@ -8,8 +8,8 @@ import org.junit.Test; -import com.baidu.hugegraph.concurrent.BarrierEvent; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.concurrent.BarrierEvent; +import org.apache.hugegraph.testutil.Assert; public class BarrierEventTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/KeyLockTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/KeyLockTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/KeyLockTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/KeyLockTest.java index 60a946abc..e431853e0 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/KeyLockTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/KeyLockTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.concurrent; +package org.apache.hugegraph.unit.concurrent; import java.util.Arrays; import java.util.List; @@ -25,9 +25,9 @@ import org.junit.Test; -import com.baidu.hugegraph.concurrent.KeyLock; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.concurrent.KeyLock; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class KeyLockTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/LockGroupTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/LockGroupTest.java similarity index 90% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/LockGroupTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/LockGroupTest.java index 1f252917e..3309a43b2 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/LockGroupTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/LockGroupTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.concurrent; +package org.apache.hugegraph.unit.concurrent; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; @@ -26,12 +26,12 @@ import org.junit.Test; -import com.baidu.hugegraph.concurrent.AtomicLock; -import com.baidu.hugegraph.concurrent.KeyLock; -import com.baidu.hugegraph.concurrent.LockGroup; -import com.baidu.hugegraph.concurrent.RowLock; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.concurrent.AtomicLock; +import org.apache.hugegraph.concurrent.KeyLock; +import org.apache.hugegraph.concurrent.LockGroup; +import org.apache.hugegraph.concurrent.RowLock; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class LockGroupTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/LockManagerTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/LockManagerTest.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/LockManagerTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/LockManagerTest.java index 4eb5abded..edb628b27 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/LockManagerTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/LockManagerTest.java @@ -17,15 +17,15 @@ * under the License. */ -package com.baidu.hugegraph.unit.concurrent; +package org.apache.hugegraph.unit.concurrent; import org.junit.After; import org.junit.Test; -import com.baidu.hugegraph.concurrent.LockGroup; -import com.baidu.hugegraph.concurrent.LockManager; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.concurrent.LockGroup; +import org.apache.hugegraph.concurrent.LockManager; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class LockManagerTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/PausableScheduledThreadPoolTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/PausableScheduledThreadPoolTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/PausableScheduledThreadPoolTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/PausableScheduledThreadPoolTest.java index b4feff6ae..fb66741d3 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/PausableScheduledThreadPoolTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/PausableScheduledThreadPoolTest.java @@ -17,16 +17,16 @@ * under the License. */ -package com.baidu.hugegraph.unit.concurrent; +package org.apache.hugegraph.unit.concurrent; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import org.apache.hugegraph.util.ExecutorUtil; import org.junit.Assert; import org.junit.Test; -import com.baidu.hugegraph.concurrent.PausableScheduledThreadPool; -import com.baidu.hugegraph.util.ExecutorUtil; +import org.apache.hugegraph.concurrent.PausableScheduledThreadPool; public class PausableScheduledThreadPoolTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/RowLockTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/RowLockTest.java similarity index 96% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/RowLockTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/RowLockTest.java index 4821f1d0a..0fd666146 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/concurrent/RowLockTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/concurrent/RowLockTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.concurrent; +package org.apache.hugegraph.unit.concurrent; import java.util.ArrayList; import java.util.HashSet; @@ -27,9 +27,9 @@ import org.junit.Test; -import com.baidu.hugegraph.concurrent.RowLock; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.concurrent.RowLock; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; import com.google.common.collect.ImmutableSet; public class RowLockTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/HugeConfigTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/HugeConfigTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/HugeConfigTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/HugeConfigTest.java index f522d56fe..01ffb316b 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/HugeConfigTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/HugeConfigTest.java @@ -17,15 +17,15 @@ * under the License. */ -package com.baidu.hugegraph.unit.config; +package org.apache.hugegraph.unit.config; -import static com.baidu.hugegraph.config.OptionChecker.allowValues; -import static com.baidu.hugegraph.config.OptionChecker.disallowEmpty; -import static com.baidu.hugegraph.config.OptionChecker.inValues; -import static com.baidu.hugegraph.config.OptionChecker.nonNegativeInt; -import static com.baidu.hugegraph.config.OptionChecker.positiveInt; -import static com.baidu.hugegraph.config.OptionChecker.rangeDouble; -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.inValues; +import static org.apache.hugegraph.config.OptionChecker.nonNegativeInt; +import static org.apache.hugegraph.config.OptionChecker.positiveInt; +import static org.apache.hugegraph.config.OptionChecker.rangeDouble; +import static org.apache.hugegraph.config.OptionChecker.rangeInt; import java.io.File; import java.io.IOException; @@ -34,6 +34,16 @@ import java.util.List; import java.util.Map; +import org.apache.hugegraph.config.ConfigConvOption; +import org.apache.hugegraph.config.ConfigException; +import org.apache.hugegraph.config.ConfigListConvOption; +import org.apache.hugegraph.config.ConfigListOption; +import org.apache.hugegraph.config.ConfigOption; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.config.OptionHolder; +import org.apache.hugegraph.config.OptionSpace; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; import org.apache.commons.collections.IteratorUtils; import org.apache.commons.configuration2.AbstractConfiguration; import org.apache.commons.configuration2.Configuration; @@ -46,17 +56,6 @@ import org.junit.BeforeClass; import org.junit.Test; -import com.baidu.hugegraph.config.ConfigConvOption; -import com.baidu.hugegraph.config.ConfigException; -import com.baidu.hugegraph.config.ConfigListConvOption; -import com.baidu.hugegraph.config.ConfigListOption; -import com.baidu.hugegraph.config.ConfigOption; -import com.baidu.hugegraph.config.HugeConfig; -import com.baidu.hugegraph.config.OptionHolder; -import com.baidu.hugegraph.config.OptionSpace; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.testutil.Whitebox; -import com.baidu.hugegraph.unit.BaseUnitTest; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -64,7 +63,7 @@ public class HugeConfigTest extends BaseUnitTest { private static final String PATH = - "src/test/java/com/baidu/hugegraph/unit/config/"; + "src/test/java/org/apache/hugegraph/unit/config/"; private static final String CONF = PATH + "test.conf"; @BeforeClass @@ -288,7 +287,7 @@ public void testHugeConfig() throws Exception { Assert.assertEquals(Object.class, config.get(TestOptions.clazz)); Assert.assertThrows(ConfigException.class, () -> { config.setProperty(TestOptions.clazz.name(), - "com.baidu.hugegraph.HugeGraph"); + "org.apache.hugegraph.HugeGraph"); }, e -> { Assert.assertTrue(e.getCause() instanceof ClassNotFoundException); }); diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/OptionSpaceTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/OptionSpaceTest.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/OptionSpaceTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/OptionSpaceTest.java index 3ff2c0512..cfb35e5cf 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/OptionSpaceTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/OptionSpaceTest.java @@ -17,18 +17,18 @@ * under the License. */ -package com.baidu.hugegraph.unit.config; +package org.apache.hugegraph.unit.config; -import static com.baidu.hugegraph.config.OptionChecker.disallowEmpty; +import static org.apache.hugegraph.config.OptionChecker.disallowEmpty; import org.junit.Test; -import com.baidu.hugegraph.config.ConfigException; -import com.baidu.hugegraph.config.ConfigOption; -import com.baidu.hugegraph.config.OptionHolder; -import com.baidu.hugegraph.config.OptionSpace; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.config.OptionSpace; +import org.apache.hugegraph.config.OptionHolder; +import org.apache.hugegraph.config.ConfigException; +import org.apache.hugegraph.config.ConfigOption; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; import com.google.common.base.Predicate; public class OptionSpaceTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test-check-error.conf b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test-check-error.conf similarity index 100% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test-check-error.conf rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test-check-error.conf diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test-list-error.conf b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test-list-error.conf similarity index 100% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test-list-error.conf rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test-list-error.conf diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test-type-error.conf b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test-type-error.conf similarity index 100% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test-type-error.conf rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test-type-error.conf diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test.conf b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test.conf similarity index 100% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/config/test.conf rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/config/test.conf diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/date/SafeDateFormatTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/date/SafeDateFormatTest.java similarity index 97% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/date/SafeDateFormatTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/date/SafeDateFormatTest.java index cf0036ba1..6c9e89edb 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/date/SafeDateFormatTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/date/SafeDateFormatTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.date; +package org.apache.hugegraph.unit.date; import java.text.DateFormat; import java.text.ParseException; @@ -28,10 +28,10 @@ import java.util.TimeZone; import java.util.concurrent.CountDownLatch; +import org.apache.hugegraph.date.SafeDateFormat; import org.junit.Test; -import com.baidu.hugegraph.date.SafeDateFormat; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.testutil.Assert; import com.google.common.collect.ImmutableList; public class SafeDateFormatTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/event/EventHubTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/event/EventHubTest.java similarity index 98% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/event/EventHubTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/event/EventHubTest.java index ee572833a..c8743e99a 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/event/EventHubTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/event/EventHubTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.event; +package org.apache.hugegraph.unit.event; import java.util.concurrent.atomic.AtomicInteger; @@ -27,13 +27,14 @@ import org.junit.BeforeClass; import org.junit.Test; -import com.baidu.hugegraph.event.Event; -import com.baidu.hugegraph.event.EventHub; -import com.baidu.hugegraph.event.EventListener; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; import com.google.common.collect.ImmutableList; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.event.Event; +import org.apache.hugegraph.event.EventHub; +import org.apache.hugegraph.event.EventListener; + public class EventHubTest extends BaseUnitTest { private static final int THREADS_NUM = 8; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/BatchMapperIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/BatchMapperIteratorTest.java similarity index 97% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/BatchMapperIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/BatchMapperIteratorTest.java index a5d33d741..40a39a217 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/BatchMapperIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/BatchMapperIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Collections; @@ -29,10 +29,10 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.BatchMapperIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; +import org.apache.hugegraph.iterator.BatchMapperIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; import com.google.common.collect.ImmutableList; @SuppressWarnings("resource") diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/ExtendableIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/ExtendableIteratorTest.java similarity index 97% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/ExtendableIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/ExtendableIteratorTest.java index 4c7ba31b8..e753ea8ea 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/ExtendableIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/ExtendableIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Iterator; @@ -26,9 +26,9 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.ExtendableIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.iterator.ExtendableIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; import com.google.common.collect.ImmutableList; @SuppressWarnings("resource") diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FilterIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FilterIteratorTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FilterIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FilterIteratorTest.java index 902467316..f6c0e1758 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FilterIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FilterIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Iterator; @@ -28,10 +28,10 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.FilterIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; +import org.apache.hugegraph.iterator.FilterIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; import com.google.common.collect.ImmutableList; @SuppressWarnings("resource") diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FlatMapperFilterIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FlatMapperFilterIteratorTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FlatMapperFilterIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FlatMapperFilterIteratorTest.java index bc69bf55e..536f38a3e 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FlatMapperFilterIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FlatMapperFilterIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Iterator; @@ -29,10 +29,10 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.FlatMapperFilterIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; +import org.apache.hugegraph.iterator.FlatMapperFilterIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FlatMapperIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FlatMapperIteratorTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FlatMapperIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FlatMapperIteratorTest.java index 974502964..5e5baf461 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/FlatMapperIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/FlatMapperIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Iterator; @@ -29,10 +29,10 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.FlatMapperIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; +import org.apache.hugegraph.iterator.FlatMapperIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/LimitIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/LimitIteratorTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/LimitIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/LimitIteratorTest.java index acd4fc1c6..f806b5e62 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/LimitIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/LimitIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Iterator; @@ -28,10 +28,10 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.LimitIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; +import org.apache.hugegraph.iterator.LimitIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; import com.google.common.collect.ImmutableList; @SuppressWarnings("resource") diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/ListIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/ListIteratorTest.java similarity index 97% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/ListIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/ListIteratorTest.java index 8ddd995ba..d8334344a 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/ListIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/ListIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Collections; @@ -27,10 +27,10 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.ListIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; +import org.apache.hugegraph.iterator.ListIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterators; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/MapperIteratorTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/MapperIteratorTest.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/MapperIteratorTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/MapperIteratorTest.java index e2c63ed65..23b2ab07e 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/iterator/MapperIteratorTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/iterator/MapperIteratorTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.iterator; +package org.apache.hugegraph.unit.iterator; import java.util.ArrayList; import java.util.Iterator; @@ -29,10 +29,10 @@ import org.junit.Test; -import com.baidu.hugegraph.iterator.MapperIterator; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; +import org.apache.hugegraph.iterator.MapperIterator; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.iterator.ExtendableIteratorTest.CloseableItor; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseCreateParamTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseCreateParamTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseCreateParamTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseCreateParamTest.java index cb67ce91f..92b902f02 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseCreateParamTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseCreateParamTest.java @@ -17,16 +17,16 @@ * under the License. */ -package com.baidu.hugegraph.unit.license; +package org.apache.hugegraph.unit.license; import java.io.IOException; import java.text.ParseException; +import org.apache.hugegraph.date.SafeDateFormat; import org.junit.Test; -import com.baidu.hugegraph.date.SafeDateFormat; -import com.baidu.hugegraph.license.LicenseCreateParam; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.license.LicenseCreateParam; +import org.apache.hugegraph.testutil.Assert; import com.fasterxml.jackson.databind.ObjectMapper; public class LicenseCreateParamTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseExtraParamTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseExtraParamTest.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseExtraParamTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseExtraParamTest.java index 7d613c535..65f9defd5 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseExtraParamTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseExtraParamTest.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.unit.license; +package org.apache.hugegraph.unit.license; import java.io.IOException; +import org.apache.hugegraph.license.LicenseExtraParam; import org.junit.Test; -import com.baidu.hugegraph.license.LicenseExtraParam; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.testutil.Assert; import com.fasterxml.jackson.databind.ObjectMapper; public class LicenseExtraParamTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseInstallParamTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseInstallParamTest.java similarity index 93% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseInstallParamTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseInstallParamTest.java index a16b02f72..8b3bbc47e 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseInstallParamTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseInstallParamTest.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.unit.license; +package org.apache.hugegraph.unit.license; import java.io.IOException; import org.junit.Test; -import com.baidu.hugegraph.license.LicenseInstallParam; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.license.LicenseInstallParam; +import org.apache.hugegraph.testutil.Assert; import com.fasterxml.jackson.databind.ObjectMapper; public class LicenseInstallParamTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseParamsTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseParamsTest.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseParamsTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseParamsTest.java index 8dec1df60..75e74f260 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/LicenseParamsTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/LicenseParamsTest.java @@ -17,15 +17,15 @@ * under the License. */ -package com.baidu.hugegraph.unit.license; +package org.apache.hugegraph.unit.license; import java.io.IOException; +import org.apache.hugegraph.license.LicenseExtraParam; +import org.apache.hugegraph.license.LicenseParams; import org.junit.Test; -import com.baidu.hugegraph.license.LicenseExtraParam; -import com.baidu.hugegraph.license.LicenseParams; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.testutil.Assert; import com.fasterxml.jackson.databind.ObjectMapper; public class LicenseParamsTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/MachineInfoTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/MachineInfoTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/MachineInfoTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/MachineInfoTest.java index c436943e9..dfe3dc74a 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/license/MachineInfoTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/license/MachineInfoTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.license; +package org.apache.hugegraph.unit.license; import java.net.InetAddress; import java.net.UnknownHostException; @@ -26,8 +26,8 @@ import org.junit.Test; -import com.baidu.hugegraph.license.MachineInfo; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.license.MachineInfo; +import org.apache.hugegraph.testutil.Assert; public class MachineInfoTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/PerfUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/PerfUtilTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/PerfUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/PerfUtilTest.java index 926d9c892..218afbcf1 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/PerfUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/PerfUtilTest.java @@ -17,27 +17,28 @@ * under the License. */ -package com.baidu.hugegraph.unit.perf; +package org.apache.hugegraph.unit.perf; import java.util.Map; import org.junit.After; import org.junit.Test; -import com.baidu.hugegraph.perf.PerfUtil; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.perf.testclass.TestClass; -import com.baidu.hugegraph.unit.perf.testclass.TestLightClass; -import com.baidu.hugegraph.unit.perf.testclass.TestPerfClass; -import com.baidu.hugegraph.unit.perf.testclass.TestPerfLightClass; -import com.baidu.hugegraph.unit.perf.testclass2.TestClass4Package; import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.perf.testclass.TestClass; +import org.apache.hugegraph.unit.perf.testclass.TestPerfLightClass; +import org.apache.hugegraph.unit.perf.testclass2.TestClass4Package; +import org.apache.hugegraph.perf.PerfUtil; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.unit.perf.testclass.TestLightClass; +import org.apache.hugegraph.unit.perf.testclass.TestPerfClass; + public class PerfUtilTest extends BaseUnitTest { private static final String prefix = - "com.baidu.hugegraph.unit.perf.testclass."; + "org.apache.hugegraph.unit.perf.testclass."; private static final PerfUtil perf = PerfUtil.instance(); @After @@ -251,7 +252,7 @@ public void testPerfUtilWithSingleThread() throws Throwable { @Test public void testPerfUtilWithProfilePackage() throws Throwable { - perf.profilePackage("com.baidu.hugegraph.unit.perf.testclass2"); + perf.profilePackage("org.apache.hugegraph.unit.perf.testclass2"); TestClass4Package.Foo obj = new TestClass4Package.Foo(); obj.foo(); diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/StopwatchTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/StopwatchTest.java similarity index 92% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/StopwatchTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/StopwatchTest.java index 53d5e60a2..dbbe4823f 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/StopwatchTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/StopwatchTest.java @@ -17,16 +17,16 @@ * under the License. */ -package com.baidu.hugegraph.unit.perf; +package org.apache.hugegraph.unit.perf; import org.junit.Test; -import com.baidu.hugegraph.perf.LightStopwatch; -import com.baidu.hugegraph.perf.NormalStopwatch; -import com.baidu.hugegraph.perf.Stopwatch; -import com.baidu.hugegraph.perf.Stopwatch.Path; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.perf.LightStopwatch; +import org.apache.hugegraph.perf.NormalStopwatch; +import org.apache.hugegraph.perf.Stopwatch; +import org.apache.hugegraph.perf.Stopwatch.Path; +import org.apache.hugegraph.unit.BaseUnitTest; public class StopwatchTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestClass.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestClass.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestClass.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestClass.java index 4288824a9..455c1707f 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestClass.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestClass.java @@ -17,10 +17,10 @@ * under the License. */ -package com.baidu.hugegraph.unit.perf.testclass; +package org.apache.hugegraph.unit.perf.testclass; -import com.baidu.hugegraph.perf.PerfUtil; -import com.baidu.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.perf.PerfUtil; +import org.apache.hugegraph.perf.PerfUtil.Watched; public class TestClass { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestLightClass.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestLightClass.java similarity index 92% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestLightClass.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestLightClass.java index 47ec3f1b7..658b654bc 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestLightClass.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestLightClass.java @@ -17,9 +17,9 @@ * under the License. */ -package com.baidu.hugegraph.unit.perf.testclass; +package org.apache.hugegraph.unit.perf.testclass; -import com.baidu.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.perf.PerfUtil.Watched; public class TestLightClass { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestPerfClass.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestPerfClass.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestPerfClass.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestPerfClass.java index 9ac381a4a..9e53fa6a5 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestPerfClass.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestPerfClass.java @@ -17,9 +17,9 @@ * under the License. */ -package com.baidu.hugegraph.unit.perf.testclass; +package org.apache.hugegraph.unit.perf.testclass; -import com.baidu.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.perf.PerfUtil.Watched; public class TestPerfClass { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestPerfLightClass.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestPerfLightClass.java similarity index 92% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestPerfLightClass.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestPerfLightClass.java index 389ef2300..4f5939ed7 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass/TestPerfLightClass.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass/TestPerfLightClass.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.unit.perf.testclass; +package org.apache.hugegraph.unit.perf.testclass; -import com.baidu.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.perf.PerfUtil.Watched; public class TestPerfLightClass { - private Foo foo = new Foo(); + private final Foo foo = new Foo(); @Watched public void test(int times) { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass2/TestClass4Package.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass2/TestClass4Package.java similarity index 93% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass2/TestClass4Package.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass2/TestClass4Package.java index b86890768..ffd76cdb1 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/perf/testclass2/TestClass4Package.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/perf/testclass2/TestClass4Package.java @@ -17,9 +17,9 @@ * under the License. */ -package com.baidu.hugegraph.unit.perf.testclass2; +package org.apache.hugegraph.unit.perf.testclass2; -import com.baidu.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.perf.PerfUtil.Watched; public class TestClass4Package { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/rest/RestClientTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/rest/RestClientTest.java similarity index 98% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/rest/RestClientTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/rest/RestClientTest.java index bd48a0c40..71fa1cd63 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/rest/RestClientTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/rest/RestClientTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.rest; +package org.apache.hugegraph.unit.rest; import java.security.NoSuchAlgorithmException; import java.util.HashMap; @@ -38,24 +38,27 @@ import jakarta.ws.rs.core.MultivaluedHashMap; import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; + +import org.junit.Test; +import org.mockito.Mockito; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.glassfish.jersey.internal.util.collection.ImmutableMultivaluedMap; + import org.apache.http.HttpClientConnection; import org.apache.http.HttpHeaders; import org.apache.http.HttpHost; import org.apache.http.conn.routing.HttpRoute; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.pool.PoolStats; -import org.glassfish.jersey.internal.util.collection.ImmutableMultivaluedMap; -import org.junit.Test; -import org.mockito.Mockito; -import com.baidu.hugegraph.rest.AbstractRestClient; -import com.baidu.hugegraph.rest.ClientException; -import com.baidu.hugegraph.rest.RestClient; -import com.baidu.hugegraph.rest.RestResult; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.testutil.Whitebox; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; +import org.apache.hugegraph.rest.AbstractRestClient; +import org.apache.hugegraph.rest.ClientException; +import org.apache.hugegraph.rest.RestClient; +import org.apache.hugegraph.rest.RestResult; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.testutil.Whitebox; public class RestClientTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/rest/RestResultTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/rest/RestResultTest.java similarity index 96% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/rest/RestResultTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/rest/RestResultTest.java index 02832fd58..141b5f508 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/rest/RestResultTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/rest/RestResultTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.rest; +package org.apache.hugegraph.unit.rest; import java.util.Map; @@ -28,12 +28,13 @@ import org.junit.Test; import org.mockito.Mockito; -import com.baidu.hugegraph.rest.RestResult; -import com.baidu.hugegraph.rest.SerializeException; -import com.baidu.hugegraph.testutil.Assert; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import org.apache.hugegraph.rest.RestResult; +import org.apache.hugegraph.rest.SerializeException; +import org.apache.hugegraph.testutil.Assert; + public class RestResultTest { @Test diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/BytesTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/BytesTest.java similarity index 96% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/BytesTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/BytesTest.java index c3d2cb1dd..0d184a5b6 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/BytesTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/BytesTest.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.Bytes; -import com.baidu.hugegraph.util.NumericUtil; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.util.Bytes; +import org.apache.hugegraph.util.NumericUtil; +import org.apache.hugegraph.testutil.Assert; public class BytesTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/CollectionUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/CollectionUtilTest.java similarity index 99% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/CollectionUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/CollectionUtilTest.java index 72fc01e71..23ffff74c 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/CollectionUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/CollectionUtilTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.util.ArrayList; import java.util.Arrays; @@ -31,9 +31,9 @@ import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.CollectionUtil; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.util.CollectionUtil; +import org.apache.hugegraph.testutil.Assert; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/DateUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/DateUtilTest.java similarity index 96% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/DateUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/DateUtilTest.java index 5a6e54c79..051253f5f 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/DateUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/DateUtilTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.util.ArrayList; import java.util.Date; @@ -27,9 +27,9 @@ import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.DateUtil; +import org.apache.hugegraph.util.DateUtil; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class DateUtilTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/EcheckTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/EcheckTest.java similarity index 96% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/EcheckTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/EcheckTest.java index 46b9113bf..59f70f51d 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/EcheckTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/EcheckTest.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/HashUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/HashUtilTest.java similarity index 94% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/HashUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/HashUtilTest.java index ada7842eb..6ba5d4a91 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/HashUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/HashUtilTest.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.Bytes; -import com.baidu.hugegraph.util.HashUtil; +import org.apache.hugegraph.util.Bytes; +import org.apache.hugegraph.util.HashUtil; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class HashUtilTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/InsertionOrderUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/InsertionOrderUtilTest.java similarity index 96% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/InsertionOrderUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/InsertionOrderUtilTest.java index a8d9fa5d7..9dc49a402 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/InsertionOrderUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/InsertionOrderUtilTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.util.List; import java.util.Map; @@ -25,9 +25,9 @@ import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.InsertionOrderUtil; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.util.InsertionOrderUtil; +import org.apache.hugegraph.testutil.Assert; import com.google.common.collect.ImmutableList; public class InsertionOrderUtilTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/LogTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/LogTest.java similarity index 79% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/LogTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/LogTest.java index 9afe842cb..dac5ece0f 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/LogTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/LogTest.java @@ -17,28 +17,28 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import org.junit.Test; import org.slf4j.Logger; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.Log; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.util.Log; +import org.apache.hugegraph.testutil.Assert; public class LogTest extends BaseUnitTest { @Test public void testLog() { Logger log1 = Log.logger(LogTest.class); - Logger log2 = Log.logger("com.baidu.hugegraph.unit.util.LogTest"); + Logger log2 = Log.logger("org.apache.hugegraph.unit.util.LogTest"); Logger log3 = Log.logger("test"); Assert.assertEquals(log1, log2); Assert.assertNotEquals(log1, log3); log1.info("Info: testLog({})", LogTest.class); - log2.info("Info: testLog({})", "com.baidu.hugegraph.unit.util.LogTest"); + log2.info("Info: testLog({})", "org.apache.hugegraph.unit.util.LogTest"); log3.info("Info: testLog({})", "test"); } } diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/LongEncodingTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/LongEncodingTest.java similarity index 98% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/LongEncodingTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/LongEncodingTest.java index 5a245a397..7f44340e6 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/LongEncodingTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/LongEncodingTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.math.BigDecimal; import java.text.ParseException; @@ -28,11 +28,11 @@ import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.Bytes; -import com.baidu.hugegraph.util.LongEncoding; -import com.baidu.hugegraph.util.NumericUtil; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.util.Bytes; +import org.apache.hugegraph.util.LongEncoding; +import org.apache.hugegraph.util.NumericUtil; +import org.apache.hugegraph.testutil.Assert; public class LongEncodingTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/NumericUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/NumericUtilTest.java similarity index 98% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/NumericUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/NumericUtilTest.java index 00e70ad8c..c6b94b1bf 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/NumericUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/NumericUtilTest.java @@ -17,17 +17,17 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.math.BigDecimal; import java.util.Date; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.Bytes; -import com.baidu.hugegraph.util.NumericUtil; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.util.Bytes; +import org.apache.hugegraph.util.NumericUtil; +import org.apache.hugegraph.testutil.Assert; public class NumericUtilTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/OrderLimitMapTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/OrderLimitMapTest.java similarity index 98% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/OrderLimitMapTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/OrderLimitMapTest.java index 75137d56a..048cd1360 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/OrderLimitMapTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/OrderLimitMapTest.java @@ -17,14 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.util.Map; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.util.OrderLimitMap; +import org.apache.hugegraph.util.OrderLimitMap; +import org.apache.hugegraph.testutil.Assert; import com.google.common.collect.ImmutableList; public class OrderLimitMapTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/ReflectionUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/ReflectionUtilTest.java similarity index 74% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/ReflectionUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/ReflectionUtilTest.java index 7031a447f..b400f5297 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/ReflectionUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/ReflectionUtilTest.java @@ -17,25 +17,26 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.io.IOException; import java.lang.reflect.Method; +import java.util.Comparator; import java.util.List; -import org.apache.commons.collections.IteratorUtils; import org.junit.Test; -import com.baidu.hugegraph.perf.PerfUtil.Watched; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.unit.perf.testclass.TestClass; -import com.baidu.hugegraph.unit.perf.testclass.TestClass.Bar; -import com.baidu.hugegraph.unit.perf.testclass.TestClass.Base; -import com.baidu.hugegraph.unit.perf.testclass.TestClass.Foo; -import com.baidu.hugegraph.unit.perf.testclass.TestClass.ManuallyProfile; -import com.baidu.hugegraph.unit.perf.testclass.TestClass.Sub; -import com.baidu.hugegraph.util.ReflectionUtil; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.perf.testclass.TestClass; +import org.apache.hugegraph.unit.perf.testclass.TestClass.Bar; +import org.apache.hugegraph.unit.perf.testclass.TestClass.Base; +import org.apache.hugegraph.unit.perf.testclass.TestClass.Foo; +import org.apache.hugegraph.unit.perf.testclass.TestClass.ManuallyProfile; +import org.apache.hugegraph.unit.perf.testclass.TestClass.Sub; +import org.apache.hugegraph.perf.PerfUtil; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.apache.hugegraph.util.ReflectionUtil; +import org.apache.commons.collections.IteratorUtils; import com.google.common.reflect.ClassPath.ClassInfo; import javassist.NotFoundException; @@ -72,7 +73,7 @@ public void testGetMethodsAnnotatedWith() { List methods; methods = ReflectionUtil.getMethodsAnnotatedWith(Sub.class, - Watched.class, + PerfUtil.Watched.class, false); methods.sort((m1, m2) -> m1.getName().compareTo(m2.getName())); Assert.assertEquals(2, methods.size()); @@ -81,7 +82,7 @@ public void testGetMethodsAnnotatedWith() { methods = ReflectionUtil.getMethodsAnnotatedWith(Sub.class, - Watched.class, + PerfUtil.Watched.class, true); methods.sort((m1, m2) -> m1.getName().compareTo(m2.getName())); Assert.assertEquals(3, methods.size()); @@ -94,16 +95,16 @@ public void testGetMethodsAnnotatedWith() { public void testClasses() throws IOException { @SuppressWarnings("unchecked") List classes = IteratorUtils.toList(ReflectionUtil.classes( - "com.baidu.hugegraph.util")); + "org.apache.hugegraph.util")); Assert.assertEquals(17, classes.size()); - classes.sort((c1, c2) -> c1.getName().compareTo(c2.getName())); - Assert.assertEquals("com.baidu.hugegraph.util.Bytes", + classes.sort(Comparator.comparing(ClassInfo::getName)); + Assert.assertEquals("org.apache.hugegraph.util.Bytes", classes.get(0).getName()); - Assert.assertEquals("com.baidu.hugegraph.util.CheckSocket", + Assert.assertEquals("org.apache.hugegraph.util.CheckSocket", classes.get(1).getName()); - Assert.assertEquals("com.baidu.hugegraph.util.CollectionUtil", + Assert.assertEquals("org.apache.hugegraph.util.CollectionUtil", classes.get(2).getName()); - Assert.assertEquals("com.baidu.hugegraph.util.VersionUtil", + Assert.assertEquals("org.apache.hugegraph.util.VersionUtil", classes.get(16).getName()); } @@ -111,9 +112,9 @@ public void testClasses() throws IOException { public void testSuperClasses() throws NotFoundException { List classes = ReflectionUtil.superClasses(Sub.class.getName()); Assert.assertEquals(2, classes.size()); - classes.sort((c1, c2) -> c1.compareTo(c2)); - Assert.assertEquals(Base.class.getName(), classes.get(0)); - Assert.assertEquals(Object.class.getName(), classes.get(1)); + classes.sort(String::compareTo); + Assert.assertEquals(Object.class.getName(), classes.get(0)); + Assert.assertEquals(Base.class.getName(), classes.get(1)); } @Test @@ -131,20 +132,20 @@ public void testNestedClasses() throws NotFoundException { @Test public void testPackageName() { - String clazz = "com.baidu.hugegraph.unit.perf.testclass2.Test"; - Assert.assertEquals("com.baidu.hugegraph.unit.perf.testclass2", + String clazz = "org.apache.hugegraph.unit.perf.testclass2.Test"; + Assert.assertEquals("org.apache.hugegraph.unit.perf.testclass2", ReflectionUtil.packageName(clazz)); - clazz = "com.baidu.hugegraph.unit.perf.testclass2.Test$Bar"; - Assert.assertEquals("com.baidu.hugegraph.unit.perf.testclass2", + clazz = "org.apache.hugegraph.unit.perf.testclass2.Test$Bar"; + Assert.assertEquals("org.apache.hugegraph.unit.perf.testclass2", ReflectionUtil.packageName(clazz)); - clazz = "com.baidu.hugegraph.unit.perf.testclass.Test$Bar"; - Assert.assertEquals("com.baidu.hugegraph.unit.perf.testclass", + clazz = "org.apache.hugegraph.unit.perf.testclass.Test$Bar"; + Assert.assertEquals("org.apache.hugegraph.unit.perf.testclass", ReflectionUtil.packageName(clazz)); - clazz = "com.baidu.hugegraph.unit.perf.testclass..Test$Bar"; - Assert.assertEquals("com.baidu.hugegraph.unit.perf.testclass.", + clazz = "org.apache.hugegraph.unit.perf.testclass..Test$Bar"; + Assert.assertEquals("org.apache.hugegraph.unit.perf.testclass.", ReflectionUtil.packageName(clazz)); clazz = "com"; diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/StringUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/StringUtilTest.java similarity index 97% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/StringUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/StringUtilTest.java index 6840f7c0c..bd4e962e2 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/StringUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/StringUtilTest.java @@ -17,16 +17,16 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.util.ArrayList; import java.util.List; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.util.StringUtil; -import com.baidu.hugegraph.util.StringUtil.Chars; +import org.apache.hugegraph.util.StringUtil; +import org.apache.hugegraph.util.StringUtil.Chars; +import org.apache.hugegraph.testutil.Assert; import com.google.common.base.Splitter; public class StringUtilTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/TimeUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/TimeUtilTest.java similarity index 95% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/TimeUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/TimeUtilTest.java index 13f831af5..453de2f10 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/TimeUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/TimeUtilTest.java @@ -17,15 +17,15 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.util.Date; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -import com.baidu.hugegraph.util.TimeUtil; +import org.apache.hugegraph.util.TimeUtil; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class TimeUtilTest extends BaseUnitTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/UnitUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/UnitUtilTest.java similarity index 99% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/UnitUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/UnitUtilTest.java index a7e31e98d..fd146b8fc 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/UnitUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/UnitUtilTest.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.util.Bytes; -import com.baidu.hugegraph.util.UnitUtil; +import org.apache.hugegraph.util.Bytes; +import org.apache.hugegraph.util.UnitUtil; +import org.apache.hugegraph.testutil.Assert; public class UnitUtilTest { diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/VersionUtilTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/VersionUtilTest.java similarity index 92% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/VersionUtilTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/VersionUtilTest.java index 9ee1862a4..6ed04505a 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/util/VersionUtilTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/util/VersionUtilTest.java @@ -17,16 +17,16 @@ * under the License. */ -package com.baidu.hugegraph.unit.util; +package org.apache.hugegraph.unit.util; import java.net.MalformedURLException; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.unit.BaseUnitTest; -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; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; public class VersionUtilTest extends BaseUnitTest { @@ -140,17 +140,17 @@ public void testGetImplementationVersion() throws MalformedURLException { @Test public void testVersion() { // Test equals - Version v1 = VersionUtil.Version.of("0.2.1"); - Version v2 = VersionUtil.Version.of("0.2.1"); + Version v1 = Version.of("0.2.1"); + Version v2 = Version.of("0.2.1"); Assert.assertEquals(v1, v1); Assert.assertEquals(v1, v2); - Version v3 = VersionUtil.Version.of("0.2.0"); - Version v4 = VersionUtil.Version.of("0.2"); + Version v3 = Version.of("0.2.0"); + Version v4 = Version.of("0.2"); Assert.assertEquals(v3, v4); - Version v5 = VersionUtil.Version.of("0.2.3"); - Version v6 = VersionUtil.Version.of("0.3.2"); + Version v5 = Version.of("0.2.3"); + Version v6 = Version.of("0.3.2"); Assert.assertNotEquals(v5, v6); Assert.assertNotEquals(v5, null); Assert.assertNotEquals(v5, "0.2.3"); diff --git a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/version/VersionTest.java b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/version/VersionTest.java similarity index 86% rename from hugegraph-common/src/test/java/com/baidu/hugegraph/unit/version/VersionTest.java rename to hugegraph-common/src/test/java/org/apache/hugegraph/unit/version/VersionTest.java index 6d92e1176..12e3c659b 100644 --- a/hugegraph-common/src/test/java/com/baidu/hugegraph/unit/version/VersionTest.java +++ b/hugegraph-common/src/test/java/org/apache/hugegraph/unit/version/VersionTest.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.unit.version; +package org.apache.hugegraph.unit.version; +import org.apache.hugegraph.util.VersionUtil; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.util.VersionUtil; -import com.baidu.hugegraph.version.CommonVersion; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.version.CommonVersion; public class VersionTest { diff --git a/hugegraph-common/src/test/resources/log4j2.xml b/hugegraph-common/src/test/resources/log4j2.xml index 7ef111d20..15600fcad 100644 --- a/hugegraph-common/src/test/resources/log4j2.xml +++ b/hugegraph-common/src/test/resources/log4j2.xml @@ -18,7 +18,7 @@ - + diff --git a/hugegraph-rpc/pom.xml b/hugegraph-rpc/pom.xml index 2c2d1c1b1..924c5dee0 100644 --- a/hugegraph-rpc/pom.xml +++ b/hugegraph-rpc/pom.xml @@ -12,7 +12,7 @@ hugegraph-rpc ${artifactId} - HugeGraph Database RPC component + HugeGraph RPC component @@ -21,9 +21,9 @@ - com.baidu.hugegraph + org.apache.hugegraph hugegraph-common - ${project.version} + ${revision} diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/config/RpcOptions.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/config/RpcOptions.java similarity index 94% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/config/RpcOptions.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/config/RpcOptions.java index d58673cc9..782643eac 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/config/RpcOptions.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/config/RpcOptions.java @@ -17,11 +17,14 @@ * 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.rangeInt; +import org.apache.hugegraph.config.ConfigOption; +import org.apache.hugegraph.config.OptionHolder; + +import static org.apache.hugegraph.config.OptionChecker.allowValues; +import static org.apache.hugegraph.config.OptionChecker.disallowEmpty; +import static org.apache.hugegraph.config.OptionChecker.rangeInt; public class RpcOptions extends OptionHolder { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcClientProvider.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcClientProvider.java similarity index 94% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcClientProvider.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcClientProvider.java index 6f0eba5a6..b17191a6d 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcClientProvider.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcClientProvider.java @@ -17,16 +17,16 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; import com.alipay.sofa.rpc.common.utils.StringUtils; -import com.baidu.hugegraph.config.HugeConfig; -import com.baidu.hugegraph.config.RpcOptions; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.config.RpcOptions; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.util.E; public class RpcClientProvider { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcCommonConfig.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcCommonConfig.java similarity index 92% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcCommonConfig.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcCommonConfig.java index 4ee50b682..475a82a91 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcCommonConfig.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcCommonConfig.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; import java.util.Map; import com.alipay.sofa.rpc.common.RpcConfigs; -import com.baidu.hugegraph.config.HugeConfig; -import com.baidu.hugegraph.config.RpcOptions; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.config.RpcOptions; public class RpcCommonConfig { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcConsumerConfig.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcConsumerConfig.java similarity index 98% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcConsumerConfig.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcConsumerConfig.java index c9b28f98e..f2c9b920e 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcConsumerConfig.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcConsumerConfig.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; import java.util.ArrayList; import java.util.List; @@ -38,9 +38,9 @@ import com.alipay.sofa.rpc.core.response.SofaResponse; import com.alipay.sofa.rpc.ext.Extension; import com.alipay.sofa.rpc.ext.ExtensionLoaderFactory; -import com.baidu.hugegraph.config.HugeConfig; -import com.baidu.hugegraph.config.RpcOptions; -import com.baidu.hugegraph.util.Log; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.config.RpcOptions; +import org.apache.hugegraph.util.Log; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcException.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcException.java similarity index 97% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcException.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcException.java index 2a2675ce4..6fc2f2493 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcException.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcException.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; public class RpcException extends RuntimeException { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcProviderConfig.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcProviderConfig.java similarity index 97% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcProviderConfig.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcProviderConfig.java index 8bf0aea3a..bc6d322d2 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcProviderConfig.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcProviderConfig.java @@ -17,12 +17,12 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; import java.util.Map; import com.alipay.sofa.rpc.config.ProviderConfig; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.util.E; import com.google.common.collect.Maps; public class RpcProviderConfig implements RpcServiceConfig4Server { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServer.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServer.java similarity index 95% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServer.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServer.java index a7e0ba911..576ad8180 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServer.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServer.java @@ -17,11 +17,10 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; import java.util.Map; -import org.apache.commons.collections.MapUtils; import org.slf4j.Logger; import com.alipay.remoting.RemotingServer; @@ -30,11 +29,12 @@ import com.alipay.sofa.rpc.config.ServerConfig; import com.alipay.sofa.rpc.server.Server; import com.alipay.sofa.rpc.server.bolt.BoltServer; -import com.baidu.hugegraph.config.HugeConfig; -import com.baidu.hugegraph.config.RpcOptions; -import com.baidu.hugegraph.testutil.Whitebox; -import com.baidu.hugegraph.util.E; -import com.baidu.hugegraph.util.Log; +import org.apache.hugegraph.config.RpcOptions; +import org.apache.commons.collections.MapUtils; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.testutil.Whitebox; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; public class RpcServer { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Client.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java similarity index 97% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Client.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java index 13cfca96f..51b59c4aa 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Client.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; public interface RpcServiceConfig4Client { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Server.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java similarity index 97% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Server.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java index 7139073cf..9c0a0e510 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Server.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.rpc; +package org.apache.hugegraph.rpc; public interface RpcServiceConfig4Server { diff --git a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/version/RpcVersion.java b/hugegraph-rpc/src/main/java/org/apache/hugegraph/version/RpcVersion.java similarity index 86% rename from hugegraph-rpc/src/main/java/com/baidu/hugegraph/version/RpcVersion.java rename to hugegraph-rpc/src/main/java/org/apache/hugegraph/version/RpcVersion.java index 5faee27ab..753ef2fb1 100644 --- a/hugegraph-rpc/src/main/java/com/baidu/hugegraph/version/RpcVersion.java +++ b/hugegraph-rpc/src/main/java/org/apache/hugegraph/version/RpcVersion.java @@ -17,15 +17,14 @@ * under the License. */ -package com.baidu.hugegraph.version; +package org.apache.hugegraph.version; -import com.baidu.hugegraph.util.VersionUtil.Version; +import org.apache.hugegraph.util.VersionUtil.Version; public class RpcVersion { public static final String NAME = "hugegraph-rpc"; // The second parameter of Version.of() is for all-in-one JAR - public static final Version VERSION = Version.of(RpcVersion.class, - "2.1.2"); + public static final Version VERSION = Version.of(RpcVersion.class, "1.0.0"); } diff --git a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/BaseUnitTest.java b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/BaseUnitTest.java similarity index 86% rename from hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/BaseUnitTest.java rename to hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/BaseUnitTest.java index cdbdb03b4..9d1e0d773 100644 --- a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/BaseUnitTest.java +++ b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/BaseUnitTest.java @@ -17,21 +17,21 @@ * under the License. */ -package com.baidu.hugegraph.unit; +package org.apache.hugegraph.unit; import java.net.URL; import org.junit.BeforeClass; -import com.baidu.hugegraph.config.HugeConfig; -import com.baidu.hugegraph.config.OptionSpace; -import com.baidu.hugegraph.rpc.RpcServer; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.config.OptionSpace; +import org.apache.hugegraph.rpc.RpcServer; public class BaseUnitTest { @BeforeClass public static void initEnv() { - OptionSpace.register("rpc", "com.baidu.hugegraph.config.RpcOptions"); + OptionSpace.register("rpc", "org.apache.hugegraph.config.RpcOptions"); } protected static HugeConfig config(boolean server) { diff --git a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/ExceptionTest.java b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/ExceptionTest.java similarity index 93% rename from hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/ExceptionTest.java rename to hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/ExceptionTest.java index ade219804..9ca812a59 100644 --- a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/ExceptionTest.java +++ b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/ExceptionTest.java @@ -17,12 +17,12 @@ * under the License. */ -package com.baidu.hugegraph.unit; +package org.apache.hugegraph.unit; import org.junit.Test; -import com.baidu.hugegraph.rpc.RpcException; -import com.baidu.hugegraph.testutil.Assert; +import org.apache.hugegraph.rpc.RpcException; +import org.apache.hugegraph.testutil.Assert; public class ExceptionTest { diff --git a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/ServerClientTest.java b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/ServerClientTest.java similarity index 97% rename from hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/ServerClientTest.java rename to hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/ServerClientTest.java index 28fe564d8..590749e1e 100644 --- a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/ServerClientTest.java +++ b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/ServerClientTest.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit; +package org.apache.hugegraph.unit; import java.io.IOException; import java.net.InetAddress; @@ -31,15 +31,15 @@ import com.alipay.sofa.rpc.common.RpcOptions; import com.alipay.sofa.rpc.core.exception.SofaRpcException; import com.alipay.sofa.rpc.core.exception.SofaRpcRuntimeException; -import com.baidu.hugegraph.config.HugeConfig; -import com.baidu.hugegraph.rpc.RpcClientProvider; -import com.baidu.hugegraph.rpc.RpcCommonConfig; -import com.baidu.hugegraph.rpc.RpcConsumerConfig; -import com.baidu.hugegraph.rpc.RpcProviderConfig; -import com.baidu.hugegraph.rpc.RpcServer; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.testutil.Whitebox; -import com.baidu.hugegraph.util.E; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.rpc.RpcClientProvider; +import org.apache.hugegraph.rpc.RpcCommonConfig; +import org.apache.hugegraph.rpc.RpcConsumerConfig; +import org.apache.hugegraph.rpc.RpcProviderConfig; +import org.apache.hugegraph.rpc.RpcServer; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.testutil.Whitebox; +import org.apache.hugegraph.util.E; import com.google.common.collect.ImmutableMap; public class ServerClientTest extends BaseUnitTest { @@ -147,8 +147,7 @@ public void testStartServerWithRandomPort() { // Init client HugeConfig config = config(false); String url = rpcServerRandom.host() + ":" + rpcServerRandom.port(); - String remoteUrlKey = com.baidu.hugegraph.config - .RpcOptions.RPC_REMOTE_URL.name(); + String remoteUrlKey = org.apache.hugegraph.config.RpcOptions.RPC_REMOTE_URL.name(); config.setProperty(remoteUrlKey, url); RpcClientProvider rpcClientRandom = new RpcClientProvider(config); @@ -186,8 +185,7 @@ public void testStartServerWithAdaptivePort() throws IOException { // Init client HugeConfig config = config(false); String url = rpcServerAdaptive.host() + ":" + rpcServerAdaptive.port(); - String remoteUrlKey = com.baidu.hugegraph.config - .RpcOptions.RPC_REMOTE_URL.name(); + String remoteUrlKey = org.apache.hugegraph.config.RpcOptions.RPC_REMOTE_URL.name(); config.setProperty(remoteUrlKey, url); RpcClientProvider rpcClientAdaptive = new RpcClientProvider(config); @@ -458,8 +456,7 @@ public void testLoadBalancer() { s5g1.resetResult(); // Test LB "roundRobin" - String lbKey = com.baidu.hugegraph.config - .RpcOptions.RPC_CLIENT_LOAD_BALANCER.name(); + String lbKey = org.apache.hugegraph.config.RpcOptions.RPC_CLIENT_LOAD_BALANCER.name(); clientLB.setProperty(lbKey, "roundRobin"); RpcClientProvider rpcClientRound = new RpcClientProvider(clientLB); HelloService round = rpcClientRound.config() diff --git a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/UnitTestSuite.java b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/UnitTestSuite.java similarity index 96% rename from hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/UnitTestSuite.java rename to hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/UnitTestSuite.java index 79446602a..ed422950d 100644 --- a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/UnitTestSuite.java +++ b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/UnitTestSuite.java @@ -17,7 +17,7 @@ * under the License. */ -package com.baidu.hugegraph.unit; +package org.apache.hugegraph.unit; import org.junit.runner.RunWith; import org.junit.runners.Suite; diff --git a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/VersionTest.java b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/VersionTest.java similarity index 87% rename from hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/VersionTest.java rename to hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/VersionTest.java index 1430bda5e..fae9fb84f 100644 --- a/hugegraph-rpc/src/test/java/com/baidu/hugegraph/unit/VersionTest.java +++ b/hugegraph-rpc/src/test/java/org/apache/hugegraph/unit/VersionTest.java @@ -17,13 +17,13 @@ * under the License. */ -package com.baidu.hugegraph.unit; +package org.apache.hugegraph.unit; import org.junit.Test; -import com.baidu.hugegraph.testutil.Assert; -import com.baidu.hugegraph.util.VersionUtil; -import com.baidu.hugegraph.version.RpcVersion; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.util.VersionUtil; +import org.apache.hugegraph.version.RpcVersion; public class VersionTest { diff --git a/hugegraph-rpc/src/test/resources/log4j2.xml b/hugegraph-rpc/src/test/resources/log4j2.xml index f69acfd1b..033c5b887 100644 --- a/hugegraph-rpc/src/test/resources/log4j2.xml +++ b/hugegraph-rpc/src/test/resources/log4j2.xml @@ -18,7 +18,7 @@ - + diff --git a/pom.xml b/pom.xml index 2a5c1e9a0..a80d987be 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,7 @@ + https://github.com/hugegraph/hugegraph-commons https://github.com/hugegraph/hugegraph-commons @@ -38,7 +39,7 @@ - 2.1.2 + 1.0.0 UTF-8 ${project.basedir}/.. 1.8