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
bdd110df
Commit
bdd110df
authored
Nov 08, 2019
by
leslizhang
Committed by
Sarath Subramanian
Nov 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3519: reuse script engine to improve lineage query performance
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
Signed-off-by:
Sarath Subramanian
<
sarath@apache.org
>
parent
5932b1af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
AtlasJanusGraph.java
...pache/atlas/repository/graphdb/janus/AtlasJanusGraph.java
+9
-8
No files found.
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java
View file @
bdd110df
...
...
@@ -51,7 +51,6 @@ import org.janusgraph.core.PropertyKey;
import
org.janusgraph.core.SchemaViolationException
;
import
org.janusgraph.core.schema.JanusGraphIndex
;
import
org.janusgraph.core.schema.JanusGraphManagement
;
import
org.janusgraph.core.schema.Mapping
;
import
org.janusgraph.core.schema.Parameter
;
import
org.janusgraph.diskstorage.BackendException
;
import
org.janusgraph.graphdb.database.StandardJanusGraph
;
...
...
@@ -84,6 +83,14 @@ public class AtlasJanusGraph implements AtlasGraph<AtlasJanusVertex, AtlasJanusE
private
final
ConvertGremlinValueFunction
GREMLIN_VALUE_CONVERSION_FUNCTION
=
new
ConvertGremlinValueFunction
();
private
final
Set
<
String
>
multiProperties
=
new
HashSet
<>();
private
final
StandardJanusGraph
janusGraph
;
private
final
ThreadLocal
<
GremlinGroovyScriptEngine
>
scriptEngine
=
ThreadLocal
.
withInitial
(()
->
{
DefaultImportCustomizer
.
Builder
builder
=
DefaultImportCustomizer
.
build
()
.
addClassImports
(
java
.
util
.
function
.
Function
.
class
)
.
addMethodImports
(
__
.
class
.
getMethods
())
.
addMethodImports
(
P
.
class
.
getMethods
());
return
new
GremlinGroovyScriptEngine
(
builder
.
create
());
});
public
AtlasJanusGraph
()
{
this
(
getGraphInstance
());
...
...
@@ -330,13 +337,7 @@ public class AtlasJanusGraph implements AtlasGraph<AtlasJanusVertex, AtlasJanusE
@Override
public
GremlinGroovyScriptEngine
getGremlinScriptEngine
()
{
DefaultImportCustomizer
.
Builder
importBuilder
=
DefaultImportCustomizer
.
build
()
.
addClassImports
(
java
.
util
.
function
.
Function
.
class
)
.
addMethodImports
(
__
.
class
.
getMethods
())
.
addMethodImports
(
P
.
class
.
getMethods
());
GremlinGroovyScriptEngine
scriptEngine
=
new
GremlinGroovyScriptEngine
(
importBuilder
.
create
());
return
scriptEngine
;
return
scriptEngine
.
get
();
}
@Override
...
...
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