javeme commented on code in PR #2295:
URL:
https://github.com/apache/incubator-hugegraph/pull/2295#discussion_r1310632443
##########
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java:
##########
@@ -560,25 +580,6 @@ public String toString() {
return sb.toString();
}
- public static long defaultCapacity(long capacity) {
- Long old = CAPACITY_CONTEXT.get();
- CAPACITY_CONTEXT.set(capacity);
- return old != null ? old : DEFAULT_CAPACITY;
- }
-
- public static long defaultCapacity() {
- Long capacity = CAPACITY_CONTEXT.get();
- return capacity != null ? capacity : DEFAULT_CAPACITY;
- }
-
- public static void checkForceCapacity(long count) throws
LimitExceedException {
- if (count > Query.DEFAULT_CAPACITY) {
- throw new LimitExceedException(
- "Too many records(must <= %s) for one query",
- Query.DEFAULT_CAPACITY);
- }
- }
-
Review Comment:
prefer to keep these methods
##########
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java:
##########
@@ -50,7 +50,7 @@ public class Query implements Cloneable {
public static final long NO_CAPACITY = -1L;
public static final long DEFAULT_CAPACITY = 800000L; // HugeGraph-777
- private static final ThreadLocal<Long> CAPACITY_CONTEXT = new
ThreadLocal<>();
+ protected static final ThreadLocal<Long> CAPACITY_CONTEXT = new
ThreadLocal<>();
Review Comment:
it does not expect to be accessed by others classes
##########
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java:
##########
@@ -625,8 +626,8 @@ public static void convAllHasSteps(Traversal.Admin<?, ?>
traversal) {
// Extract all has steps in traversal
@SuppressWarnings("rawtypes")
List<HasStep> steps =
- TraversalHelper.getStepsOfAssignableClassRecursively(
- HasStep.class, traversal);
+ TraversalHelper.getStepsOfAssignableClassRecursively(
+ HasStep.class, traversal);
Review Comment:
prefer to keep the origin code style
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]