Commit 750646e7 by Madhan Neethiraj

ATLAS-3733: upgraded JanusGraph version to 0.5.1, and Tinkerpop to 3.4.6

parent b866e48f
......@@ -39,6 +39,7 @@ import org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphDatabase;
import org.apache.atlas.repository.graphdb.janus.AtlasJanusVertex;
import org.apache.tinkerpop.gremlin.process.traversal.Compare;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.janusgraph.graphdb.query.JanusGraphPredicateUtils;
import org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -226,7 +227,7 @@ public class NativeJanusGraphQuery implements NativeTinkerpopGraphQuery<AtlasJan
JanusGraphPredicate pred;
if (op instanceof ComparisionOperator) {
Compare c = getGremlinPredicate((ComparisionOperator) op);
pred = JanusGraphPredicate.Converter.convert(c);
pred = JanusGraphPredicateUtils.convert(c);
} else {
pred = getGremlinPredicate((MatchingOperator)op);
}
......
......@@ -56,7 +56,6 @@ import org.apache.http.HttpException;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.client.HttpClient;
import org.apache.http.client.utils.HttpClientUtils;
import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.impl.auth.KerberosScheme;
import org.apache.http.protocol.HttpContext;
......@@ -114,7 +113,7 @@ import org.janusgraph.diskstorage.indexing.RawQuery;
import org.janusgraph.diskstorage.solr.transform.GeoToWktConverter;
import org.janusgraph.diskstorage.util.DefaultTransaction;
import org.janusgraph.graphdb.configuration.PreInitializeConfigOptions;
import org.janusgraph.graphdb.database.serialize.AttributeUtil;
import org.janusgraph.graphdb.database.serialize.AttributeUtils;
import org.janusgraph.graphdb.internal.Order;
import org.janusgraph.graphdb.query.JanusGraphPredicate;
import org.janusgraph.graphdb.query.condition.And;
......@@ -1009,8 +1008,8 @@ public class Solr6Index implements IndexProvider {
public boolean supports(KeyInformation information, JanusGraphPredicate predicate) {
final Class<?> dataType = information.getDataType();
final Mapping mapping = Mapping.getMapping(information);
if (mapping!=Mapping.DEFAULT && !AttributeUtil.isString(dataType) &&
!(mapping==Mapping.PREFIX_TREE && AttributeUtil.isGeo(dataType))) return false;
if (mapping!=Mapping.DEFAULT && !AttributeUtils.isString(dataType) &&
!(mapping==Mapping.PREFIX_TREE && AttributeUtils.isGeo(dataType))) return false;
if (Number.class.isAssignableFrom(dataType)) {
return predicate instanceof Cmp;
......@@ -1021,7 +1020,7 @@ public class Solr6Index implements IndexProvider {
case PREFIX_TREE:
return predicate == Geo.INTERSECT || predicate == Geo.WITHIN || predicate == Geo.CONTAINS;
}
} else if (AttributeUtil.isString(dataType)) {
} else if (AttributeUtils.isString(dataType)) {
switch(mapping) {
case DEFAULT:
case TEXT:
......@@ -1049,9 +1048,9 @@ public class Solr6Index implements IndexProvider {
if (Number.class.isAssignableFrom(dataType) || dataType == Date.class || dataType == Instant.class
|| dataType == Boolean.class || dataType == UUID.class) {
return mapping == Mapping.DEFAULT;
} else if (AttributeUtil.isString(dataType)) {
} else if (AttributeUtils.isString(dataType)) {
return mapping == Mapping.DEFAULT || mapping == Mapping.TEXT || mapping == Mapping.STRING;
} else if (AttributeUtil.isGeo(dataType)) {
} else if (AttributeUtils.isGeo(dataType)) {
return mapping == Mapping.DEFAULT || mapping == Mapping.PREFIX_TREE;
}
return false;
......@@ -1066,17 +1065,17 @@ public class Solr6Index implements IndexProvider {
if (ParameterType.MAPPED_NAME.hasParameter(keyInfo.getParameters())) return key;
String postfix;
final Class dataType = keyInfo.getDataType();
if (AttributeUtil.isString(dataType)) {
if (AttributeUtils.isString(dataType)) {
final Mapping map = getStringMapping(keyInfo);
switch (map) {
case TEXT: postfix = "_t"; break;
case STRING: postfix = "_s"; break;
default: throw new IllegalArgumentException("Unsupported string mapping: " + map);
}
} else if (AttributeUtil.isWholeNumber(dataType)) {
} else if (AttributeUtils.isWholeNumber(dataType)) {
if (dataType.equals(Long.class)) postfix = "_l";
else postfix = "_i";
} else if (AttributeUtil.isDecimal(dataType)) {
} else if (AttributeUtils.isDecimal(dataType)) {
if (dataType.equals(Float.class)) postfix = "_f";
else postfix = "_d";
} else if (dataType.equals(BigInteger.class)) {
......@@ -1124,7 +1123,7 @@ public class Solr6Index implements IndexProvider {
*/
private static Mapping getStringMapping(KeyInformation information) {
assert AttributeUtil.isString(information.getDataType());
assert AttributeUtils.isString(information.getDataType());
Mapping map = Mapping.getMapping(information);
if (map==Mapping.DEFAULT) map = Mapping.TEXT;
return map;
......
......@@ -45,7 +45,6 @@ atlas.graphdb.backend=${graphdb.backend.impl}
# Graph Storage
atlas.graph.storage.backend=${graph.storage.backend}
atlas.graph.storage.transactions=false
# Entity repository implementation
atlas.EntityAuditRepository.impl=${entity.repository.impl}
......
......@@ -656,8 +656,8 @@
<jersey.version>1.19</jersey.version>
<jsr.version>1.1</jsr.version>
<janus.version>0.4.1</janus.version>
<tinkerpop.version>3.4.4</tinkerpop.version>
<janus.version>0.5.1</janus.version>
<tinkerpop.version>3.4.6</tinkerpop.version>
<lucene-solr.version>7.3.0</lucene-solr.version>
<hadoop.version>3.1.1</hadoop.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment