Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
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
openSource
apollo
Commits
33b2d125
Commit
33b2d125
authored
Sep 19, 2016
by
张乐
Committed by
GitHub
Sep 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #412 from nobodyiam/tooling-cluster-new
Tooling cluster new
parents
33c59a5b
455782f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
ConfigUtil.java
...main/java/com/ctrip/framework/apollo/util/ConfigUtil.java
+4
-4
pom.xml
pom.xml
+1
-1
No files found.
apollo-client/src/main/java/com/ctrip/framework/apollo/util/ConfigUtil.java
View file @
33b2d125
...
...
@@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
@Named
(
type
=
ConfigUtil
.
class
)
public
class
ConfigUtil
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ConfigUtil
.
class
);
private
static
final
String
TOOL
S_CLUSTER
=
"TOOLS
"
;
private
static
final
String
TOOL
ING_CLUSTER
=
"TOOLING
"
;
private
int
refreshInterval
=
5
;
private
TimeUnit
refreshIntervalTimeUnit
=
TimeUnit
.
MINUTES
;
private
int
connectTimeout
=
1000
;
//1 second
...
...
@@ -65,9 +65,9 @@ public class ConfigUtil {
//Load data center from system property
cluster
=
System
.
getProperty
(
ConfigConsts
.
APOLLO_CLUSTER_KEY
);
//Use TOOL
S cluster if tools
=true in server.properties
//Use TOOL
ING cluster if tooling
=true in server.properties
if
(
Strings
.
isNullOrEmpty
(
cluster
)
&&
isToolingZone
())
{
cluster
=
TOOL
S
_CLUSTER
;
cluster
=
TOOL
ING
_CLUSTER
;
}
//Use data center as cluster
...
...
@@ -82,7 +82,7 @@ public class ConfigUtil {
}
private
boolean
isToolingZone
()
{
if
(
"true"
.
equalsIgnoreCase
(
Foundation
.
server
().
getProperty
(
"tools
"
,
"false"
).
trim
()))
{
if
(
"true"
.
equalsIgnoreCase
(
Foundation
.
deployment
().
getProperty
(
"tooling
"
,
"false"
).
trim
()))
{
return
true
;
}
return
false
;
...
...
pom.xml
View file @
33b2d125
...
...
@@ -139,7 +139,7 @@
<dependency>
<groupId>
com.ctrip.framework
</groupId>
<artifactId>
framework-foundation
</artifactId>
<version>
1.1.
7
</version>
<version>
1.1.
8-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
...
...
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