diff --git a/hugegraph-api/pom.xml b/hugegraph-api/pom.xml
index 3204dd833d..90c466e9ec 100644
--- a/hugegraph-api/pom.xml
+++ b/hugegraph-api/pom.xml
@@ -113,7 +113,12 @@
io.dropwizard.metrics
- metrics-jersey2
+ metrics-jersey3
+
+
+ org.sonatype.sisu
+ sisu-inject-bean
+ 2.5.0-b32
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java
index 398f0a686d..5d63112808 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/API.java
@@ -24,10 +24,10 @@
import java.util.concurrent.Callable;
import java.util.function.Consumer;
-import javax.ws.rs.ForbiddenException;
-import javax.ws.rs.NotFoundException;
-import javax.ws.rs.NotSupportedException;
-import javax.ws.rs.core.MediaType;
+import jakarta.ws.rs.ForbiddenException;
+import jakarta.ws.rs.NotFoundException;
+import jakarta.ws.rs.NotSupportedException;
+import jakarta.ws.rs.core.MediaType;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/AccessAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/AccessAPI.java
index 4d947837f3..1225f30ffd 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/AccessAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/AccessAPI.java
@@ -21,19 +21,19 @@
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Path;
import org.slf4j.Logger;
import com.baidu.hugegraph.HugeGraph;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/BelongAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/BelongAPI.java
index 634bade2da..0807f4c257 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/BelongAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/BelongAPI.java
@@ -21,19 +21,19 @@
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+
+import jakarta.inject.Singleton;
import org.slf4j.Logger;
import com.baidu.hugegraph.HugeGraph;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/GroupAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/GroupAPI.java
index e884c544ce..cc59eb5622 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/GroupAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/GroupAPI.java
@@ -21,19 +21,19 @@
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+
+import jakarta.inject.Singleton;
import org.slf4j.Logger;
import com.baidu.hugegraph.HugeGraph;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/LoginAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/LoginAPI.java
index 51cd1f3976..12eec8cfde 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/LoginAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/LoginAPI.java
@@ -19,20 +19,20 @@
package com.baidu.hugegraph.api.auth;
-import javax.inject.Singleton;
+import jakarta.inject.Singleton;
import javax.security.sasl.AuthenticationException;
-import javax.ws.rs.BadRequestException;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.NotAuthorizedException;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.HeaderParam;
+import jakarta.ws.rs.NotAuthorizedException;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/ProjectAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/ProjectAPI.java
index 4eb9573fda..e91b4f4309 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/ProjectAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/ProjectAPI.java
@@ -23,18 +23,18 @@
import java.util.List;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/TargetAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/TargetAPI.java
index 04c1181522..e1d5e17f89 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/TargetAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/TargetAPI.java
@@ -22,18 +22,18 @@
import java.util.List;
import java.util.Map;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/UserAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/UserAPI.java
index 0bb744a976..9811459f78 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/UserAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/auth/UserAPI.java
@@ -21,18 +21,18 @@
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/AuthenticationFilter.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/AuthenticationFilter.java
index bbc6745b85..0dc1305eed 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/AuthenticationFilter.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/AuthenticationFilter.java
@@ -25,18 +25,18 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.Priority;
-import javax.ws.rs.BadRequestException;
-import javax.ws.rs.NotAuthorizedException;
-import javax.ws.rs.Priorities;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.PreMatching;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.NotAuthorizedException;
+import jakarta.ws.rs.Priorities;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.PreMatching;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.SecurityContext;
+import jakarta.ws.rs.core.UriInfo;
+import jakarta.ws.rs.ext.Provider;
import javax.xml.bind.DatatypeConverter;
import org.apache.commons.lang3.StringUtils;
@@ -71,10 +71,10 @@ public class AuthenticationFilter implements ContainerRequestFilter {
);
@Context
- private javax.inject.Provider managerProvider;
+ private jakarta.inject.Provider managerProvider;
@Context
- private javax.inject.Provider requestProvider;
+ private jakarta.inject.Provider requestProvider;
@Override
public void filter(ContainerRequestContext context) throws IOException {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/CompressInterceptor.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/CompressInterceptor.java
index 447617b17a..77d92e5ffb 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/CompressInterceptor.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/CompressInterceptor.java
@@ -26,14 +26,14 @@
import java.lang.annotation.RetentionPolicy;
import java.util.zip.GZIPOutputStream;
-import javax.inject.Singleton;
-import javax.ws.rs.NameBinding;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.ext.Provider;
-import javax.ws.rs.ext.WriterInterceptor;
-import javax.ws.rs.ext.WriterInterceptorContext;
-
+import jakarta.ws.rs.NameBinding;
+import jakarta.ws.rs.WebApplicationException;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.ext.Provider;
+import jakarta.ws.rs.ext.WriterInterceptor;
+import jakarta.ws.rs.ext.WriterInterceptorContext;
+
+import jakarta.inject.Singleton;
import org.slf4j.Logger;
import com.baidu.hugegraph.server.RestServer;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/DecompressInterceptor.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/DecompressInterceptor.java
index 563e6990d0..496cf6ecd9 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/DecompressInterceptor.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/DecompressInterceptor.java
@@ -24,11 +24,11 @@
import java.lang.annotation.RetentionPolicy;
import java.util.zip.GZIPInputStream;
-import javax.inject.Singleton;
-import javax.ws.rs.NameBinding;
-import javax.ws.rs.ext.Provider;
-import javax.ws.rs.ext.ReaderInterceptor;
-import javax.ws.rs.ext.ReaderInterceptorContext;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.NameBinding;
+import jakarta.ws.rs.ext.Provider;
+import jakarta.ws.rs.ext.ReaderInterceptor;
+import jakarta.ws.rs.ext.ReaderInterceptorContext;
@Provider
@Singleton
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/ExceptionFilter.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/ExceptionFilter.java
index 5a8b1af62d..2febefd174 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/ExceptionFilter.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/ExceptionFilter.java
@@ -26,13 +26,13 @@
import javax.json.Json;
import javax.json.JsonArrayBuilder;
import javax.json.JsonObjectBuilder;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.ExceptionMapper;
-import javax.ws.rs.ext.Provider;
+import jakarta.ws.rs.WebApplicationException;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.ext.ExceptionMapper;
+import jakarta.ws.rs.ext.Provider;
import org.apache.commons.lang3.StringUtils;
import org.glassfish.hk2.api.MultiException;
@@ -55,7 +55,7 @@ public class ExceptionFilter {
public static class TracedExceptionMapper {
@Context
- private javax.inject.Provider configProvider;
+ private jakarta.inject.Provider configProvider;
protected boolean trace() {
HugeConfig config = this.configProvider.get();
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadDetectFilter.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadDetectFilter.java
index d52cf12374..ba59f1ab80 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadDetectFilter.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadDetectFilter.java
@@ -22,14 +22,14 @@
import java.util.List;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.ServiceUnavailableException;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.PreMatching;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.PathSegment;
-import javax.ws.rs.ext.Provider;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.ServiceUnavailableException;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.PreMatching;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.PathSegment;
+import jakarta.ws.rs.ext.Provider;
import com.baidu.hugegraph.config.HugeConfig;
import com.baidu.hugegraph.config.ServerOptions;
@@ -56,9 +56,9 @@ public class LoadDetectFilter implements ContainerRequestFilter {
RateLimiter.create(1.0 / 30);
@Context
- private javax.inject.Provider configProvider;
+ private jakarta.inject.Provider configProvider;
@Context
- private javax.inject.Provider loadProvider;
+ private jakarta.inject.Provider loadProvider;
@Override
public void filter(ContainerRequestContext context) {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadReleaseFilter.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadReleaseFilter.java
index c393b0107b..210f996c19 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadReleaseFilter.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/LoadReleaseFilter.java
@@ -19,12 +19,12 @@
package com.baidu.hugegraph.api.filter;
-import javax.inject.Singleton;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.ext.Provider;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.ext.Provider;
import com.baidu.hugegraph.define.WorkLoad;
@@ -33,7 +33,7 @@
public class LoadReleaseFilter implements ContainerResponseFilter {
@Context
- private javax.inject.Provider loadProvider;
+ private jakarta.inject.Provider loadProvider;
@Override
public void filter(ContainerRequestContext requestContext,
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/StatusFilter.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/StatusFilter.java
index f27f3f58db..3d93b9ef9c 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/StatusFilter.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/filter/StatusFilter.java
@@ -24,11 +24,11 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import javax.ws.rs.NameBinding;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
-import javax.ws.rs.ext.Provider;
+import jakarta.ws.rs.NameBinding;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
+import jakarta.ws.rs.ext.Provider;
@Provider
public class StatusFilter implements ContainerResponseFilter {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java
index e2913a7247..d1c132e949 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java
@@ -26,19 +26,19 @@
import java.util.Map;
import java.util.NoSuchElementException;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Direction;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java
index eb63564996..22bb9dbc2d 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java
@@ -27,19 +27,19 @@
import java.util.Map;
import java.util.NoSuchElementException;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.T;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
index d071c45f73..5c897cb730 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
@@ -22,18 +22,17 @@
import java.util.Map;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
import com.baidu.hugegraph.api.API;
import com.baidu.hugegraph.api.filter.CompressInterceptor.Compress;
@@ -45,6 +44,8 @@
import com.codahale.metrics.annotation.Timed;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import jakarta.inject.Provider;
+import jakarta.inject.Singleton;
@Path("gremlin")
@Singleton
@@ -57,7 +58,7 @@ public class GremlinAPI extends API {
private static final Set FORBIDDEN_REQUEST_EXCEPTIONS =
ImmutableSet.of("java.lang.SecurityException",
- "javax.ws.rs.ForbiddenException");
+ "jakarta.ws.rs.ForbiddenException");
private static final Set BAD_REQUEST_EXCEPTIONS = ImmutableSet.of(
"java.lang.IllegalArgumentException",
"java.util.concurrent.TimeoutException",
@@ -67,7 +68,7 @@ public class GremlinAPI extends API {
);
@Context
- private javax.inject.Provider configProvider;
+ private Provider configProvider;
private GremlinClient client;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinClient.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinClient.java
index b3d1d21d32..b2b2725f87 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinClient.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinClient.java
@@ -22,12 +22,12 @@
import java.util.List;
import java.util.Map;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.Response;
import com.baidu.hugegraph.api.filter.CompressInterceptor;
import com.baidu.hugegraph.rest.AbstractRestClient;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/ComputerAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/ComputerAPI.java
index e3ffe1eeca..14eab1fcf7 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/ComputerAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/ComputerAPI.java
@@ -21,14 +21,14 @@
import java.util.Map;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.NotFoundException;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.NotFoundException;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/GremlinAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/GremlinAPI.java
index 8c5afe12c9..9d1a5a2151 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/GremlinAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/GremlinAPI.java
@@ -27,14 +27,14 @@
import java.util.HashMap;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/RebuildAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/RebuildAPI.java
index b4440205fd..eb382cc933 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/RebuildAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/RebuildAPI.java
@@ -21,13 +21,13 @@
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/TaskAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/TaskAPI.java
index 90c34b02e5..055975f35e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/TaskAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/job/TaskAPI.java
@@ -26,18 +26,18 @@
import java.util.Map;
import java.util.stream.Collectors;
-import javax.inject.Singleton;
-import javax.ws.rs.BadRequestException;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.NotSupportedException;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.NotSupportedException;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.groovy.util.Maps;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java
index 27c4caed73..23c0ae8aeb 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/metrics/MetricsAPI.java
@@ -25,12 +25,12 @@
import java.util.LinkedHashMap;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/GraphsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/GraphsAPI.java
index f55d64e478..7a5ce5c06d 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/GraphsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/GraphsAPI.java
@@ -24,20 +24,20 @@
import java.util.Map;
import java.util.Set;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.ForbiddenException;
-import javax.ws.rs.GET;
-import javax.ws.rs.NotSupportedException;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.SecurityContext;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.ForbiddenException;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.NotSupportedException;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.SecurityContext;
import org.slf4j.Logger;
@@ -108,16 +108,8 @@ public Object get(@Context GraphManager manager,
public File getConf(@Context GraphManager manager,
@PathParam("name") String name) {
LOG.debug("Get graph configuration by name '{}'", name);
-
- HugeGraph g = graph4admin(manager, name);
-
- HugeConfig config = (HugeConfig) g.configuration();
- File file = config.getFile();
- if (file == null) {
- throw new NotSupportedException("Can't access the api in " +
- "a node which started with non local file config.");
- }
- return file;
+ throw new NotSupportedException("Can't access the api in " +
+ "a node which started with non local file config.");
}
@DELETE
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/ProfileAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/ProfileAPI.java
index 42cd4845ed..e8cd4bc3dc 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/ProfileAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/ProfileAPI.java
@@ -26,13 +26,13 @@
import java.util.TreeMap;
import java.util.TreeSet;
-import javax.inject.Singleton;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Application;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.MediaType;
import org.apache.commons.lang3.StringUtils;
import org.apache.tinkerpop.shaded.jackson.annotation.JsonProperty;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/VersionAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/VersionAPI.java
index b4e0343b7d..5f107cb363 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/VersionAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/profile/VersionAPI.java
@@ -21,11 +21,11 @@
import java.util.Map;
-import javax.annotation.security.PermitAll;
-import javax.inject.Singleton;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
+import jakarta.annotation.security.PermitAll;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
import com.baidu.hugegraph.api.API;
import com.baidu.hugegraph.version.ApiVersion;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/raft/RaftAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/raft/RaftAPI.java
index 9f06852c6f..e8e7aa7a68 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/raft/RaftAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/raft/RaftAPI.java
@@ -22,17 +22,17 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/EdgeLabelAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/EdgeLabelAPI.java
index e7e8880725..17e895ca44 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/EdgeLabelAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/EdgeLabelAPI.java
@@ -23,18 +23,18 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/IndexLabelAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/IndexLabelAPI.java
index 5aa6c50814..b98e8b9bd6 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/IndexLabelAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/IndexLabelAPI.java
@@ -23,18 +23,18 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/PropertyKeyAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/PropertyKeyAPI.java
index 4c3e99b311..fe099552c9 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/PropertyKeyAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/PropertyKeyAPI.java
@@ -23,18 +23,18 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/SchemaAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/SchemaAPI.java
index 378005e812..c18d46a214 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/SchemaAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/SchemaAPI.java
@@ -23,13 +23,13 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/VertexLabelAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/VertexLabelAPI.java
index 38e3ecf099..454cc72a98 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/VertexLabelAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/schema/VertexLabelAPI.java
@@ -23,18 +23,18 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.security.RolesAllowed;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AllShortestPathsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AllShortestPathsAPI.java
index cfbde599ee..d6a0078d94 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AllShortestPathsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AllShortestPathsAPI.java
@@ -24,14 +24,14 @@
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CountAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CountAPI.java
index ecda4ad32d..2126b1e6de 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CountAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CountAPI.java
@@ -27,12 +27,12 @@
import java.util.List;
import java.util.Map;
-import javax.inject.Singleton;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CrosspointsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CrosspointsAPI.java
index 30ca26ac52..f7748ac481 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CrosspointsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CrosspointsAPI.java
@@ -23,14 +23,14 @@
import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedCrosspointsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
index 3162c55acb..5a2549b0ca 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedCrosspointsAPI.java
@@ -30,13 +30,13 @@
import java.util.Map;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedPathsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedPathsAPI.java
index f50e9e4eb9..2154706b16 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedPathsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/CustomizedPathsAPI.java
@@ -32,13 +32,13 @@
import java.util.Map;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/EdgesAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/EdgesAPI.java
index cfd307f266..137afc3feb 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/EdgesAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/EdgesAPI.java
@@ -24,14 +24,14 @@
import java.util.Iterator;
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/FusiformSimilarityAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/FusiformSimilarityAPI.java
index f4c52a2379..71f5a14c80 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/FusiformSimilarityAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/FusiformSimilarityAPI.java
@@ -26,13 +26,13 @@
import java.util.Iterator;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/JaccardSimilarityAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/JaccardSimilarityAPI.java
index 9aef1013b7..66ffbcbf1f 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/JaccardSimilarityAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/JaccardSimilarityAPI.java
@@ -25,16 +25,16 @@
import java.util.Map;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KneighborAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KneighborAPI.java
index 4c721a13e5..ead263c3f8 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KneighborAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KneighborAPI.java
@@ -27,16 +27,16 @@
import java.util.List;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KoutAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KoutAPI.java
index 40bab89193..8ba64957aa 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KoutAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/KoutAPI.java
@@ -28,16 +28,16 @@
import java.util.List;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/MultiNodeShortestPathAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
index 8a6492aad1..9a531eff49 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/MultiNodeShortestPathAPI.java
@@ -26,13 +26,13 @@
import java.util.List;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java
index 6957e99e57..dbf2c3d9ff 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java
@@ -28,12 +28,12 @@
import java.util.List;
import java.util.Map;
-import javax.inject.Singleton;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PathsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PathsAPI.java
index 095463b7cb..d2dd3a671d 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PathsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PathsAPI.java
@@ -28,16 +28,16 @@
import java.util.Iterator;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java
index 5ec50e382a..184355ca76 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java
@@ -26,12 +26,12 @@
import java.util.Map;
-import javax.inject.Singleton;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RaysAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RaysAPI.java
index bb36766782..ae663dc6b9 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RaysAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RaysAPI.java
@@ -23,14 +23,14 @@
import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RingsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RingsAPI.java
index 6879da007e..f257267c9e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RingsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/RingsAPI.java
@@ -23,14 +23,14 @@
import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE;
import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SameNeighborsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SameNeighborsAPI.java
index 05c12d6ad2..745877426d 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SameNeighborsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SameNeighborsAPI.java
@@ -24,14 +24,14 @@
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ShortestPathAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ShortestPathAPI.java
index 87e2f7cd60..85d84ca3be 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ShortestPathAPI.java
@@ -24,14 +24,14 @@
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SingleSourceShortestPathAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
index 6a2d973809..d7218269f1 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/SingleSourceShortestPathAPI.java
@@ -25,14 +25,14 @@
import java.util.Iterator;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TemplatePathsAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TemplatePathsAPI.java
index 2dc33a8fd8..9674cf8b9a 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TemplatePathsAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/TemplatePathsAPI.java
@@ -28,13 +28,13 @@
import java.util.List;
import java.util.Set;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/VerticesAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/VerticesAPI.java
index 9dbf0fad7a..84547ecb52 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/VerticesAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/VerticesAPI.java
@@ -24,14 +24,14 @@
import java.util.Iterator;
import java.util.List;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/WeightedShortestPathAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/WeightedShortestPathAPI.java
index 1c7def2263..8a46cba78e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/WeightedShortestPathAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/WeightedShortestPathAPI.java
@@ -24,14 +24,14 @@
import java.util.Iterator;
-import javax.inject.Singleton;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/variables/VariablesAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/variables/VariablesAPI.java
index 64c01d2258..7c55ae3516 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/variables/VariablesAPI.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/variables/VariablesAPI.java
@@ -22,16 +22,16 @@
import java.util.Map;
import java.util.Optional;
-import javax.inject.Singleton;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.NotFoundException;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.NotFoundException;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
import org.slf4j.Logger;
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeFactoryAuthProxy.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeFactoryAuthProxy.java
index a0bd21fa5c..ccb9f7a796 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeFactoryAuthProxy.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeFactoryAuthProxy.java
@@ -28,8 +28,6 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.configuration.Configuration;
-
import com.baidu.hugegraph.HugeException;
import com.baidu.hugegraph.HugeFactory;
import com.baidu.hugegraph.HugeGraph;
@@ -60,6 +58,7 @@
import com.baidu.hugegraph.util.Reflection;
import com.baidu.hugegraph.variables.HugeVariables;
import com.google.common.collect.ImmutableSet;
+import org.apache.commons.configuration2.Configuration;
public final class HugeFactoryAuthProxy {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java
index e7eb59d6c1..f6296d4988 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java
@@ -36,8 +36,8 @@
import java.util.function.Supplier;
import javax.security.sasl.AuthenticationException;
-import javax.ws.rs.ForbiddenException;
-import javax.ws.rs.NotAuthorizedException;
+import jakarta.ws.rs.ForbiddenException;
+import jakarta.ws.rs.NotAuthorizedException;
import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyTranslator;
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
@@ -1593,31 +1593,22 @@ public List> toList() {
}
@Override
- public void applyStrategies(Admin, ?> traversal) {
- String script;
- if (traversal instanceof HugeScriptTraversal) {
- script = ((HugeScriptTraversal, ?>) traversal).script();
- } else {
- GroovyTranslator translator = GroovyTranslator.of("g");
- script = translator.translate(traversal.getBytecode());
- }
+ public Iterator> iterator() {
+ if (this.strategies == null) {
+ return new Iterator(){
- /*
- * Verify gremlin-execute permission for user gremlin(in gremlin-
- * server-exec worker) and gremlin job(in task worker).
- * But don't check permission in rest worker, because the following
- * places need to call traversal():
- * 1.vertices/edges rest api
- * 2.oltp rest api (like crosspointpath/neighborrank)
- * 3.olap rest api (like centrality/lpa/louvain/subgraph)
- */
- String caller = Thread.currentThread().getName();
- if (!caller.contains(REST_WORKER)) {
- verifyNamePermission(HugePermission.EXECUTE,
- ResourceType.GREMLIN, script);
- }
+ @Override
+ public boolean hasNext() {
+ return false;
+ }
- this.strategies.applyStrategies(traversal);
+ @Override
+ public Object next() {
+ throw new IllegalStateException();
+ }
+ };
+ }
+ return this.strategies.iterator();
}
@Override
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java
index 60a3b772cf..514d8e03db 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java
@@ -57,7 +57,7 @@ public class WsAndHttpBasicAuthHandler extends SaslAuthenticationHandler {
private static final String HTTP_AUTH = "http-authentication";
public WsAndHttpBasicAuthHandler(Authenticator authenticator,
- Settings.AuthenticationSettings settings) {
+ Settings settings) {
super(authenticator, settings);
}
@@ -70,8 +70,7 @@ public void channelRead(final ChannelHandlerContext ctx, final Object obj)
if (authHandler != null) {
authHandler = pipeline.remove(HTTP_AUTH);
} else {
- authHandler = new HttpBasicAuthHandler(
- this.authenticator, this.authenticationSettings);
+ authHandler = new HttpBasicAuthHandler(this.authenticator);
}
pipeline.addAfter(AUTHENTICATOR, HTTP_AUTH, authHandler);
ctx.fireChannelRead(obj);
@@ -93,8 +92,7 @@ private static class HttpBasicAuthHandler
private final Base64.Decoder decoder = Base64.getUrlDecoder();
- public HttpBasicAuthHandler(Authenticator authenticator,
- Settings.AuthenticationSettings settings) {
+ public HttpBasicAuthHandler(Authenticator authenticator) {
super(authenticator);
}
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/ApplicationConfig.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/server/ApplicationConfig.java
index b5134c8007..d03ce9fcdd 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/ApplicationConfig.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/server/ApplicationConfig.java
@@ -19,7 +19,7 @@
package com.baidu.hugegraph.server;
-import javax.ws.rs.ApplicationPath;
+import jakarta.ws.rs.ApplicationPath;
import org.apache.tinkerpop.gremlin.server.util.MetricManager;
import org.glassfish.hk2.api.Factory;
@@ -39,7 +39,7 @@
import com.baidu.hugegraph.define.WorkLoad;
import com.baidu.hugegraph.util.E;
import com.codahale.metrics.MetricRegistry;
-import com.codahale.metrics.jersey2.InstrumentedResourceMethodApplicationListener;
+import com.codahale.metrics.jersey3.InstrumentedResourceMethodApplicationListener;
@ApplicationPath("/")
public class ApplicationConfig extends ResourceConfig {
diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/RestServer.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/server/RestServer.java
index 3a796df0c3..8cfe4b208b 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/server/RestServer.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/server/RestServer.java
@@ -26,7 +26,7 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
-import javax.ws.rs.core.UriBuilder;
+import jakarta.ws.rs.core.UriBuilder;
import org.glassfish.grizzly.CompletionHandler;
import org.glassfish.grizzly.GrizzlyFuture;
diff --git a/hugegraph-core/pom.xml b/hugegraph-core/pom.xml
index fdd2e7652d..e53fd462fc 100644
--- a/hugegraph-core/pom.xml
+++ b/hugegraph-core/pom.xml
@@ -19,7 +19,7 @@
com.baidu.hugegraph
hugegraph-common
- 1.8.8
+ 1.8.10
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeFactory.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeFactory.java
index 9bc3227388..57ae00f074 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeFactory.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/HugeFactory.java
@@ -25,9 +25,10 @@
import java.util.Map;
import java.util.concurrent.TimeoutException;
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.Configuration;
+import org.apache.commons.configuration2.PropertiesConfiguration;
+import org.apache.commons.configuration2.builder.fluent.Configurations;
+import org.apache.commons.configuration2.ex.ConfigurationException;
import org.slf4j.Logger;
import com.baidu.hugegraph.config.CoreOptions;
@@ -64,16 +65,6 @@ public static synchronized HugeGraph open(Configuration config) {
}
public static synchronized HugeGraph open(HugeConfig config) {
- SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- // Not allowed to read file via Gremlin when SecurityManager enabled
- String configFile = config.getFileName();
- if (configFile == null) {
- configFile = config.toString();
- }
- sm.checkRead(configFile);
- }
-
String name = config.get(CoreOptions.STORE);
checkGraphName(name, "graph config(like hugegraph.properties)");
name = name.toLowerCase();
@@ -113,7 +104,7 @@ public static PropertiesConfiguration getLocalConfig(String path) {
"Please specify a proper config file rather than: %s",
file.toString());
try {
- return new PropertiesConfiguration(file);
+ return new Configurations().properties(file);
} catch (ConfigurationException e) {
throw new HugeException("Unable to load config file: %s", e, path);
}
@@ -121,7 +112,7 @@ public static PropertiesConfiguration getLocalConfig(String path) {
public static PropertiesConfiguration getRemoteConfig(URL url) {
try {
- return new PropertiesConfiguration(url);
+ return new Configurations().properties(url);
} catch (ConfigurationException e) {
throw new HugeException("Unable to load remote config file: %s",
e, url);
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java
index 297e446d3b..1eced16ac8 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java
@@ -19,26 +19,6 @@
package com.baidu.hugegraph;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.Transaction;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import org.apache.tinkerpop.gremlin.structure.io.Io;
-import org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction;
-import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
-import org.slf4j.Logger;
-
import com.baidu.hugegraph.analyzer.Analyzer;
import com.baidu.hugegraph.analyzer.AnalyzerFactory;
import com.baidu.hugegraph.auth.AuthManager;
@@ -56,11 +36,7 @@
import com.baidu.hugegraph.backend.query.Query;
import com.baidu.hugegraph.backend.serializer.AbstractSerializer;
import com.baidu.hugegraph.backend.serializer.SerializerFactory;
-import com.baidu.hugegraph.backend.store.BackendFeatures;
-import com.baidu.hugegraph.backend.store.BackendProviderFactory;
-import com.baidu.hugegraph.backend.store.BackendStore;
-import com.baidu.hugegraph.backend.store.BackendStoreProvider;
-import com.baidu.hugegraph.backend.store.BackendStoreSystemInfo;
+import com.baidu.hugegraph.backend.store.*;
import com.baidu.hugegraph.backend.store.raft.RaftBackendStoreProvider;
import com.baidu.hugegraph.backend.store.raft.RaftGroupManager;
import com.baidu.hugegraph.backend.store.ram.RamTable;
@@ -76,18 +52,8 @@
import com.baidu.hugegraph.perf.PerfUtil.Watched;
import com.baidu.hugegraph.rpc.RpcServiceConfig4Client;
import com.baidu.hugegraph.rpc.RpcServiceConfig4Server;
-import com.baidu.hugegraph.schema.EdgeLabel;
-import com.baidu.hugegraph.schema.IndexLabel;
-import com.baidu.hugegraph.schema.PropertyKey;
-import com.baidu.hugegraph.schema.SchemaElement;
-import com.baidu.hugegraph.schema.SchemaLabel;
-import com.baidu.hugegraph.schema.SchemaManager;
-import com.baidu.hugegraph.schema.VertexLabel;
-import com.baidu.hugegraph.structure.HugeEdge;
-import com.baidu.hugegraph.structure.HugeEdgeProperty;
-import com.baidu.hugegraph.structure.HugeFeatures;
-import com.baidu.hugegraph.structure.HugeVertex;
-import com.baidu.hugegraph.structure.HugeVertexProperty;
+import com.baidu.hugegraph.schema.*;
+import com.baidu.hugegraph.structure.*;
import com.baidu.hugegraph.task.ServerInfoManager;
import com.baidu.hugegraph.task.TaskManager;
import com.baidu.hugegraph.task.TaskScheduler;
@@ -95,14 +61,24 @@
import com.baidu.hugegraph.type.define.GraphMode;
import com.baidu.hugegraph.type.define.GraphReadMode;
import com.baidu.hugegraph.type.define.NodeRole;
-import com.baidu.hugegraph.util.DateUtil;
-import com.baidu.hugegraph.util.E;
-import com.baidu.hugegraph.util.Events;
-import com.baidu.hugegraph.util.LockUtil;
-import com.baidu.hugegraph.util.Log;
+import com.baidu.hugegraph.util.*;
import com.baidu.hugegraph.variables.HugeVariables;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.RateLimiter;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.structure.*;
+import org.apache.tinkerpop.gremlin.structure.io.Io;
+import org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction;
+import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+import org.slf4j.Logger;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* StandardHugeGraph is the entrance of the graph system, you can modify or
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeTarget.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeTarget.java
index 799aba4eb2..ed01fcb820 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeTarget.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/HugeTarget.java
@@ -36,7 +36,7 @@
import com.baidu.hugegraph.util.E;
import com.baidu.hugegraph.util.JsonUtil;
-import jersey.repackaged.com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableList;
public class HugeTarget extends Entity {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/computer/AbstractComputer.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/computer/AbstractComputer.java
index 971d927639..c86084f421 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/computer/AbstractComputer.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/computer/AbstractComputer.java
@@ -25,11 +25,16 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.configuration.tree.ConfigurationNode;
-import org.apache.tinkerpop.gremlin.util.config.YamlConfiguration;
+import org.apache.commons.configuration2.Configuration;
+import org.apache.commons.configuration2.HierarchicalConfiguration;
+import org.apache.commons.configuration2.YAMLConfiguration;
+import org.apache.commons.configuration2.io.FileHandler;
+import org.apache.commons.configuration2.tree.ImmutableNode;
import org.slf4j.Logger;
import com.baidu.hugegraph.HugeException;
@@ -71,7 +76,7 @@ public abstract class AbstractComputer implements Computer {
protected static final String CATEGORY_RANK = "rank";
protected static final String CATEGORY_COMM = "community";
- private YamlConfiguration config;
+ private YAMLConfiguration config;
private Map commonConfig = new HashMap<>();
@Override
@@ -146,8 +151,9 @@ private void initializeConfig(ComputerJob job) throws Exception {
E.checkArgument(configPath.endsWith(".yaml"),
"Expect a yaml config file.");
- this.config = new YamlConfiguration();
- this.config.load(configPath);
+ this.config = new YAMLConfiguration();
+ FileHandler fileHandler = new FileHandler(this.config);
+ fileHandler.load(configPath);
// Read common and computer specified parameters
this.commonConfig = this.readCommonConfig();
@@ -162,16 +168,18 @@ private Map readEnvConfig() {
}
private Map readSubConfig(String sub) {
- List nodes = this.config.getRootNode()
- .getChildren(sub);
- E.checkArgument(nodes.size() == 1,
- "Must contain one '%s' node in config file '%s'",
- sub, this.config.getFileName());
+ List> nodes =
+ this.config.childConfigurationsAt(sub);
- List subConfigs = nodes.get(0).getChildren();
- Map results = new HashMap<>(subConfigs.size());
- for (ConfigurationNode node : subConfigs) {
- results.put(node.getName(), node.getValue());
+ E.checkArgument(nodes.size() == 1,
+ "Must contain one '%s' node",
+ sub);
+
+ HierarchicalConfiguration node = nodes.get(0);
+ Map results = new HashMap<>(node.size());
+ for (Iterator it = node.getKeys(); it.hasNext(); ) {
+ String key = it.next();
+ results.put(key, node.getProperty(key));
}
return results;
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeElement.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeElement.java
index 34edd4c7bd..7c5a2598f9 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeElement.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeElement.java
@@ -431,7 +431,7 @@ public static final ElementKeys classifyKeys(Object... keyValues) {
.providedKeyValuesMustHaveALegalKeyOnEvenIndices();
}
if (val == null) {
- throw Property.Exceptions.propertyValueCanNotBeNull();
+ throw Property.Exceptions.propertyDoesNotExist();
}
if (key.equals(T.id)) {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/OltpTraverser.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/OltpTraverser.java
index a21fa536ea..fd84848f04 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/OltpTraverser.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/OltpTraverser.java
@@ -25,6 +25,7 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Consumer;
+import com.google.common.base.Objects;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Property;
@@ -37,7 +38,6 @@
import com.baidu.hugegraph.iterator.FilterIterator;
import com.baidu.hugegraph.util.Consumers;
-import jersey.repackaged.com.google.common.base.Objects;
public abstract class OltpTraverser extends HugeTraverser
implements AutoCloseable {
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/HugeCountStepStrategy.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/HugeCountStepStrategy.java
index 8a499b74f8..1997723943 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/HugeCountStepStrategy.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/HugeCountStepStrategy.java
@@ -31,7 +31,8 @@
import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountGlobalStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateGlobalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateLocalStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.IdentityStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.CollectingBarrierStep;
@@ -82,8 +83,7 @@ public void apply(Traversal.Admin, ?> traversal) {
step instanceof CollectingBarrierStep) ||
(step instanceof TraversalParent &&
TraversalHelper.anyStepRecursively(s -> {
- return s instanceof SideEffectStep ||
- s instanceof AggregateStep;
+ return s instanceof SideEffectStep;
}, (TraversalParent) step))) {
return;
}
diff --git a/hugegraph-dist/src/assembly/static/conf/computer.yaml b/hugegraph-dist/src/assembly/static/conf/computer.yaml
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/gremlin-driver-settings.yaml b/hugegraph-dist/src/assembly/static/conf/gremlin-driver-settings.yaml
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml b/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml
old mode 100644
new mode 100755
index 8787491fe9..3b0147fcfb
--- a/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml
+++ b/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml
@@ -3,9 +3,9 @@
#port: 8182
# timeout in ms of gremlin query
-scriptEvaluationTimeout: 30000
+evaluationTimeout: 30000
-channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer
+channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {
hugegraph: conf/hugegraph.properties
}
diff --git a/hugegraph-dist/src/assembly/static/conf/hugegraph-community.license b/hugegraph-dist/src/assembly/static/conf/hugegraph-community.license
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/hugegraph-server.keystore b/hugegraph-dist/src/assembly/static/conf/hugegraph-server.keystore
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/hugegraph.properties b/hugegraph-dist/src/assembly/static/conf/hugegraph.properties
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/log4j2.xml b/hugegraph-dist/src/assembly/static/conf/log4j2.xml
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/remote-objects.yaml b/hugegraph-dist/src/assembly/static/conf/remote-objects.yaml
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/remote.yaml b/hugegraph-dist/src/assembly/static/conf/remote.yaml
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/assembly/static/conf/rest-server.properties b/hugegraph-dist/src/assembly/static/conf/rest-server.properties
old mode 100644
new mode 100755
diff --git a/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java b/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java
index a51e66ad26..e27101163b 100644
--- a/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java
+++ b/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java
@@ -20,13 +20,19 @@
package com.baidu.hugegraph.cmd;
import java.util.Collection;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.collections.map.MultiValueMap;
import org.apache.commons.configuration.tree.ConfigurationNode;
+import org.apache.commons.configuration2.FileBasedConfiguration;
+import org.apache.commons.configuration2.HierarchicalConfiguration;
+import org.apache.commons.configuration2.YAMLConfiguration;
+import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder;
+import org.apache.commons.configuration2.builder.fluent.Parameters;
+import org.apache.commons.configuration2.tree.ImmutableNode;
import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
-import org.apache.tinkerpop.gremlin.util.config.YamlConfiguration;
import org.slf4j.Logger;
import com.baidu.hugegraph.HugeFactory;
@@ -76,26 +82,26 @@ public static void main(String[] args) throws Exception {
RegisterUtil.registerPlugins();
RegisterUtil.registerServer();
- YamlConfiguration config = new YamlConfiguration();
- config.load(gremlinConfFile);
+ Parameters params = new Parameters();
+ FileBasedConfigurationBuilder builder =
+ new FileBasedConfigurationBuilder(YAMLConfiguration.class).
+ configure(params.fileBased().setFileName(gremlinConfFile));
+ YAMLConfiguration config = (YAMLConfiguration) builder.getConfiguration();
- List nodes = config.getRootNode()
- .getChildren(GRAPHS);
+ List> nodes =
+ config.childConfigurationsAt(GRAPHS);
E.checkArgument(nodes.size() == 1,
"Must contain one '%s' node in config file '%s'",
GRAPHS, gremlinConfFile);
- List graphNames = nodes.get(0).getChildren();
-
- E.checkArgument(!graphNames.isEmpty(),
+ HierarchicalConfiguration node = nodes.get(0);
+ E.checkArgument(!node.isEmpty(),
"Must contain at least one graph");
- for (ConfigurationNode graphName : graphNames) {
- @SuppressWarnings("unchecked")
- String name = ((Map.Entry)
- graphName.getReference()).getKey();
- HugeFactory.checkGraphName(name, "gremlin-server.yaml");
- String configPath = graphName.getValue().toString();
+ for (Iterator it = node.getKeys(); it.hasNext(); ) {
+ String graphName = it.next();
+ HugeFactory.checkGraphName(graphName, "gremlin-server.yaml");
+ String configPath = node.getProperty(graphName).toString();
initGraph(configPath);
}
diff --git a/hugegraph-dist/src/main/java/com/baidu/hugegraph/dist/RegisterUtil.java b/hugegraph-dist/src/main/java/com/baidu/hugegraph/dist/RegisterUtil.java
index cb02c960b5..f137946bda 100644
--- a/hugegraph-dist/src/main/java/com/baidu/hugegraph/dist/RegisterUtil.java
+++ b/hugegraph-dist/src/main/java/com/baidu/hugegraph/dist/RegisterUtil.java
@@ -20,11 +20,15 @@
package com.baidu.hugegraph.dist;
import java.io.InputStream;
+import java.net.URL;
import java.util.List;
import java.util.ServiceLoader;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.Configuration;
+import org.apache.commons.configuration2.PropertiesConfiguration;
+import org.apache.commons.configuration2.builder.fluent.Configurations;
+import org.apache.commons.configuration2.ex.ConfigurationException;
+import org.apache.kerby.config.Conf;
import org.slf4j.Logger;
import com.baidu.hugegraph.HugeException;
@@ -50,15 +54,13 @@ public class RegisterUtil {
public static void registerBackends() {
String confFile = "/backend.properties";
- InputStream input = RegisterUtil.class
- .getResourceAsStream(confFile);
+ URL input = RegisterUtil.class.getResource(confFile);
E.checkState(input != null,
"Can't read file '%s' as stream", confFile);
- PropertiesConfiguration props = new PropertiesConfiguration();
- props.setDelimiterParsingDisabled(true);
+ PropertiesConfiguration props = null;
try {
- props.load(input);
+ props = new Configurations().properties(input);
} catch (ConfigurationException e) {
throw new HugeException("Can't load config file: %s", e, confFile);
}
diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTables.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTables.java
index c7f3ab9813..a7598cfe47 100644
--- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTables.java
+++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlTables.java
@@ -41,8 +41,8 @@
import com.baidu.hugegraph.type.define.Directions;
import com.baidu.hugegraph.type.define.HugeKeys;
import com.baidu.hugegraph.util.E;
+import com.google.common.collect.ImmutableMap;
-import jersey.repackaged.com.google.common.collect.ImmutableMap;
public class MysqlTables {
diff --git a/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloHttpClient.java b/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloHttpClient.java
index 6f46b26f07..d41cfa2ab5 100644
--- a/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloHttpClient.java
+++ b/hugegraph-palo/src/main/java/com/baidu/hugegraph/backend/store/palo/PaloHttpClient.java
@@ -23,12 +23,12 @@
import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
import com.baidu.hugegraph.config.HugeConfig;
import com.baidu.hugegraph.rest.AbstractRestClient;
import com.baidu.hugegraph.rest.RestClient;
import com.google.common.collect.ImmutableMap;
+import jakarta.ws.rs.core.Response;
public class PaloHttpClient {
diff --git a/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlTables.java b/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlTables.java
index 6442014adb..f61022490b 100644
--- a/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlTables.java
+++ b/hugegraph-postgresql/src/main/java/com/baidu/hugegraph/backend/store/postgresql/PostgresqlTables.java
@@ -35,7 +35,7 @@
import com.baidu.hugegraph.type.define.Directions;
import com.baidu.hugegraph.type.define.HugeKeys;
-import jersey.repackaged.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;
import static com.baidu.hugegraph.backend.store.mysql.MysqlTables.BOOLEAN;
import static com.baidu.hugegraph.backend.store.mysql.MysqlTables.HUGE_TEXT;
diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraphProvider.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraphProvider.java
index a8673c3570..a2f936da76 100644
--- a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraphProvider.java
+++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraphProvider.java
@@ -30,8 +30,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.Configuration;
import org.apache.tinkerpop.gremlin.AbstractGraphProvider;
import org.apache.tinkerpop.gremlin.FeatureRequirement;
import org.apache.tinkerpop.gremlin.FeatureRequirements;
diff --git a/pom.xml b/pom.xml
index 711d17cccc..8015050685 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,12 +98,12 @@
1.2.17
2.12.1
4.12
- 3.4.3
+ 3.5.1
2.4
25.1-jre
4.5.2
3.0.3
- 3.1.0
+ 4.2.4
3.21.0-GA
bash
@@ -260,7 +260,7 @@
io.dropwizard.metrics
- metrics-jersey2
+ metrics-jersey3
${metrics.version}