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
27e8b2a4
Commit
27e8b2a4
authored
Jul 31, 2018
by
apoorvnaik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2817: Handle auto upgrade from janus 0.2.0 to janus 0.3.0
parent
5b406348
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
AtlasJanusGraphDatabase.java
...las/repository/graphdb/janus/AtlasJanusGraphDatabase.java
+12
-1
No files found.
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphDatabase.java
View file @
27e8b2a4
...
...
@@ -30,6 +30,7 @@ import org.apache.atlas.typesystem.types.DataTypes.TypeCategory;
import
org.apache.atlas.utils.AtlasPerfTracer
;
import
org.apache.commons.configuration.Configuration
;
import
org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper
;
import
org.janusgraph.core.JanusGraphException
;
import
org.janusgraph.graphdb.database.serialize.attribute.SerializableSerializer
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -50,6 +51,7 @@ public class AtlasJanusGraphDatabase implements GraphDatabase<AtlasJanusVertex,
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
AtlasJanusGraphDatabase
.
class
);
private
static
final
Logger
PERF_LOG
=
AtlasPerfTracer
.
getPerfLogger
(
"AtlasJanusGraphDatabase"
);
private
static
final
String
OLDER_STORAGE_EXCEPTION
=
"Storage version is incompatible with current client"
;
/**
* Constant for the configuration property that indicates the prefix.
...
...
@@ -102,7 +104,16 @@ public class AtlasJanusGraphDatabase implements GraphDatabase<AtlasJanusVertex,
throw
new
RuntimeException
(
e
);
}
graphInstance
=
JanusGraphFactory
.
open
(
config
);
try
{
graphInstance
=
JanusGraphFactory
.
open
(
config
);
}
catch
(
JanusGraphException
e
)
{
LOG
.
warn
(
"JanusGraphException: {}"
,
e
.
getMessage
());
if
(
e
.
getMessage
().
startsWith
(
OLDER_STORAGE_EXCEPTION
))
{
LOG
.
info
(
"Newer client is being used with older janus storage version. Setting allow-upgrade=true and reattempting connection"
);
config
.
addProperty
(
"graph.allow-upgrade"
,
true
);
graphInstance
=
JanusGraphFactory
.
open
(
config
);
}
}
atlasGraphInstance
=
new
AtlasJanusGraph
();
validateIndexBackend
(
config
);
}
...
...
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