Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
750646e7
Commit
750646e7
authored
Apr 17, 2020
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3733: upgraded JanusGraph version to 0.5.1, and Tinkerpop to 3.4.6
parent
b866e48f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
15 deletions
+14
-15
NativeJanusGraphQuery.java
...repository/graphdb/janus/query/NativeJanusGraphQuery.java
+2
-1
Solr6Index.java
...main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
+10
-11
atlas-application.properties
intg/src/test/resources/atlas-application.properties
+0
-1
pom.xml
pom.xml
+2
-2
UserProfileServiceTest.java
.../atlas/repository/userprofile/UserProfileServiceTest.java
+0
-0
No files found.
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/query/NativeJanusGraphQuery.java
View file @
750646e7
...
...
@@ -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
=
JanusGraphPredicate
Utils
.
convert
(
c
);
}
else
{
pred
=
getGremlinPredicate
((
MatchingOperator
)
op
);
}
...
...
graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
View file @
750646e7
...
...
@@ -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.AttributeUtil
s
;
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
&&
!
AttributeUtil
s
.
isString
(
dataType
)
&&
!(
mapping
==
Mapping
.
PREFIX_TREE
&&
AttributeUtil
s
.
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
(
AttributeUtil
s
.
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
(
AttributeUtil
s
.
isString
(
dataType
))
{
return
mapping
==
Mapping
.
DEFAULT
||
mapping
==
Mapping
.
TEXT
||
mapping
==
Mapping
.
STRING
;
}
else
if
(
AttributeUtil
.
isGeo
(
dataType
))
{
}
else
if
(
AttributeUtil
s
.
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
(
AttributeUtil
s
.
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
(
AttributeUtil
s
.
isWholeNumber
(
dataType
))
{
if
(
dataType
.
equals
(
Long
.
class
))
postfix
=
"_l"
;
else
postfix
=
"_i"
;
}
else
if
(
AttributeUtil
.
isDecimal
(
dataType
))
{
}
else
if
(
AttributeUtil
s
.
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
AttributeUtil
s
.
isString
(
information
.
getDataType
());
Mapping
map
=
Mapping
.
getMapping
(
information
);
if
(
map
==
Mapping
.
DEFAULT
)
map
=
Mapping
.
TEXT
;
return
map
;
...
...
intg/src/test/resources/atlas-application.properties
View file @
750646e7
...
...
@@ -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}
...
...
pom.xml
View file @
750646e7
...
...
@@ -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>
...
...
repository/src/test/java/org/apache/atlas/repository/userprofile/UserProfileServiceTest.java
View file @
750646e7
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment