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
ee418912
Commit
ee418912
authored
Mar 26, 2019
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3099: Update graph storage and index backend property to be configurable
parent
01ea65c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
41 deletions
+27
-41
ApplicationProperties.java
...src/main/java/org/apache/atlas/ApplicationProperties.java
+27
-41
No files found.
intg/src/main/java/org/apache/atlas/ApplicationProperties.java
View file @
ee418912
...
@@ -261,62 +261,48 @@ public final class ApplicationProperties extends PropertiesConfiguration {
...
@@ -261,62 +261,48 @@ public final class ApplicationProperties extends PropertiesConfiguration {
}
}
private
void
setDefaults
()
{
private
void
setDefaults
()
{
// setting value for 'atlas.graphdb.backend' (default = 'janus')
String
graphDbBackend
=
getString
(
GRAPHDB_BACKEND_CONF
);
String
graphDbBackend
=
getString
(
GRAPHDB_BACKEND_CONF
);
if
(
StringUtils
.
isEmpty
(
graphDbBackend
))
{
if
(
StringUtils
.
isEmpty
(
graphDbBackend
))
{
graphDbBackend
=
DEFAULT_GRAPHDB_BACKEND
;
graphDbBackend
=
DEFAULT_GRAPHDB_BACKEND
;
clearPropertyDirect
(
GRAPHDB_BACKEND_CONF
);
addPropertyDirect
(
GRAPHDB_BACKEND_CONF
,
graphDbBackend
);
LOG
.
info
(
"No graphdb backend specified. Will use '"
+
graphDbBackend
+
"'"
);
// The below default values for storage backend, index backend and solr-wait-searcher
// should be removed once ambari change to handle them is committed.
clearPropertyDirect
(
STORAGE_BACKEND_CONF
);
addPropertyDirect
(
STORAGE_BACKEND_CONF
,
STORAGE_BACKEND_HBASE2
);
LOG
.
info
(
"Using storage backend '"
+
STORAGE_BACKEND_HBASE2
+
"'"
);
clearPropertyDirect
(
INDEX_BACKEND_CONF
);
addPropertyDirect
(
INDEX_BACKEND_CONF
,
INDEX_BACKEND_SOLR
);
LOG
.
info
(
"Using index backend '"
+
INDEX_BACKEND_SOLR
+
"'"
);
clearPropertyDirect
(
SOLR_WAIT_SEARCHER_CONF
);
addPropertyDirect
(
SOLR_WAIT_SEARCHER_CONF
,
DEFAULT_SOLR_WAIT_SEARCHER
);
LOG
.
info
(
"Setting solr-wait-searcher property '"
+
DEFAULT_SOLR_WAIT_SEARCHER
+
"'"
);
clearPropertyDirect
(
INDEX_MAP_NAME_CONF
);
addPropertyDirect
(
INDEX_MAP_NAME_CONF
,
DEFAULT_INDEX_MAP_NAME
);
LOG
.
info
(
"Setting index.search.map-name property '"
+
DEFAULT_INDEX_MAP_NAME
+
"'"
);
}
}
String
storageBackend
=
getString
(
STORAGE_BACKEND_CONF
);
clearPropertyDirect
(
GRAPHDB_BACKEND_CONF
);
addPropertyDirect
(
GRAPHDB_BACKEND_CONF
,
graphDbBackend
);
if
(
StringUtils
.
isEmpty
(
storageBackend
))
{
LOG
.
info
(
"Using graphdb backend '"
+
graphDbBackend
+
"'"
);
if
(
graphDbBackend
.
contains
(
GRAPHBD_BACKEND_JANUS
))
{
storageBackend
=
STORAGE_BACKEND_HBASE2
;
}
if
(
StringUtils
.
isNotEmpty
(
storageBackend
))
{
// setting value for 'atlas.graph.storage.backend' (default = 'hbase2')
clearPropertyDirect
(
STORAGE_BACKEND_CONF
);
String
storageBackend
=
getString
(
STORAGE_BACKEND_CONF
);
addPropertyDirect
(
STORAGE_BACKEND_CONF
,
storageBackend
);
LOG
.
info
(
"No storage backend specified. Will use '"
+
storageBackend
+
"'"
);
if
(
StringUtils
.
isEmpty
(
storageBackend
)
||
storageBackend
.
equalsIgnoreCase
(
STORAGE_BACKEND_HBASE
))
{
}
storageBackend
=
STORAGE_BACKEND_HBASE2
;
}
}
clearPropertyDirect
(
STORAGE_BACKEND_CONF
);
addPropertyDirect
(
STORAGE_BACKEND_CONF
,
storageBackend
);
LOG
.
info
(
"Using storage backend '"
+
storageBackend
+
"'"
);
// setting value for 'atlas.graph.index.search.backend' (default = 'solr')
String
indexBackend
=
getString
(
INDEX_BACKEND_CONF
);
String
indexBackend
=
getString
(
INDEX_BACKEND_CONF
);
if
(
StringUtils
.
isEmpty
(
indexBackend
))
{
if
(
StringUtils
.
isEmpty
(
indexBackend
))
{
if
(
graphDbBackend
.
contains
(
GRAPHBD_BACKEND_JANUS
))
{
indexBackend
=
INDEX_BACKEND_SOLR
;
indexBackend
=
INDEX_BACKEND_SOLR
;
}
}
if
(
StringUtils
.
isNotEmpty
(
indexBackend
))
{
clearPropertyDirect
(
INDEX_BACKEND_CONF
);
clearPropertyDirect
(
INDEX_BACKEND_CONF
);
addPropertyDirect
(
INDEX_BACKEND_CONF
,
indexBackend
);
addPropertyDirect
(
INDEX_BACKEND_CONF
,
indexBackend
);
LOG
.
info
(
"Using index backend '"
+
indexBackend
+
"'"
);
LOG
.
info
(
"No index backend specified. Will use '"
+
indexBackend
+
"'"
);
// set the following if indexing backend is 'solr'
}
if
(
indexBackend
.
equalsIgnoreCase
(
INDEX_BACKEND_SOLR
))
{
clearPropertyDirect
(
SOLR_WAIT_SEARCHER_CONF
);
addPropertyDirect
(
SOLR_WAIT_SEARCHER_CONF
,
DEFAULT_SOLR_WAIT_SEARCHER
);
LOG
.
info
(
"Setting solr-wait-searcher property '"
+
DEFAULT_SOLR_WAIT_SEARCHER
+
"'"
);
clearPropertyDirect
(
INDEX_MAP_NAME_CONF
);
addPropertyDirect
(
INDEX_MAP_NAME_CONF
,
DEFAULT_INDEX_MAP_NAME
);
LOG
.
info
(
"Setting index.search.map-name property '"
+
DEFAULT_INDEX_MAP_NAME
+
"'"
);
}
}
setDbCacheConfDefaults
();
setDbCacheConfDefaults
();
...
...
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