[tinkerpop] branch master updated (179678ab7d -> 42cefe106a)

2022-06-03 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


from 179678ab7d Merge branch '3.6-dev'
 add 38a3bd76e3 Upgrade docs for gremlin-javascript GraphBinary support 
(#1675)
 add 32d2fda049 Merge branch '3.5-dev' into 3.6-dev
 new 42cefe106a Merge branch '3.6-dev'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc  |  1 +
 docs/src/upgrade/release-3.5.x.asciidoc | 21 +
 2 files changed, 22 insertions(+)



[tinkerpop] 01/01: Merge branch '3.6-dev'

2022-06-03 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 42cefe106a3375aab497cbfc477178fa83d08325
Merge: 179678ab7d 32d2fda049
Author: Jorge Bay 
AuthorDate: Fri Jun 3 09:23:30 2022 +0200

Merge branch '3.6-dev'

 CHANGELOG.asciidoc  |  1 +
 docs/src/upgrade/release-3.5.x.asciidoc | 21 +
 2 files changed, 22 insertions(+)




[tinkerpop] branch 3.6-dev updated (8e7a798fb5 -> 32d2fda049)

2022-06-03 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


from 8e7a798fb5 Fixed docker -d option
 add 38a3bd76e3 Upgrade docs for gremlin-javascript GraphBinary support 
(#1675)
 new 32d2fda049 Merge branch '3.5-dev' into 3.6-dev

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc  |  1 +
 docs/src/upgrade/release-3.5.x.asciidoc | 21 +
 2 files changed, 22 insertions(+)



[tinkerpop] 01/01: Merge branch '3.5-dev' into 3.6-dev

2022-06-03 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 32d2fda0490d7bffb97542b773fbab6ac96ec585
Merge: 8e7a798fb5 38a3bd76e3
Author: Jorge Bay 
AuthorDate: Fri Jun 3 09:22:53 2022 +0200

Merge branch '3.5-dev' into 3.6-dev

 CHANGELOG.asciidoc  |  1 +
 docs/src/upgrade/release-3.5.x.asciidoc | 21 +
 2 files changed, 22 insertions(+)




[tinkerpop] branch 3.5-dev updated: Upgrade docs for gremlin-javascript GraphBinary support (#1675)

2022-06-03 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.5-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/3.5-dev by this push:
 new 38a3bd76e3 Upgrade docs for gremlin-javascript GraphBinary support 
(#1675)
38a3bd76e3 is described below

commit 38a3bd76e35a83fbb56e157f4874633920f436b5
Author: Jorge Bay-Gondra 
AuthorDate: Fri Jun 3 09:19:28 2022 +0200

Upgrade docs for gremlin-javascript GraphBinary support (#1675)
---
 CHANGELOG.asciidoc  |  1 +
 docs/src/upgrade/release-3.5.x.asciidoc | 21 +
 2 files changed, 22 insertions(+)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d83bd89e00..19cd1c2ad0 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Allowed `datetime()` syntax to accept zone offset with colon separators and 
seconds.
 * Fixed a minor problem in the Gremlin parser where a `GraphTraversalSource` 
may not have been initialized.
 * Added getters to high and low properties in RangeLocalStep.
+* TINKERPOP-2229 Added GraphBinary serialization support to gremlin-javascript.
 
 [[release-3-5-3]]
 === TinkerPop 3.5.3 (Release Date: April 4, 2022)
diff --git a/docs/src/upgrade/release-3.5.x.asciidoc 
b/docs/src/upgrade/release-3.5.x.asciidoc
index 852e59e42a..8ded2be6cd 100644
--- a/docs/src/upgrade/release-3.5.x.asciidoc
+++ b/docs/src/upgrade/release-3.5.x.asciidoc
@@ -21,6 +21,27 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 *The Sleeping Gremlin: No. 18 Entr'acte Symphonique*
 
+== TinkerPop 3.5.4
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the 
link:https://github.com/apache/tinkerpop/blob/3.5-dev/CHANGELOG.asciidoc#release-3-5-4[changelog]
 for a
+complete list of all the modifications that are part of this release.
+
+=== Upgrading for Users
+
+ GraphBinary support for gremlin-javascript
+
+Gremlin JavaScript now also supports GraphBinary. GraphSON3 still remains the 
default serialization format.
+
+To enable GraphBinary support, set the mime type in the connection options.
+
+[source,javascript]
+
+const options = { mimeType: 'application/vnd.graphbinary-v1.0' }
+const g = traversal().withRemote(new 
DriverRemoteConnection('ws://localhost:8182/gremlin', options));
+
+
 == TinkerPop 3.5.3
 
 *Release Date: April 4, 2022*



[tinkerpop] branch graphbinary-js-docs created (now feada75de2)

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch graphbinary-js-docs
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


  at feada75de2 Upgrade docs for gremlin-javascript GraphBinary support

This branch includes the following new commits:

 new feada75de2 Upgrade docs for gremlin-javascript GraphBinary support

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: Upgrade docs for gremlin-javascript GraphBinary support

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch graphbinary-js-docs
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit feada75de298340883d77aa346684a36c8cd528f
Author: Jorge Bay 
AuthorDate: Thu Jun 2 10:22:51 2022 +0200

Upgrade docs for gremlin-javascript GraphBinary support
---
 CHANGELOG.asciidoc  |  1 +
 docs/src/upgrade/release-3.5.x.asciidoc | 21 +
 2 files changed, 22 insertions(+)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d83bd89e00..19cd1c2ad0 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Allowed `datetime()` syntax to accept zone offset with colon separators and 
seconds.
 * Fixed a minor problem in the Gremlin parser where a `GraphTraversalSource` 
may not have been initialized.
 * Added getters to high and low properties in RangeLocalStep.
+* TINKERPOP-2229 Added GraphBinary serialization support to gremlin-javascript.
 
 [[release-3-5-3]]
 === TinkerPop 3.5.3 (Release Date: April 4, 2022)
diff --git a/docs/src/upgrade/release-3.5.x.asciidoc 
b/docs/src/upgrade/release-3.5.x.asciidoc
index 852e59e42a..8ded2be6cd 100644
--- a/docs/src/upgrade/release-3.5.x.asciidoc
+++ b/docs/src/upgrade/release-3.5.x.asciidoc
@@ -21,6 +21,27 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 *The Sleeping Gremlin: No. 18 Entr'acte Symphonique*
 
+== TinkerPop 3.5.4
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the 
link:https://github.com/apache/tinkerpop/blob/3.5-dev/CHANGELOG.asciidoc#release-3-5-4[changelog]
 for a
+complete list of all the modifications that are part of this release.
+
+=== Upgrading for Users
+
+ GraphBinary support for gremlin-javascript
+
+Gremlin JavaScript now also supports GraphBinary. GraphSON3 still remains the 
default serialization format.
+
+To enable GraphBinary support, set the mime type in the connection options.
+
+[source,javascript]
+
+const options = { mimeType: 'application/vnd.graphbinary-v1.0' }
+const g = traversal().withRemote(new 
DriverRemoteConnection('ws://localhost:8182/gremlin', options));
+
+
 == TinkerPop 3.5.3
 
 *Release Date: April 4, 2022*



[tinkerpop] branch master updated (f8a2df03c7 -> 20d2cac2b9)

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


from f8a2df03c7 Merge '3.6-dev' into master and solving conflicts
 add 89fe194516 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 add e07e4b2131 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 add 23a3adcc60 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 add 3971a1ea61 Impl BytecodeSerializer and GraphBinaryWriter.writeRequest
 add 8ffc09c523 GraphBinaryReader.readResponse: start with the very first 
fail cases
 add 38b0984331 Switch from String.replaceAll to String.replace for support 
of older JS/node
 add 8862c6f0c4 Impl UuidSerializer.deserialize()
 add 826d86f09e Impl IntSerializer.deserialize()
 add 44f0b2651d UuidSerializer.deserialize: add test case with nullable 
format and null value
 add 08a09bbcec Impl StringSerializer.deserialize()
 add 3d5c5bcacc graphbinary-test.js: use terminology of official docs in 
error messages
 add 431bda940e Re-structure to multiple js files
 add ff84c5ae60 Impl MapSerializer.deserialize() and 
AnySerializer.deserialize()
 add e9d609f19b Avoid static class fields to support old js/node
 add 23b35b968f Avoid public class fields to support old js/node
 add 5a6434c3d2 Impl BytecodeSerializer.deserialize()
 add 303726de51 AnySerializer test as a testable "register" of supported 
(de)serializers
 add 79791009cd Impl ListSerializer.deserialize()
 add 0947021717 Impl TraverserSerializer.deserialize()
 add c54a2ef3bf GraphBinaryReader: fix a typo: response.request_id -> 
response.requestId
 add 87f7774f4a Impl LongSerializer.serialize() and deserialize()
 add 2524085ee0 TraverserSerializer.deserialize: change {bulk} from Int to 
Long type
 add ec12769e65 Use IntSerializer.deserialize() instead of direct 
Buffer.readInt32BE()
 add 44818e8507 Add more tests for ListSerializer
 add e1848f457d Add at least one complete test for 
GraphBinaryReader.readResponse()
 add edf45799e4 Impl UnspecifiedNullSerializer.serialize() and deserialize()
 add fb24d2694e Add basic structure of AnySerializer.serialize() impl and 
testing
 add 2feeec6f1b Impl TraverserSerializer.serialize() and its support by 
AnySerializer.serialize()
 add a0ada4d113 Impl EnumSerializer (Barrier, Cardinality, Column, 
Direction, Operator, Order, Pick, Pop, Scope, T)
 add 27d094720e Impl ListSerializer.serialize() and canBeUsedFor()
 add 5bf31e6cd5 AnySerializer.serialize() errors if value is not supported 
instead of falling back to StringSerializer
 add ec8f0a4041 Test AnySerializer.serialize() with a string item
 add f0575172b1 Test AnySerializer.serialize() with an Int32 param
 add 2c8c8921c5 Switch EnumSerializer to use fully-qualified enum element 
name string
 add a4ba6e481f Impl BooleanSerializer
 add 6027fc3b10 Switch MapSerializer to Map class, but serialize() still 
can handle usual objects
 add 4a05bd14ec Add UnspecifiedNull support to AnySerializer.serialize()
 add 921d7e38ff Make EnumSerializer.deserialize() return existing EnumValue 
instances
 add 76f191ed01 Impl PSerializer
 add 9e05abc898 Fix EnumSerializer null handling
 add bdca983795 Impl DateSerializer
 add 908583911a Impl VertexSerializer
 add 17e124c5cb Impl EdgeSerializer
 add 1ca2bbf130 CI: include gremlin-javascript GraphBinary unit tests
 add 20a8d85f49 Impl TimestampSerializer
 add 39695d997f Normalize style of GraphBinary unit tests
 add 85202c0cfa Impl ClassSerializer
 add 76be2bc178 Impl DoubleSerializer and FloatSerializer
 add d3296b3182 Impl SetSerializer
 add 5c1750e666 Impl PathSerializer
 add 525a3c8a71 Impl PropertySerializer
 add df55dfec6f Impl VertexPropertySerializer
 add 5c13ce8fd3 Impl LambdaSerializer
 add 2de6335fc6 Ignore Graph and Binding types
 add ad4a411d2a Impl ByteSerializer
 add fb3f18c942 Impl ByteBufferSerializer
 add 88759eaacd Impl TextPSerializer
 add fba5041d00 Impl TraversalStrategySerializer
 add 15084ad4e7 Impl BulkSetSerializer
 add b922456c79 Backup bigint based Long implementation as LongSerializerNg
 add 0b31ff973e LongSerializer: move away from bigint and align with 
GraphSON implementation
 add df8596b11b Impl NumberSerializationStrategy
 add 61b41f6328 AnySerializer-test: mention that Set is the same as List
 add a84f6b1d9e Turn off LongSerializerNg
 add cca51d5f46 BytecodeSerializer: fix sources serialization
 add 2faf27fc1e Make TraversalStrategySerializer use FQCN
 add 33c326d249 AnySerializer: fix LONG deserialization test
 add 668e7a94d5 Fix ReservedKeysVerificationStrategy.fqcn field value
 add 142d04c0e3 gremlin-javascript: run tests for two protocols 
(application/vnd.grem

[tinkerpop] 01/01: Merge branch '3.6-dev'

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 20d2cac2b9fd57d66d5d0708e0c71514fd487ce4
Merge: f8a2df03c7 6b8c1f38b2
Author: Jorge Bay 
AuthorDate: Thu Jun 2 09:59:31 2022 +0200

Merge branch '3.6-dev'

 .gitignore |   1 +
 .../gremlin-javascript/lib/driver/connection.js|  14 +-
 .../lib/process/traversal-strategy.js  |   2 +-
 .../lib/structure/io/binary/GraphBinary.js | 109 
 .../structure/io/binary/internals/AnySerializer.js |  95 
 .../io/binary/internals/ArraySerializer.js | 135 +
 .../io/binary/internals/BigIntegerSerializer.js| 151 ++
 .../io/binary/internals/BooleanSerializer.js   | 103 
 .../io/binary/internals/BulkSetSerializer.js   | 124 +
 .../io/binary/internals/ByteBufferSerializer.js| 124 +
 .../io/binary/internals/ByteSerializer.js  |  95 
 .../io/binary/internals/BytecodeSerializer.js  | 249 +
 .../lib/structure/io/binary/internals/DataType.js  |  97 
 .../io/binary/internals/DateSerializer.js  | 103 
 .../io/binary/internals/DoubleSerializer.js|  99 
 .../io/binary/internals/EdgeSerializer.js  | 215 
 .../io/binary/internals/EnumSerializer.js  | 148 +
 .../io/binary/internals/FloatSerializer.js |  99 
 .../io/binary/internals/GraphBinaryReader.js   |  80 +++
 .../io/binary/internals/GraphBinaryWriter.js   |  83 +++
 .../structure/io/binary/internals/IntSerializer.js | 112 
 .../io/binary/internals/LambdaSerializer.js|  70 +++
 .../io/binary/internals/LongSerializer.js  | 107 
 .../io/binary/internals/LongSerializerNg.js| 102 
 .../structure/io/binary/internals/MapSerializer.js | 153 ++
 .../internals/NumberSerializationStrategy.js   |  68 +++
 .../structure/io/binary/internals/PSerializer.js   | 151 ++
 .../io/binary/internals/PathSerializer.js  | 123 +
 .../io/binary/internals/PropertySerializer.js  | 141 +
 .../io/binary/internals/ShortSerializer.js |  99 
 .../io/binary/internals/StringSerializer.js| 114 
 .../io/binary/internals/TextPSerializer.js | 145 +
 .../internals/TraversalStrategySerializer.js   |  72 +++
 .../io/binary/internals/TraverserSerializer.js | 123 +
 .../binary/internals/UnspecifiedNullSerializer.js  |  75 +++
 .../io/binary/internals/UuidSerializer.js  | 119 +
 .../binary/internals/VertexPropertySerializer.js   | 172 ++
 .../io/binary/internals/VertexSerializer.js| 135 +
 .../lib/structure/io/binary/internals/utils.js |  59 ++
 .../javascript/gremlin-javascript/package.json |  12 +-
 .../javascript/gremlin-javascript/test/helper.js   |  17 +-
 .../test/integration/sasl-authentication-tests.js  |   4 +-
 .../test/integration/traversal-test.js |   2 +-
 .../test/unit/graphbinary/AnySerializer-test.js| 594 +
 .../graphbinary/ArraySerializerTestTemplate.js | 151 ++
 .../unit/graphbinary/BigIntegerSerializer-test.js  | 200 +++
 .../unit/graphbinary/BooleanSerializer-test.js | 141 +
 .../unit/graphbinary/BulkSetSerializer-test.js | 158 ++
 .../unit/graphbinary/ByteBufferSerializer-test.js  | 155 ++
 .../test/unit/graphbinary/ByteSerializer-test.js   | 118 
 .../unit/graphbinary/BytecodeSerializer-test.js| 213 
 .../test/unit/graphbinary/ClassSerializer-test.js  |  25 +
 .../test/unit/graphbinary/DateSerializer-test.js   |  25 +
 .../unit/graphbinary/DateSerializerTestTemplate.js | 149 ++
 .../test/unit/graphbinary/DoubleSerializer-test.js | 152 ++
 .../test/unit/graphbinary/EdgeSerializer-test.js   | 170 ++
 .../test/unit/graphbinary/EnumSerializer-test.js   | 172 ++
 .../test/unit/graphbinary/FloatSerializer-test.js  | 123 +
 .../unit/graphbinary/GraphBinaryReader-test.js | 129 +
 .../unit/graphbinary/GraphBinaryWriter-test.js |  86 +++
 .../test/unit/graphbinary/IntSerializer-test.js| 148 +
 .../test/unit/graphbinary/LambdaSerializer-test.js |  95 
 .../test/unit/graphbinary/ListSerializer-test.js   |  25 +
 .../test/unit/graphbinary/LongSerializer-test.js   | 145 +
 .../test/unit/graphbinary/LongSerializerNg-test.js | 133 +
 .../test/unit/graphbinary/MapSerializer-test.js| 215 
 .../test/unit/graphbinary/PSerializer-test.js  | 197 +++
 .../test/unit/graphbinary/PathSerializer-test.js   | 152 ++
 .../unit/graphbinary/PropertySerializer-test.js| 141 +
 .../test/unit/graphbinary/SetSerializer-test.js|  25 +
 .../test/unit/graphbinary/ShortSerializer-test.js  | 122 +
 .../test/unit/graphbinary/StringSerializer-test.js |  25 +
 .../graphbinary/StringSerializerTestTemplate.js| 169 ++
 .../test

[tinkerpop] branch 3.6-dev updated (f94e203a7b -> 6b8c1f38b2)

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


from f94e203a7b Merge '3.5-dev' into 3.6-dev and solving conflicts
 add 89fe194516 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 add e07e4b2131 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 add 23a3adcc60 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 add 3971a1ea61 Impl BytecodeSerializer and GraphBinaryWriter.writeRequest
 add 8ffc09c523 GraphBinaryReader.readResponse: start with the very first 
fail cases
 add 38b0984331 Switch from String.replaceAll to String.replace for support 
of older JS/node
 add 8862c6f0c4 Impl UuidSerializer.deserialize()
 add 826d86f09e Impl IntSerializer.deserialize()
 add 44f0b2651d UuidSerializer.deserialize: add test case with nullable 
format and null value
 add 08a09bbcec Impl StringSerializer.deserialize()
 add 3d5c5bcacc graphbinary-test.js: use terminology of official docs in 
error messages
 add 431bda940e Re-structure to multiple js files
 add ff84c5ae60 Impl MapSerializer.deserialize() and 
AnySerializer.deserialize()
 add e9d609f19b Avoid static class fields to support old js/node
 add 23b35b968f Avoid public class fields to support old js/node
 add 5a6434c3d2 Impl BytecodeSerializer.deserialize()
 add 303726de51 AnySerializer test as a testable "register" of supported 
(de)serializers
 add 79791009cd Impl ListSerializer.deserialize()
 add 0947021717 Impl TraverserSerializer.deserialize()
 add c54a2ef3bf GraphBinaryReader: fix a typo: response.request_id -> 
response.requestId
 add 87f7774f4a Impl LongSerializer.serialize() and deserialize()
 add 2524085ee0 TraverserSerializer.deserialize: change {bulk} from Int to 
Long type
 add ec12769e65 Use IntSerializer.deserialize() instead of direct 
Buffer.readInt32BE()
 add 44818e8507 Add more tests for ListSerializer
 add e1848f457d Add at least one complete test for 
GraphBinaryReader.readResponse()
 add edf45799e4 Impl UnspecifiedNullSerializer.serialize() and deserialize()
 add fb24d2694e Add basic structure of AnySerializer.serialize() impl and 
testing
 add 2feeec6f1b Impl TraverserSerializer.serialize() and its support by 
AnySerializer.serialize()
 add a0ada4d113 Impl EnumSerializer (Barrier, Cardinality, Column, 
Direction, Operator, Order, Pick, Pop, Scope, T)
 add 27d094720e Impl ListSerializer.serialize() and canBeUsedFor()
 add 5bf31e6cd5 AnySerializer.serialize() errors if value is not supported 
instead of falling back to StringSerializer
 add ec8f0a4041 Test AnySerializer.serialize() with a string item
 add f0575172b1 Test AnySerializer.serialize() with an Int32 param
 add 2c8c8921c5 Switch EnumSerializer to use fully-qualified enum element 
name string
 add a4ba6e481f Impl BooleanSerializer
 add 6027fc3b10 Switch MapSerializer to Map class, but serialize() still 
can handle usual objects
 add 4a05bd14ec Add UnspecifiedNull support to AnySerializer.serialize()
 add 921d7e38ff Make EnumSerializer.deserialize() return existing EnumValue 
instances
 add 76f191ed01 Impl PSerializer
 add 9e05abc898 Fix EnumSerializer null handling
 add bdca983795 Impl DateSerializer
 add 908583911a Impl VertexSerializer
 add 17e124c5cb Impl EdgeSerializer
 add 1ca2bbf130 CI: include gremlin-javascript GraphBinary unit tests
 add 20a8d85f49 Impl TimestampSerializer
 add 39695d997f Normalize style of GraphBinary unit tests
 add 85202c0cfa Impl ClassSerializer
 add 76be2bc178 Impl DoubleSerializer and FloatSerializer
 add d3296b3182 Impl SetSerializer
 add 5c1750e666 Impl PathSerializer
 add 525a3c8a71 Impl PropertySerializer
 add df55dfec6f Impl VertexPropertySerializer
 add 5c13ce8fd3 Impl LambdaSerializer
 add 2de6335fc6 Ignore Graph and Binding types
 add ad4a411d2a Impl ByteSerializer
 add fb3f18c942 Impl ByteBufferSerializer
 add 88759eaacd Impl TextPSerializer
 add fba5041d00 Impl TraversalStrategySerializer
 add 15084ad4e7 Impl BulkSetSerializer
 add b922456c79 Backup bigint based Long implementation as LongSerializerNg
 add 0b31ff973e LongSerializer: move away from bigint and align with 
GraphSON implementation
 add df8596b11b Impl NumberSerializationStrategy
 add 61b41f6328 AnySerializer-test: mention that Set is the same as List
 add a84f6b1d9e Turn off LongSerializerNg
 add cca51d5f46 BytecodeSerializer: fix sources serialization
 add 2faf27fc1e Make TraversalStrategySerializer use FQCN
 add 33c326d249 AnySerializer: fix LONG deserialization test
 add 668e7a94d5 Fix ReservedKeysVerificationStrategy.fqcn field value
 add 142d04c0e3 gremlin-javascript: run tests for two protocols 
(application/vnd

[tinkerpop] branch 3.6-dev-temp created (now 6b8c1f38b2)

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.6-dev-temp
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


  at 6b8c1f38b2 Merge branch '3.5-dev' into 3.6-dev

This branch includes the following new commits:

 new 6b8c1f38b2 Merge branch '3.5-dev' into 3.6-dev

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: Merge branch '3.5-dev' into 3.6-dev

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.6-dev-temp
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 6b8c1f38b22728b18bf1c194088e843f0d6c275c
Merge: f94e203a7b 18a1ed7e04
Author: Jorge Bay 
AuthorDate: Thu Jun 2 09:51:10 2022 +0200

Merge branch '3.5-dev' into 3.6-dev

 .gitignore |   1 +
 .../gremlin-javascript/lib/driver/connection.js|  14 +-
 .../lib/process/traversal-strategy.js  |   2 +-
 .../lib/structure/io/binary/GraphBinary.js | 109 
 .../structure/io/binary/internals/AnySerializer.js |  95 
 .../io/binary/internals/ArraySerializer.js | 135 +
 .../io/binary/internals/BigIntegerSerializer.js| 151 ++
 .../io/binary/internals/BooleanSerializer.js   | 103 
 .../io/binary/internals/BulkSetSerializer.js   | 124 +
 .../io/binary/internals/ByteBufferSerializer.js| 124 +
 .../io/binary/internals/ByteSerializer.js  |  95 
 .../io/binary/internals/BytecodeSerializer.js  | 249 +
 .../lib/structure/io/binary/internals/DataType.js  |  97 
 .../io/binary/internals/DateSerializer.js  | 103 
 .../io/binary/internals/DoubleSerializer.js|  99 
 .../io/binary/internals/EdgeSerializer.js  | 215 
 .../io/binary/internals/EnumSerializer.js  | 148 +
 .../io/binary/internals/FloatSerializer.js |  99 
 .../io/binary/internals/GraphBinaryReader.js   |  80 +++
 .../io/binary/internals/GraphBinaryWriter.js   |  83 +++
 .../structure/io/binary/internals/IntSerializer.js | 112 
 .../io/binary/internals/LambdaSerializer.js|  70 +++
 .../io/binary/internals/LongSerializer.js  | 107 
 .../io/binary/internals/LongSerializerNg.js| 102 
 .../structure/io/binary/internals/MapSerializer.js | 153 ++
 .../internals/NumberSerializationStrategy.js   |  68 +++
 .../structure/io/binary/internals/PSerializer.js   | 151 ++
 .../io/binary/internals/PathSerializer.js  | 123 +
 .../io/binary/internals/PropertySerializer.js  | 141 +
 .../io/binary/internals/ShortSerializer.js |  99 
 .../io/binary/internals/StringSerializer.js| 114 
 .../io/binary/internals/TextPSerializer.js | 145 +
 .../internals/TraversalStrategySerializer.js   |  72 +++
 .../io/binary/internals/TraverserSerializer.js | 123 +
 .../binary/internals/UnspecifiedNullSerializer.js  |  75 +++
 .../io/binary/internals/UuidSerializer.js  | 119 +
 .../binary/internals/VertexPropertySerializer.js   | 172 ++
 .../io/binary/internals/VertexSerializer.js| 135 +
 .../lib/structure/io/binary/internals/utils.js |  59 ++
 .../javascript/gremlin-javascript/package.json |  12 +-
 .../javascript/gremlin-javascript/test/helper.js   |  17 +-
 .../test/integration/sasl-authentication-tests.js  |   4 +-
 .../test/integration/traversal-test.js |   2 +-
 .../test/unit/graphbinary/AnySerializer-test.js| 594 +
 .../graphbinary/ArraySerializerTestTemplate.js | 151 ++
 .../unit/graphbinary/BigIntegerSerializer-test.js  | 200 +++
 .../unit/graphbinary/BooleanSerializer-test.js | 141 +
 .../unit/graphbinary/BulkSetSerializer-test.js | 158 ++
 .../unit/graphbinary/ByteBufferSerializer-test.js  | 155 ++
 .../test/unit/graphbinary/ByteSerializer-test.js   | 118 
 .../unit/graphbinary/BytecodeSerializer-test.js| 213 
 .../test/unit/graphbinary/ClassSerializer-test.js  |  25 +
 .../test/unit/graphbinary/DateSerializer-test.js   |  25 +
 .../unit/graphbinary/DateSerializerTestTemplate.js | 149 ++
 .../test/unit/graphbinary/DoubleSerializer-test.js | 152 ++
 .../test/unit/graphbinary/EdgeSerializer-test.js   | 170 ++
 .../test/unit/graphbinary/EnumSerializer-test.js   | 172 ++
 .../test/unit/graphbinary/FloatSerializer-test.js  | 123 +
 .../unit/graphbinary/GraphBinaryReader-test.js | 129 +
 .../unit/graphbinary/GraphBinaryWriter-test.js |  86 +++
 .../test/unit/graphbinary/IntSerializer-test.js| 148 +
 .../test/unit/graphbinary/LambdaSerializer-test.js |  95 
 .../test/unit/graphbinary/ListSerializer-test.js   |  25 +
 .../test/unit/graphbinary/LongSerializer-test.js   | 145 +
 .../test/unit/graphbinary/LongSerializerNg-test.js | 133 +
 .../test/unit/graphbinary/MapSerializer-test.js| 215 
 .../test/unit/graphbinary/PSerializer-test.js  | 197 +++
 .../test/unit/graphbinary/PathSerializer-test.js   | 152 ++
 .../unit/graphbinary/PropertySerializer-test.js| 141 +
 .../test/unit/graphbinary/SetSerializer-test.js|  25 +
 .../test/unit/graphbinary/ShortSerializer-test.js  | 122 +
 .../test/unit/graphbinary/StringSerializer-test.js |  25 +
 .../graphbinary/StringSerializerTestTemplate.js| 169

[tinkerpop] branch 3.5-dev updated (5fb7888f4e -> 18a1ed7e04)

2022-06-02 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.5-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


from 5fb7888f4e Added getters to high and low properties in RangeLocalStep 
(#1667)
 new 89fe194516 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 new e07e4b2131 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 new 23a3adcc60 (WIP) gremlin-javascript: Add GraphBinary serialization 
support
 new 3971a1ea61 Impl BytecodeSerializer and GraphBinaryWriter.writeRequest
 new 8ffc09c523 GraphBinaryReader.readResponse: start with the very first 
fail cases
 new 38b0984331 Switch from String.replaceAll to String.replace for support 
of older JS/node
 new 8862c6f0c4 Impl UuidSerializer.deserialize()
 new 826d86f09e Impl IntSerializer.deserialize()
 new 44f0b2651d UuidSerializer.deserialize: add test case with nullable 
format and null value
 new 08a09bbcec Impl StringSerializer.deserialize()
 new 3d5c5bcacc graphbinary-test.js: use terminology of official docs in 
error messages
 new 431bda940e Re-structure to multiple js files
 new ff84c5ae60 Impl MapSerializer.deserialize() and 
AnySerializer.deserialize()
 new e9d609f19b Avoid static class fields to support old js/node
 new 23b35b968f Avoid public class fields to support old js/node
 new 5a6434c3d2 Impl BytecodeSerializer.deserialize()
 new 303726de51 AnySerializer test as a testable "register" of supported 
(de)serializers
 new 79791009cd Impl ListSerializer.deserialize()
 new 0947021717 Impl TraverserSerializer.deserialize()
 new c54a2ef3bf GraphBinaryReader: fix a typo: response.request_id -> 
response.requestId
 new 87f7774f4a Impl LongSerializer.serialize() and deserialize()
 new 2524085ee0 TraverserSerializer.deserialize: change {bulk} from Int to 
Long type
 new ec12769e65 Use IntSerializer.deserialize() instead of direct 
Buffer.readInt32BE()
 new 44818e8507 Add more tests for ListSerializer
 new e1848f457d Add at least one complete test for 
GraphBinaryReader.readResponse()
 new edf45799e4 Impl UnspecifiedNullSerializer.serialize() and deserialize()
 new fb24d2694e Add basic structure of AnySerializer.serialize() impl and 
testing
 new 2feeec6f1b Impl TraverserSerializer.serialize() and its support by 
AnySerializer.serialize()
 new a0ada4d113 Impl EnumSerializer (Barrier, Cardinality, Column, 
Direction, Operator, Order, Pick, Pop, Scope, T)
 new 27d094720e Impl ListSerializer.serialize() and canBeUsedFor()
 new 5bf31e6cd5 AnySerializer.serialize() errors if value is not supported 
instead of falling back to StringSerializer
 new ec8f0a4041 Test AnySerializer.serialize() with a string item
 new f0575172b1 Test AnySerializer.serialize() with an Int32 param
 new 2c8c8921c5 Switch EnumSerializer to use fully-qualified enum element 
name string
 new a4ba6e481f Impl BooleanSerializer
 new 6027fc3b10 Switch MapSerializer to Map class, but serialize() still 
can handle usual objects
 new 4a05bd14ec Add UnspecifiedNull support to AnySerializer.serialize()
 new 921d7e38ff Make EnumSerializer.deserialize() return existing EnumValue 
instances
 new 76f191ed01 Impl PSerializer
 new 9e05abc898 Fix EnumSerializer null handling
 new bdca983795 Impl DateSerializer
 new 908583911a Impl VertexSerializer
 new 17e124c5cb Impl EdgeSerializer
 new 1ca2bbf130 CI: include gremlin-javascript GraphBinary unit tests
 new 20a8d85f49 Impl TimestampSerializer
 new 39695d997f Normalize style of GraphBinary unit tests
 new 85202c0cfa Impl ClassSerializer
 new 76be2bc178 Impl DoubleSerializer and FloatSerializer
 new d3296b3182 Impl SetSerializer
 new 5c1750e666 Impl PathSerializer
 new 525a3c8a71 Impl PropertySerializer
 new df55dfec6f Impl VertexPropertySerializer
 new 5c13ce8fd3 Impl LambdaSerializer
 new 2de6335fc6 Ignore Graph and Binding types
 new ad4a411d2a Impl ByteSerializer
 new fb3f18c942 Impl ByteBufferSerializer
 new 88759eaacd Impl TextPSerializer
 new fba5041d00 Impl TraversalStrategySerializer
 new 15084ad4e7 Impl BulkSetSerializer
 new b922456c79 Backup bigint based Long implementation as LongSerializerNg
 new 0b31ff973e LongSerializer: move away from bigint and align with 
GraphSON implementation
 new df8596b11b Impl NumberSerializationStrategy
 new 61b41f6328 AnySerializer-test: mention that Set is the same as List
 new a84f6b1d9e Turn off LongSerializerNg
 new cca51d5f46 BytecodeSerializer: fix sources serialization
 new 2faf27fc1e Make TraversalStrategySerializer use FQCN
 new 33c326d249 AnySerializer: fix LONG deserialization test
 new 668e7a94d5 Fix ReservedKeysVerificationStrategy.fqcn field value
 new 142d04c0e3 gremlin-javascript: run tests for two protocols 

[tinkerpop] branch 3.5-dev updated: docs: Fix GraphBinary Path type spec typo

2022-02-14 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.5-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/3.5-dev by this push:
 new 616bc96  docs: Fix GraphBinary Path type spec typo
 new ad68f12  Merge pull request #1566 from 
ihoro/fix-graphbinary-path-type-spec
616bc96 is described below

commit 616bc962f2199f7757ff23876b0ac94b34e2b0c3
Author: Igor Ostapenko 
AuthorDate: Fri Feb 11 22:32:19 2022 +0200

docs: Fix GraphBinary Path type spec typo

Mentioned List and Set are expected to be fully qualified according to the
actual behaviour of gremlin-server.
---
 docs/src/dev/io/graphbinary.asciidoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/src/dev/io/graphbinary.asciidoc 
b/docs/src/dev/io/graphbinary.asciidoc
index 9403857..d6669fd 100644
--- a/docs/src/dev/io/graphbinary.asciidoc
+++ b/docs/src/dev/io/graphbinary.asciidoc
@@ -279,8 +279,8 @@ Format: `{labels}{objects}`
 
 Where:
 
-- `{labels}` is a `List` in which each item is a `Set` of `String`.
-- `{objects}` is a `List` of fully qualified typed values.
+- `{labels}` is a fully qualified `List` in which each item is a fully 
qualified `Set` of `String`.
+- `{objects}` is a fully qualified `List` of fully qualified typed values.
 
  Property
 


[tinkerpop] branch 3.5-dev updated: docs: Fix GraphBinary enum like types specification

2022-02-07 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.5-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/3.5-dev by this push:
 new a34280d  docs: Fix GraphBinary enum like types specification
 new cbb3bea  Merge pull request #1560 from ihoro/fix-graphbinary-enum-spec
a34280d is described below

commit a34280dc030b6aaffaf36509b60e38dec2da5073
Author: Igor Ostapenko 
AuthorDate: Thu Feb 3 20:24:39 2022 +0200

docs: Fix GraphBinary enum like types specification

Enum like types (Barrier, Cardinality, Column, Direction, Operator, Order,
Pick, Pop, Scope, T) should provide enum element name as a fully-qualified
string, i.e. as {type_code}{type_info}{value_flag}{value}.
---
 docs/src/dev/io/graphbinary.asciidoc | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/docs/src/dev/io/graphbinary.asciidoc 
b/docs/src/dev/io/graphbinary.asciidoc
index ecec755..9403857 100644
--- a/docs/src/dev/io/graphbinary.asciidoc
+++ b/docs/src/dev/io/graphbinary.asciidoc
@@ -356,7 +356,7 @@ properties. Note that as TinkerPop currently send 
"references" only, this value
 
  Barrier
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Binding
 
@@ -386,31 +386,31 @@ Where:
 
  Cardinality
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Column
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Direction
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Operator
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Order
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Pick
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Pop
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Lambda
 
@@ -433,11 +433,11 @@ Where:
 
  Scope
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  T
 
-Format: a single `String` representing the enum value.
+Format: a fully qualified single `String` representing the enum value.
 
  Traverser
 


[tinkerpop] branch 3.5-dev updated: gremlin-javascript: Tune Writer/Reader abstraction border

2022-01-19 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.5-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/3.5-dev by this push:
 new 93d7109  gremlin-javascript: Tune Writer/Reader abstraction border
 new ec78520  Merge pull request #1549 from 
ihoro/gremlin-javascript-tune-writer-reader-abstraction-border
93d7109 is described below

commit 93d7109153d5f44cd67e437a8db2277335ef3973
Author: Igor Ostapenko 
AuthorDate: Tue Jan 11 23:55:40 2022 +0200

gremlin-javascript: Tune Writer/Reader abstraction border
---
 .../gremlin-javascript/lib/driver/connection.js| 66 ++
 .../lib/structure/io/graph-serializer.js   | 46 +++
 2 files changed, 62 insertions(+), 50 deletions(-)

diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
index cf46475..a726b21 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
@@ -29,7 +29,6 @@ const utils = require('../utils');
 const serializer = require('../structure/io/graph-serializer');
 const ResultSet = require('./result-set');
 const ResponseError = require('./response-error');
-const Bytecode = require('../process/bytecode');
 
 const responseStatusCode = {
   success: 200,
@@ -92,7 +91,8 @@ class Connection extends EventEmitter {
 this._pingInterval = null;
 this._pongTimeout = null;
 
-this._header = String.fromCharCode(this.mimeType.length) + this.mimeType;
+this._header = String.fromCharCode(this.mimeType.length) + this.mimeType; 
// TODO: what if mimeType.length > 255
+this._header_buf = Buffer.from(this._header);
 this.isOpen = false;
 this.traversalSource = options.traversalSource || 'g';
 this._authenticator = options.authenticator;
@@ -169,7 +169,19 @@ class Connection extends EventEmitter {
 };
   }
 
-  const message = Buffer.from(this._header + 
JSON.stringify(this._getRequest(rid, op, args, processor)));
+  const request = {
+'requestId': rid,
+'op': op || 'bytecode',
+// if using op eval need to ensure processor stays unset if caller 
didn't set it.
+'processor': (!processor && op !== 'eval') ? 'traversal' : processor,
+'args': args || {},
+  };
+
+  const request_buf = this._writer.writeRequest(request);
+  const message = Buffer.concat(
+[this._header_buf, request_buf],
+this._header_buf.length + request_buf.length
+  );
   this._ws.send(message);
 }));
   }
@@ -186,26 +198,6 @@ class Connection extends EventEmitter {
   : new serializer.GraphSONWriter();
   }
 
-  _getRequest(id, op, args, processor) {
-if (args) {
-  args = this._adaptArgs(args, true);
-} else {
-  args = {};
-}
-
-if (args['gremlin'] instanceof Bytecode) {
-  args['gremlin'] = this._writer.adaptObject(args['gremlin']);
-}
-
-return ({
-  'requestId': { '@type': 'g:UUID', '@value': id },
-  'op': op || 'bytecode',
-  // if using op eval need to ensure processor stays unset if caller 
didn't set it.
-  'processor': (!processor && op !== 'eval') ? 'traversal' : processor,
-  'args': args
-});
-  }
-
   _pingHeartbeat() {
 
 if (this._pingInterval) {
@@ -247,7 +239,7 @@ class Connection extends EventEmitter {
   }
 
   _handleMessage(data) {
-const response = this._reader.read(JSON.parse(data.toString()));
+const response = this._reader.readResponse(data);
 if (response.requestId === null || response.requestId === undefined) {
   // There was a serialization issue on the server that prevented the 
parsing of the request id
   // We invoke any of the pending handlers with an error
@@ -337,32 +329,6 @@ class Connection extends EventEmitter {
   }
 
   /**
-   * Takes the given args map and ensures all arguments are passed through to 
_write.adaptObject
-   * @param {Object} args Map of arguments to process.
-   * @param {Boolean} protocolLevel Determines whether it's a protocol level 
binding.
-   * @returns {Object}
-   * @private
-   */
-  _adaptArgs(args, protocolLevel) {
-if (args instanceof Object) {
-  let newObj = {};
-  Object.keys(args).forEach((key) => {
-// bindings key (at the protocol-level needs special handling. without 
this, it wraps the generated Map
-// in another map for types like EnumValue. Could be a nicer way to do 
this but for now it's solving the
-// problem with script submission of non JSON native types
-if (protocolLevel && key === 'bindings')
-  newObj[key] = this._adaptArgs(args[key], false);
-else
-  newObj[key] = thi

[tinkerpop] branch master updated (74fc50c -> 2e6f922)

2020-06-11 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 74fc50c  Merge branch '3.4-dev'
 add c7a5527  TINKERPOP-2377 .NET GLV: Check for null earlier
 new 2e6f922  Merge pull request #1294 from apache/TINKERPOP-2377

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)



[tinkerpop] 01/01: Merge pull request #1294 from apache/TINKERPOP-2377

2020-06-11 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 2e6f922da74e2f9e565a32ba7fbd7d601ff7c027
Merge: 74fc50c c7a5527
Author: Jorge Bay Gondra 
AuthorDate: Thu Jun 11 13:13:51 2020 +0200

Merge pull request #1294 from apache/TINKERPOP-2377

TINKERPOP-2377 .NET GLV: Check for null earlier

 gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)



[tinkerpop] 01/01: TINKERPOP-2377 .NET GLV: Check for null earlier

2020-06-10 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2377
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit c7a552739f12102a32689e6828b215871d29f010
Author: Jorge Bay Gondra 
AuthorDate: Wed Jun 10 15:49:19 2020 +0200

TINKERPOP-2377 .NET GLV: Check for null earlier
---
 gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
index 490e4e4..5db0fe8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
@@ -110,17 +110,17 @@ namespace Gremlin.Net.Process.Traversal
 
 private object ConvertArgument(object argument, bool searchBindings)
 {
+if (null == argument)
+{
+return null;
+}
+
 if (searchBindings)
 {
 var variable = Bindings.GetBoundVariable(argument);
 if (variable != null)
 return new Binding(variable, ConvertArgument(argument, 
false));
 }
-
-if (null == argument)
-{
-return null;
-}
 
 if (IsDictionaryType(argument.GetType()))
 {
@@ -164,4 +164,4 @@ namespace Gremlin.Net.Process.Traversal
 return type.IsConstructedGenericType && 
type.GetGenericTypeDefinition() == typeof(HashSet<>);
 }
 }
-}
\ No newline at end of file
+}



[tinkerpop] branch TINKERPOP-2377 created (now c7a5527)

2020-06-10 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2377
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at c7a5527  TINKERPOP-2377 .NET GLV: Check for null earlier

This branch includes the following new commits:

 new c7a5527  TINKERPOP-2377 .NET GLV: Check for null earlier

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: Merge branch '3.4-dev'

2020-02-26 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit f817accc18ae24c86b2b3d0911391a6efe01e13f
Merge: aab3b4c b4fd63e
Author: Jorge Bay Gondra 
AuthorDate: Wed Feb 26 09:42:19 2020 +0100

Merge branch '3.4-dev'

 gremlin-dotnet/glv/Gremlin.Net.csproj.template| 2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)




[tinkerpop] branch master updated (aab3b4c -> f817acc)

2020-02-26 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from aab3b4c  Merge branch '3.4-dev'
 add 51f3a8f  TINKERPOP-2339 Bump System.Net.WebSockets.Client dependency
 add b807268  Merge pull request #1249 from apache/TINKERPOP-2339
 add b4fd63e  Merge branch '3.3-dev' into 3.4-dev
 new f817acc  Merge branch '3.4-dev'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gremlin-dotnet/glv/Gremlin.Net.csproj.template| 2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



[tinkerpop] branch 3.4-dev updated (3f554a7 -> b4fd63e)

2020-02-26 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 3f554a7  Update all documentation links to use https:// CTR
 add 51f3a8f  TINKERPOP-2339 Bump System.Net.WebSockets.Client dependency
 add b807268  Merge pull request #1249 from apache/TINKERPOP-2339
 new b4fd63e  Merge branch '3.3-dev' into 3.4-dev

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gremlin-dotnet/glv/Gremlin.Net.csproj.template| 2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



[tinkerpop] 01/01: Merge branch '3.3-dev' into 3.4-dev

2020-02-26 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit b4fd63eb7566dbc7d0a66431e3916a8da5b477b3
Merge: 3f554a7 b807268
Author: Jorge Bay Gondra 
AuthorDate: Wed Feb 26 09:41:36 2020 +0100

Merge branch '3.3-dev' into 3.4-dev

 gremlin-dotnet/glv/Gremlin.Net.csproj.template| 2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)




[tinkerpop] branch 3.3-dev updated (46593a6 -> b807268)

2020-02-26 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.3-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 46593a6  Changed all tinkerpop links to https:// CTR
 add 51f3a8f  TINKERPOP-2339 Bump System.Net.WebSockets.Client dependency
 add b807268  Merge pull request #1249 from apache/TINKERPOP-2339

No new revisions were added by this update.

Summary of changes:
 gremlin-dotnet/glv/Gremlin.Net.csproj.template| 2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



[tinkerpop] 01/01: TINKERPOP-2339 Bump System.Net.WebSockets.Client dependency

2020-02-17 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2339
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 51f3a8f4ac95dda0c489ad7ca52aca3789d71e15
Author: Jorge Bay Gondra 
AuthorDate: Mon Feb 17 15:23:22 2020 +0100

TINKERPOP-2339 Bump System.Net.WebSockets.Client dependency
---
 gremlin-dotnet/glv/Gremlin.Net.csproj.template| 2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gremlin-dotnet/glv/Gremlin.Net.csproj.template 
b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
index 1a6b949..f66676e 100644
--- a/gremlin-dotnet/glv/Gremlin.Net.csproj.template
+++ b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
@@ -67,7 +67,7 @@ NOTE that versions suffixed with "-rc" are considered release 
candidates (i.e. p
 
   
 
-
+
 
   
 
diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj 
b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
index e5d8aee..a1f8146 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
@@ -67,7 +67,7 @@ NOTE that versions suffixed with "-rc" are considered release 
candidates (i.e. p
 
   
 
-
+
 
   
 



[tinkerpop] branch TINKERPOP-2339 created (now 51f3a8f)

2020-02-17 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2339
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at 51f3a8f  TINKERPOP-2339 Bump System.Net.WebSockets.Client dependency

This branch includes the following new commits:

 new 51f3a8f  TINKERPOP-2339 Bump System.Net.WebSockets.Client dependency

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] branch TINKERPOP-2338 updated: TINKERPOP-2338 Fix gherkin test runner for .NET

2020-02-13 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2338
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2338 by this push:
 new 3775925  TINKERPOP-2338 Fix gherkin test runner for .NET
3775925 is described below

commit 377592519f3d8cbb0c959769c490ddc38f97c5ee
Author: Jorge Bay Gondra 
AuthorDate: Thu Feb 13 12:34:18 2020 +0100

TINKERPOP-2338 Fix gherkin test runner for .NET

Default to object for Properties() method generic param
---
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs   | 2 +-
 .../Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 621ec8e..59fd11e 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -41,7 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
 new Dictionary
 {
 // Add here the name of scenarios to ignore and the reason, 
e.g.:
-{ "g_V_properties_propertiesXstartTimeX_drop", 
IgnoreReason.NoReason },
+//{ "g_V_properties_propertiesXstartTimeX_drop", 
IgnoreReason.NoReason },
 };
 
 private static class Keywords
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
index 77ed4eb..d77ec5e 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
@@ -61,6 +61,7 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 switch (method.Name)
 {
 case nameof(GraphTraversal.Properties):
+return typeof(object);
 case nameof(GraphTraversal.Values) when 
parameterValues.Length == 1:
 // The parameter contains the element property names
 var properties = ((IEnumerable) 
parameterValues[parameterValues.Length - 1]).Cast();



[tinkerpop] branch master updated (669412f -> 3f67f94)

2020-01-29 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 669412f  Merge branch '3.4-dev'
 add 2c60aa1  TINKERPOP-2332 JavaScript GLV: Fix structure toString() 
methods
 add dc5e457  TINKERPOP-2333 JavaScript GLV: Fix Edge GraphSON2+ 
serialization
 add e2c4b27  Merge pull request #1242 from apache/TINKERPOP-2332
 add 0dd374a  Merge branch '3.3-dev' into 3.4-dev
 new 3f67f94  Merge branch '3.4-dev'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../gremlin-javascript/lib/structure/graph.js  | 34 ++---
 .../lib/structure/io/type-serializers.js   |  4 +-
 .../test/cucumber/feature-steps.js |  4 +-
 .../test/unit/structure-types-test.js  | 87 ++
 4 files changed, 115 insertions(+), 14 deletions(-)
 create mode 100644 
gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/structure-types-test.js



[tinkerpop] 01/01: Merge branch '3.4-dev'

2020-01-29 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 3f67f9492101aef3f147e4913cef6948f6f6d3a4
Merge: 669412f 0dd374a
Author: Jorge Bay Gondra 
AuthorDate: Wed Jan 29 17:22:56 2020 +0100

Merge branch '3.4-dev'

 .../gremlin-javascript/lib/structure/graph.js  | 34 ++---
 .../lib/structure/io/type-serializers.js   |  4 +-
 .../test/cucumber/feature-steps.js |  4 +-
 .../test/unit/structure-types-test.js  | 87 ++
 4 files changed, 115 insertions(+), 14 deletions(-)

diff --cc 
gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 3b3ddbf,4c0414a..1c6d512
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@@ -67,7 -66,8 +67,9 @@@ const ignoredScenarios = 
// An associative array containing the scenario name as key, for example:
'g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX': new 
IgnoreError(ignoreReason.setNotSupported),
'g_withSideEffectXa_setX_V_both_name_aggregateXlocal_aX_capXaX': new 
IgnoreError(ignoreReason.setNotSupported),
 +  'g_V_group_byXageX': new 
IgnoreError(ignoreReason.nullKeysInMapNotSupportedWell),
+   'g_V_shortestPath_edgesIncluded': new 
IgnoreError(ignoreReason.needsFurtherInvestigation),
+   'g_V_shortestPath_edgesIncluded_edgesXoutEX': new 
IgnoreError(ignoreReason.needsFurtherInvestigation)
  };
  
  defineSupportCode(function(methods) {



[tinkerpop] 01/01: Merge branch '3.3-dev' into 3.4-dev

2020-01-29 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 0dd374a399360281577eb04b4112af72f7d06f1b
Merge: 7ea3dfa e2c4b27
Author: Jorge Bay Gondra 
AuthorDate: Wed Jan 29 16:30:31 2020 +0100

Merge branch '3.3-dev' into 3.4-dev

 .../gremlin-javascript/lib/structure/graph.js  | 34 ++---
 .../lib/structure/io/type-serializers.js   |  4 +-
 .../test/cucumber/feature-steps.js |  4 +-
 .../test/unit/structure-types-test.js  | 87 ++
 4 files changed, 115 insertions(+), 14 deletions(-)

diff --cc 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js
index edbc02c,5019a9c..359e2f8
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js
@@@ -165,11 -168,20 +168,20 @@@ function areEqual(obj1, obj2) 
return false;
  }
  
+ function summarize(value) {
+   if (value === null || value === undefined) {
+ return value;
+   }
+ 
+   const strValue = value.toString();
+   return strValue.length > 20 ? strValue.substr(0, 20) : strValue;
+ }
+ 
  module.exports = {
-   Edge: Edge,
-   Graph: Graph,
-   Path: Path,
-   Property: Property,
-   Vertex: Vertex,
-   VertexProperty: VertexProperty
+   Edge,
+   Graph,
+   Path,
+   Property,
+   Vertex,
+   VertexProperty
 -};
 +};
diff --cc 
gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index fed551d,2ad085f..4c0414a
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@@ -34,7 -34,6 +34,7 @@@ const traversal = require('../../lib/pr
  const Path = graphModule.Path;
  const __ = graphTraversalModule.statics;
  const t = traversalModule.t;
- const direction = traversalModule.direction
++const direction = traversalModule.direction;
  
  // Determines whether the feature maps (m[]), are deserialized as objects 
(true) or maps (false).
  // Use false for GraphSON3.
@@@ -65,7 -63,6 +65,9 @@@ const ignoreReason = 
  const ignoredScenarios = {
// An associative array containing the scenario name as key, for example:
'g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX': new 
IgnoreError(ignoreReason.setNotSupported),
 +  'g_withSideEffectXa_setX_V_both_name_aggregateXlocal_aX_capXaX': new 
IgnoreError(ignoreReason.setNotSupported),
++  'g_V_shortestPath_edgesIncluded': new 
IgnoreError(ignoreReason.needsFurtherInvestigation),
++  'g_V_shortestPath_edgesIncluded_edgesXoutEX': new 
IgnoreError(ignoreReason.needsFurtherInvestigation)
  };
  
  defineSupportCode(function(methods) {



[tinkerpop] branch 3.4-dev updated (7ea3dfa -> 0dd374a)

2020-01-29 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 7ea3dfa  TINKERPOP-2325 Refactored the filter traversal build for 
SPARQL
 add 2c60aa1  TINKERPOP-2332 JavaScript GLV: Fix structure toString() 
methods
 add dc5e457  TINKERPOP-2333 JavaScript GLV: Fix Edge GraphSON2+ 
serialization
 add e2c4b27  Merge pull request #1242 from apache/TINKERPOP-2332
 new 0dd374a  Merge branch '3.3-dev' into 3.4-dev

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../gremlin-javascript/lib/structure/graph.js  | 34 ++---
 .../lib/structure/io/type-serializers.js   |  4 +-
 .../test/cucumber/feature-steps.js |  4 +-
 .../test/unit/structure-types-test.js  | 87 ++
 4 files changed, 115 insertions(+), 14 deletions(-)
 create mode 100644 
gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/structure-types-test.js



[tinkerpop] 01/01: Merge pull request #1242 from apache/TINKERPOP-2332

2020-01-29 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.3-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit e2c4b27cfe1aea50d159924b1883e08073d8e9a5
Merge: ea91070 dc5e457
Author: Jorge Bay Gondra 
AuthorDate: Wed Jan 29 16:27:11 2020 +0100

Merge pull request #1242 from apache/TINKERPOP-2332

TINKERPOP-2332 JavaScript GLV: Fix structure toString() methods

 .../gremlin-javascript/lib/structure/graph.js  | 34 ++---
 .../lib/structure/io/type-serializers.js   |  4 +-
 .../test/unit/structure-types-test.js  | 87 ++
 3 files changed, 112 insertions(+), 13 deletions(-)



[tinkerpop] branch 3.3-dev updated (ea91070 -> e2c4b27)

2020-01-29 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.3-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from ea91070  Merge pull request #1241 from apache/TINKERPOP-2330
 add 2c60aa1  TINKERPOP-2332 JavaScript GLV: Fix structure toString() 
methods
 add dc5e457  TINKERPOP-2333 JavaScript GLV: Fix Edge GraphSON2+ 
serialization
 new e2c4b27  Merge pull request #1242 from apache/TINKERPOP-2332

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../gremlin-javascript/lib/structure/graph.js  | 34 ++---
 .../lib/structure/io/type-serializers.js   |  4 +-
 .../test/unit/structure-types-test.js  | 87 ++
 3 files changed, 112 insertions(+), 13 deletions(-)
 create mode 100644 
gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/structure-types-test.js



[tinkerpop] branch master updated (434a41c -> c9404fc)

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 434a41c  Merge pull request #1240 from apache/TINKERPOP-2312
 add 57ba497  TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 
writers/readers
 add ea91070  Merge pull request #1241 from apache/TINKERPOP-2330
 add a6dc045  Merge branch '3.3-dev' into 3.4-dev
 new c9404fc  Merge branch '3.4-dev'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/javascript/gremlin-javascript/index.js|  5 +-
 .../gremlin-javascript/lib/driver/connection.js| 29 +--
 .../lib/structure/io/graph-serializer.js   | 88 +-
 .../gremlin-javascript/test/unit/client-test.js|  4 +-
 .../gremlin-javascript/test/unit/exports-test.js   |  6 ++
 5 files changed, 101 insertions(+), 31 deletions(-)



[tinkerpop] 01/01: Merge branch '3.4-dev'

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit c9404fc76d8af9adc05427c5dbd974b2ba8893c2
Merge: 434a41c a6dc045
Author: Jorge Bay Gondra 
AuthorDate: Mon Jan 27 15:35:44 2020 +0100

Merge branch '3.4-dev'

 .../main/javascript/gremlin-javascript/index.js|  5 +-
 .../gremlin-javascript/lib/driver/connection.js| 29 +--
 .../lib/structure/io/graph-serializer.js   | 88 +-
 .../gremlin-javascript/test/unit/client-test.js|  4 +-
 .../gremlin-javascript/test/unit/exports-test.js   |  6 ++
 5 files changed, 101 insertions(+), 31 deletions(-)



[tinkerpop] branch 3.4-dev updated (f56292b -> a6dc045)

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from f56292b  Change test for bindings to use the 3.4.x approach CTR
 add 57ba497  TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 
writers/readers
 add ea91070  Merge pull request #1241 from apache/TINKERPOP-2330
 new a6dc045  Merge branch '3.3-dev' into 3.4-dev

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/javascript/gremlin-javascript/index.js|  5 +-
 .../gremlin-javascript/lib/driver/connection.js| 29 +--
 .../lib/structure/io/graph-serializer.js   | 88 +-
 .../gremlin-javascript/test/unit/client-test.js|  4 +-
 .../gremlin-javascript/test/unit/exports-test.js   |  6 ++
 5 files changed, 101 insertions(+), 31 deletions(-)



[tinkerpop] 01/01: Merge branch '3.3-dev' into 3.4-dev

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit a6dc04581a3a8b1dfdbb98ac56ecb8c5bf210e96
Merge: f56292b ea91070
Author: Jorge Bay Gondra 
AuthorDate: Mon Jan 27 15:34:32 2020 +0100

Merge branch '3.3-dev' into 3.4-dev

 .../main/javascript/gremlin-javascript/index.js|  5 +-
 .../gremlin-javascript/lib/driver/connection.js| 29 +--
 .../lib/structure/io/graph-serializer.js   | 88 +-
 .../gremlin-javascript/test/unit/client-test.js|  4 +-
 .../gremlin-javascript/test/unit/exports-test.js   |  6 ++
 5 files changed, 101 insertions(+), 31 deletions(-)

diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
index a9d5c97,5ef0eca..87f9842
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
@@@ -78,14 -77,10 +78,11 @@@ module.exports = 
  statics: gt.statics,
  Translator,
  traversal: AnonymousTraversalSource.traversal,
 -AnonymousTraversalSource
 +AnonymousTraversalSource,
 +withOptions: t.withOptions
},
structure: {
- io: {
-   GraphSONReader: gs.GraphSONReader,
-   GraphSONWriter: gs.GraphSONWriter
- },
+ io: gs,
  Edge: graph.Edge,
  Graph: graph.Graph,
  Path: graph.Path,
diff --cc 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
index 7943852,fb461d9..122f315
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
@@@ -169,15 -211,16 +212,18 @@@ const graphSON2Deserializers = 
'g:VertexProperty': typeSerializers.VertexPropertySerializer,
'g:Property': typeSerializers.PropertySerializer,
'g:Path': typeSerializers.Path3Serializer,
-   'g:T': typeSerializers.TSerializer,
 -  'g:T': typeSerializers.TSerializer
 +  'g:TextP': typeSerializers.TextPSerializer,
-   'g:List': typeSerializers.ListSerializer,
-   'g:Set': typeSerializers.SetSerializer,
-   'g:Map': typeSerializers.MapSerializer,
++  'g:T': typeSerializers.TSerializer,
 +  'g:BulkSet': typeSerializers.BulkSetSerializer
  };
  
- const serializers = [
+ const graphSON3Deserializers = Object.assign({}, graphSON2Deserializers, {
+   'g:List': typeSerializers.ListSerializer,
+   'g:Set': typeSerializers.SetSerializer,
+   'g:Map': typeSerializers.MapSerializer
+ });
+ 
+ const graphSON2Serializers = [
typeSerializers.NumberSerializer,
typeSerializers.DateSerializer,
typeSerializers.BytecodeSerializer,



[tinkerpop] branch 3.3-dev updated (bd6a855 -> ea91070)

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.3-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from bd6a855  Merge branch 'TINKERPOP-2323' into 3.3-dev
 add 57ba497  TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 
writers/readers
 new ea91070  Merge pull request #1241 from apache/TINKERPOP-2330

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/javascript/gremlin-javascript/index.js|  5 +-
 .../gremlin-javascript/lib/driver/connection.js| 29 +---
 .../lib/structure/io/graph-serializer.js   | 84 ++
 .../gremlin-javascript/test/unit/client-test.js|  4 +-
 .../gremlin-javascript/test/unit/exports-test.js   |  6 ++
 5 files changed, 99 insertions(+), 29 deletions(-)



[tinkerpop] 01/01: Merge pull request #1241 from apache/TINKERPOP-2330

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.3-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit ea9107024404aee53da6da30620c5913e612b06c
Merge: bd6a855 57ba497
Author: Jorge Bay Gondra 
AuthorDate: Mon Jan 27 15:26:35 2020 +0100

Merge pull request #1241 from apache/TINKERPOP-2330

TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 writers/readers

 .../main/javascript/gremlin-javascript/index.js|  5 +-
 .../gremlin-javascript/lib/driver/connection.js| 29 +---
 .../lib/structure/io/graph-serializer.js   | 84 ++
 .../gremlin-javascript/test/unit/client-test.js|  4 +-
 .../gremlin-javascript/test/unit/exports-test.js   |  6 ++
 5 files changed, 99 insertions(+), 29 deletions(-)



[tinkerpop] branch TINKERPOP-2332 updated: TINKERPOP-2333 JavaScript GLV: Fix Edge GraphSON2+ serialization

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2332
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2332 by this push:
 new dc5e457  TINKERPOP-2333 JavaScript GLV: Fix Edge GraphSON2+ 
serialization
dc5e457 is described below

commit dc5e457780114c497b46eca0fc3b3daa8d2fec16
Author: Jorge Bay Gondra 
AuthorDate: Mon Jan 27 11:55:55 2020 +0100

TINKERPOP-2333 JavaScript GLV: Fix Edge GraphSON2+ serialization
---
 .../gremlin-javascript/lib/structure/io/type-serializers.js   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
index c553b47..42183b9 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
@@ -293,9 +293,9 @@ class EdgeSerializer extends TypeSerializer {
 const value = obj[valueKey];
 return new g.Edge(
   this.reader.read(value['id']),
-  this.reader.read(value['outV']),
+  new g.Vertex(this.reader.read(value['outV']), 
this.reader.read(value['outVLabel'])),
   value['label'],
-  this.reader.read(value['inV']),
+  new g.Vertex(this.reader.read(value['inV']), 
this.reader.read(value['inVLabel'])),
   this.reader.read(value['properties'])
 );
   }



[tinkerpop] branch TINKERPOP-2332 created (now 2c60aa1)

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2332
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at 2c60aa1  TINKERPOP-2332 JavaScript GLV: Fix structure toString() 
methods

This branch includes the following new commits:

 new 2c60aa1  TINKERPOP-2332 JavaScript GLV: Fix structure toString() 
methods

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: TINKERPOP-2332 JavaScript GLV: Fix structure toString() methods

2020-01-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2332
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 2c60aa1ce10b36b55f1a181b3d9ff4f85a6a32f1
Author: Jorge Bay Gondra 
AuthorDate: Mon Jan 27 10:23:03 2020 +0100

TINKERPOP-2332 JavaScript GLV: Fix structure toString() methods
---
 .../gremlin-javascript/lib/structure/graph.js  | 34 ++---
 .../test/unit/structure-types-test.js  | 87 ++
 2 files changed, 110 insertions(+), 11 deletions(-)

diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js
index 98d9c77..5019a9c 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js
@@ -65,7 +65,7 @@ class Vertex extends Element {
   }
 
   toString() {
-return 'v[' + this.id + ']';
+return `v[${this.id}]`;
   }
 }
 
@@ -85,7 +85,10 @@ class Edge extends Element {
   }
 
   toString() {
-return 'e[' + this.id + '][' + this.outV.id + '-' + this.label + '->' + 
this.inV.id + ']';
+const outVId = this.outV ? this.outV.id : '?';
+const inVId = this.inV ? this.inV.id : '?';
+
+return `e[${this.id}][${outVId}-${this.label}->${inVId}]`;
   }
 }
 
@@ -98,7 +101,7 @@ class VertexProperty extends Element {
   }
 
   toString() {
-return 'vp[' + this.label + '->' + this.value.substr(0, 20) + ']';
+return `vp[${this.label}->${summarize(this.value)}]`;
   }
 }
 
@@ -109,7 +112,7 @@ class Property {
   }
 
   toString() {
-return 'p[' + this.key + '->' + this.value.substr(0, 20) + ']';
+return `p[${this.key}->${summarize(this.value)}]`;
   }
 
   equals(other) {
@@ -130,7 +133,7 @@ class Path {
   }
 
   toString() {
-return 'path[' + this.objects.join(", ") +  ']';
+return `path[${(this.objects || []).join(", ")}]`;
   }
 
   equals(other) {
@@ -165,11 +168,20 @@ function areEqual(obj1, obj2) {
   return false;
 }
 
+function summarize(value) {
+  if (value === null || value === undefined) {
+return value;
+  }
+
+  const strValue = value.toString();
+  return strValue.length > 20 ? strValue.substr(0, 20) : strValue;
+}
+
 module.exports = {
-  Edge: Edge,
-  Graph: Graph,
-  Path: Path,
-  Property: Property,
-  Vertex: Vertex,
-  VertexProperty: VertexProperty
+  Edge,
+  Graph,
+  Path,
+  Property,
+  Vertex,
+  VertexProperty
 };
\ No newline at end of file
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/structure-types-test.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/structure-types-test.js
new file mode 100644
index 000..29bebfa
--- /dev/null
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/structure-types-test.js
@@ -0,0 +1,87 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+/**
+ * @author Jorge Bay Gondra
+ */
+'use strict';
+
+const { assert } = require('chai');
+const { VertexProperty, Property, Vertex, Edge, Path } = 
require('../../lib/structure/graph');
+
+describe('Edge', () => {
+  describe('#toString()', () => {
+it('should support empty outV and inV', () => {
+  const element = new Edge('123', null, 'label1', undefined, null);
+  assert.strictEqual(element.toString(), `e[123][?-label1->?]`);
+});
+  });
+});
+
+describe('Vertex', () => {
+  describe('#toString()', () => {
+it('should return the string representation based on the id', () => {
+  const element = new Vertex(-200, 'label1', null);
+  assert.strictEqual(element.toString(), `v[-200]`);
+});
+  });
+});
+
+describe('VertexProperty', () => {
+  describe('#toString()', () => {
+it('should return the string representation and summarize', () => {
+  [
+[ new VertexProperty(1, 'label1', 'value1'), 'vp[label1->value1]' ],
+[ new VertexProperty(1, 'label2', null), 'vp[label2->null]' ],
+[ new Ve

[tinkerpop] branch TINKERPOP-2330 created (now 57ba497)

2020-01-23 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2330
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at 57ba497  TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 
writers/readers

This branch includes the following new commits:

 new 57ba497  TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 
writers/readers

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 writers/readers

2020-01-23 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2330
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 57ba497f7de1fee8945e9c92b011c27739423c0d
Author: Jorge Bay Gondra 
AuthorDate: Thu Jan 23 14:54:48 2020 +0100

TINKERPOP-2330 JavaScript GLV: Export GraphSON2 and 3 writers/readers
---
 .../main/javascript/gremlin-javascript/index.js|  5 +-
 .../gremlin-javascript/lib/driver/connection.js| 29 +---
 .../lib/structure/io/graph-serializer.js   | 84 ++
 .../gremlin-javascript/test/unit/client-test.js|  4 +-
 .../gremlin-javascript/test/unit/exports-test.js   |  6 ++
 5 files changed, 99 insertions(+), 29 deletions(-)

diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
index c8fe547..5ef0eca 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
@@ -80,10 +80,7 @@ module.exports = {
 AnonymousTraversalSource
   },
   structure: {
-io: {
-  GraphSONReader: gs.GraphSONReader,
-  GraphSONWriter: gs.GraphSONWriter
-},
+io: gs,
 Edge: graph.Edge,
 Graph: graph.Graph,
 Path: graph.Path,
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
index 692dbe1..29be5dc 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
@@ -38,6 +38,7 @@ const responseStatusCode = {
 };
 
 const defaultMimeType = 'application/vnd.gremlin-v3.0+json';
+const graphSON2MimeType = 'application/vnd.gremlin-v2.0+json';
 
 const pingIntervalDelay = 60 * 1000;
 const pongTimeoutDelay = 30 * 1000;
@@ -73,10 +74,16 @@ class Connection extends EventEmitter {
 this.url = url;
 this.options = options = options || {};
 
+/**
+ * Gets the MIME type.
+ * @type {String}
+ */
+this.mimeType = options.mimeType || defaultMimeType;
+
 // A map containing the request id and the handler
 this._responseHandlers = {};
-this._reader = options.reader || new serializer.GraphSONReader();
-this._writer = options.writer || new serializer.GraphSONWriter();
+this._reader = options.reader || this._getDefaultReader(this.mimeType);
+this._writer = options.writer || this._getDefaultWriter(this.mimeType);
 this._openPromise = null;
 this._openCallback = null;
 this._closePromise = null;
@@ -84,12 +91,6 @@ class Connection extends EventEmitter {
 this._pingInterval = null;
 this._pongTimeout = null;
 
-/**
- * Gets the MIME type.
- * @type {String}
- */
-this.mimeType = options.mimeType || defaultMimeType;
-
 this._header = String.fromCharCode(this.mimeType.length) + this.mimeType;
 this.isOpen = false;
 this.traversalSource = options.traversalSource || 'g';
@@ -169,6 +170,18 @@ class Connection extends EventEmitter {
 }));
   }
 
+  _getDefaultReader(mimeType) {
+return mimeType === graphSON2MimeType
+  ? new serializer.GraphSON2Reader()
+  : new serializer.GraphSONReader();
+  }
+
+  _getDefaultWriter(mimeType) {
+return mimeType === graphSON2MimeType
+  ? new serializer.GraphSON2Writer()
+  : new serializer.GraphSONWriter();
+  }
+
   _getRequest(id, bytecode, op, args, processor) {
 if (args) {
   args = this._adaptArgs(args, true);
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
index 4a7fdf2..fb461d9 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
@@ -25,24 +25,27 @@
 const typeSerializers = require('./type-serializers');
 
 /**
- * GraphSON Writer
+ * GraphSON2 writer.
  */
-class GraphSONWriter {
+class GraphSON2Writer {
+
   /**
* @param {Object} [options]
-   * @param {Object} options.serializers An object used as an associative 
array with GraphSON 2 type name as keys and
+   * @param {Object} [options.serializers] An object used as an associative 
array with GraphSON 2 type name as keys and
* serializer instances as values, ie: { 'g:Int64': longSerializer }.
* @constructor
*/
   constructor(options) {
 this._options = options || {};
 // Create instance of the default serializers
-this._serializers = serializers.map(serializerConstructor => {
+this._serializers = this.getDefaultSerializers().map(serializerConstructor 
=> {
   const s

[tinkerpop] branch 3.4-dev updated (edc3502 -> 89903ff)

2020-01-21 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from edc3502  Merge branch '3.3-dev' into 3.4-dev
 add 4a1e9b9  TINKERPOP-2329 JavaScript GLV: upgrade ws dependency
 add 640297e  TINKERPOP-2329 Update all dev dependencies
 add 4bf2cbd  Merge pull request #1239 from apache/TINKERPOP-2329
 add 89903ff  Merge branch '3.3-dev' into 3.4-dev

No new revisions were added by this update.

Summary of changes:
 gremlin-javascript/glv/PackageJson.template| 18 +-
 .../main/javascript/gremlin-javascript/package.json| 18 +-
 2 files changed, 18 insertions(+), 18 deletions(-)



[tinkerpop] 02/02: Merge branch '3.4-dev'

2020-01-21 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 06f6fe995b3661508f24d265c151d169cd0d08ab
Merge: 4c4a7b6 89903ff
Author: Jorge Bay Gondra 
AuthorDate: Tue Jan 21 15:31:51 2020 +0100

Merge branch '3.4-dev'

 gremlin-javascript/glv/PackageJson.template| 18 +-
 .../main/javascript/gremlin-javascript/package.json| 18 +-
 2 files changed, 18 insertions(+), 18 deletions(-)




[tinkerpop] 01/02: Merge branch '3.3-dev' into 3.4-dev

2020-01-21 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 89903ffdfa17bcc1eb8dfaf0d61ad541d7917ee7
Merge: edc3502 4bf2cbd
Author: Jorge Bay Gondra 
AuthorDate: Tue Jan 21 15:31:40 2020 +0100

Merge branch '3.3-dev' into 3.4-dev

 gremlin-javascript/glv/PackageJson.template| 18 +-
 .../main/javascript/gremlin-javascript/package.json| 18 +-
 2 files changed, 18 insertions(+), 18 deletions(-)




[tinkerpop] branch master updated (4c4a7b6 -> 06f6fe9)

2020-01-21 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 4c4a7b6  Merge branch '3.4-dev'
 add 4a1e9b9  TINKERPOP-2329 JavaScript GLV: upgrade ws dependency
 add 640297e  TINKERPOP-2329 Update all dev dependencies
 add 4bf2cbd  Merge pull request #1239 from apache/TINKERPOP-2329
 new 89903ff  Merge branch '3.3-dev' into 3.4-dev
 new 06f6fe9  Merge branch '3.4-dev'

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gremlin-javascript/glv/PackageJson.template| 18 +-
 .../main/javascript/gremlin-javascript/package.json| 18 +-
 2 files changed, 18 insertions(+), 18 deletions(-)



[tinkerpop] branch 3.3-dev updated (999f142 -> 4bf2cbd)

2020-01-21 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch 3.3-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 999f142  Fixed python build problems given new releases to pypi
 add 4a1e9b9  TINKERPOP-2329 JavaScript GLV: upgrade ws dependency
 add 640297e  TINKERPOP-2329 Update all dev dependencies
 new 4bf2cbd  Merge pull request #1239 from apache/TINKERPOP-2329

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gremlin-javascript/glv/PackageJson.template| 18 +-
 .../main/javascript/gremlin-javascript/package.json| 18 +-
 2 files changed, 18 insertions(+), 18 deletions(-)



[tinkerpop] 01/01: Merge pull request #1239 from apache/TINKERPOP-2329

2020-01-21 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch 3.3-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 4bf2cbd24bb709e106259155660e43a82f50616f
Merge: 999f142 640297e
Author: Jorge Bay Gondra 
AuthorDate: Tue Jan 21 15:30:50 2020 +0100

Merge pull request #1239 from apache/TINKERPOP-2329

TINKERPOP-2329 JavaScript GLV: upgrade ws dependency

 gremlin-javascript/glv/PackageJson.template| 18 +-
 .../main/javascript/gremlin-javascript/package.json| 18 +-
 2 files changed, 18 insertions(+), 18 deletions(-)



[tinkerpop] branch TINKERPOP-2329 updated: TINKERPOP-2329 Update all dev dependencies

2020-01-16 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2329
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2329 by this push:
 new 640297e  TINKERPOP-2329 Update all dev dependencies
640297e is described below

commit 640297ed58279ca73f8456f539d92c676c62e2ed
Author: Jorge Bay Gondra 
AuthorDate: Thu Jan 16 15:28:15 2020 +0100

TINKERPOP-2329 Update all dev dependencies
---
 gremlin-javascript/glv/PackageJson.template| 10 +-
 .../src/main/javascript/gremlin-javascript/package.json| 10 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gremlin-javascript/glv/PackageJson.template 
b/gremlin-javascript/glv/PackageJson.template
index a40d3f7..4089dc2 100644
--- a/gremlin-javascript/glv/PackageJson.template
+++ b/gremlin-javascript/glv/PackageJson.template
@@ -38,10 +38,10 @@
   "devDependencies": {
 "chai": "~4.1.2",
 "cucumber": "~4.2.1",
-"grunt": "~1.0.2",
-"grunt-cli": "~1.2.0",
-"grunt-jsdoc": "~2.3.0",
-"mocha": "~4.0.1"
+"grunt": "~1.0.4",
+"grunt-cli": "~1.3.2",
+"grunt-jsdoc": "~2.3.1",
+"mocha": "~5.2.0"
   },
   "repository": {
 "type": "git",
@@ -53,7 +53,7 @@
   },
   "scripts": {
 "test": "./node_modules/mocha/bin/mocha test/unit test/integration -t 
5000",
-"features": "cucumber.js --require test/cucumber 
../../../../../gremlin-test/features/",
+"features": "./node_modules/.bin/cucumber-js --require test/cucumber 
../../../../../gremlin-test/features/",
 "unit-test": "./node_modules/mocha/bin/mocha test/unit"
   },
   "engines": {
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
index ff36cbd..6485f9b 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
@@ -19,10 +19,10 @@
   "devDependencies": {
 "chai": "~4.1.2",
 "cucumber": "~4.2.1",
-"grunt": "~1.0.2",
-"grunt-cli": "~1.2.0",
-"grunt-jsdoc": "~2.3.0",
-"mocha": "~4.0.1"
+"grunt": "~1.0.4",
+"grunt-cli": "~1.3.2",
+"grunt-jsdoc": "~2.3.1",
+"mocha": "~5.2.0"
   },
   "repository": {
 "type": "git",
@@ -34,7 +34,7 @@
   },
   "scripts": {
 "test": "./node_modules/mocha/bin/mocha test/unit test/integration -t 
5000",
-"features": "cucumber.js --require test/cucumber 
../../../../../gremlin-test/features/",
+"features": "./node_modules/.bin/cucumber-js --require test/cucumber 
../../../../../gremlin-test/features/",
 "unit-test": "./node_modules/mocha/bin/mocha test/unit"
   },
   "engines": {



[tinkerpop] 01/01: TINKERPOP-2329 JavaScript GLV: upgrade ws dependency

2020-01-16 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2329
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 4a1e9b99c51706f032a31592ed98a2ae2ec93c48
Author: Jorge Bay Gondra 
AuthorDate: Thu Jan 16 14:13:29 2020 +0100

TINKERPOP-2329 JavaScript GLV: upgrade ws dependency
---
 gremlin-javascript/glv/PackageJson.template  | 12 ++--
 .../src/main/javascript/gremlin-javascript/package.json  | 12 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/gremlin-javascript/glv/PackageJson.template 
b/gremlin-javascript/glv/PackageJson.template
index 8bc2905..a40d3f7 100644
--- a/gremlin-javascript/glv/PackageJson.template
+++ b/gremlin-javascript/glv/PackageJson.template
@@ -33,15 +33,15 @@
   ],
   "license": "Apache-2.0",
   "dependencies": {
-"ws": "^3.0.0"
+"ws": "^6.2.1"
   },
   "devDependencies": {
-"mocha": "~4.0.1",
-"cucumber": "~3.1.0",
 "chai": "~4.1.2",
+"cucumber": "~4.2.1",
 "grunt": "~1.0.2",
 "grunt-cli": "~1.2.0",
-"grunt-jsdoc": "~2.3.0"
+"grunt-jsdoc": "~2.3.0",
+"mocha": "~4.0.1"
   },
   "repository": {
 "type": "git",
@@ -52,9 +52,9 @@
 "url": "https://issues.apache.org/jira/browse/TINKERPOP;
   },
   "scripts": {
-"test": "mocha test/unit test/integration -t 5000",
+"test": "./node_modules/mocha/bin/mocha test/unit test/integration -t 
5000",
 "features": "cucumber.js --require test/cucumber 
../../../../../gremlin-test/features/",
-"unit-test": "mocha test/unit"
+"unit-test": "./node_modules/mocha/bin/mocha test/unit"
   },
   "engines": {
 "node": ">=6"
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
index 9aa5a2b..ff36cbd 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
@@ -14,15 +14,15 @@
   ],
   "license": "Apache-2.0",
   "dependencies": {
-"ws": "^3.0.0"
+"ws": "^6.2.1"
   },
   "devDependencies": {
-"mocha": "~4.0.1",
-"cucumber": "~3.1.0",
 "chai": "~4.1.2",
+"cucumber": "~4.2.1",
 "grunt": "~1.0.2",
 "grunt-cli": "~1.2.0",
-"grunt-jsdoc": "~2.3.0"
+"grunt-jsdoc": "~2.3.0",
+"mocha": "~4.0.1"
   },
   "repository": {
 "type": "git",
@@ -33,9 +33,9 @@
 "url": "https://issues.apache.org/jira/browse/TINKERPOP;
   },
   "scripts": {
-"test": "mocha test/unit test/integration -t 5000",
+"test": "./node_modules/mocha/bin/mocha test/unit test/integration -t 
5000",
 "features": "cucumber.js --require test/cucumber 
../../../../../gremlin-test/features/",
-"unit-test": "mocha test/unit"
+"unit-test": "./node_modules/mocha/bin/mocha test/unit"
   },
   "engines": {
 "node": ">=6"



[tinkerpop] branch TINKERPOP-2329 created (now 4a1e9b9)

2020-01-16 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2329
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at 4a1e9b9  TINKERPOP-2329 JavaScript GLV: upgrade ws dependency

This branch includes the following new commits:

 new 4a1e9b9  TINKERPOP-2329 JavaScript GLV: upgrade ws dependency

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: Merge branch 'tp34'

2019-11-07 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit d0838e2cc468e7f4f5c27216692349fad37cbf85
Merge: 172b77b 2b9f40e
Author: Jorge Bay Gondra 
AuthorDate: Thu Nov 7 10:18:13 2019 +0100

Merge branch 'tp34'

 CHANGELOG.asciidoc |   6 +
 docs/src/upgrade/release-3.4.x.asciidoc|  25 ++
 .../tinkerpop/gremlin/structure/io/Buffer.java | 250 +
 .../gremlin/structure/io/BufferFactory.java|  21 +-
 .../gremlin/structure/io}/binary/DataType.java |   5 +-
 .../structure/io}/binary/GraphBinaryIo.java|   5 +-
 .../structure/io}/binary/GraphBinaryReader.java|  15 +-
 .../structure/io}/binary/GraphBinaryWriter.java|  30 +-
 .../structure/io}/binary/TypeSerializer.java   |  16 +-
 .../io}/binary/TypeSerializerRegistry.java |  18 +-
 .../io}/binary/types/BigDecimalSerializer.java |  16 +-
 .../io}/binary/types/BigIntegerSerializer.java |  16 +-
 .../io}/binary/types/BindingSerializer.java|  17 +-
 .../io}/binary/types/BulkSetSerializer.java|  19 +-
 .../io}/binary/types/ByteBufferSerializer.java |  16 +-
 .../io}/binary/types/ByteCodeSerializer.java   |  24 +-
 .../structure/io}/binary/types/CharSerializer.java |  17 +-
 .../io}/binary/types/ClassSerializer.java  |  17 +-
 .../io}/binary/types/CollectionSerializer.java |  16 +-
 .../io}/binary/types/CustomTypeSerializer.java |   4 +-
 .../structure/io}/binary/types/DateSerializer.java |  14 +-
 .../io}/binary/types/DurationSerializer.java   |  16 +-
 .../structure/io}/binary/types/EdgeSerializer.java |  17 +-
 .../structure/io}/binary/types/EnumSerializer.java |  16 +-
 .../io}/binary/types/GraphSerializer.java  |  24 +-
 .../io}/binary/types/InetAddressSerializer.java|  18 +-
 .../io}/binary/types/InstantSerializer.java|  16 +-
 .../io}/binary/types/LambdaSerializer.java |  17 +-
 .../structure/io}/binary/types/ListSerializer.java |  16 +-
 .../io}/binary/types/LocalDateSerializer.java  |  16 +-
 .../io}/binary/types/LocalDateTimeSerializer.java  |  16 +-
 .../io}/binary/types/LocalTimeSerializer.java  |  16 +-
 .../io}/binary/types/MapEntrySerializer.java   |  18 +-
 .../structure/io}/binary/types/MapSerializer.java  |  16 +-
 .../io}/binary/types/MetricsSerializer.java|  16 +-
 .../io}/binary/types/MonthDaySerializer.java   |  16 +-
 .../io}/binary/types/OffsetDateTimeSerializer.java |  16 +-
 .../io}/binary/types/OffsetTimeSerializer.java |  16 +-
 .../structure/io}/binary/types/PSerializer.java|  24 +-
 .../structure/io}/binary/types/PathSerializer.java |  16 +-
 .../io}/binary/types/PeriodSerializer.java |  16 +-
 .../io}/binary/types/PropertySerializer.java   |  17 +-
 .../structure/io}/binary/types/SetSerializer.java  |  16 +-
 .../io}/binary/types/SimpleTypeSerializer.java |  33 +-
 .../io}/binary/types/SingleTypeSerializer.java |  36 +-
 .../io}/binary/types/StringSerializer.java |  14 +-
 .../io}/binary/types/TransformSerializer.java  |   4 +-
 .../types/TraversalExplanationSerializer.java  |  18 +-
 .../binary/types/TraversalMetricsSerializer.java   |  16 +-
 .../binary/types/TraversalStrategySerializer.java  |  16 +-
 .../io}/binary/types/TraverserSerializer.java  |  17 +-
 .../structure/io}/binary/types/TreeSerializer.java |  17 +-
 .../structure/io}/binary/types/UUIDSerializer.java |  14 +-
 .../io}/binary/types/VertexPropertySerializer.java |  17 +-
 .../io}/binary/types/VertexSerializer.java |  17 +-
 .../io}/binary/types/YearMonthSerializer.java  |  16 +-
 .../io}/binary/types/ZoneOffsetSerializer.java |  16 +-
 .../io}/binary/types/ZonedDateTimeSerializer.java  |  16 +-
 .../driver/ser/GraphBinaryMessageSerializerV1.java |  10 +-
 .../tinkerpop/gremlin/driver/ser/NettyBuffer.java  | 267 ++
 .../gremlin/driver/ser/NettyBufferFactory.java | 114 ++
 .../ser/binary/RequestMessageSerializer.java   |  58 +++-
 .../ser/binary/ResponseMessageSerializer.java  |  65 ++--
 .../gremlin/driver/ser/NettyBufferFactoryTest.java | 385 +
 .../binary/GraphBinaryMessageSerializerV1Test.java |   1 +
 .../GraphBinaryReaderWriterRoundTripTest.java  |   8 +-
 .../ser/binary/TypeSerializerFailureTests.java |  11 +-
 .../ser/binary/TypeSerializerRegistryTest.java |  29 +-
 .../ser/binary/types/CharSerializerTest.java   |  23 +-
 .../types/sample/SamplePersonSerializer.java   |  19 +-
 .../types/sample/SamplePersonSerializerTest.java   |  25 +-
 .../driver/GraphBinaryReaderWriterBenchmark.java   |  29 +-
 .../gremlin/driver/SerializationBenchmark.java |   2 +-
 .../scripts/generate-graphbinary-resources.groovy  |   7 +-
 .../graphbinary/GraphBinaryCompatibilityTest.java  |  21 +-
 75 files changed, 1704 insertions

[tinkerpop] 01/01: Merge branch 'TINKERPOP-2305' into tp34

2019-11-07 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch tp34
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 2b9f40efb1da6b9ab22e3ffbe700759f4156ec9a
Merge: 47e25aa c2108bb
Author: Jorge Bay Gondra 
AuthorDate: Thu Nov 7 10:07:14 2019 +0100

Merge branch 'TINKERPOP-2305' into tp34

 CHANGELOG.asciidoc |   6 +
 docs/src/upgrade/release-3.4.x.asciidoc|  25 ++
 .../tinkerpop/gremlin/structure/io/Buffer.java | 250 +
 .../gremlin/structure/io/BufferFactory.java|  21 +-
 .../gremlin/structure/io}/binary/DataType.java |   5 +-
 .../structure/io}/binary/GraphBinaryIo.java|   5 +-
 .../structure/io}/binary/GraphBinaryReader.java|  15 +-
 .../structure/io}/binary/GraphBinaryWriter.java|  30 +-
 .../structure/io}/binary/TypeSerializer.java   |  16 +-
 .../io}/binary/TypeSerializerRegistry.java |  18 +-
 .../io}/binary/types/BigDecimalSerializer.java |  16 +-
 .../io}/binary/types/BigIntegerSerializer.java |  16 +-
 .../io}/binary/types/BindingSerializer.java|  17 +-
 .../io}/binary/types/BulkSetSerializer.java|  19 +-
 .../io}/binary/types/ByteBufferSerializer.java |  16 +-
 .../io}/binary/types/ByteCodeSerializer.java   |  24 +-
 .../structure/io}/binary/types/CharSerializer.java |  17 +-
 .../io}/binary/types/ClassSerializer.java  |  17 +-
 .../io}/binary/types/CollectionSerializer.java |  16 +-
 .../io}/binary/types/CustomTypeSerializer.java |   4 +-
 .../structure/io}/binary/types/DateSerializer.java |  14 +-
 .../io}/binary/types/DurationSerializer.java   |  16 +-
 .../structure/io}/binary/types/EdgeSerializer.java |  17 +-
 .../structure/io}/binary/types/EnumSerializer.java |  16 +-
 .../io}/binary/types/GraphSerializer.java  |  25 +-
 .../io}/binary/types/InetAddressSerializer.java|  18 +-
 .../io}/binary/types/InstantSerializer.java|  16 +-
 .../io}/binary/types/LambdaSerializer.java |  17 +-
 .../structure/io}/binary/types/ListSerializer.java |  16 +-
 .../io}/binary/types/LocalDateSerializer.java  |  16 +-
 .../io}/binary/types/LocalDateTimeSerializer.java  |  16 +-
 .../io}/binary/types/LocalTimeSerializer.java  |  16 +-
 .../io}/binary/types/MapEntrySerializer.java   |  18 +-
 .../structure/io}/binary/types/MapSerializer.java  |  16 +-
 .../io}/binary/types/MetricsSerializer.java|  16 +-
 .../io}/binary/types/MonthDaySerializer.java   |  16 +-
 .../io}/binary/types/OffsetDateTimeSerializer.java |  16 +-
 .../io}/binary/types/OffsetTimeSerializer.java |  16 +-
 .../structure/io}/binary/types/PSerializer.java|  24 +-
 .../structure/io}/binary/types/PathSerializer.java |  16 +-
 .../io}/binary/types/PeriodSerializer.java |  16 +-
 .../io}/binary/types/PropertySerializer.java   |  17 +-
 .../structure/io}/binary/types/SetSerializer.java  |  16 +-
 .../io}/binary/types/SimpleTypeSerializer.java |  33 +-
 .../io}/binary/types/SingleTypeSerializer.java |  36 +-
 .../io}/binary/types/StringSerializer.java |  14 +-
 .../io}/binary/types/TransformSerializer.java  |   4 +-
 .../types/TraversalExplanationSerializer.java  |  18 +-
 .../binary/types/TraversalMetricsSerializer.java   |  16 +-
 .../binary/types/TraversalStrategySerializer.java  |  16 +-
 .../io}/binary/types/TraverserSerializer.java  |  17 +-
 .../structure/io}/binary/types/TreeSerializer.java |  17 +-
 .../structure/io}/binary/types/UUIDSerializer.java |  14 +-
 .../io}/binary/types/VertexPropertySerializer.java |  17 +-
 .../io}/binary/types/VertexSerializer.java |  17 +-
 .../io}/binary/types/YearMonthSerializer.java  |  16 +-
 .../io}/binary/types/ZoneOffsetSerializer.java |  16 +-
 .../io}/binary/types/ZonedDateTimeSerializer.java  |  16 +-
 .../driver/ser/GraphBinaryMessageSerializerV1.java |  10 +-
 .../tinkerpop/gremlin/driver/ser/NettyBuffer.java  | 267 ++
 .../gremlin/driver/ser/NettyBufferFactory.java | 114 ++
 .../ser/binary/RequestMessageSerializer.java   |  58 +++-
 .../ser/binary/ResponseMessageSerializer.java  |  65 ++--
 .../gremlin/driver/ser/NettyBufferFactoryTest.java | 385 +
 .../binary/GraphBinaryMessageSerializerV1Test.java |   1 +
 .../GraphBinaryReaderWriterRoundTripTest.java  |   8 +-
 .../ser/binary/TypeSerializerFailureTests.java |  11 +-
 .../ser/binary/TypeSerializerRegistryTest.java |  29 +-
 .../ser/binary/types/CharSerializerTest.java   |  23 +-
 .../types/sample/SamplePersonSerializer.java   |  19 +-
 .../types/sample/SamplePersonSerializerTest.java   |  25 +-
 .../driver/GraphBinaryReaderWriterBenchmark.java   |  29 +-
 .../gremlin/driver/SerializationBenchmark.java |   2 +-
 .../scripts/generate-graphbinary-resources.groovy  |   7 +-
 .../graphbinary/GraphBinaryCompatibilityTest.java  |  21 +-
 75 files changed

