Skip to content

Commit

Permalink
update to TinkerPop 3.3.2
Browse files Browse the repository at this point in the history
- fixes JanusGraph#1038

Signed-off-by: Jason Plurad <[email protected]>
  • Loading branch information
pluradj committed May 1, 2018
1 parent 4124cf9 commit bd5be6d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
25 changes: 25 additions & 0 deletions docs/changelog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
[appendix]
== Release Notes

=== Version 0.3.0 (Release Date: May ??, 2018)

[source, xml]
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-core</artifactId>
<version>0.3.0</version>
</dependency>

*Tested Compatibility:*

* Apache Cassandra 2.1.18, 2.2.10, 3.0.14, 3.11.0
* Apache HBase 0.98.24-hadoop2, 1.2.6, 1.3.1
* Google Bigtable 1.0.0
* Oracle BerkeleyJE 7.4.5
* Elasticsearch 1.7.6, 2.4.6, 5.6.2, 6.0.1
* Apache Lucene 7.0.0
* Apache Solr 5.5.4, 6.6.1, 7.0.0
* Apache TinkerPop 3.3.2
* Java 1.8

For more information on features and bug fixes in 0.3.0, see the GitHub milestone:

* https://github.com/JanusGraph/janusgraph/milestone/4?closed=1

=== Version 0.2.1 (Release Date: May ??, 2018)

[source, xml]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ public GraphCentricQueryBuilder profiler(QueryProfiler profiler) {
public GraphCentricQueryBuilder has(String key, JanusGraphPredicate predicate, Object condition) {
Preconditions.checkNotNull(key);
Preconditions.checkNotNull(predicate);
Preconditions.checkArgument(predicate.isValidCondition(condition), "Invalid condition: %s", condition);
Preconditions.checkArgument(predicate.isValidCondition(condition),
"Invalid condition: %s", condition);
if (predicate.equals(Contain.NOT_IN)) {
// when querying `has(key, without(value))`, the query must also satisfy `has(key)`
has(key);
}
constraints.add(new PredicateCondition<String, JanusGraphElement>(key, predicate, condition));
constraints.add(new PredicateCondition<>(key, predicate, condition));
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.apache.tinkerpop.shaded.jackson.core.JsonGenerationException;
import org.apache.tinkerpop.shaded.jackson.core.JsonParser;
import org.apache.tinkerpop.shaded.jackson.core.JsonProcessingException;
import org.apache.tinkerpop.shaded.jackson.core.JsonToken;
import org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId;
import org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext;
import org.apache.tinkerpop.shaded.jackson.databind.deser.std.StdDeserializer;
import org.janusgraph.core.attribute.Geoshape;
Expand Down Expand Up @@ -80,13 +82,14 @@ public void serialize(final RelationIdentifier relationIdentifier, final JsonGen
@Override
public void serializeWithType(final RelationIdentifier relationIdentifier, final JsonGenerator jsonGenerator,
final SerializerProvider serializerProvider, final TypeSerializer typeSerializer)
throws IOException {
typeSerializer.writeTypePrefixForScalar(relationIdentifier, jsonGenerator);
throws IOException, JsonProcessingException {
// since jackson 2.9, must keep track of `typeIdDef` in order to close it properly
final WritableTypeId typeIdDef = typeSerializer.writeTypePrefix(jsonGenerator, typeSerializer.typeId(relationIdentifier, JsonToken.VALUE_STRING));
jsonGenerator.writeStartObject();
jsonGenerator.writeStringField(GraphSONTokens.VALUE, relationIdentifier.toString());
jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
jsonGenerator.writeEndObject();
typeSerializer.writeTypeSuffixForScalar(relationIdentifier, jsonGenerator);
typeSerializer.writeTypeSuffix(jsonGenerator, typeIdDef);
}
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<properties>
<janusgraph.compatible.versions>0.1.0,0.1.1,0.2.0</janusgraph.compatible.versions>
<titan.compatible-versions>1.0.0,1.1.0-SNAPSHOT</titan.compatible-versions>
<tinkerpop.version>3.3.1</tinkerpop.version>
<tinkerpop.version>3.3.2</tinkerpop.version>
<junit.version>4.12</junit.version>
<mrunit.version>1.1.0</mrunit.version>
<mockito.version>1.10.19</mockito.version>
Expand Down

0 comments on commit bd5be6d

Please sign in to comment.