This is an automated email from the ASF dual-hosted git repository.
xiazcy pushed a commit to branch master-http
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master-http by this push:
new 287f8aa61f Update serializers for `label` as a singleton list of
string according to GraphBinaryV4 IO spec. (#2780)
287f8aa61f is described below
commit 287f8aa61f676c760a10f20441189890c7844778
Author: Yang Xia <[email protected]>
AuthorDate: Mon Oct 7 20:59:00 2024 -0700
Update serializers for `label` as a singleton list of string according to
GraphBinaryV4 IO spec. (#2780)
---
CHANGELOG.asciidoc | 1 +
.../structure/io/binary/types/EdgeSerializer.java | 20 +++++++++++-----
.../structure/io/binary/types/GraphSerializer.java | 19 +++++++++------
.../io/binary/types/VertexPropertySerializer.java | 8 +++++--
.../io/binary/types/VertexSerializer.java | 10 ++++++--
.../gremlin_python/structure/io/graphbinaryV4.py | 26 +++++++++++++--------
gremlin-python/src/main/python/radish/gremlin.py | 3 ++-
.../src/main/python/tests/structure/io/model.py | 4 ++--
.../driver/remote/AbstractRemoteGraphProvider.java | 2 +-
.../io/graphbinary/bulked-traverser-v4.gbin | Bin 81 -> 93 bytes
.../io/graphbinary/max-offsetdatetime-v4.gbin | Bin 20 -> 20 bytes
.../io/graphbinary/meta-vertexproperty-v4.gbin | Bin 55 -> 61 bytes
.../io/graphbinary/min-offsetdatetime-v4.gbin | Bin 20 -> 20 bytes
.../structure/io/graphbinary/no-prop-edge-v4.gbin | Bin 62 -> 80 bytes
.../io/graphbinary/no-prop-vertex-v4.gbin | Bin 24 -> 30 bytes
.../structure/io/graphbinary/prop-path-v4.gbin | Bin 575 -> 635 bytes
.../set-cardinality-vertexproperty-v4.gbin | Bin 72 -> 78 bytes
.../structure/io/graphbinary/tinker-graph-v4.gbin | Bin 2264 -> 2504 bytes
.../io/graphbinary/traversal-edge-v4.gbin | Bin 81 -> 99 bytes
.../io/graphbinary/traversal-path-v4.gbin | Bin 108 -> 126 bytes
.../io/graphbinary/traversal-tree-v4.gbin | Bin 152 -> 176 bytes
.../io/graphbinary/traversal-vertex-v4.gbin | Bin 405 -> 441 bytes
.../graphbinary/traversal-vertexproperty-v4.gbin | Bin 39 -> 45 bytes
.../structure/io/graphbinary/var-type-map-v4.gbin | Bin 79 -> 99 bytes
.../io/graphbinary/vertex-traverser-v4.gbin | Bin 415 -> 451 bytes
.../gremlin/test/features/map/AsDate.feature | 1 +
.../gremlin/test/features/map/DateAdd.feature | 1 +
.../io/AbstractTypedCompatibilityTest.java | 11 ++++-----
.../tinkerpop/gremlin/structure/io/Model.java | 6 +++--
29 files changed, 73 insertions(+), 39 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 717aa7fbf5..95ab1c2628 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -65,6 +65,7 @@
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Remove serializers for datatype removed from GraphBinaryV4 IO spec.
* Add `DateTime` serializer for Java and Python according to GraphBinaryV4 IO
spec.
* Replaced `Date` with `OffsetDateTime` in Java core.
+* Update serializers for `label` as a singleton list of string according to
GraphBinaryV4 IO spec.
* The `maxContentLength` setting for Gremlin Driver has been renamed to
`maxResponseContentLength` and now blocks incoming responses that are too large
based on total response size.
* The `maxContentLength` setting for Gremlin Server has been renamed to
`maxRequestContentLength`.
* Add missing strategies to the `TraversalStrategies` global cache as well as
`CoreImports` in `gremlin-groovy`.
diff --git
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EdgeSerializer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EdgeSerializer.java
index 6c52b815e5..3d8c0575de 100644
---
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EdgeSerializer.java
+++
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EdgeSerializer.java
@@ -29,6 +29,7 @@ import
org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdge;
import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
import java.io.IOException;
+import java.util.Collections;
import java.util.List;
/**
@@ -42,12 +43,15 @@ public class EdgeSerializer extends
SimpleTypeSerializer<Edge> {
@Override
protected Edge readValue(final Buffer buffer, final GraphBinaryReader
context) throws IOException {
final Object id = context.read(buffer);
- final String label = context.readValue(buffer, String.class, false);
+ // reading single string value for now according to GraphBinaryV4
+ final String label = (String) context.readValue(buffer, List.class,
false).get(0);
final Object inVId = context.read(buffer);
- final String inVLabel = context.readValue(buffer, String.class, false);
+ // reading single string value for now according to GraphBinaryV4
+ final String inVLabel = (String) context.readValue(buffer, List.class,
false).get(0);
final Object outVId = context.read(buffer);
- final String outVLabel = context.readValue(buffer, String.class,
false);
+ // reading single string value for now according to GraphBinaryV4
+ final String outVLabel = (String) context.readValue(buffer,
List.class, false).get(0);
// discard the parent vertex
context.read(buffer);
@@ -72,12 +76,16 @@ public class EdgeSerializer extends
SimpleTypeSerializer<Edge> {
protected void writeValue(final Edge value, final Buffer buffer, final
GraphBinaryWriter context) throws IOException {
context.write(value.id(), buffer);
- context.writeValue(value.label(), buffer, false);
+ // wrapping label into list here for now according to GraphBinaryV4,
but we aren't allowing null label yet
+ if (value.label() == null) {
+ throw new IOException("Unexpected null value when nullable is
false");
+ }
+ context.writeValue(Collections.singletonList(value.label()), buffer,
false);
context.write(value.inVertex().id(), buffer);
- context.writeValue(value.inVertex().label(), buffer, false);
+
context.writeValue(Collections.singletonList(value.inVertex().label()), buffer,
false);
context.write(value.outVertex().id(), buffer);
- context.writeValue(value.outVertex().label(), buffer, false);
+
context.writeValue(Collections.singletonList(value.outVertex().label()),
buffer, false);
// we don't serialize the parent Vertex for edges.
context.write(null, buffer);
diff --git
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/GraphSerializer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/GraphSerializer.java
index f107b8afac..c5d6cb2f58 100644
---
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/GraphSerializer.java
+++
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/GraphSerializer.java
@@ -35,6 +35,7 @@ import
org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -63,17 +64,18 @@ public class GraphSerializer extends
SimpleTypeSerializer<Graph> {
final Graph graph = (Graph) openMethod.invoke(null, conf);
final int vertexCount = context.readValue(buffer, Integer.class,
false);
for (int ix = 0; ix < vertexCount; ix++) {
- final Vertex v = graph.addVertex(T.id, context.read(buffer),
T.label, context.readValue(buffer, String.class, false));
+ final Vertex v = graph.addVertex(T.id, context.read(buffer),
T.label, context.readValue(buffer, List.class, false).get(0));
final int vertexPropertyCount = context.readValue(buffer,
Integer.class, false);
for (int iy = 0; iy < vertexPropertyCount; iy++) {
final Object id = context.read(buffer);
- final String label = context.readValue(buffer,
String.class, false);
+ // reading single string value for now according to
GraphBinaryV4
+ final String label = (String) context.readValue(buffer,
List.class, false).get(0);
final Object val = context.read(buffer);
context.read(buffer); // toss parent as it's always null
final VertexProperty<Object> vp =
v.property(VertexProperty.Cardinality.list, label, val, T.id, id);
- final List<Property> edgeProperties =
context.readValue(buffer, ArrayList.class, false);
+ final List<Property> edgeProperties =
context.readValue(buffer, List.class, false);
for (Property p : edgeProperties) {
vp.property(p.key(), p.value());
}
@@ -83,7 +85,8 @@ public class GraphSerializer extends
SimpleTypeSerializer<Graph> {
final int edgeCount = context.readValue(buffer, Integer.class,
false);
for (int ix = 0; ix < edgeCount; ix++) {
final Object id = context.read(buffer);
- final String label = context.readValue(buffer, String.class,
false);
+ // reading single string value for now according to
GraphBinaryV4
+ final String label = (String) context.readValue(buffer,
List.class, false).get(0);
final Object inId = context.read(buffer);
final Vertex inV = graph.vertices(inId).next();
context.read(buffer); // toss in label - always null in this
context
@@ -131,12 +134,13 @@ public class GraphSerializer extends
SimpleTypeSerializer<Graph> {
final List<VertexProperty<Object>> vertexProperties =
IteratorUtils.list(vertex.properties());
context.write(vertex.id(), buffer);
- context.writeValue(vertex.label(), buffer, false);
+ // serializing label as list here for now according to GraphBinaryV4
+ context.writeValue(Collections.singletonList(vertex.label()), buffer,
false);
context.writeValue(vertexProperties.size(), buffer, false);
for (VertexProperty<Object> vp : vertexProperties) {
context.write(vp.id(), buffer);
- context.writeValue(vp.label(), buffer, false);
+ context.writeValue(Collections.singletonList(vp.label()), buffer,
false);
context.write(vp.value(), buffer);
// maintain the VertexProperty format we have with this empty
parent.........
@@ -149,7 +153,8 @@ public class GraphSerializer extends
SimpleTypeSerializer<Graph> {
private void writeEdge(Buffer buffer, GraphBinaryWriter context, Edge
edge) throws IOException {
context.write(edge.id(), buffer);
- context.writeValue(edge.label(), buffer, false);
+ // serializing label as list here for now according to GraphBinaryV4
+ context.writeValue(Collections.singletonList(edge.label()), buffer,
false);
context.write(edge.inVertex().id(), buffer);
diff --git
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexPropertySerializer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexPropertySerializer.java
index dd3afbec05..62af97d262 100644
---
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexPropertySerializer.java
+++
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexPropertySerializer.java
@@ -44,7 +44,7 @@ public class VertexPropertySerializer extends
SimpleTypeSerializer<VertexPropert
protected VertexProperty readValue(final Buffer buffer, final
GraphBinaryReader context) throws IOException {
final DetachedVertexProperty.Builder builder =
DetachedVertexProperty.build()
.setId(context.read(buffer))
- .setLabel(context.readValue(buffer, String.class, false))
+ .setLabel((String) context.readValue(buffer, List.class,
false).get(0))
.setValue(context.read(buffer));
// discard the parent vertex - we only send "references"
@@ -61,7 +61,11 @@ public class VertexPropertySerializer extends
SimpleTypeSerializer<VertexPropert
@Override
protected void writeValue(final VertexProperty value, final Buffer buffer,
final GraphBinaryWriter context) throws IOException {
context.write(value.id(), buffer);
- context.writeValue(value.label(), buffer, false);
+ // wrapping label into list here for now according to GraphBinaryV4,
but we aren't allowing null label yet
+ if (value.label() == null) {
+ throw new IOException("Unexpected null value when nullable is
false");
+ }
+ context.writeValue(Collections.singletonList(value.label()), buffer,
false);
context.write(value.value(), buffer);
// we don't serialize the parent vertex, let's hold a place for it
diff --git
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java
index f25055e9a2..8cd21bfabd 100644
---
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java
+++
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java
@@ -28,6 +28,7 @@ import
org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
import
org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertexProperty;
import java.io.IOException;
+import java.util.Collections;
import java.util.List;
/**
@@ -41,7 +42,8 @@ public class VertexSerializer extends
SimpleTypeSerializer<Vertex> {
@Override
protected Vertex readValue(final Buffer buffer, final GraphBinaryReader
context) throws IOException {
final Object id = context.read(buffer);
- final String label = context.readValue(buffer, String.class, false);
+ // reading single string value for now according to GraphBinaryV4
+ final String label = (String) context.readValue(buffer, List.class,
false).get(0);
final List<DetachedVertexProperty> properties = context.read(buffer);
final DetachedVertex.Builder builder =
DetachedVertex.build().setId(id).setLabel(label);
@@ -58,7 +60,11 @@ public class VertexSerializer extends
SimpleTypeSerializer<Vertex> {
@Override
protected void writeValue(final Vertex value, final Buffer buffer, final
GraphBinaryWriter context) throws IOException {
context.write(value.id(), buffer);
- context.writeValue(value.label(), buffer, false);
+ // wrapping label into list here for now according to GraphBinaryV4,
but we aren't allowing null label yet
+ if (value.label() == null) {
+ throw new IOException("Unexpected null value when nullable is
false");
+ }
+ context.writeValue(Collections.singletonList(value.label()), buffer,
false);
if (value.properties() == null) {
context.write(null, buffer);
}
diff --git
a/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py
b/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py
index 3cf8f53a3e..41fc8a47dd 100644
---
a/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py
+++
b/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py
@@ -535,11 +535,12 @@ class EdgeIO(_GraphBinaryTypeIO):
cls.prefix_bytes(cls.graphbinary_type, as_value, nullable, to_extend)
writer.to_dict(obj.id, to_extend)
- StringIO.dictify(obj.label, writer, to_extend, True, False)
+ # serializing label as list here for now according to GraphBinaryV4
+ ListIO.dictify([obj.label], writer, to_extend, True, False)
writer.to_dict(obj.inV.id, to_extend)
- StringIO.dictify(obj.inV.label, writer, to_extend, True, False)
+ ListIO.dictify([obj.inV.label], writer, to_extend, True, False)
writer.to_dict(obj.outV.id, to_extend)
- StringIO.dictify(obj.outV.label, writer, to_extend, True, False)
+ ListIO.dictify([obj.outV.label], writer, to_extend, True, False)
to_extend.extend(NULL_BYTES)
to_extend.extend(NULL_BYTES)
@@ -552,9 +553,10 @@ class EdgeIO(_GraphBinaryTypeIO):
@classmethod
def _read_edge(cls, b, r):
edgeid = r.read_object(b)
- edgelbl = r.to_object(b, DataType.string, False)
- inv = Vertex(r.read_object(b), r.to_object(b, DataType.string, False))
- outv = Vertex(r.read_object(b), r.to_object(b, DataType.string, False))
+ # reading single string value for now according to GraphBinaryV4
+ edgelbl = r.to_object(b, DataType.list, False)[0]
+ inv = Vertex(r.read_object(b), r.to_object(b, DataType.list, False)[0])
+ outv = Vertex(r.read_object(b), r.to_object(b, DataType.list,
False)[0])
b.read(2)
properties = r.read_object(b)
edge = Edge(edgeid, outv, edgelbl, inv, properties)
@@ -625,7 +627,8 @@ class VertexIO(_GraphBinaryTypeIO):
def dictify(cls, obj, writer, to_extend, as_value=False, nullable=True):
cls.prefix_bytes(cls.graphbinary_type, as_value, nullable, to_extend)
writer.to_dict(obj.id, to_extend)
- StringIO.dictify(obj.label, writer, to_extend, True, False)
+ # serializing label as list here for now according to GraphBinaryV4
+ ListIO.dictify([obj.label], writer, to_extend, True, False)
to_extend.extend(NULL_BYTES)
return to_extend
@@ -635,7 +638,8 @@ class VertexIO(_GraphBinaryTypeIO):
@classmethod
def _read_vertex(cls, b, r):
- vertex = Vertex(r.read_object(b), r.to_object(b, DataType.string,
False), r.read_object(b))
+ # reading single string value for now according to GraphBinaryV4
+ vertex = Vertex(r.read_object(b), r.to_object(b, DataType.list,
False)[0], r.read_object(b))
return vertex
@@ -648,7 +652,8 @@ class VertexPropertyIO(_GraphBinaryTypeIO):
def dictify(cls, obj, writer, to_extend, as_value=False, nullable=True):
cls.prefix_bytes(cls.graphbinary_type, as_value, nullable, to_extend)
writer.to_dict(obj.id, to_extend)
- StringIO.dictify(obj.label, writer, to_extend, True, False)
+ # serializing label as list here for now according to GraphBinaryV4
+ ListIO.dictify([obj.label], writer, to_extend, True, False)
writer.to_dict(obj.value, to_extend)
to_extend.extend(NULL_BYTES)
to_extend.extend(NULL_BYTES)
@@ -660,7 +665,8 @@ class VertexPropertyIO(_GraphBinaryTypeIO):
@classmethod
def _read_vertexproperty(cls, b, r):
- vp = VertexProperty(r.read_object(b), r.to_object(b, DataType.string,
False), r.read_object(b), None)
+ # reading single string value for now according to GraphBinaryV4
+ vp = VertexProperty(r.read_object(b), r.to_object(b, DataType.list,
False)[0], r.read_object(b), None)
b.read(2)
vp.properties = r.read_object(b)
return vp
diff --git a/gremlin-python/src/main/python/radish/gremlin.py
b/gremlin-python/src/main/python/radish/gremlin.py
index a516d99e78..7cb78e8873 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -395,6 +395,7 @@ world.gremlins = {
'g_withStrategiesXComputerVerificationStrategyX_V': [(lambda
g:g.with_strategies(ComputerVerificationStrategy()).V())],
'g_withoutStrategiesXComputerVerificationStrategyX_V': [(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ComputerVerificationStrategy')]).V())],
'g_withStrategiesXConnectiveStrategyStrategyX_V_hasXname_markoX_or_whereXinXknowsX_hasXname_markoXX':
[(lambda g:g.with_strategies(ConnectiveStrategy()).V().has('name',
'marko').or_().where(__.in_('knows').has('name', 'marko')))],
+
'g_withoutStrategiesXConnectiveStrategyX_V_hasXname_markoX_or_whereXinXknowsX_hasXname_markoXX':
[(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy')]).V().has('name',
'marko').or_().where(__.in_('knows').has('name', 'marko')))],
'g_withStrategiesXCountStrategyX_V_whereXoutE_count_isX0XX': [(lambda
g:g.with_strategies(CountStrategy()).V().where(__.out_e().count().is_(0)))],
'g_withoutStrategiesXCountStrategyX_V_whereXoutE_count_isX0XX': [(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy')]).V().where(__.out_e().count().is_(0)))],
'g_withStrategiesXEarlyLimitStrategyX_V_out_order_valueMap_limitX3X_selectXnameX':
[(lambda
g:g.with_strategies(EarlyLimitStrategy()).V().out().order().value_map().limit(3).select('name'))],
@@ -484,7 +485,7 @@ world.gremlins = {
'g_withStrategiesXReservedKeysVerificationStrategyXthrowException_trueXX_addVXpersonX_propertyXid_123X_propertyXname_markoX':
[(lambda
g:g.with_strategies(ReservedKeysVerificationStrategy(throw_exception=True)).add_v('person').property('id',
123).property('name', 'marko'))],
'g_withStrategiesXReservedKeysVerificationStrategyXthrowException_trueXX_addVXpersonX_propertyXage_29X_propertyXname_markoX':
[(lambda
g:g.with_strategies(ReservedKeysVerificationStrategy(throw_exception=True,
keys=['age'])).add_v('person').property('age', 29).property('name', 'marko'))],
'g_withoutStrategiesXReservedKeysVerificationStrategyX_addVXpersonX_propertyXid_123X_propertyXname_markoX':
[(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReservedKeysVerificationStrategy')]).add_v('person').property('id',
123).property('name', 'marko'))],
- 'g_withStrategiesXSeedStrategyX_V': [(lambda
g:g.with_strategies(SeedStrategy(seed=7)).V().coin(0.5))],
+ 'g_withStrategiesXSeedStrategyX_V_coinX0.5X': [(lambda
g:g.with_strategies(SeedStrategy(seed=7)).V().coin(0.5))],
'g_withoutStrategiesXSeedStrategyX_V': [(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy')]).V())],
'g_withStrategiesXStandardVerificationStrategyX_V': [(lambda
g:g.with_strategies(StandardVerificationStrategy()).V())],
'g_withoutStrategiesXStandardVerificationStrategyX_V': [(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.StandardVerificationStrategy')]).V())],
diff --git a/gremlin-python/src/main/python/tests/structure/io/model.py
b/gremlin-python/src/main/python/tests/structure/io/model.py
index ae8a3392a2..2440d65ef7 100644
--- a/gremlin-python/src/main/python/tests/structure/io/model.py
+++ b/gremlin-python/src/main/python/tests/structure/io/model.py
@@ -89,8 +89,8 @@ model["var-type-list"] = [1, "person", True, None]
model["empty-list"] = []
model["var-type-map"] = {
"test": 123,
- datetime.datetime(1970, 1, 1, 0, 24, 41, 295000): "red",
- (1,2,3): datetime.datetime(1970, 1, 1, 0, 24, 41, 295000),
+ datetime.datetime(1970, 1, 1, 0, 24, 41, 295000,
tzinfo=datetime.timezone.utc): "red",
+ (1,2,3): datetime.datetime(1970, 1, 1, 0, 24, 41, 295000,
tzinfo=datetime.timezone.utc),
None: None
}
model["empty-map"] = {}
diff --git
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
index aea52aaa56..a639a44a07 100644
---
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
+++
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
@@ -334,7 +334,7 @@ public abstract class AbstractRemoteGraphProvider extends
AbstractGraphProvider
public static Cluster.Builder createClusterBuilder(final Serializers
serializer) {
// bigger buffer for some tests
- return
TestClientFactory.build().maxResponseContentLength(10_000_000).serializer(serializer);
+ return
TestClientFactory.build().maxResponseContentLength(12_000_000).serializer(serializer);
}
public static void startServer() throws Exception {
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/bulked-traverser-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/bulked-traverser-v4.gbin
index ec0a589053..8878bbec8e 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/bulked-traverser-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/bulked-traverser-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/max-offsetdatetime-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/max-offsetdatetime-v4.gbin
index 620169668a..e59db1ee46 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/max-offsetdatetime-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/max-offsetdatetime-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/meta-vertexproperty-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/meta-vertexproperty-v4.gbin
index f06f76cbc4..dd181d43da 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/meta-vertexproperty-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/meta-vertexproperty-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/min-offsetdatetime-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/min-offsetdatetime-v4.gbin
index b915bea8ca..e1ca5d6caf 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/min-offsetdatetime-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/min-offsetdatetime-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-edge-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-edge-v4.gbin
index 201264742c..17ebdda413 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-edge-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-edge-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-vertex-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-vertex-v4.gbin
index cb85436422..462187167c 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-vertex-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/no-prop-vertex-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/prop-path-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/prop-path-v4.gbin
index 9306df5aa8..4213e12a18 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/prop-path-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/prop-path-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/set-cardinality-vertexproperty-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/set-cardinality-vertexproperty-v4.gbin
index 133922bb45..a5ee87ec28 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/set-cardinality-vertexproperty-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/set-cardinality-vertexproperty-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/tinker-graph-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/tinker-graph-v4.gbin
index a0a76d1396..c1f53cba3a 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/tinker-graph-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/tinker-graph-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-edge-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-edge-v4.gbin
index f5404427d4..25b658ecd1 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-edge-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-edge-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-path-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-path-v4.gbin
index 5a0a2e5ef3..fda24e98c5 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-path-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-path-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-tree-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-tree-v4.gbin
index 5e589e15f7..e1112df6e9 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-tree-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-tree-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertex-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertex-v4.gbin
index 4347734a13..6b592bf0f2 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertex-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertex-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertexproperty-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertexproperty-v4.gbin
index 8ddbebdefc..4120d8c419 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertexproperty-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/traversal-vertexproperty-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/var-type-map-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/var-type-map-v4.gbin
index e2d511ef03..9633ecf3ac 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/var-type-map-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/var-type-map-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/vertex-traverser-v4.gbin
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/vertex-traverser-v4.gbin
index 2448b5c74f..46e02df795 100644
Binary files
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/vertex-traverser-v4.gbin
and
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/vertex-traverser-v4.gbin
differ
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/AsDate.feature
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/AsDate.feature
index a410fd70e7..23f46ee70c 100644
---
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/AsDate.feature
+++
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/AsDate.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+# todo: re-enable after datetime is implemented
@StepClassMap @StepAsDate
Feature: Step - asDate()
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/DateAdd.feature
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/DateAdd.feature
index 6bd3fc6c9d..939c7419bf 100644
---
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/DateAdd.feature
+++
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/DateAdd.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+# todo: re-enable after datetime is implemented
@StepClassMap @StepDateAdd
Feature: Step - dateAdd()
diff --git
a/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
index e16e189800..b9dbc0efa4 100644
---
a/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
+++
b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
@@ -47,6 +47,7 @@ import org.apache.tinkerpop.gremlin.util.function.Lambda;
import org.apache.tinkerpop.gremlin.util.message.RequestMessage;
import org.apache.tinkerpop.gremlin.util.message.ResponseMessage;
import org.apache.tinkerpop.gremlin.util.ser.GraphSONMessageSerializerV4;
+import org.junit.Ignore;
import org.junit.Test;
import java.math.BigDecimal;
@@ -533,8 +534,8 @@ public abstract class AbstractTypedCompatibilityTest
extends AbstractCompatibili
assertEquals(resource, recycled);
}
- // todo: map contains removed date type, revisit after datetime is
properly implemented
- // @Test
+ @Test
+ @Ignore("re-enable after GraphSONV4 datetime is implemented")
public void shouldReadWriteMultiTypeMap() throws Exception {
final String resourceName = "var-type-map";
@@ -558,8 +559,7 @@ public abstract class AbstractTypedCompatibilityTest
extends AbstractCompatibili
assertEquals(resource, recycled);
}
- // todo: re-visit after datetime is properly implemented
- // @Test
+ @Test
public void shouldReadWriteMaxOffsetDateTime() throws Exception {
final String resourceName = "max-offsetdatetime";
@@ -572,8 +572,7 @@ public abstract class AbstractTypedCompatibilityTest
extends AbstractCompatibili
assertEquals(resource, recycled);
}
- // todo: re-visit after datetime is properly implemented
- // @Test
+ @Test
public void shouldReadWriteMinOffsetDateTime() throws Exception {
final String resourceName = "min-offsetdatetime";
diff --git
a/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
index 2e309d4fb1..5d1b65f877 100644
---
a/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
+++
b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
@@ -38,7 +38,9 @@ import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
+import java.time.Instant;
import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
@@ -105,8 +107,8 @@ public class Model {
final Map<Object,Object> map = new HashMap<>();
map.put("test", 123);
- map.put(new Date(1481295L), "red");
- map.put(Arrays.asList(1,2,3), new Date(1481295L));
+ map.put(OffsetDateTime.ofInstant(Instant.ofEpochMilli(1481295L),
ZoneOffset.UTC), "red");
+ map.put(Arrays.asList(1,2,3),
OffsetDateTime.ofInstant(Instant.ofEpochMilli(1481295L), ZoneOffset.UTC));
map.put(null, null);
addCoreEntry(map, "var-type-map", "Map is redefined so that to provide
the ability to allow for non-String keys, which is not possible in JSON.");
addCoreEntry(Collections.EMPTY_MAP, "empty-map");