[tinkerpop] branch master updated (172b77b -> d0838e2)

2019-11-07 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 172b77b  Merge pull request #1211 from apache/TINKERPOP-1568
 add 344b737  TINKERPOP-2305 Introduce Buffer interface
 add a76cf5d  TINKERPOP-2305 Refactor serialization method signatures
 add 6e10bde  TINKERPOP-2035 Move to gremlin-core
 add 5c2cb9f  TINKERPOP-2035 Add utility methods to read/write from Netty 
buffer
 add c2108bb  TINKERPOP-2035 Fix gremlin-io-test and declare params as final
 add 2b9f40e  Merge branch 'TINKERPOP-2305' into tp34
 new d0838e2  Merge branch 'tp34'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc |   6 +
 docs/src/upgrade/release-3.4.x.asciidoc|  25 ++
 .../tinkerpop/gremlin/structure/io/Buffer.java | 250 +
 .../gremlin/structure/io/BufferFactory.java|  21 +-
 .../gremlin/structure/io}/binary/DataType.java |   5 +-
 .../structure/io}/binary/GraphBinaryIo.java|   5 +-
 .../structure/io}/binary/GraphBinaryReader.java|  15 +-
 .../structure/io}/binary/GraphBinaryWriter.java|  30 +-
 .../structure/io}/binary/TypeSerializer.java   |  16 +-
 .../io}/binary/TypeSerializerRegistry.java |  18 +-
 .../io}/binary/types/BigDecimalSerializer.java |  16 +-
 .../io}/binary/types/BigIntegerSerializer.java |  16 +-
 .../io}/binary/types/BindingSerializer.java|  17 +-
 .../io}/binary/types/BulkSetSerializer.java|  19 +-
 .../io}/binary/types/ByteBufferSerializer.java |  16 +-
 .../io}/binary/types/ByteCodeSerializer.java   |  24 +-
 .../structure/io}/binary/types/CharSerializer.java |  17 +-
 .../io}/binary/types/ClassSerializer.java  |  17 +-
 .../io}/binary/types/CollectionSerializer.java |  16 +-
 .../io}/binary/types/CustomTypeSerializer.java |   4 +-
 .../structure/io}/binary/types/DateSerializer.java |  14 +-
 .../io}/binary/types/DurationSerializer.java   |  16 +-
 .../structure/io}/binary/types/EdgeSerializer.java |  17 +-
 .../structure/io}/binary/types/EnumSerializer.java |  16 +-
 .../io}/binary/types/GraphSerializer.java  |  24 +-
 .../io}/binary/types/InetAddressSerializer.java|  18 +-
 .../io}/binary/types/InstantSerializer.java|  16 +-
 .../io}/binary/types/LambdaSerializer.java |  17 +-
 .../structure/io}/binary/types/ListSerializer.java |  16 +-
 .../io}/binary/types/LocalDateSerializer.java  |  16 +-
 .../io}/binary/types/LocalDateTimeSerializer.java  |  16 +-
 .../io}/binary/types/LocalTimeSerializer.java  |  16 +-
 .../io}/binary/types/MapEntrySerializer.java   |  18 +-
 .../structure/io}/binary/types/MapSerializer.java  |  16 +-
 .../io}/binary/types/MetricsSerializer.java|  16 +-
 .../io}/binary/types/MonthDaySerializer.java   |  16 +-
 .../io}/binary/types/OffsetDateTimeSerializer.java |  16 +-
 .../io}/binary/types/OffsetTimeSerializer.java |  16 +-
 .../structure/io}/binary/types/PSerializer.java|  24 +-
 .../structure/io}/binary/types/PathSerializer.java |  16 +-
 .../io}/binary/types/PeriodSerializer.java |  16 +-
 .../io}/binary/types/PropertySerializer.java   |  17 +-
 .../structure/io}/binary/types/SetSerializer.java  |  16 +-
 .../io}/binary/types/SimpleTypeSerializer.java |  33 +-
 .../io}/binary/types/SingleTypeSerializer.java |  36 +-
 .../io}/binary/types/StringSerializer.java |  14 +-
 .../io}/binary/types/TransformSerializer.java  |   4 +-
 .../types/TraversalExplanationSerializer.java  |  18 +-
 .../binary/types/TraversalMetricsSerializer.java   |  16 +-
 .../binary/types/TraversalStrategySerializer.java  |  16 +-
 .../io}/binary/types/TraverserSerializer.java  |  17 +-
 .../structure/io}/binary/types/TreeSerializer.java |  17 +-
 .../structure/io}/binary/types/UUIDSerializer.java |  14 +-
 .../io}/binary/types/VertexPropertySerializer.java |  17 +-
 .../io}/binary/types/VertexSerializer.java |  17 +-
 .../io}/binary/types/YearMonthSerializer.java  |  16 +-
 .../io}/binary/types/ZoneOffsetSerializer.java |  16 +-
 .../io}/binary/types/ZonedDateTimeSerializer.java  |  16 +-
 .../driver/ser/GraphBinaryMessageSerializerV1.java |  10 +-
 .../tinkerpop/gremlin/driver/ser/NettyBuffer.java  | 267 ++
 .../gremlin/driver/ser/NettyBufferFactory.java | 114 ++
 .../ser/binary/RequestMessageSerializer.java   |  58 +++-
 .../ser/binary/ResponseMessageSerializer.java  |  65 ++--
 .../gremlin/driver/ser/NettyBufferFactoryTest.java | 385 +
 .../binary/GraphBinaryMessageSeriali

