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
89fc8357
Commit
89fc8357
authored
Jul 13, 2018
by
apoorvnaik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2786: Honor ZK server ensemble provided in configuration
Change-Id: I3153f258276b534e864fb53b8bcc1cd6af936b5b
parent
12ca5c97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
HAConfiguration.java
...on/src/main/java/org/apache/atlas/ha/HAConfiguration.java
+9
-3
No files found.
common/src/main/java/org/apache/atlas/ha/HAConfiguration.java
View file @
89fc8357
...
...
@@ -20,6 +20,7 @@ package org.apache.atlas.ha;
import
org.apache.atlas.security.SecurityProperties
;
import
org.apache.commons.configuration.Configuration
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -179,9 +180,11 @@ public final class HAConfiguration {
}
public
static
ZookeeperProperties
getZookeeperProperties
(
Configuration
configuration
)
{
String
zookeeperConnectString
=
configuration
.
getString
(
"atlas.kafka."
+
ZOOKEEPER_PREFIX
+
"connect"
)
;
String
[]
zkServers
;
if
(
configuration
.
containsKey
(
HA_ZOOKEEPER_CONNECT
))
{
zookeeperConnectString
=
configuration
.
getString
(
HA_ZOOKEEPER_CONNECT
);
zkServers
=
configuration
.
getStringArray
(
HA_ZOOKEEPER_CONNECT
);
}
else
{
zkServers
=
configuration
.
getStringArray
(
"atlas.kafka."
+
ZOOKEEPER_PREFIX
+
"connect"
);
}
String
zkRoot
=
configuration
.
getString
(
ATLAS_SERVER_HA_ZK_ROOT_KEY
,
ATLAS_SERVER_ZK_ROOT_DEFAULT
);
...
...
@@ -195,7 +198,10 @@ public final class HAConfiguration {
String
acl
=
configuration
.
getString
(
HA_ZOOKEEPER_ACL
);
String
auth
=
configuration
.
getString
(
HA_ZOOKEEPER_AUTH
);
return
new
ZookeeperProperties
(
zookeeperConnectString
,
zkRoot
,
retriesSleepTimeMillis
,
numRetries
,
return
new
ZookeeperProperties
(
StringUtils
.
join
(
zkServers
,
','
),
zkRoot
,
retriesSleepTimeMillis
,
numRetries
,
sessionTimeout
,
acl
,
auth
);
}
}
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