Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
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
spring-cloud-netflix
Commits
a968b4be
Commit
a968b4be
authored
Jul 12, 2017
by
Ryan Baxter
Committed by
GitHub
Jul 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2112 from gzurowski/remove-lombok-from-turbine
Remove Lombok from spring-cloud-netflix-turbine module
parents
65902d11
0dea44ac
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
18 deletions
+63
-18
pom.xml
spring-cloud-netflix-turbine/pom.xml
+0
-7
CommonsInstanceDiscovery.java
...ework/cloud/netflix/turbine/CommonsInstanceDiscovery.java
+4
-3
EurekaInstanceDiscovery.java
...mework/cloud/netflix/turbine/EurekaInstanceDiscovery.java
+4
-3
SpringAggregatorFactory.java
...mework/cloud/netflix/turbine/SpringAggregatorFactory.java
+4
-2
TurbineProperties.java
...ingframework/cloud/netflix/turbine/TurbineProperties.java
+51
-3
No files found.
spring-cloud-netflix-turbine/pom.xml
View file @
a968b4be
...
@@ -90,13 +90,6 @@
...
@@ -90,13 +90,6 @@
<artifactId>
turbine-core
</artifactId>
<artifactId>
turbine-core
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<!-- Only needed at compile time -->
<scope>
compile
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
...
...
spring-cloud-netflix-turbine/src/main/java/org/springframework/cloud/netflix/turbine/CommonsInstanceDiscovery.java
View file @
a968b4be
...
@@ -21,6 +21,8 @@ import java.util.Collection;
...
@@ -21,6 +21,8 @@ import java.util.Collection;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.cloud.client.ServiceInstance
;
import
org.springframework.cloud.client.ServiceInstance
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.expression.Expression
;
import
org.springframework.expression.Expression
;
...
@@ -30,8 +32,6 @@ import org.springframework.expression.spel.support.StandardEvaluationContext;
...
@@ -30,8 +32,6 @@ import org.springframework.expression.spel.support.StandardEvaluationContext;
import
com.netflix.turbine.discovery.Instance
;
import
com.netflix.turbine.discovery.Instance
;
import
com.netflix.turbine.discovery.InstanceDiscovery
;
import
com.netflix.turbine.discovery.InstanceDiscovery
;
import
lombok.extern.apachecommons.CommonsLog
;
/**
/**
* Class that encapsulates an {@link InstanceDiscovery}
* Class that encapsulates an {@link InstanceDiscovery}
* implementation that uses Spring Cloud Commons (see https://github.com/spring-cloud/spring-cloud-commons)
* implementation that uses Spring Cloud Commons (see https://github.com/spring-cloud/spring-cloud-commons)
...
@@ -45,9 +45,10 @@ import lombok.extern.apachecommons.CommonsLog;
...
@@ -45,9 +45,10 @@ import lombok.extern.apachecommons.CommonsLog;
*
*
* @author Spencer Gibb
* @author Spencer Gibb
*/
*/
@CommonsLog
public
class
CommonsInstanceDiscovery
implements
InstanceDiscovery
{
public
class
CommonsInstanceDiscovery
implements
InstanceDiscovery
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
CommonsInstanceDiscovery
.
class
);
private
static
final
String
DEFAULT_CLUSTER_NAME_EXPRESSION
=
"serviceId"
;
private
static
final
String
DEFAULT_CLUSTER_NAME_EXPRESSION
=
"serviceId"
;
protected
static
final
String
PORT_KEY
=
"port"
;
protected
static
final
String
PORT_KEY
=
"port"
;
protected
static
final
String
SECURE_PORT_KEY
=
"securePort"
;
protected
static
final
String
SECURE_PORT_KEY
=
"securePort"
;
...
...
spring-cloud-netflix-turbine/src/main/java/org/springframework/cloud/netflix/turbine/EurekaInstanceDiscovery.java
View file @
a968b4be
...
@@ -27,8 +27,8 @@ import com.netflix.appinfo.InstanceInfo.InstanceStatus;
...
@@ -27,8 +27,8 @@ import com.netflix.appinfo.InstanceInfo.InstanceStatus;
import
com.netflix.discovery.EurekaClient
;
import
com.netflix.discovery.EurekaClient
;
import
com.netflix.discovery.shared.Application
;
import
com.netflix.discovery.shared.Application
;
import
com.netflix.turbine.discovery.Instance
;
import
com.netflix.turbine.discovery.Instance
;
import
org.apache.commons.logging.Log
;
import
lombok.extern.apachecommons.CommonsLog
;
import
org.apache.commons.logging.LogFactory
;
/**
/**
* Class that encapsulates an {@link com.netflix.turbine.discovery.InstanceDiscovery}
* Class that encapsulates an {@link com.netflix.turbine.discovery.InstanceDiscovery}
...
@@ -43,9 +43,10 @@ import lombok.extern.apachecommons.CommonsLog;
...
@@ -43,9 +43,10 @@ import lombok.extern.apachecommons.CommonsLog;
*
*
* @author Spencer Gibb
* @author Spencer Gibb
*/
*/
@CommonsLog
public
class
EurekaInstanceDiscovery
extends
CommonsInstanceDiscovery
{
public
class
EurekaInstanceDiscovery
extends
CommonsInstanceDiscovery
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
EurekaInstanceDiscovery
.
class
);
private
static
final
String
EUREKA_DEFAULT_CLUSTER_NAME_EXPRESSION
=
"appName"
;
private
static
final
String
EUREKA_DEFAULT_CLUSTER_NAME_EXPRESSION
=
"appName"
;
private
static
final
String
ASG_KEY
=
"asg"
;
private
static
final
String
ASG_KEY
=
"asg"
;
...
...
spring-cloud-netflix-turbine/src/main/java/org/springframework/cloud/netflix/turbine/SpringAggregatorFactory.java
View file @
a968b4be
...
@@ -31,16 +31,18 @@ import com.netflix.turbine.monitor.cluster.AggregateClusterMonitor;
...
@@ -31,16 +31,18 @@ import com.netflix.turbine.monitor.cluster.AggregateClusterMonitor;
import
com.netflix.turbine.monitor.cluster.ClusterMonitor
;
import
com.netflix.turbine.monitor.cluster.ClusterMonitor
;
import
com.netflix.turbine.monitor.cluster.ClusterMonitorFactory
;
import
com.netflix.turbine.monitor.cluster.ClusterMonitorFactory
;
import
lombok.extern.apachecommons.CommonsLog
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
static
com
.
netflix
.
turbine
.
monitor
.
cluster
.
AggregateClusterMonitor
.
AggregatorClusterMonitorConsole
;
import
static
com
.
netflix
.
turbine
.
monitor
.
cluster
.
AggregateClusterMonitor
.
AggregatorClusterMonitorConsole
;
/**
/**
* @author Spencer Gibb
* @author Spencer Gibb
*/
*/
@CommonsLog
public
class
SpringAggregatorFactory
implements
ClusterMonitorFactory
<
AggDataFromCluster
>
{
public
class
SpringAggregatorFactory
implements
ClusterMonitorFactory
<
AggDataFromCluster
>
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
SpringAggregatorFactory
.
class
);
private
static
final
DynamicStringProperty
aggClusters
=
DynamicPropertyFactory
private
static
final
DynamicStringProperty
aggClusters
=
DynamicPropertyFactory
.
getInstance
().
getStringProperty
(
"turbine.aggregator.clusterConfig"
,
null
);
.
getInstance
().
getStringProperty
(
"turbine.aggregator.clusterConfig"
,
null
);
...
...
spring-cloud-netflix-turbine/src/main/java/org/springframework/cloud/netflix/turbine/TurbineProperties.java
View file @
a968b4be
...
@@ -18,16 +18,15 @@ package org.springframework.cloud.netflix.turbine;
...
@@ -18,16 +18,15 @@ package org.springframework.cloud.netflix.turbine;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
lombok.Data
;
/**
/**
* @author Spencer Gibb
* @author Spencer Gibb
* @author Gregor Zurowski
*/
*/
@Data
@ConfigurationProperties
(
"turbine"
)
@ConfigurationProperties
(
"turbine"
)
public
class
TurbineProperties
{
public
class
TurbineProperties
{
...
@@ -48,4 +47,53 @@ public class TurbineProperties {
...
@@ -48,4 +47,53 @@ public class TurbineProperties {
}
}
return
null
;
return
null
;
}
}
public
String
getClusterNameExpression
()
{
return
clusterNameExpression
;
}
public
void
setClusterNameExpression
(
String
clusterNameExpression
)
{
this
.
clusterNameExpression
=
clusterNameExpression
;
}
public
String
getAppConfig
()
{
return
appConfig
;
}
public
void
setAppConfig
(
String
appConfig
)
{
this
.
appConfig
=
appConfig
;
}
public
boolean
isCombineHostPort
()
{
return
combineHostPort
;
}
public
void
setCombineHostPort
(
boolean
combineHostPort
)
{
this
.
combineHostPort
=
combineHostPort
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
TurbineProperties
that
=
(
TurbineProperties
)
o
;
return
Objects
.
equals
(
clusterNameExpression
,
that
.
clusterNameExpression
)
&&
Objects
.
equals
(
appConfig
,
that
.
appConfig
)
&&
Objects
.
equals
(
combineHostPort
,
that
.
combineHostPort
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
clusterNameExpression
,
appConfig
,
combineHostPort
);
}
@Override
public
String
toString
()
{
return
new
StringBuilder
(
"TurbineProperties{"
)
.
append
(
"clusterNameExpression='"
).
append
(
clusterNameExpression
).
append
(
"', "
)
.
append
(
"appConfig='"
).
append
(
appConfig
).
append
(
"', "
)
.
append
(
"combineHostPort="
).
append
(
combineHostPort
).
append
(
"}"
)
.
toString
();
}
}
}
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