[tinkerpop] branch tp34 updated (47e25aa -> 2b9f40e)

2019-11-07 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch tp34
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 47e25aa  Merge branch 'tp33' into tp34
 add 344b737  TINKERPOP-2305 Introduce Buffer interface
 add a76cf5d  TINKERPOP-2305 Refactor serialization method signatures
 add 6e10bde  TINKERPOP-2035 Move to gremlin-core
 add 5c2cb9f  TINKERPOP-2035 Add utility methods to read/write from Netty 
buffer
 add c2108bb  TINKERPOP-2035 Fix gremlin-io-test and declare params as final
 new 2b9f40e  Merge branch 'TINKERPOP-2305' into tp34

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc |   6 +
 docs/src/upgrade/release-3.4.x.asciidoc|  25 ++
 .../tinkerpop/gremlin/structure/io/Buffer.java | 250 +
 .../gremlin/structure/io/BufferFactory.java|  21 +-
 .../gremlin/structure/io}/binary/DataType.java |   5 +-
 .../structure/io}/binary/GraphBinaryIo.java|   5 +-
 .../structure/io}/binary/GraphBinaryReader.java|  15 +-
 .../structure/io}/binary/GraphBinaryWriter.java|  30 +-
 .../structure/io}/binary/TypeSerializer.java   |  16 +-
 .../io}/binary/TypeSerializerRegistry.java |  18 +-
 .../io}/binary/types/BigDecimalSerializer.java |  16 +-
 .../io}/binary/types/BigIntegerSerializer.java |  16 +-
 .../io}/binary/types/BindingSerializer.java|  17 +-
 .../io}/binary/types/BulkSetSerializer.java|  19 +-
 .../io}/binary/types/ByteBufferSerializer.java |  16 +-
 .../io}/binary/types/ByteCodeSerializer.java   |  24 +-
 .../structure/io}/binary/types/CharSerializer.java |  17 +-
 .../io}/binary/types/ClassSerializer.java  |  17 +-
 .../io}/binary/types/CollectionSerializer.java |  16 +-
 .../io}/binary/types/CustomTypeSerializer.java |   4 +-
 .../structure/io}/binary/types/DateSerializer.java |  14 +-
 .../io}/binary/types/DurationSerializer.java   |  16 +-
 .../structure/io}/binary/types/EdgeSerializer.java |  17 +-
 .../structure/io}/binary/types/EnumSerializer.java |  16 +-
 .../io}/binary/types/GraphSerializer.java  |  25 +-
 .../io}/binary/types/InetAddressSerializer.java|  18 +-
 .../io}/binary/types/InstantSerializer.java|  16 +-
 .../io}/binary/types/LambdaSerializer.java |  17 +-
 .../structure/io}/binary/types/ListSerializer.java |  16 +-
 .../io}/binary/types/LocalDateSerializer.java  |  16 +-
 .../io}/binary/types/LocalDateTimeSerializer.java  |  16 +-
 .../io}/binary/types/LocalTimeSerializer.java  |  16 +-
 .../io}/binary/types/MapEntrySerializer.java   |  18 +-
 .../structure/io}/binary/types/MapSerializer.java  |  16 +-
 .../io}/binary/types/MetricsSerializer.java|  16 +-
 .../io}/binary/types/MonthDaySerializer.java   |  16 +-
 .../io}/binary/types/OffsetDateTimeSerializer.java |  16 +-
 .../io}/binary/types/OffsetTimeSerializer.java |  16 +-
 .../structure/io}/binary/types/PSerializer.java|  24 +-
 .../structure/io}/binary/types/PathSerializer.java |  16 +-
 .../io}/binary/types/PeriodSerializer.java |  16 +-
 .../io}/binary/types/PropertySerializer.java   |  17 +-
 .../structure/io}/binary/types/SetSerializer.java  |  16 +-
 .../io}/binary/types/SimpleTypeSerializer.java |  33 +-
 .../io}/binary/types/SingleTypeSerializer.java |  36 +-
 .../io}/binary/types/StringSerializer.java |  14 +-
 .../io}/binary/types/TransformSerializer.java  |   4 +-
 .../types/TraversalExplanationSerializer.java  |  18 +-
 .../binary/types/TraversalMetricsSerializer.java   |  16 +-
 .../binary/types/TraversalStrategySerializer.java  |  16 +-
 .../io}/binary/types/TraverserSerializer.java  |  17 +-
 .../structure/io}/binary/types/TreeSerializer.java |  17 +-
 .../structure/io}/binary/types/UUIDSerializer.java |  14 +-
 .../io}/binary/types/VertexPropertySerializer.java |  17 +-
 .../io}/binary/types/VertexSerializer.java |  17 +-
 .../io}/binary/types/YearMonthSerializer.java  |  16 +-
 .../io}/binary/types/ZoneOffsetSerializer.java |  16 +-
 .../io}/binary/types/ZonedDateTimeSerializer.java  |  16 +-
 .../driver/ser/GraphBinaryMessageSerializerV1.java |  10 +-
 .../tinkerpop/gremlin/driver/ser/NettyBuffer.java  | 267 ++
 .../gremlin/driver/ser/NettyBufferFactory.java | 114 ++
 .../ser/binary/RequestMessageSerializer.java   |  58 +++-
 .../ser/binary/ResponseMessageSerializer.java  |  65 ++--
 .../gremlin/driver/ser/NettyBufferFactoryTest.java | 385 +
 .../binary/GraphBinaryMessageSerializerV1Test.java |   1 +
 .../GraphBinaryReaderWriterRoundTripTest.java  |   

