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
6 years ago
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
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
31 deletions
+17
-31
ApplicationProperties.java
...src/main/java/org/apache/atlas/ApplicationProperties.java
+17
-31
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 {
}
private
void
setDefaults
()
{
// setting value for 'atlas.graphdb.backend' (default = 'janus')
String
graphDbBackend
=
getString
(
GRAPHDB_BACKEND_CONF
);
if
(
StringUtils
.
isEmpty
(
graphDbBackend
))
{
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
+
"'"
);
}
LOG
.
info
(
"Using graphdb backend '"
+
graphDbBackend
+
"'"
);
// setting value for 'atlas.graph.storage.backend' (default = 'hbase2')
String
storageBackend
=
getString
(
STORAGE_BACKEND_CONF
);
if
(
StringUtils
.
isEmpty
(
storageBackend
))
{
if
(
graphDbBackend
.
contains
(
GRAPHBD_BACKEND_JANUS
))
{
if
(
StringUtils
.
isEmpty
(
storageBackend
)
||
storageBackend
.
equalsIgnoreCase
(
STORAGE_BACKEND_HBASE
))
{
storageBackend
=
STORAGE_BACKEND_HBASE2
;
}
if
(
StringUtils
.
isNotEmpty
(
storageBackend
))
{
clearPropertyDirect
(
STORAGE_BACKEND_CONF
);
addPropertyDirect
(
STORAGE_BACKEND_CONF
,
storageBackend
);
LOG
.
info
(
"Using storage backend '"
+
storageBackend
+
"'"
);
LOG
.
info
(
"No storage backend specified. Will use '"
+
storageBackend
+
"'"
);
}
}
// setting value for 'atlas.graph.index.search.backend' (default = 'solr')
String
indexBackend
=
getString
(
INDEX_BACKEND_CONF
);
if
(
StringUtils
.
isEmpty
(
indexBackend
))
{
if
(
graphDbBackend
.
contains
(
GRAPHBD_BACKEND_JANUS
))
{
indexBackend
=
INDEX_BACKEND_SOLR
;
}
if
(
StringUtils
.
isNotEmpty
(
indexBackend
))
{
clearPropertyDirect
(
INDEX_BACKEND_CONF
);
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
();
...
...
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