[tinkerpop] branch TINKERPOP-2235 updated: TINKERPOP-2235 Fix C# gherkin test harness

2019-11-05 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2235
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2235 by this push:
 new 99e179e  TINKERPOP-2235 Fix C# gherkin test harness
99e179e is described below

commit 99e179eceacb712b4e06ccf0ab4c71c73406f839
Author: Jorge Bay Gondra 
AuthorDate: Tue Nov 5 12:26:58 2019 +0100

TINKERPOP-2235 Fix C# gherkin test harness

Fix C# gherkin test harness for method with params and generic type 
parameters.
Add null as token.
---
 .../Gherkin/CommonSteps.cs|  3 ++-
 .../Gherkin/TraversalEvaluation/LiteralParameter.cs   | 11 ---
 .../Gherkin/TraversalEvaluation/TraversalParser.cs| 19 +--
 3 files changed, 23 insertions(+), 10 deletions(-)

diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
index d4b2aab..504f7a9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
@@ -63,7 +63,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
 {@"s\[(.*)\]", ToSet},
 {@"m\[(.+)\]", ToMap},
 {@"c\[(.+)\]", ToLambda},
-{@"t\[(.+)\]", ToT}
+{@"t\[(.+)\]", ToT},
+{"null", (_, __) => null}
 }.ToDictionary(kv => new Regex("^" + kv.Key + "$", 
RegexOptions.Compiled), kv => kv.Value);
 
 private static readonly IDictionary> 
NumericParsers =
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/LiteralParameter.cs
 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/LiteralParameter.cs
index da0ac24..10a88a2 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/LiteralParameter.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/LiteralParameter.cs
@@ -29,10 +29,15 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 /// 
 /// Represents a literal (number / boolean) that is allowed as a gremlin 
parameter.
 /// 
-public class LiteralParameter : ITokenParameter, 
IEquatable> where T : struct
+public class LiteralParameter : ITokenParameter, 
IEquatable>
 {
 public bool Equals(LiteralParameter other)
 {
+if (Value == null)
+{
+return other.Value == null;
+}
+
 return Value.Equals(other.Value);
 }
 
@@ -46,7 +51,7 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 
 public override int GetHashCode()
 {
-return Value.GetHashCode();
+return Value?.GetHashCode() ?? 0;
 }
 
 public T Value { get; }
@@ -79,7 +84,7 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 
 internal static class LiteralParameter
 {
-public static LiteralParameter Create(TType value) where 
TType : struct
+public static LiteralParameter Create(TType value)
 {
 return new LiteralParameter(value);
 }
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
index 105932f..fb84fdd 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs
@@ -233,6 +233,7 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 var paramsInfo = method.GetParameters();
 var parameters = new object[paramsInfo.Length];
 genericParameterTypes = new Dictionary();
+
 for (var i = 0; i < paramsInfo.Length; i++)
 {
 var info = paramsInfo[i];
@@ -246,15 +247,18 @@ namespace 
Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 // We've provided a value for parameter of a generic 
type, we can infer the
 // type of the generic argument based on the parameter.
 // For example, in the case of `Constant(E2 value)`
-// if we have the type of value we have the type of 
E2. 
+// if we have the type of value we have the type of E2.
 genericParameterTypes.Add(info.ParameterType.Name, 
tokenParameter.GetParameterType());
 }
   

[tinkerpop] branch TINKERPOP-2305 updated: TINKERPOP-2035 Fix gremlin-io-test and declare params as final

2019-10-16 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2305
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2305 by this push:
 new c2108bb  TINKERPOP-2035 Fix gremlin-io-test and declare params as final
c2108bb is described below

commit c2108bb5ba0447dccac2e5421943c2c6fdb9216c
Author: Jorge Bay Gondra 
AuthorDate: Wed Oct 16 15:36:54 2019 +0200

TINKERPOP-2035 Fix gremlin-io-test and declare params as final
---
 .../tinkerpop/gremlin/structure/io/Buffer.java | 36 ++--
 .../gremlin/structure/io/BufferFactory.java|  4 +--
 .../tinkerpop/gremlin/driver/ser/NettyBuffer.java  | 38 +++---
 .../gremlin/driver/ser/NettyBufferFactory.java | 10 +++---
 .../scripts/generate-graphbinary-resources.groovy  |  5 ++-
 5 files changed, 48 insertions(+), 45 deletions(-)

diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
index e370ed7..c507889 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
@@ -43,7 +43,7 @@ public interface Buffer {
  * @throws IndexOutOfBoundsException
  * if its out of bounds.
  */
-Buffer readerIndex(int readerIndex);
+Buffer readerIndex(final int readerIndex);
 
 /**
  * Returns the writer index of this buffer.
@@ -53,7 +53,7 @@ public interface Buffer {
 /**
  * Sets the writer index of this buffer.
  */
-Buffer writerIndex(int writerIndex);
+Buffer writerIndex(final int writerIndex);
 
 /**
  * Marks the current writer index in this buffer.
@@ -125,14 +125,14 @@ public interface Buffer {
  * @param dstIndex the first index of the destination
  * @param length   the number of bytes to transfer
  */
-Buffer readBytes(byte[] destination, int dstIndex, int length);
+Buffer readBytes(final byte[] destination, final int dstIndex, final int 
length);
 
 /**
  * Transfers this buffer's data to the specified destination starting at
  * the current reader index until the destination's position
  * reaches its limit, and advances the reader index.
  */
-Buffer readBytes(ByteBuffer dst);
+Buffer readBytes(final ByteBuffer dst);
 
 /**
  * Transfers this buffer's data to the specified stream starting at the
@@ -143,60 +143,60 @@ public interface Buffer {
  * @throws IOException
  * if the specified stream threw an exception during I/O
  */
-Buffer readBytes(OutputStream out, int length) throws IOException;
+Buffer readBytes(final OutputStream out, final int length) throws 
IOException;
 
 /**
  * Sets the specified boolean at the current writer index and advances the 
index.
  */
-Buffer writeBoolean(boolean value);
+Buffer writeBoolean(final boolean value);
 
 /**
  * Sets the specified byte at the current writer index and advances the 
index.
  */
-Buffer writeByte(int value);
+Buffer writeByte(final int value);
 
 /**
  * Sets the specified 16-bit short integer at the current writer index and 
advances the index.
  */
-Buffer writeShort(int value);
+Buffer writeShort(final int value);
 
 /**
  * Sets the specified 32-bit integer at the current writer index and 
advances the index.
  */
-Buffer writeInt(int value);
+Buffer writeInt(final int value);
 
 /**
  * Sets the specified 64-bit long integer at the current writer index and 
advances the index.
  */
-Buffer writeLong(long value);
+Buffer writeLong(final long value);
 
 /**
  * Sets the specified 32-bit floating point number at the current writer 
index and advances the index.
  */
-Buffer writeFloat(float value);
+Buffer writeFloat(final float value);
 
 /**
  * Sets the specified 64-bit floating point number at the current writer 
index and advances the index.
  */
-Buffer writeDouble(double value);
+Buffer writeDouble(final double value);
 
 /**
  * Transfers the specified source array's data to this buffer starting at 
the current writer index
  * and advances the index.
  */
-Buffer writeBytes(byte[] src);
+Buffer writeBytes(final byte[] src);
 
 /**
  * Transfers the specified source byte data to this buffer starting at the 
current writer index
  * and advances the index.
  */
-Buffer writeBytes(ByteBuffer src);
+Buffer writeBytes(final ByteBuffer src);
 
 /**
  * Transfers the specified source array's data to this buffer starting at 
the current writer index
  * and advances the index.
  */
-Buffer writeBytes(byte[] src, int srcIndex, int length

[tinkerpop] branch TINKERPOP-2305 updated: TINKERPOP-2035 Add utility methods to read/write from Netty buffer

2019-10-14 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2305
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2305 by this push:
 new 5c2cb9f  TINKERPOP-2035 Add utility methods to read/write from Netty 
buffer
5c2cb9f is described below

commit 5c2cb9fb8c6fdba228da7b0c27e3063e6ba06862
Author: Jorge Bay Gondra 
AuthorDate: Mon Oct 14 12:36:55 2019 +0200

TINKERPOP-2035 Add utility methods to read/write from Netty buffer
---
 .../tinkerpop/gremlin/structure/io/Buffer.java |  17 +-
 .../tinkerpop/gremlin/driver/ser/NettyBuffer.java  |  22 ++
 .../gremlin/driver/ser/NettyBufferFactory.java |  73 
 .../gremlin/driver/ser/NettyBufferFactoryTest.java | 385 +
 4 files changed, 496 insertions(+), 1 deletion(-)

diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
index 4d37bba..e370ed7 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
@@ -215,11 +215,21 @@ public interface Buffer {
 int referenceCount();
 
 /**
- * Exposes this buffer's readable bytes as an NIO ByteBuffer's.
+ * Returns the maximum number of NIO {@link ByteBuffer}s that consist this 
buffer.
+ */
+int nioBufferCount();
+
+/**
+ * Exposes this buffer's readable bytes as NIO ByteBuffer's instances.
  */
 ByteBuffer[] nioBuffers();
 
 /**
+ * Exposes this buffer's readable bytes as NIO ByteBuffer's instances.
+ */
+ByteBuffer[] nioBuffers(int index, int length);
+
+/**
  * Exposes this buffer's readable bytes as a NIO {@link ByteBuffer}. The 
returned buffer
  * either share or contains the copied content of this buffer, while 
changing the position
  * and limit of the returned NIO buffer does not affect the indexes and 
marks of this buffer.
@@ -227,6 +237,11 @@ public interface Buffer {
 ByteBuffer nioBuffer();
 
 /**
+ * Exposes this buffer's sub-region as an NIO {@link ByteBuffer}.
+ */
+ByteBuffer nioBuffer(int index, int length);
+
+/**
  * Transfers this buffer's data to the specified destination starting at
  * the specified absolute {@code index}.
  * This method does not modify reader or writer indexes.
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java
index f9de6c6..e194f1f 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java
@@ -238,8 +238,30 @@ final class NettyBuffer implements Buffer {
 }
 
 @Override
+public ByteBuffer nioBuffer(int index, int length) {
+return this.buffer.nioBuffer(index, length);
+}
+
+@Override
+public ByteBuffer[] nioBuffers(int index, int length) {
+return this.buffer.nioBuffers(index, length);
+}
+
+@Override
+public int nioBufferCount() {
+return this.buffer.nioBufferCount();
+}
+
+@Override
 public Buffer getBytes(int index, byte[] dst) {
 this.buffer.getBytes(index, dst);
 return this;
 }
+
+/**
+ * Returns the underlying buffer.
+ */
+public ByteBuf getUnderlyingBuffer() {
+return this.buffer;
+}
 }
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java
index b1bfe1f..2be524c 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.structure.io.Buffer;
 import org.apache.tinkerpop.gremlin.structure.io.BufferFactory;
 
 import java.nio.ByteBuffer;
+import java.util.function.Consumer;
 
 /**
  * Represents a factory to create {@link Buffer} instances from wrapped {@link 
ByteBuf} instances.
@@ -38,4 +39,76 @@ public class NettyBufferFactory implements 
BufferFactory {
 public Buffer wrap(ByteBuffer value) {
 return create(Unpooled.wrappedBuffer(value));
 }
+
+private static ByteBuf getFromIndex(Buffer buffer, int index) {
+if (buffer.nioBufferCount() == 1) {
+// Heap and direct buffers usually take a single buffer
+// It will create a new ByteBuf using the same backing byte array
+return Unpooled.wrappedBuffer(buffer.nioBuffer(index, 
buffer.capacity() - index

[tinkerpop] branch TINKERPOP-2305 created (now 6e10bde)

2019-10-11 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2305
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at 6e10bde  TINKERPOP-2035 Move to gremlin-core

This branch includes the following new commits:

 new 344b737  TINKERPOP-2305 Introduce Buffer interface
 new a76cf5d  TINKERPOP-2305 Refactor serialization method signatures
 new 6e10bde  TINKERPOP-2035 Move to gremlin-core

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 02/03: TINKERPOP-2305 Refactor serialization method signatures

2019-10-11 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2305
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit a76cf5de34737a45c7c71749cfbbf6f3c589e5ac
Author: Jorge Bay Gondra 
AuthorDate: Thu Oct 10 10:13:22 2019 +0200

TINKERPOP-2305 Refactor serialization method signatures
---
 .../tinkerpop/gremlin/structure/io/Buffer.java | 67 +-
 .../gremlin/structure/io/BufferFactory.java| 39 +
 .../tinkerpop/gremlin/driver/NettyBuffer.java  | 65 +
 ...UUIDSerializer.java => NettyBufferFactory.java} | 29 +-
 .../driver/ser/binary/GraphBinaryReader.java   | 10 ++--
 .../driver/ser/binary/GraphBinaryWriter.java   | 19 +++---
 .../ser/binary/RequestMessageSerializer.java   | 13 -
 .../ser/binary/ResponseMessageSerializer.java  | 12 +++-
 .../gremlin/driver/ser/binary/TypeSerializer.java  | 11 ++--
 .../ser/binary/types/BigDecimalSerializer.java |  6 +-
 .../ser/binary/types/BigIntegerSerializer.java |  6 +-
 .../driver/ser/binary/types/BindingSerializer.java |  6 +-
 .../driver/ser/binary/types/BulkSetSerializer.java |  7 +--
 .../ser/binary/types/ByteBufferSerializer.java |  6 +-
 .../ser/binary/types/ByteCodeSerializer.java   | 12 ++--
 .../driver/ser/binary/types/CharSerializer.java|  7 +--
 .../driver/ser/binary/types/ClassSerializer.java   |  6 +-
 .../ser/binary/types/CollectionSerializer.java |  6 +-
 .../driver/ser/binary/types/DateSerializer.java|  6 +-
 .../ser/binary/types/DurationSerializer.java   |  6 +-
 .../driver/ser/binary/types/EdgeSerializer.java|  6 +-
 .../driver/ser/binary/types/EnumSerializer.java|  6 +-
 .../driver/ser/binary/types/GraphSerializer.java   | 11 ++--
 .../ser/binary/types/InetAddressSerializer.java|  6 +-
 .../driver/ser/binary/types/InstantSerializer.java |  6 +-
 .../driver/ser/binary/types/LambdaSerializer.java  |  6 +-
 .../driver/ser/binary/types/ListSerializer.java|  6 +-
 .../ser/binary/types/LocalDateSerializer.java  |  6 +-
 .../ser/binary/types/LocalDateTimeSerializer.java  |  6 +-
 .../ser/binary/types/LocalTimeSerializer.java  |  6 +-
 .../ser/binary/types/MapEntrySerializer.java   |  6 +-
 .../driver/ser/binary/types/MapSerializer.java |  6 +-
 .../driver/ser/binary/types/MetricsSerializer.java |  6 +-
 .../ser/binary/types/MonthDaySerializer.java   |  6 +-
 .../ser/binary/types/OffsetDateTimeSerializer.java |  6 +-
 .../ser/binary/types/OffsetTimeSerializer.java |  6 +-
 .../driver/ser/binary/types/PSerializer.java   |  6 +-
 .../driver/ser/binary/types/PathSerializer.java|  6 +-
 .../driver/ser/binary/types/PeriodSerializer.java  |  6 +-
 .../ser/binary/types/PropertySerializer.java   |  6 +-
 .../driver/ser/binary/types/SetSerializer.java |  6 +-
 .../ser/binary/types/SimpleTypeSerializer.java | 14 ++---
 .../ser/binary/types/SingleTypeSerializer.java | 28 -
 .../driver/ser/binary/types/StringSerializer.java  |  6 +-
 .../types/TraversalExplanationSerializer.java  |  6 +-
 .../binary/types/TraversalMetricsSerializer.java   |  6 +-
 .../binary/types/TraversalStrategySerializer.java  |  6 +-
 .../ser/binary/types/TraverserSerializer.java  |  6 +-
 .../driver/ser/binary/types/TreeSerializer.java|  6 +-
 .../driver/ser/binary/types/UUIDSerializer.java|  6 +-
 .../ser/binary/types/VertexPropertySerializer.java |  6 +-
 .../driver/ser/binary/types/VertexSerializer.java  |  6 +-
 .../ser/binary/types/YearMonthSerializer.java  |  6 +-
 .../ser/binary/types/ZoneOffsetSerializer.java |  6 +-
 .../ser/binary/types/ZonedDateTimeSerializer.java  |  6 +-
 .../GraphBinaryReaderWriterRoundTripTest.java  |  6 +-
 .../ser/binary/TypeSerializerFailureTests.java |  6 +-
 .../ser/binary/TypeSerializerRegistryTest.java | 10 ++--
 .../ser/binary/types/CharSerializerTest.java   |  8 ++-
 .../types/sample/SamplePersonSerializer.java   | 10 ++--
 .../types/sample/SamplePersonSerializerTest.java   |  5 +-
 .../driver/GraphBinaryReaderWriterBenchmark.java   | 12 ++--
 .../graphbinary/GraphBinaryCompatibilityTest.java  |  9 +--
 63 files changed, 419 insertions(+), 231 deletions(-)

diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
index 3219a90..4d37bba 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Vers

[tinkerpop] 01/03: TINKERPOP-2305 Introduce Buffer interface

2019-10-11 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2305
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 344b737881f42eaf0e8f6c8e7fd2df526b0b3329
Author: Jorge Bay Gondra 
AuthorDate: Mon Oct 7 10:40:53 2019 +0200

TINKERPOP-2305 Introduce Buffer interface
---
 .../tinkerpop/gremlin/structure/io/Buffer.java | 174 
 .../tinkerpop/gremlin/driver/NettyBuffer.java  | 180 +
 2 files changed, 354 insertions(+)

diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
new file mode 100644
index 000..3219a90
--- /dev/null
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Buffer.java
@@ -0,0 +1,174 @@
+package org.apache.tinkerpop.gremlin.structure.io;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+
+/**
+ * Represents an abstract view for one or more primitive byte arrays and NIO 
buffers.
+ */
+public interface Buffer {
+
+/**
+ * Returns the reader index of this buffer.
+ */
+int readerIndex();
+
+/**
+ * Sets the reader index of this buffer.
+ *
+ * @throws IndexOutOfBoundsException
+ * if its out of bounds.
+ */
+Buffer readerIndex(int readerIndex);
+
+/**
+ * Returns the writer index of this buffer.
+ */
+int writerIndex();
+
+/**
+ * Sets the writer index of this buffer.
+ *
+ * @throws IndexOutOfBoundsException
+ * if its out of bounds.
+ */
+Buffer writerIndex(int writerIndex);
+
+/**
+ * Returns the number of bytes (octets) this buffer can contain.
+ */
+int capacity();
+
+/**
+ * Gets a boolean and advances the reader index.
+ */
+boolean readBoolean();
+
+/**
+ * Gets a byte and advances the reader index.
+ */
+byte readByte();
+
+/**
+ * Gets a 16-bit short integer and advances the reader index.
+ */
+short readShort();
+
+/**
+ * Gets a 32-bit integer at the current index and advances the reader 
index.
+ */
+int readInt();
+
+/**
+ * Gets a 64-bit integer  and advances the reader index.
+ */
+long readLong();
+
+/**
+ * Gets a 32-bit floating point number and advances the reader index.
+ */
+float readFloat();
+
+/**
+ * Gets a 64-bit floating point number and advances the reader index.
+ */
+double readDouble();
+
+/**
+ * Transfers this buffer's data to the specified destination starting at
+ * the current reader index and advances the reader index.
+ */
+Buffer readBytes(byte[] destination);
+
+/**
+ * Transfers this buffer's data to the specified destination starting at
+ * the current reader index and advances the reader index.
+ *
+ * @param destination The destination buffer
+ * @param dstIndex the first index of the destination
+ * @param length   the number of bytes to transfer
+ */
+Buffer readBytes(byte[] destination, int dstIndex, int length);
+
+/**
+ * Transfers this buffer's data to the specified destination starting at
+ * the current reader index until the destination's position
+ * reaches its limit, and advances the reader index.
+ */
+Buffer readBytes(ByteBuffer dst);
+
+/**
+ * Transfers this buffer's data to the specified stream starting at the
+ * current reader index and advances the index.
+ *
+ * @param length the number of bytes to transfer
+ *
+ * @throws IOException
+ * if the specified stream threw an exception during I/O
+ */
+Buffer readBytes(OutputStream out, int length) throws IOException;
+
+/**
+ * Sets the specified boolean at the current writer index and advances the 
index.
+ */
+Buffer writeBoolean(boolean value);
+
+/**
+ * Sets the specified byte at the current writer index and advances the 
index.
+ */
+Buffer writeByte(int value);
+
+/**
+ * Sets the specified 16-bit short integer at the current writer index and 
advances the index.
+ */
+Buffer writeShort(int value);
+
+/**
+ * Sets the specified 32-bit integer at the current writer index and 
advances the index.
+ */
+Buffer writeInt(int value);
+
+/**
+ * Sets the specified 64-bit long integer at the current writer index and 
advances the index.
+ */
+Buffer writeLong(long value);
+
+/**
+ * Sets the specified 32-bit floating point number at the current writer 
index and advances the index.
+ */
+Buffer writeFloat(float value);
+
+/**
+ * Sets the specified 64-bit floating point number at the current writer 
index and advances the index.
+ */
+Buffer writeDouble(double value);
+
+/**
+ * Transfers

[tinkerpop] 01/01: Merge branch 'tp34'

2019-10-09 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit f835b416f83c1a56238ed0d511093938de24c26f
Merge: 25a34d1 ae9d257
Author: Jorge Bay Gondra 
AuthorDate: Wed Oct 9 12:59:04 2019 +0200

Merge branch 'tp34'

 CHANGELOG.asciidoc  |  1 +
 .../gremlin-javascript/lib/driver/client.js | 21 +++--
 .../gremlin-javascript/lib/driver/connection.js |  2 +-
 .../lib/driver/driver-remote-connection.js  | 10 ++
 4 files changed, 31 insertions(+), 3 deletions(-)




[tinkerpop] branch master updated (25a34d1 -> f835b41)

2019-10-09 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 25a34d1  Merge branch 'tp34'
 add ddf7b98  TINKERPOP-2290 Add a way to catch a connection error
 add 78819c3  TINKERPOP-2290, Stop the connection from emiting an  event
 add 7ebff7d  Merge pull request #1202 from gion/TINKERPOP-2290
 add 970441a  Update changelog CTR
 add ae9d257  Merge branch 'tp33' into tp34
 new f835b41  Merge branch 'tp34'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc  |  1 +
 .../gremlin-javascript/lib/driver/client.js | 21 +++--
 .../gremlin-javascript/lib/driver/connection.js |  2 +-
 .../lib/driver/driver-remote-connection.js  | 10 ++
 4 files changed, 31 insertions(+), 3 deletions(-)



[tinkerpop] 02/02: Update changelog CTR

2019-10-09 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch tp33
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 970441ad02af7cdb999524a29d496b86a52867df
Author: Jorge Bay Gondra 
AuthorDate: Wed Oct 9 12:55:33 2019 +0200

Update changelog CTR
---
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 2a90f05..943813d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -46,6 +46,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Made `EventStrategy` compatible with multi-valued properties.
 * Changed `TraversalOpProcessor` to throw a `SERVER_ERROR_SCRIPT_EVALUATION` 
(597) if lambdas don't compile.
 * Bumped `commons-compress` to 1.19 due to CVE-2018-11771.
+* gremlin-javascript: Use `socketError` Connection event to prevent exit on 
error and expose Connection events.
 
 [[release-3-3-8]]
 === TinkerPop 3.3.8 (Release Date: August 5, 2019)



[tinkerpop] branch tp34 updated (0f512fc -> ae9d257)

2019-10-09 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch tp34
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 0f512fc  Merge branch 'tp33' into tp34
 add ddf7b98  TINKERPOP-2290 Add a way to catch a connection error
 add 78819c3  TINKERPOP-2290, Stop the connection from emiting an  event
 add 7ebff7d  Merge pull request #1202 from gion/TINKERPOP-2290
 add 970441a  Update changelog CTR
 new ae9d257  Merge branch 'tp33' into tp34

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc  |  1 +
 .../gremlin-javascript/lib/driver/client.js | 21 +++--
 .../gremlin-javascript/lib/driver/connection.js |  2 +-
 .../lib/driver/driver-remote-connection.js  | 10 ++
 4 files changed, 31 insertions(+), 3 deletions(-)



[tinkerpop] 01/01: Merge branch 'tp33' into tp34

2019-10-09 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch tp34
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit ae9d257fb870f07d3906b25c909333b205710fb7
Merge: 0f512fc 970441a
Author: Jorge Bay Gondra 
AuthorDate: Wed Oct 9 12:56:53 2019 +0200

Merge branch 'tp33' into tp34

 CHANGELOG.asciidoc  |  1 +
 .../gremlin-javascript/lib/driver/client.js | 21 +++--
 .../gremlin-javascript/lib/driver/connection.js |  2 +-
 .../lib/driver/driver-remote-connection.js  | 10 ++
 4 files changed, 31 insertions(+), 3 deletions(-)




[tinkerpop] branch tp33 updated (b0f0b40 -> 970441a)

2019-10-09 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch tp33
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from b0f0b40  Updated changelog CTR
 add ddf7b98  TINKERPOP-2290 Add a way to catch a connection error
 add 78819c3  TINKERPOP-2290, Stop the connection from emiting an  event
 new 7ebff7d  Merge pull request #1202 from gion/TINKERPOP-2290
 new 970441a  Update changelog CTR

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc  |  1 +
 .../gremlin-javascript/lib/driver/client.js | 21 +++--
 .../gremlin-javascript/lib/driver/connection.js |  2 +-
 .../lib/driver/driver-remote-connection.js  | 10 ++
 4 files changed, 31 insertions(+), 3 deletions(-)



[tinkerpop] branch TINKERPOP-2089 updated: TINKERPOP-2089 Minor fixes

2019-05-13 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2089
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2089 by this push:
 new 22e3560  TINKERPOP-2089 Minor fixes
22e3560 is described below

commit 22e35606688f41278390cf6683db2740474b4250
Author: Jorge Bay Gondra 
AuthorDate: Mon May 13 14:30:16 2019 +0200

TINKERPOP-2089 Minor fixes
---
 gremlin-javascript/glv/GraphTraversalSource.template| 11 ++-
 .../gremlin-javascript/lib/process/anonymous-traversal.js   |  5 +
 .../gremlin-javascript/lib/process/graph-traversal.js   | 11 ++-
 .../javascript/gremlin-javascript/lib/structure/graph.js|  7 ---
 .../gremlin-javascript/test/integration/traversal-test.js   | 13 ++---
 5 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/gremlin-javascript/glv/GraphTraversalSource.template 
b/gremlin-javascript/glv/GraphTraversalSource.template
index d96279a..9f94828 100644
--- a/gremlin-javascript/glv/GraphTraversalSource.template
+++ b/gremlin-javascript/glv/GraphTraversalSource.template
@@ -22,23 +22,25 @@
  */
 'use strict';
 
-const Traversal = require('./traversal').Traversal;
+const { Traversal } = require('./traversal');
 const remote = require('../driver/remote-connection');
 const utils = require('../utils');
 const Bytecode = require('./bytecode');
-const TraversalStrategies = 
require('./traversal-strategy').TraversalStrategies;
+const { TraversalStrategies } = require('./traversal-strategy');
 
 
 /**
  * Represents the primary DSL of the Gremlin traversal machine.
  */
 class GraphTraversalSource {
+
   /**
+   * Creates a new instance of {@link GraphTraversalSource}.
* @param {Graph} graph
* @param {TraversalStrategies} traversalStrategies
* @param {Bytecode} [bytecode]
-   * @param {Class} graphTraversalSourceClass
-   * @param {Class} graphTraversalClass
+   * @param {Function} [graphTraversalSourceClass] Optional {@link 
GraphTraversalSource} constructor.
+   * @param {Function} [graphTraversalClass] Optional {@link GraphTraversal} 
constructor.
*/
   constructor(graph, traversalStrategies, bytecode, graphTraversalSourceClass, 
graphTraversalClass) {
 this.graph = graph;
@@ -55,7 +57,6 @@ class GraphTraversalSource {
   withRemote(remoteConnection) {
 const traversalStrategy = new 
TraversalStrategies(this.traversalStrategies);
 traversalStrategy.addStrategy(new remote.RemoteStrategy(remoteConnection));
-var object = Object.create(this.constructor.prototype);
 return new this.graphTraversalSourceClass(this.graph, traversalStrategy, 
new Bytecode(this.bytecode), this.graphTraversalSourceClass, 
this.graphTraversalClass);
   }
 
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/anonymous-traversal.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/anonymous-traversal.js
index 3fbe7eb..ff30a4b 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/anonymous-traversal.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/anonymous-traversal.js
@@ -31,6 +31,10 @@ const Graph = require('../structure/graph').Graph;
  */
 class AnonymousTraversalSource {
 
+  /**
+   * Creates a new instance of {@link AnonymousTraversalSource}.
+   * @param {Function} [traversalSourceClass] Optional {@code 
GraphTraversalSource} constructor.
+   */
   constructor(traversalSourceClass) {
 this.traversalSourceClass = traversalSourceClass;
   }
@@ -38,6 +42,7 @@ class AnonymousTraversalSource {
   /**
* Constructs an {@code AnonymousTraversalSource} which will then be 
configured to spawn a
* {@link GraphTraversalSource}.
+   * @param {Function} [traversalSourceClass] Optional {@code 
GraphTraversalSource} constructor.
* @returns {AnonymousTraversalSource}.
*/
   static traversal(traversalSourceClass) {
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
index 89285e3..34e06db 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
@@ -22,23 +22,25 @@
  */
 'use strict';
 
-const Traversal = require('./traversal').Traversal;
+const { Traversal } = require('./traversal');
 const remote = require('../driver/remote-connection');
 const utils = require('../utils');
 const Bytecode = require('./bytecode');
-const TraversalStrategies = 
require('./traversal-strategy').TraversalStrategies;
+const { TraversalStrategies } = require('./traversal-strategy');
 
 
 /**
  * Represents the primary DSL of the Gremlin traversal machine.
  */
 class GraphTraversalSource {
+
   /**
+   * Creates

[tinkerpop] branch master updated: Correct sample custom serializer for GraphBinary CTR

2019-05-08 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
 new 25e185f  Correct sample custom serializer for GraphBinary CTR
25e185f is described below

commit 25e185f95426bd812b727b57620eb894a7eee1ef
Author: Jorge Bay Gondra 
AuthorDate: Wed May 8 13:35:39 2019 +0200

Correct sample custom serializer for GraphBinary CTR
---
 .../types/sample/SamplePersonSerializer.java   | 64 ++
 .../types/sample/SamplePersonSerializerTest.java   | 22 
 2 files changed, 62 insertions(+), 24 deletions(-)

diff --git 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java
 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java
index 7efe0ea..03b54c3 100644
--- 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java
+++ 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java
@@ -25,6 +25,7 @@ import 
org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryReader;
 import org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryWriter;
 import 
org.apache.tinkerpop.gremlin.driver.ser.binary.types.CustomTypeSerializer;
 
+import java.nio.charset.StandardCharsets;
 import java.util.Date;
 
 /**
@@ -51,13 +52,29 @@ public final class SamplePersonSerializer implements 
CustomTypeSerializer buffer.readableBytes()) {
+throw new SerializationException(
+String.format("Not enough readable bytes: %d (expected %d)", 
valueLength, buffer.readableBytes()));
+}
 
 final String name = context.readValue(buffer, String.class, false);
 final Date birthDate = context.readValue(buffer, Date.class, false);
@@ -66,35 +83,34 @@ public final class SamplePersonSerializer implements 
CustomTypeSerializer

[tinkerpop] branch master updated: Include javadoc for GraphBinaryReader and GraphBinaryWriter CTR

2019-05-08 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
 new 6538c9e  Include javadoc for GraphBinaryReader and GraphBinaryWriter 
CTR
6538c9e is described below

commit 6538c9e15e183decf55e30b73cfff13ded0d2dfc
Author: Jorge Bay Gondra 
AuthorDate: Wed May 8 11:45:41 2019 +0200

Include javadoc for GraphBinaryReader and GraphBinaryWriter CTR
---
 .../driver/ser/binary/GraphBinaryReader.java   | 30 ++
 .../driver/ser/binary/GraphBinaryWriter.java   | 17 
 2 files changed, 47 insertions(+)

diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReader.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReader.java
index ee012fe..e88c752 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReader.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReader.java
@@ -21,6 +21,30 @@ package org.apache.tinkerpop.gremlin.driver.ser.binary;
 import io.netty.buffer.ByteBuf;
 import org.apache.tinkerpop.gremlin.driver.ser.SerializationException;
 
+/**
+ * Reads a value from a buffer using the {@link TypeSerializer} instances 
configured in the
+ * {@link TypeSerializerRegistry}.
+ *
+ * 
+ * This class exposes two different methods to read a value from a buffer: 
{@link GraphBinaryReader#read(ByteBuf)}
+ * and {@link GraphBinaryReader#readValue(ByteBuf, Class, boolean)}:
+ * 
+ * {@code read()} method expects a value in fully-qualified 
format, composed of
+ * {type_code}{type_info}{value_flag}{value}.
+ * {@code readValue()} method expects a 
{value_flag}{value} when a value is nullable and
+ * only {value} when a value is not nullable.
+ * 
+ * 
+ * 
+ *
+ * 
+ * The {@link GraphBinaryReader} should be used to read a nested known 
type from a {@link TypeSerializer}.
+ * For example, if a POINT type is composed by two doubles representing 
the position in the x and y axes, a
+ * {@link TypeSerializer} for POINT type should use the provided {@link 
GraphBinaryReader} instance to read those
+ * two double values. As x and y values are expected to be provided as 
non-nullable doubles, the method
+ * {@code readValue()} should be used: {@code readValue(buffer, 
Double.class, false)}
+ * 
+ */
 public class GraphBinaryReader {
 private final TypeSerializerRegistry registry;
 
@@ -34,6 +58,12 @@ public class GraphBinaryReader {
 
 /**
  * Reads a value for an specific type.
+ *
+ * When the value is nullable, the reader expects the 
{value_flag}{value} to be contained in the
+ * buffer.
+ *
+ * When the value is not nullable, the reader expects only the 
{value} to be contained in the
+ * buffer.
  */
 public  T readValue(final ByteBuf buffer, final Class type, final 
boolean nullable) throws SerializationException {
 if (buffer == null) {
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
index 68ccc7a..ac22e05 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
@@ -24,6 +24,23 @@ import 
org.apache.tinkerpop.gremlin.driver.ser.SerializationException;
 import 
org.apache.tinkerpop.gremlin.driver.ser.binary.types.CustomTypeSerializer;
 import 
org.apache.tinkerpop.gremlin.driver.ser.binary.types.TransformSerializer;
 
+/**
+ * Writes a value to a buffer using the {@link TypeSerializer} instances 
configured in the
+ * {@link TypeSerializerRegistry}.
+ *
+ * 
+ * This class exposes two different methods to write a value to a buffer:
+ * {@link GraphBinaryWriter#write(Object, ByteBuf)} and
+ * {@link GraphBinaryWriter#writeValue(Object, ByteBuf, boolean)}:
+ * 
+ * {@code write()} method writes the binary representation of the
+ * {type_code}{type_info}{value_flag}{value} 
components.
+ * {@code writeValue()} method writes the 
{value_flag}{value} when a value is nullable and
+ * only {value} when a value is not nullable.
+ * 
+ * 
+ * 
+ */
 public class GraphBinaryWriter {
 private final TypeSerializerRegistry registry;
 private final static byte VALUE_FLAG_NULL = 1;



[tinkerpop] branch TINKERPOP-2206 updated: TINKERPOP-2206 Minor fixes

2019-05-07 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2206
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2206 by this push:
 new c75a1d9  TINKERPOP-2206 Minor fixes
c75a1d9 is described below

commit c75a1d9f6565efb2948066d4d502e35e6cc7f1c6
Author: Jorge Bay Gondra 
AuthorDate: Tue May 7 10:27:36 2019 +0200

TINKERPOP-2206 Minor fixes
---
 gremlin-javascript/glv/TraversalSource.template|  2 +-
 .../gremlin-javascript/lib/process/traversal.js|  2 +-
 .../lib/structure/io/graph-serializer.js   | 18 +++---
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/gremlin-javascript/glv/TraversalSource.template 
b/gremlin-javascript/glv/TraversalSource.template
index 63facdf..afacce8 100644
--- a/gremlin-javascript/glv/TraversalSource.template
+++ b/gremlin-javascript/glv/TraversalSource.template
@@ -159,7 +159,7 @@ class P {
   }
 
   static without(...args) {
-if (args.length == 1 && Array.isArray(args[0])) {
+if (args.length === 1 && Array.isArray(args[0])) {
   return new P("without", args[0], null);
 } else {
   return new P("without", args, null);
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
index 28a0a2b..bb763a2 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
@@ -159,7 +159,7 @@ class P {
   }
 
   static without(...args) {
-if (args.length == 1 && Array.isArray(args[0])) {
+if (args.length === 1 && Array.isArray(args[0])) {
   return new P("without", args[0], null);
 } else {
   return new P("without", args, null);
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
index 4ee036a..94386df 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
@@ -50,29 +50,33 @@ class GraphSONWriter {
   }
   s.writer = this;
   // Insert custom serializers first
-  th
-  is._serializers.unshift(s);
+  this._serializers.unshift(s);
 });
   }
 
   adaptObject(value) {
 let s;
-let o = value;
+
 for (let i = 0; i < this._serializers.length; i++) {
   const currentSerializer = this._serializers[i];
-  if (currentSerializer.canBeUsedFor && currentSerializer.canBeUsedFor(o)) 
{
+  if (currentSerializer.canBeUsedFor && 
currentSerializer.canBeUsedFor(value)) {
 s = currentSerializer;
 break;
   }
 }
+
 if (s) {
-  return s.serialize(o);
+  return s.serialize(value);
 }
+
 if (Array.isArray(value)) {
-  o = value.map(item => this.adaptObject(item));
+  // We need to handle arrays when there is no serializer
+  // for older versions of GraphSON
+  return value.map(item => this.adaptObject(item));
 }
+
 // Default (strings / objects / ...)
-return o;
+return value;
   }
 
   /**



[tinkerpop] branch master updated (3c87b3a -> 2e84dfb)

2019-03-01 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 3c87b3a  Merge branch 'tp33'
 new 543a0e2  TINKERPOP-2166 Cache expression to obtain the method in 
PSerializer
 new e02b8fc  TINKERPOP-2166 Changelog
 new 2e84dfb  Merge pull request #1073 from apache/TINKERPOP-2166

The 14997 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc |   2 +-
 .../driver/ser/binary/types/PSerializer.java   | 133 +++--
 .../driver/GraphBinaryReaderWriterBenchmark.java   |   9 ++
 3 files changed, 109 insertions(+), 35 deletions(-)



[tinkerpop] branch TINKERPOP-2166 deleted (was e02b8fc)

2019-03-01 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2166
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


 was e02b8fc  TINKERPOP-2166 Changelog

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[tinkerpop] branch TINKERPOP-2166 updated: TINKERPOP-2166 Changelog

2019-03-01 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2166
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2166 by this push:
 new e02b8fc  TINKERPOP-2166 Changelog
e02b8fc is described below

commit e02b8fc2cac596373645666f1b59881791352698
Author: Jorge Bay Gondra 
AuthorDate: Fri Mar 1 10:09:06 2019 +0100

TINKERPOP-2166 Changelog
---
 CHANGELOG.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ea8205f..d22cfbf 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -37,7 +37,7 @@ This release also includes changes from <>.
 * Release working buffers in case of failure for GraphBinary.
 * GraphBinary: Use the same `ByteBuf` instance to write during serialization. 
Changed signature of write methods in type serializers.
 * Remove unused parameter in GraphBinary's `ResponseMessageSerializer`.
-
+* GraphBinary: Cache expression to obtain the method in `PSerializer`.
 
 [[release-3-4-0]]
 === TinkerPop 3.4.0 (Release Date: January 2, 2019)



[tinkerpop] branch TINKERPOP-2161 deleted (was 0a14205)

2019-02-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2161
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


 was 0a14205  TINKERPOP-2161 Add link to ticket in upgrade docs

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[tinkerpop] branch master updated (e812808 -> 90528cd)

2019-02-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from e812808  Minor word additions CTR
 add 2402939  TINKERPOP-2161 GraphBinary: use a single buffer instead of 
allocators
 add 70637df  Remove unused param from ResponseMessageSerializer and 
CHANGELOG entry
 add 859e30f  Remove P serialization from benchmarks
 add 31f536f  Fix: Uncomment tests
 add 3e18418  Add subsection to upgrade docs
 add 0a14205  TINKERPOP-2161 Add link to ticket in upgrade docs
 new 90528cd  Merge pull request #1065 from apache/TINKERPOP-2161

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc |   3 +
 docs/src/upgrade/release-3.4.x.asciidoc|  12 +++
 .../driver/ser/GraphBinaryMessageSerializerV1.java |  29 +++--
 .../driver/ser/binary/GraphBinaryWriter.java   |  57 +-
 .../ser/binary/RequestMessageSerializer.java   |  24 ++---
 .../ser/binary/ResponseMessageSerializer.java  |  34 +++---
 .../gremlin/driver/ser/binary/TypeSerializer.java  |   4 +-
 .../driver/ser/binary/TypeSerializerRegistry.java  |   4 +-
 .../ser/binary/types/BigDecimalSerializer.java |  10 +-
 .../ser/binary/types/BigIntegerSerializer.java |   5 +-
 .../driver/ser/binary/types/BindingSerializer.java |  15 +--
 .../driver/ser/binary/types/BulkSetSerializer.java |  20 +---
 .../ser/binary/types/ByteBufferSerializer.java |   5 +-
 .../ser/binary/types/ByteCodeSerializer.java   |  46 +++-
 .../driver/ser/binary/types/CharSerializer.java|   5 +-
 .../driver/ser/binary/types/ClassSerializer.java   |   5 +-
 .../ser/binary/types/CollectionSerializer.java |  19 +---
 .../driver/ser/binary/types/DateSerializer.java|   5 +-
 .../ser/binary/types/DurationSerializer.java   |   5 +-
 .../driver/ser/binary/types/EdgeSerializer.java|  37 +++
 .../driver/ser/binary/types/EnumSerializer.java|   5 +-
 .../driver/ser/binary/types/GraphSerializer.java   |  95 ++--
 .../ser/binary/types/InetAddressSerializer.java|   5 +-
 .../driver/ser/binary/types/InstantSerializer.java |   5 +-
 .../driver/ser/binary/types/LambdaSerializer.java  |  20 +---
 .../driver/ser/binary/types/ListSerializer.java|   5 +-
 .../ser/binary/types/LocalDateSerializer.java  |   5 +-
 .../ser/binary/types/LocalDateTimeSerializer.java  |  10 +-
 .../ser/binary/types/LocalTimeSerializer.java  |   5 +-
 .../ser/binary/types/MapEntrySerializer.java   |   3 +-
 .../driver/ser/binary/types/MapSerializer.java |  22 ++--
 .../driver/ser/binary/types/MetricsSerializer.java |  28 ++---
 .../ser/binary/types/MonthDaySerializer.java   |   5 +-
 .../ser/binary/types/OffsetDateTimeSerializer.java |  10 +-
 .../ser/binary/types/OffsetTimeSerializer.java |  10 +-
 .../driver/ser/binary/types/PSerializer.java   |  13 +--
 .../driver/ser/binary/types/PathSerializer.java|  18 +---
 .../driver/ser/binary/types/PeriodSerializer.java  |   5 +-
 .../ser/binary/types/PropertySerializer.java   |  13 +--
 .../driver/ser/binary/types/SetSerializer.java |   5 +-
 .../ser/binary/types/SimpleTypeSerializer.java |  22 ++--
 .../ser/binary/types/SingleTypeSerializer.java |  26 ++---
 .../driver/ser/binary/types/StringSerializer.java  |   6 +-
 .../types/TraversalExplanationSerializer.java  |   3 +-
 .../binary/types/TraversalMetricsSerializer.java   |  18 +---
 .../binary/types/TraversalStrategySerializer.java  |  18 +---
 .../ser/binary/types/TraverserSerializer.java  |  17 +--
 .../driver/ser/binary/types/TreeSerializer.java|  23 +---
 .../driver/ser/binary/types/UUIDSerializer.java|   8 +-
 .../ser/binary/types/VertexPropertySerializer.java |  30 ++
 .../driver/ser/binary/types/VertexSerializer.java  |  23 +---
 .../ser/binary/types/YearMonthSerializer.java  |   5 +-
 .../ser/binary/types/ZoneOffsetSerializer.java |   5 +-
 .../ser/binary/types/ZonedDateTimeSerializer.java  |  10 +-
 .../GraphBinaryReaderWriterRoundTripTest.java  |   3 +-
 .../ser/binary/TypeSerializerFailureTests.java |   8 +-
 .../ser/binary/TypeSerializerRegistryTest.java |   9 +-
 .../ser/binary/types/CharSerializerTest.java   |   6 +-
 .../types/sample/SamplePersonSerializer.java   |  39 ---
 .../driver/GraphBinaryReaderWriterBenchmark.java   | 119 +
 .../gremlin/driver/GraphSONMapperBenchmark.java| 107 ++
 .../gremlin/driver/SerializationBenchmark.java |  18 ++--
 62 files changed, 569 insertions(+), 585 deletions(-)
 create mode 100644 
gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tink

[tinkerpop] 01/01: Merge pull request #1065 from apache/TINKERPOP-2161

2019-02-27 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 90528cde17d2f83bb7dc9937a6b35ce0ab9f5753
Merge: e812808 0a14205
Author: Jorge Bay Gondra 
AuthorDate: Wed Feb 27 15:53:33 2019 +0100

Merge pull request #1065 from apache/TINKERPOP-2161

TINKERPOP-2161 - GraphBinary: use a single buffer instead of allocators

 CHANGELOG.asciidoc |   3 +
 docs/src/upgrade/release-3.4.x.asciidoc|  12 +++
 .../driver/ser/GraphBinaryMessageSerializerV1.java |  29 +++--
 .../driver/ser/binary/GraphBinaryWriter.java   |  57 +-
 .../ser/binary/RequestMessageSerializer.java   |  24 ++---
 .../ser/binary/ResponseMessageSerializer.java  |  34 +++---
 .../gremlin/driver/ser/binary/TypeSerializer.java  |   4 +-
 .../driver/ser/binary/TypeSerializerRegistry.java  |   4 +-
 .../ser/binary/types/BigDecimalSerializer.java |  10 +-
 .../ser/binary/types/BigIntegerSerializer.java |   5 +-
 .../driver/ser/binary/types/BindingSerializer.java |  15 +--
 .../driver/ser/binary/types/BulkSetSerializer.java |  20 +---
 .../ser/binary/types/ByteBufferSerializer.java |   5 +-
 .../ser/binary/types/ByteCodeSerializer.java   |  46 +++-
 .../driver/ser/binary/types/CharSerializer.java|   5 +-
 .../driver/ser/binary/types/ClassSerializer.java   |   5 +-
 .../ser/binary/types/CollectionSerializer.java |  19 +---
 .../driver/ser/binary/types/DateSerializer.java|   5 +-
 .../ser/binary/types/DurationSerializer.java   |   5 +-
 .../driver/ser/binary/types/EdgeSerializer.java|  37 +++
 .../driver/ser/binary/types/EnumSerializer.java|   5 +-
 .../driver/ser/binary/types/GraphSerializer.java   |  95 ++--
 .../ser/binary/types/InetAddressSerializer.java|   5 +-
 .../driver/ser/binary/types/InstantSerializer.java |   5 +-
 .../driver/ser/binary/types/LambdaSerializer.java  |  20 +---
 .../driver/ser/binary/types/ListSerializer.java|   5 +-
 .../ser/binary/types/LocalDateSerializer.java  |   5 +-
 .../ser/binary/types/LocalDateTimeSerializer.java  |  10 +-
 .../ser/binary/types/LocalTimeSerializer.java  |   5 +-
 .../ser/binary/types/MapEntrySerializer.java   |   3 +-
 .../driver/ser/binary/types/MapSerializer.java |  22 ++--
 .../driver/ser/binary/types/MetricsSerializer.java |  28 ++---
 .../ser/binary/types/MonthDaySerializer.java   |   5 +-
 .../ser/binary/types/OffsetDateTimeSerializer.java |  10 +-
 .../ser/binary/types/OffsetTimeSerializer.java |  10 +-
 .../driver/ser/binary/types/PSerializer.java   |  13 +--
 .../driver/ser/binary/types/PathSerializer.java|  18 +---
 .../driver/ser/binary/types/PeriodSerializer.java  |   5 +-
 .../ser/binary/types/PropertySerializer.java   |  13 +--
 .../driver/ser/binary/types/SetSerializer.java |   5 +-
 .../ser/binary/types/SimpleTypeSerializer.java |  22 ++--
 .../ser/binary/types/SingleTypeSerializer.java |  26 ++---
 .../driver/ser/binary/types/StringSerializer.java  |   6 +-
 .../types/TraversalExplanationSerializer.java  |   3 +-
 .../binary/types/TraversalMetricsSerializer.java   |  18 +---
 .../binary/types/TraversalStrategySerializer.java  |  18 +---
 .../ser/binary/types/TraverserSerializer.java  |  17 +--
 .../driver/ser/binary/types/TreeSerializer.java|  23 +---
 .../driver/ser/binary/types/UUIDSerializer.java|   8 +-
 .../ser/binary/types/VertexPropertySerializer.java |  30 ++
 .../driver/ser/binary/types/VertexSerializer.java  |  23 +---
 .../ser/binary/types/YearMonthSerializer.java  |   5 +-
 .../ser/binary/types/ZoneOffsetSerializer.java |   5 +-
 .../ser/binary/types/ZonedDateTimeSerializer.java  |  10 +-
 .../GraphBinaryReaderWriterRoundTripTest.java  |   3 +-
 .../ser/binary/TypeSerializerFailureTests.java |   8 +-
 .../ser/binary/TypeSerializerRegistryTest.java |   9 +-
 .../ser/binary/types/CharSerializerTest.java   |   6 +-
 .../types/sample/SamplePersonSerializer.java   |  39 ---
 .../driver/GraphBinaryReaderWriterBenchmark.java   | 119 +
 .../gremlin/driver/GraphSONMapperBenchmark.java| 107 ++
 .../gremlin/driver/SerializationBenchmark.java |  18 ++--
 62 files changed, 569 insertions(+), 585 deletions(-)

diff --cc CHANGELOG.asciidoc
index 614af94,ea8205f..882ce4e
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -34,8 -34,10 +34,11 @@@ This release also includes changes fro
  * Added fallback resolver to `TypeSerializerRegistry` for GraphBinary.
  * Added easier to understand exceptions for connection problems in the 
Gremlin.Net driver.
  * Support configuring the type registry builder for GraphBinary.
 +* Bump to Groovy 2.5.6.
  * Release working buffers in case of failure for GraphBinary.
+ * GraphBinary: Use the same `ByteBuf` instance to write during serialization

[tinkerpop] branch TINKERPOP-2161 updated: TINKERPOP-2161 Add link to ticket in upgrade docs

2019-02-25 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2161
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2161 by this push:
 new 0a14205  TINKERPOP-2161 Add link to ticket in upgrade docs
0a14205 is described below

commit 0a142050205d22d5f0555eebcc84296c3481d2e0
Author: Jorge Bay Gondra 
AuthorDate: Mon Feb 25 15:22:33 2019 +0100

TINKERPOP-2161 Add link to ticket in upgrade docs
---
 docs/src/upgrade/release-3.4.x.asciidoc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/docs/src/upgrade/release-3.4.x.asciidoc 
b/docs/src/upgrade/release-3.4.x.asciidoc
index ac9f8dc..6bf4dbc 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -37,6 +37,8 @@ In GraphBinary serialization, Java `write()` and 
`writeValue()` from `TypeSerial
 `ByteBuf` instance instead of an `ByteBufAllocator`, that way the same buffer 
instance gets reused during the write
 of a message. Additionally, we took the opportunity to remove the unused 
parameter from `ResponseMessageSerializer`.
 
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-2161[TINKERPOP-2161]
+
 == TinkerPop 3.4.0
 
 *Release Date: January 2, 2019*



[tinkerpop] branch TINKERPOP-2166 created (now 543a0e2)

2019-02-25 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2166
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at 543a0e2  TINKERPOP-2166 Cache expression to obtain the method in 
PSerializer

This branch includes the following new commits:

 new 543a0e2  TINKERPOP-2166 Cache expression to obtain the method in 
PSerializer

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: TINKERPOP-2166 Cache expression to obtain the method in PSerializer

2019-02-25 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2166
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 543a0e222c5247e7d45d44b0803037f3be5c8acd
Author: Jorge Bay Gondra 
AuthorDate: Mon Feb 25 13:03:45 2019 +0100

TINKERPOP-2166 Cache expression to obtain the method in PSerializer
---
 .../driver/ser/binary/types/PSerializer.java   | 133 +++--
 .../driver/GraphBinaryReaderWriterBenchmark.java   |   9 ++
 2 files changed, 108 insertions(+), 34 deletions(-)

diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/PSerializer.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/PSerializer.java
index 0ae3420..b7c08a0 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/PSerializer.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/PSerializer.java
@@ -27,6 +27,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.util.AndP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
 
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
@@ -34,6 +35,8 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -42,6 +45,8 @@ public class PSerializer extends 
SimpleTypeSerializer {
 
 private final Class classOfP;
 
+private final ConcurrentHashMap methods = 
new ConcurrentHashMap<>();
+
 public PSerializer(final DataType typeOfP, final Class classOfP) {
 super(typeOfP);
 this.classOfP = classOfP;
@@ -53,59 +58,88 @@ public class PSerializer extends 
SimpleTypeSerializer {
 final int length = context.readValue(buffer, Integer.class, false);
 final Object[] args = new Object[length];
 final Class[] argumentClasses = new Class[length];
-boolean collectionType = false;
 for (int i = 0; i < length; i++) {
 args[i] = context.read(buffer);
 argumentClasses[i] = args[i].getClass();
 }
 
-switch (predicateName) {
-case "and":
-return (T) ((P) args[0]).and((P) args[1]);
-case "or":
-return (T) ((P) args[0]).or((P) args[1]);
-default:
-Method m;
+if ("and".equals(predicateName)) {
+return (T) ((P) args[0]).and((P) args[1]);
+} else if ("or".equals(predicateName)) {
+return (T) ((P) args[0]).or((P) args[1]);
+}
+
+CheckedFunction f = getMethod(predicateName, 
argumentClasses);
+
+try {
+return f.apply(args);
+} catch (Exception ex) {
+throw new SerializationException(ex);
+}
+}
+
+private CheckedFunction getMethod(final String predicateName, final 
Class[] argumentClasses) throws SerializationException {
+final PFunctionId id = new PFunctionId(predicateName, argumentClasses);
+
+CheckedFunction result = methods.get(id);
+
+if (result == null) {
+boolean collectionType = false;
+Method m;
+try {
+// do a direct lookup
+m = classOfP.getMethod(predicateName, argumentClasses);
+} catch (NoSuchMethodException ex0) {
+// then try collection types
 try {
-// do a direct lookup
-m = classOfP.getMethod(predicateName, argumentClasses);
-} catch (NoSuchMethodException ex0) {
-// then try collection types
+m = classOfP.getMethod(predicateName, Collection.class);
+collectionType = true;
+} catch (NoSuchMethodException ex1) {
+// finally go for the generics
 try {
-m = classOfP.getMethod(predicateName, 
Collection.class);
-collectionType = true;
-} catch (NoSuchMethodException ex1) {
-// finally go for the generics
-try {
-m = classOfP.getMethod(predicateName, 
Object.class);
-} catch (NoSuchMethodException ex2) {
-throw new SerializationException("not found");
-}
+m = classOfP.getMethod(predicateName, Object.class);
+} catch (NoSuchMethodException ex2) {
+

[tinkerpop] branch TINKERPOP-2161 updated: Add subsection to upgrade docs

2019-02-25 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2161
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2161 by this push:
 new 3e18418  Add subsection to upgrade docs
3e18418 is described below

commit 3e18418142aa089e9a70af734c47b78978725232
Author: Jorge Bay Gondra 
AuthorDate: Mon Feb 25 09:52:21 2019 +0100

Add subsection to upgrade docs
---
 CHANGELOG.asciidoc  |  3 +--
 docs/src/upgrade/release-3.4.x.asciidoc | 10 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f60c48e..ea8205f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -35,8 +35,7 @@ This release also includes changes from <>.
 * Added easier to understand exceptions for connection problems in the 
Gremlin.Net driver.
 * Support configuring the type registry builder for GraphBinary.
 * Release working buffers in case of failure for GraphBinary.
-* GraphBinary: Use the same `ByteBuf` instance to write during serialization. 
Changed signature of write methods in type
-serializers.
+* GraphBinary: Use the same `ByteBuf` instance to write during serialization. 
Changed signature of write methods in type serializers.
 * Remove unused parameter in GraphBinary's `ResponseMessageSerializer`.
 
 
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc 
b/docs/src/upgrade/release-3.4.x.asciidoc
index 5b052f1..ac9f8dc 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -27,6 +27,16 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 Please see the 
link:https://github.com/apache/tinkerpop/blob/3.4.1/CHANGELOG.asciidoc#release-3-4-1[changelog]
 for a complete list of all the modifications that are part of this release.
 
+=== Upgrading for Providers
+
+ Graph Database Providers
+
+= GraphBinary Serializer Changes
+
+In GraphBinary serialization, Java `write()` and `writeValue()` from 
`TypeSerializer` interface now take a Netty's
+`ByteBuf` instance instead of an `ByteBufAllocator`, that way the same buffer 
instance gets reused during the write
+of a message. Additionally, we took the opportunity to remove the unused 
parameter from `ResponseMessageSerializer`.
+
 == TinkerPop 3.4.0
 
 *Release Date: January 2, 2019*



[tinkerpop] branch TINKERPOP-2161 updated: Fix: Uncomment tests

2019-02-22 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2161
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2161 by this push:
 new 31f536f  Fix: Uncomment tests
31f536f is described below

commit 31f536f41305d2b6fc4977280f6545f0aa592ff1
Author: Jorge Bay Gondra 
AuthorDate: Fri Feb 22 11:19:00 2019 +0100

Fix: Uncomment tests
---
 .../ser/binary/TypeSerializerFailureTests.java | 236 +++
 .../ser/binary/TypeSerializerRegistryTest.java | 321 ++---
 2 files changed, 280 insertions(+), 277 deletions(-)

diff --git 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
index a721750..38296e4 100644
--- 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
+++ 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
@@ -1,116 +1,120 @@
-///*
-// * Licensed to the Apache Software Foundation (ASF) under one
-// * or more contributor license agreements.  See the NOTICE file
-// * distributed with this work for additional information
-// * regarding copyright ownership.  The ASF licenses this file
-// * to you under the Apache License, Version 2.0 (the
-// * "License"); you may not use this file except in compliance
-// * with the License.  You may obtain a copy of the License at
-// *
-// * http://www.apache.org/licenses/LICENSE-2.0
-// *
-// * Unless required by applicable law or agreed to in writing,
-// * software distributed under the License is distributed on an
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// * KIND, either express or implied.  See the License for the
-// * specific language governing permissions and limitations
-// * under the License.
-// */
-//
-//package org.apache.tinkerpop.gremlin.driver.ser.binary;
-//
-//import io.netty.buffer.UnpooledByteBufAllocator;
-//import org.apache.tinkerpop.gremlin.driver.ser.SerializationException;
-//import 
org.apache.tinkerpop.gremlin.process.remote.traversal.DefaultRemoteTraverser;
-//import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
-//import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
-//import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyPath;
-//import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
-//import 
org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics;
-//import org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics;
-//import org.apache.tinkerpop.gremlin.structure.Vertex;
-//import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdge;
-//import org.apache.tinkerpop.gremlin.structure.util.reference.ReferencePath;
-//import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex;
-//import 
org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertexProperty;
-//import org.apache.tinkerpop.gremlin.util.function.Lambda;
-//import org.junit.Test;
-//import org.junit.runner.RunWith;
-//import org.junit.runners.Parameterized;
-//
-//import java.util.Arrays;
-//import java.util.Collection;
-//import java.util.Collections;
-//import java.util.List;
-//
-//import static org.junit.Assert.assertEquals;
-//import static org.junit.Assert.fail;
-//
-//@RunWith(Parameterized.class)
-//public class TypeSerializerFailureTests {
-//
-//private final GraphBinaryWriter writer = new GraphBinaryWriter();
-//private final UnpooledByteBufAllocator allocator = new 
UnpooledByteBufAllocator(false);
-//
-//@Parameterized.Parameters(name = "Value={0}")
-//public static Collection input() {
-//final Bytecode.Binding b = new Bytecode.Binding(null, "b");
-//
-//final ReferenceVertex vertex = new ReferenceVertex("a vertex", null);
-//
-//final Bytecode bytecode = new Bytecode();
-//bytecode.addStep(null);
-//
-//final BulkSet bulkSet = new BulkSet<>();
-//bulkSet.add(vertex, 1L);
-//
-//final MutableMetrics metrics = new MutableMetrics("a metric", null);
-//
-//final Tree tree = new Tree<>();
-//tree.put(vertex, null);
-//
-//// Provide instances that are malformed for serialization to fail
-//return Arrays.asList(
-//b,
-//vertex,
-//Collections.singletonMap("one", b),
-//bulkSet,
-//bytecode,
-//Collections.singletonList(vertex),
-//new ReferenceEdge("an edge", null, vertex, vertex),
-//Lambda.supplier(null),
-//me

[tinkerpop] branch TINKERPOP-2161 updated: Remove P serialization from benchmarks

2019-02-22 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2161
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2161 by this push:
 new 859e30f  Remove P serialization from benchmarks
859e30f is described below

commit 859e30ff8afa36279e81c7c7d8be2a28e7ef5f37
Author: Jorge Bay Gondra 
AuthorDate: Fri Feb 22 11:13:39 2019 +0100

Remove P serialization from benchmarks
---
 .../tinkerpop/gremlin/driver/GraphBinaryReaderWriterBenchmark.java | 3 ---
 .../org/apache/tinkerpop/gremlin/driver/GraphSONMapperBenchmark.java   | 2 --
 2 files changed, 5 deletions(-)

diff --git 
a/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphBinaryReaderWriterBenchmark.java
 
b/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphBinaryReaderWriterBenchmark.java
index 761089d..1cc509a 100644
--- 
a/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphBinaryReaderWriterBenchmark.java
+++ 
b/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphBinaryReaderWriterBenchmark.java
@@ -25,12 +25,10 @@ import 
org.apache.tinkerpop.gremlin.driver.ser.SerializationException;
 import org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryReader;
 import org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryWriter;
 import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
-import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.annotations.Level;
-import org.openjdk.jmh.annotations.Measurement;
 import org.openjdk.jmh.annotations.Scope;
 import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
@@ -77,7 +75,6 @@ public class GraphBinaryReaderWriterBenchmark extends 
AbstractBenchmarkBase {
 .property("name4", BigInteger.valueOf(33343455342245L))
 .property("name5", 
"kjlkdnvlkdrnvldnvndlrkvnlhkjdkgkrtnlkndblknlknonboirnlkbnrtbonrobinokbnrklnbkrnblktengotrngotkrnglkt")
 .property("name6", Instant.now())
-.property("name9", P.between(12, 15))
 .asAdmin().getBytecode();
 
 writer.writeValue(bytecode1, bytecodeBuffer1, false);
diff --git 
a/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphSONMapperBenchmark.java
 
b/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphSONMapperBenchmark.java
index 7a87db7..e787ca7 100644
--- 
a/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphSONMapperBenchmark.java
+++ 
b/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/GraphSONMapperBenchmark.java
@@ -20,7 +20,6 @@ package org.apache.tinkerpop.gremlin.driver;
 
 import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
 import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
-import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion;
@@ -74,7 +73,6 @@ public class GraphSONMapperBenchmark extends 
AbstractBenchmarkBase {
 .property("name4", BigInteger.valueOf(33343455342245L))
 .property("name5", 
"kjlkdnvlkdrnvldnvndlrkvnlhkjdkgkrtnlkndblknlknonboirnlkbnrtbonrobinokbnrklnbkrnblktengotrngotkrnglkt")
 .property("name6", Instant.now())
-.property("name9", P.between(12, 15))
 .asAdmin().getBytecode();
 
 



[tinkerpop] branch TINKERPOP-2161 updated: Remove unused param from ResponseMessageSerializer and CHANGELOG entry

2019-02-22 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2161
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2161 by this push:
 new 70637df  Remove unused param from ResponseMessageSerializer and 
CHANGELOG entry
70637df is described below

commit 70637dfb86836d28eeb162ef89fd7a77f1ec5ae0
Author: Jorge Bay Gondra 
AuthorDate: Fri Feb 22 10:14:30 2019 +0100

Remove unused param from ResponseMessageSerializer and CHANGELOG entry
---
 CHANGELOG.asciidoc | 4 
 .../gremlin/driver/ser/GraphBinaryMessageSerializerV1.java | 5 ++---
 .../tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java | 1 +
 .../gremlin/driver/ser/binary/RequestMessageSerializer.java| 3 +--
 .../gremlin/driver/ser/binary/ResponseMessageSerializer.java   | 7 +++
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b75a3db..f60c48e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -35,6 +35,10 @@ This release also includes changes from <>.
 * Added easier to understand exceptions for connection problems in the 
Gremlin.Net driver.
 * Support configuring the type registry builder for GraphBinary.
 * Release working buffers in case of failure for GraphBinary.
+* GraphBinary: Use the same `ByteBuf` instance to write during serialization. 
Changed signature of write methods in type
+serializers.
+* Remove unused parameter in GraphBinary's `ResponseMessageSerializer`.
+
 
 [[release-3-4-0]]
 === TinkerPop 3.4.0 (Release Date: January 2, 2019)
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
index 0d9b59c..c368562 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
@@ -20,7 +20,6 @@ package org.apache.tinkerpop.gremlin.driver.ser;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufAllocator;
-import io.netty.buffer.CompositeByteBuf;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
 import org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryIo;
@@ -123,7 +122,7 @@ public class GraphBinaryMessageSerializerV1 extends 
AbstractMessageSerializer {
 final ByteBuf buffer = allocator.buffer();
 
 try {
-responseSerializer.writeValue(responseMessage, buffer, writer, 
false);
+responseSerializer.writeValue(responseMessage, buffer, writer);
 } catch (Exception ex) {
 buffer.release();
 throw ex;
@@ -153,7 +152,7 @@ public class GraphBinaryMessageSerializerV1 extends 
AbstractMessageSerializer {
 
 @Override
 public ResponseMessage deserializeResponse(final ByteBuf msg) throws 
SerializationException {
-return responseSerializer.readValue(msg, reader, false);
+return responseSerializer.readValue(msg, reader);
 }
 
 @Override
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
index 46fb05a..68ccc7a 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
@@ -28,6 +28,7 @@ public class GraphBinaryWriter {
 private final TypeSerializerRegistry registry;
 private final static byte VALUE_FLAG_NULL = 1;
 private final static byte VALUE_FLAG_NONE = 0;
+public final static byte VERSION_BYTE = (byte)0x81;
 private final static byte[] unspecifiedNullBytes = new byte[] { 
DataType.UNSPECIFIED_NULL.getCodeByte(), 0x01};
 private final static byte[] customTypeCodeBytes = new byte[] { 
DataType.CUSTOM.getCodeByte() };
 
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
index b7373a3..42f70cd 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
@@ -19,7 +19,6 @@
 package org.apache.tinkerpop.gremlin.driver.ser.binary;
 
 import io.netty.buffer.ByteBuf;
-import io.netty.buffer.ByteBufAllocator;
 

[tinkerpop] branch TINKERPOP-2161 created (now 2402939)

2019-02-18 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2161
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at 2402939  TINKERPOP-2161 GraphBinary: use a single buffer instead of 
allocators

This branch includes the following new commits:

 new 2402939  TINKERPOP-2161 GraphBinary: use a single buffer instead of 
allocators

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] branch write-TINKERPOP-2161-1 created (now eab3420)

2019-02-18 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch write-TINKERPOP-2161-1
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at eab3420  Use unmodifiableBuffers instead of composites

This branch includes the following new commits:

 new eab3420  Use unmodifiableBuffers instead of composites

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] 01/01: Use unmodifiableBuffers instead of composites

2019-02-18 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch write-TINKERPOP-2161-1
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit eab3420436da3d70e6ab54b79375e97594153f90
Author: Jorge Bay Gondra 
AuthorDate: Mon Feb 18 11:55:53 2019 +0100

Use unmodifiableBuffers instead of composites
---
 .../driver/ser/GraphBinaryMessageSerializerV1.java | 10 ++---
 .../driver/ser/binary/GraphBinaryWriter.java   | 16 ---
 .../ser/binary/RequestMessageSerializer.java   | 24 ++
 .../ser/binary/ResponseMessageSerializer.java  |  6 ++-
 .../ser/binary/types/BigDecimalSerializer.java |  9 ++--
 .../driver/ser/binary/types/BindingSerializer.java |  9 ++--
 .../driver/ser/binary/types/BulkSetSerializer.java | 11 +++--
 .../ser/binary/types/ByteCodeSerializer.java   | 48 +---
 .../ser/binary/types/CollectionSerializer.java |  9 ++--
 .../driver/ser/binary/types/EdgeSerializer.java| 21 +
 .../driver/ser/binary/types/GraphSerializer.java   | 52 +++---
 .../driver/ser/binary/types/LambdaSerializer.java  | 10 ++---
 .../ser/binary/types/LocalDateTimeSerializer.java  |  8 ++--
 .../driver/ser/binary/types/MapSerializer.java | 10 ++---
 .../driver/ser/binary/types/MetricsSerializer.java | 16 +++
 .../ser/binary/types/OffsetDateTimeSerializer.java |  8 ++--
 .../ser/binary/types/OffsetTimeSerializer.java |  8 ++--
 .../driver/ser/binary/types/PSerializer.java   | 11 +++--
 .../driver/ser/binary/types/PathSerializer.java|  8 ++--
 .../ser/binary/types/PropertySerializer.java   | 11 +++--
 .../ser/binary/types/SimpleTypeSerializer.java | 34 +-
 .../binary/types/TraversalMetricsSerializer.java   |  9 ++--
 .../binary/types/TraversalStrategySerializer.java  | 10 ++---
 .../ser/binary/types/TraverserSerializer.java  |  9 ++--
 .../driver/ser/binary/types/TreeSerializer.java| 13 +++---
 .../ser/binary/types/VertexPropertySerializer.java | 15 +++
 .../driver/ser/binary/types/VertexSerializer.java  | 13 +++---
 .../ser/binary/types/ZonedDateTimeSerializer.java  |  9 ++--
 .../binary/GraphBinaryMessageSerializerV1Test.java | 31 -
 .../GraphBinaryReaderWriterRoundTripTest.java  | 15 ++-
 .../ser/binary/types/CharSerializerTest.java   | 28 +++-
 .../types/sample/SamplePersonSerializerTest.java   | 10 -
 .../driver/GraphBinaryReaderWriterBenchmark.java   |  4 ++
 .../gremlin/driver/GraphSONMapperBenchmark.java|  4 ++
 34 files changed, 318 insertions(+), 191 deletions(-)

diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
index c0defd4..be916b4 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
@@ -20,7 +20,7 @@ package org.apache.tinkerpop.gremlin.driver.ser;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufAllocator;
-import io.netty.buffer.CompositeByteBuf;
+import io.netty.buffer.Unpooled;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
 import org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryIo;
@@ -125,11 +125,9 @@ public class GraphBinaryMessageSerializerV1 extends 
AbstractMessageSerializer {
 
 @Override
 public ByteBuf serializeRequestAsBinary(final RequestMessage 
requestMessage, final ByteBufAllocator allocator) throws SerializationException 
{
-final CompositeByteBuf result = allocator.compositeBuffer(3);
-result.addComponent(true, 
allocator.buffer(1).writeByte(HEADER.length));
-result.addComponent(true, 
allocator.buffer(HEADER.length).writeBytes(HEADER));
-result.addComponent(true, requestSerializer.writeValue(requestMessage, 
allocator, writer));
-return result;
+return Unpooled.unmodifiableBuffer(
+allocator.buffer(1 + 
HEADER.length).writeByte(HEADER.length).writeBytes(HEADER),
+requestSerializer.writeValue(requestMessage, allocator, writer));
 }
 
 @Override
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
index 1703658..9ff773a 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.driver.ser.binary;
 import io.netty.buffer.ByteBuf;
 import

[tinkerpop] branch master updated: More serialization benchmarks

2019-02-15 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
 new 555d726  More serialization benchmarks
555d726 is described below

commit 555d726d1937e4e4213890e4e8c51f189475f724
Author: Jorge Bay Gondra 
AuthorDate: Fri Feb 15 10:09:10 2019 +0100

More serialization benchmarks
---
 .../gremlin/driver/SerializationBenchmark.java | 52 +-
 1 file changed, 50 insertions(+), 2 deletions(-)

diff --git 
a/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/SerializationBenchmark.java
 
b/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/SerializationBenchmark.java
index d68b8ab..d919add 100644
--- 
a/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/SerializationBenchmark.java
+++ 
b/gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/driver/SerializationBenchmark.java
@@ -19,13 +19,18 @@
 package org.apache.tinkerpop.gremlin.driver;
 
 import io.netty.buffer.ByteBuf;
+import io.netty.buffer.ByteBufAllocator;
 import io.netty.buffer.Unpooled;
 import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
+import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
+import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
 import org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1;
 import org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0;
 import org.apache.tinkerpop.gremlin.driver.ser.SerializationException;
 import org.apache.tinkerpop.gremlin.driver.ser.binary.DataType;
+import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
+import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex;
 import org.openjdk.jmh.annotations.Benchmark;
 
 import java.nio.charset.StandardCharsets;
@@ -46,7 +51,7 @@ public class SerializationBenchmark extends 
AbstractBenchmarkBase {
 
 private static final ByteBuf RequestMessageBinaryBuffer1 = 
Unpooled.wrappedBuffer(new byte[]{
 // flag
-0x1,
+(byte)0x81,
 // uuid
 (byte) 0xd3, (byte) 0xfd, 0x35, 0x40, 0x67, 0x18, 0x46, (byte) 
0x87,(byte) 0x95, 0x6b, (byte) 0xc8, 0x61,
 (byte) 0x8a, 0x26, (byte) 0xe3, 0x35,
@@ -60,7 +65,7 @@ public class SerializationBenchmark extends 
AbstractBenchmarkBase {
 
 private static final ByteBuf RequestMessageBinaryBuffer2 = 
Unpooled.wrappedBuffer(new byte[]{
 // flag
-0x1,
+(byte)0x81,
 // uuid
 (byte) 0xd3, (byte) 0xfd, 0x35, 0x40, 0x67, 0x18, 0x46, (byte) 
0x87,(byte) 0x95, 0x6b, (byte) 0xc8, 0x61,
 (byte) 0x8a, 0x26, (byte) 0xe3, 0x35,
@@ -90,9 +95,26 @@ public class SerializationBenchmark extends 
AbstractBenchmarkBase {
 
 private static final UUID id = UUID.randomUUID();
 
+private static final ResponseMessage response = ResponseMessage
+
.build(UUID.randomUUID()).code(ResponseStatusCode.SUCCESS).result(new 
ReferenceVertex(1, "person"))
+.create();
+
+private static final Bytecode bytecode = new Bytecode();
+private static final RequestMessage request = RequestMessage
+
.build(Tokens.OPS_BYTECODE).processor("traversal").overrideRequestId(UUID.randomUUID())
+.add(Tokens.ARGS_GREMLIN, bytecode)
+.create();
+
 private static final GraphBinaryMessageSerializerV1 binarySerializer = new 
GraphBinaryMessageSerializerV1();
 private static final GraphSONMessageSerializerV3d0 graphsonSerializer = 
new GraphSONMessageSerializerV3d0();
 
+static {
+bytecode.addStep("V");
+bytecode.addStep("values", "name");
+bytecode.addStep("order");
+bytecode.addStep("tail", 5);
+}
+
 @Benchmark
 public RequestMessage testReadMessage1Binary() throws 
SerializationException {
 RequestMessageBinaryBuffer1.readerIndex(0);
@@ -119,6 +141,32 @@ public class SerializationBenchmark extends 
AbstractBenchmarkBase {
 }
 
 @Benchmark
+public void testWriteResponseBinary() throws SerializationException {
+ByteBuf buffer = binarySerializer.serializeResponseAsBinary(response, 
ByteBufAllocator.DEFAULT);
+buffer.release();
+}
+
+@Benchmark
+public void testWriteResponseGraphSON() throws SerializationException {
+ByteBuf buffer = 
graphsonSerializer.serializeResponseAsBinary(response, 
ByteBufAllocator.DEFAULT);
+buffer.release();
+}
+
+@Benchmark
+public void testWriteBytecodeBinary() throws SerializationException {
+
+ByteBuf buffer = binary

[tinkerpop] branch TINKERPOP-2154 deleted (was 5bf5503)

2019-02-12 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2154
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


 was 5bf5503  TINKERPOP-2154 changelog

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[tinkerpop] branch master updated (bb43b91 -> c710445)

2019-02-12 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from bb43b91  Merge branch 'tp33'
 add c66c497  TINKERPOP-2154 GraphBinary: Release working buffers on failure
 add c2a0d4b  TINKERPOP-2154 fix add missing license to file
 add 5bf5503  TINKERPOP-2154 changelog
 new c710445  Merge pull request #1058 from apache/TINKERPOP-2154

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc |   1 +
 .../driver/ser/binary/GraphBinaryWriter.java   |  21 ++--
 .../driver/ser/binary/types/BindingSerializer.java |   9 +-
 .../driver/ser/binary/types/BulkSetSerializer.java |  12 ++-
 .../ser/binary/types/ByteCodeSerializer.java   |  25 +++--
 .../ser/binary/types/CollectionSerializer.java |  10 +-
 .../ser/binary/types/CustomTypeSerializer.java |   3 -
 .../driver/ser/binary/types/EdgeSerializer.java|  33 +++---
 .../driver/ser/binary/types/GraphSerializer.java   |  79 +-
 .../driver/ser/binary/types/LambdaSerializer.java  |  14 ++-
 .../driver/ser/binary/types/MapSerializer.java |  14 ++-
 .../driver/ser/binary/types/MetricsSerializer.java |  27 +++--
 .../driver/ser/binary/types/PathSerializer.java|  11 +-
 .../binary/types/TraversalMetricsSerializer.java   |  16 ++-
 .../binary/types/TraversalStrategySerializer.java  |  11 +-
 .../ser/binary/types/TraverserSerializer.java  |  11 +-
 .../driver/ser/binary/types/TreeSerializer.java|  16 ++-
 .../ser/binary/types/VertexPropertySerializer.java |  23 ++--
 .../driver/ser/binary/types/VertexSerializer.java  |  19 ++--
 .../ser/binary/TypeSerializerFailureTests.java | 116 +
 20 files changed, 361 insertions(+), 110 deletions(-)
 create mode 100644 
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java



[tinkerpop] 01/01: Merge pull request #1058 from apache/TINKERPOP-2154

2019-02-12 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit c71044584d51539d4481990770e259361b7b5dac
Merge: bb43b91 5bf5503
Author: Jorge Bay Gondra 
AuthorDate: Tue Feb 12 09:02:58 2019 +0100

Merge pull request #1058 from apache/TINKERPOP-2154

TINKERPOP-2154 GraphBinary: Release working buffers on failure

 CHANGELOG.asciidoc |   1 +
 .../driver/ser/binary/GraphBinaryWriter.java   |  21 ++--
 .../driver/ser/binary/types/BindingSerializer.java |   9 +-
 .../driver/ser/binary/types/BulkSetSerializer.java |  12 ++-
 .../ser/binary/types/ByteCodeSerializer.java   |  25 +++--
 .../ser/binary/types/CollectionSerializer.java |  10 +-
 .../ser/binary/types/CustomTypeSerializer.java |   3 -
 .../driver/ser/binary/types/EdgeSerializer.java|  33 +++---
 .../driver/ser/binary/types/GraphSerializer.java   |  79 +-
 .../driver/ser/binary/types/LambdaSerializer.java  |  14 ++-
 .../driver/ser/binary/types/MapSerializer.java |  14 ++-
 .../driver/ser/binary/types/MetricsSerializer.java |  27 +++--
 .../driver/ser/binary/types/PathSerializer.java|  11 +-
 .../binary/types/TraversalMetricsSerializer.java   |  16 ++-
 .../binary/types/TraversalStrategySerializer.java  |  11 +-
 .../ser/binary/types/TraverserSerializer.java  |  11 +-
 .../driver/ser/binary/types/TreeSerializer.java|  16 ++-
 .../ser/binary/types/VertexPropertySerializer.java |  23 ++--
 .../driver/ser/binary/types/VertexSerializer.java  |  19 ++--
 .../ser/binary/TypeSerializerFailureTests.java | 116 +
 20 files changed, 361 insertions(+), 110 deletions(-)




[tinkerpop] branch TINKERPOP-2154 updated: TINKERPOP-2154 changelog

2019-02-12 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2154
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2154 by this push:
 new 5bf5503  TINKERPOP-2154 changelog
5bf5503 is described below

commit 5bf5503b9b6d6807fa9dfc4f2abd2e0c8d32468a
Author: Jorge Bay Gondra 
AuthorDate: Tue Feb 12 09:01:21 2019 +0100

TINKERPOP-2154 changelog
---
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 487844b..62cd2a8 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,7 @@ This release also includes changes from <>.
 * Added fallback resolver to `TypeSerializerRegistry` for GraphBinary.
 * Added easier to understand exceptions for connection problems in the 
Gremlin.Net driver.
 * Support configuring the type registry builder for GraphBinary.
+* Release working buffers in case of failure for GraphBinary.
 
 [[release-3-4-0]]
 === TinkerPop 3.4.0 (Release Date: January 2, 2019)



[tinkerpop] branch master updated: Avoid using ByteBuf#readCharSequence() for Netty 4.0 compat CTR

2019-02-11 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
 new 8061512  Avoid using ByteBuf#readCharSequence() for Netty 4.0 compat 
CTR
8061512 is described below

commit 806151291eb9fbb685720464977f2516a0fab23d
Author: Jorge Bay Gondra 
AuthorDate: Mon Feb 11 11:58:10 2019 +0100

Avoid using ByteBuf#readCharSequence() for Netty 4.0 compat CTR
---
 .../tinkerpop/gremlin/driver/ser/binary/types/StringSerializer.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/StringSerializer.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/StringSerializer.java
index 93dbfe4..5267b5d 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/StringSerializer.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/StringSerializer.java
@@ -34,8 +34,10 @@ public class StringSerializer extends 
SimpleTypeSerializer {
 
 @Override
 protected String readValue(final ByteBuf buffer, final GraphBinaryReader 
context) {
-final int length = buffer.readInt();
-return buffer.readCharSequence(length, 
StandardCharsets.UTF_8).toString();
+// Use Netty 4.0 API (avoid ByteBuf#readCharSequence() method) to 
maximize compatibility
+final byte[] bytes = new byte[buffer.readInt()];
+buffer.readBytes(bytes);
+return new String(bytes, StandardCharsets.UTF_8);
 }
 
 @Override



[tinkerpop] branch TINKERPOP-2154 updated: TINKERPOP-2154 fix add missing license to file

2019-02-08 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2154
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2154 by this push:
 new c2a0d4b  TINKERPOP-2154 fix add missing license to file
c2a0d4b is described below

commit c2a0d4bb9d8566694e855e5628f36e892f930f5b
Author: Jorge Bay Gondra 
AuthorDate: Fri Feb 8 12:37:51 2019 +0100

TINKERPOP-2154 fix add missing license to file
---
 .../driver/ser/binary/TypeSerializerFailureTests.java | 19 +++
 1 file changed, 19 insertions(+)

diff --git 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
index c8f935e..2118497 100644
--- 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
+++ 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.tinkerpop.gremlin.driver.ser.binary;
 
 import io.netty.buffer.UnpooledByteBufAllocator;



[tinkerpop] 01/01: TINKERPOP-2154 GraphBinary: Release working buffers on failure

2019-02-08 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch TINKERPOP-2154
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit c66c497880c0dae6df5e5450bee6a2376f10a149
Author: Jorge Bay Gondra 
AuthorDate: Fri Feb 8 12:31:53 2019 +0100

TINKERPOP-2154 GraphBinary: Release working buffers on failure
---
 .../driver/ser/binary/GraphBinaryWriter.java   | 21 +++--
 .../driver/ser/binary/types/BindingSerializer.java |  9 +-
 .../driver/ser/binary/types/BulkSetSerializer.java | 12 ++-
 .../ser/binary/types/ByteCodeSerializer.java   | 25 --
 .../ser/binary/types/CollectionSerializer.java | 10 ++-
 .../ser/binary/types/CustomTypeSerializer.java |  3 -
 .../driver/ser/binary/types/EdgeSerializer.java| 33 +---
 .../driver/ser/binary/types/GraphSerializer.java   | 79 --
 .../driver/ser/binary/types/LambdaSerializer.java  | 14 +++-
 .../driver/ser/binary/types/MapSerializer.java | 14 ++--
 .../driver/ser/binary/types/MetricsSerializer.java | 27 --
 .../driver/ser/binary/types/PathSerializer.java| 11 ++-
 .../binary/types/TraversalMetricsSerializer.java   | 16 +++-
 .../binary/types/TraversalStrategySerializer.java  | 11 ++-
 .../ser/binary/types/TraverserSerializer.java  | 11 ++-
 .../driver/ser/binary/types/TreeSerializer.java| 16 ++--
 .../ser/binary/types/VertexPropertySerializer.java | 23 +++--
 .../driver/ser/binary/types/VertexSerializer.java  | 19 +++--
 .../ser/binary/TypeSerializerFailureTests.java | 97 ++
 19 files changed, 341 insertions(+), 110 deletions(-)

diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
index b3c2c0f..1703658 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryWriter.java
@@ -71,14 +71,16 @@ public class GraphBinaryWriter {
 final TypeSerializer serializer = (TypeSerializer) 
registry.getSerializer(objectClass);
 
 if (serializer instanceof CustomTypeSerializer) {
+// It's a custom type
 CustomTypeSerializer customTypeSerializer = (CustomTypeSerializer) 
serializer;
-// Is a custom type
-// Write type code, custom type name and let the serializer write
-// the rest of {custom_type_info} followed by {value_flag} and 
{value}
-return allocator.compositeBuffer(3).addComponents(true,
-Unpooled.wrappedBuffer(customTypeCodeBytes),
-writeValue(customTypeSerializer.getTypeName(), allocator, 
false),
-customTypeSerializer.write(value, allocator, this));
+
+// Try to serialize the custom value before allocating a composite 
buffer
+ByteBuf customTypeValueBuffer = customTypeSerializer.write(value, 
allocator, this);
+
+return allocator.compositeBuffer(3)
+.addComponent(true, 
Unpooled.wrappedBuffer(customTypeCodeBytes))
+.addComponent(true, 
writeValue(customTypeSerializer.getTypeName(), allocator, false))
+.addComponent(true, customTypeValueBuffer);
 }
 
 if (serializer instanceof TransformSerializer) {
@@ -88,11 +90,14 @@ public class GraphBinaryWriter {
 return write(transformSerializer.transform(value), allocator);
 }
 
+// Try to serialize the value before creating a new composite buffer
+ByteBuf typeInfoAndValueBuffer = serializer.write(value, allocator, 
this);
+
 return allocator.compositeBuffer(2).addComponents(true,
 // {type_code}
 
Unpooled.wrappedBuffer(serializer.getDataType().getDataTypeBuffer()),
 // {type_info}{value_flag}{value}
-serializer.write(value, allocator, this));
+typeInfoAndValueBuffer);
 }
 
 /**
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/BindingSerializer.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/BindingSerializer.java
index de73fb2..3d9f61a 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/BindingSerializer.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/BindingSerializer.java
@@ -45,8 +45,13 @@ public class BindingSerializer extends 
SimpleTypeSerializer {
 @Override
 protected ByteBuf writeValue(final Bytecode.Binding value, final 
ByteBufAllocator allocator, final GraphBinaryWriter context) throws 
SerializationException {
 final CompositeByteBuf result = allocator.compositeBuffer(2

[tinkerpop] branch TINKERPOP-2154 created (now c66c497)

2019-02-08 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a change to branch TINKERPOP-2154
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


  at c66c497  TINKERPOP-2154 GraphBinary: Release working buffers on failure

This branch includes the following new commits:

 new c66c497  TINKERPOP-2154 GraphBinary: Release working buffers on failure

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[tinkerpop] branch master updated: GraphBinary: use exception instead of assertion for msb check CTR

2019-02-07 Thread jorgebg
This is an automated email from the ASF dual-hosted git repository.

jorgebg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
 new f799335  GraphBinary: use exception instead of assertion for msb check 
CTR
f799335 is described below

commit f799335a29e5da98644b75e8d5d9aea810bc6262
Author: Jorge Bay Gondra 
AuthorDate: Thu Feb 7 10:18:38 2019 +0100

GraphBinary: use exception instead of assertion for msb check CTR
---
 .../gremlin/driver/ser/binary/RequestMessageSerializer.java  | 9 +++--
 .../gremlin/driver/ser/binary/ResponseMessageSerializer.java | 9 +++--
 .../driver/ser/binary/GraphBinaryMessageSerializerV1Test.java| 9 +
 3 files changed, 23 insertions(+), 4 deletions(-)

diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
index 7ac1c97..3277598 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
@@ -29,8 +29,13 @@ import java.util.UUID;
 public class RequestMessageSerializer {
 
 public RequestMessage readValue(final ByteBuf buffer, final 
GraphBinaryReader context) throws SerializationException {
-final int version = buffer.readByte();
-assert version >>> 31 == 1;
+final int version = buffer.readByte() & 0xff;
+
+if (version >>> 7 != 1) {
+// This is an indication that the request buffer was incorrectly 
built
+// Or the buffer offsets are wrong
+throw new SerializationException("The most significant bit should 
be set according to the format");
+}
 
 final UUID id = context.readValue(buffer, UUID.class, false);
 final String op = context.readValue(buffer, String.class, false);
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java
index cceb260..f93fe28 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java
@@ -32,8 +32,13 @@ import java.util.UUID;
 public class ResponseMessageSerializer {
 
 public ResponseMessage readValue(final ByteBuf buffer, final 
GraphBinaryReader context, final boolean nullable) throws 
SerializationException {
-final int version = buffer.readByte();
-assert version >>> 31 == 1;
+final int version = buffer.readByte() & 0xff;
+
+if (version >>> 7 != 1) {
+// This is an indication that the response buffer was incorrectly 
built
+// Or the buffer offsets are wrong
+throw new SerializationException("The most significant bit should 
be set according to the format");
+}
 
 return ResponseMessage.build(context.readValue(buffer, UUID.class, 
true))
 
.code(ResponseStatusCode.getFromValue(context.readValue(buffer, Integer.class, 
false)))
diff --git 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java
 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java
index 0e8e7ed..7321d1e 100644
--- 
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java
+++ 
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java
@@ -148,6 +148,15 @@ public class GraphBinaryMessageSerializerV1Test {
 assertEquals(1, counter);
 }
 
+@Test(expected = IllegalStateException.class)
+public void shouldThrowWhenConfigurationOfRegistryBuilderFails() {
+final GraphBinaryMessageSerializerV1 serializer = new 
GraphBinaryMessageSerializerV1();
+final Map config = new HashMap<>();
+config.put(GraphBinaryMessageSerializerV1.TOKEN_BUILDER, 
"org.apache.tinkerpop.gremlin.driver.ser.binary.NonExistentClass");
+
+serializer.configure(config, null);
+}
+
 private static void assertResponseEquals(ResponseMessage expected, 
ResponseMessage actual) {
 assertEquals(expected.getRequestId(), actual.getRequestId());
 // Status



  1   2   3   4   5   6   7   8   9   10   >