Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
45
Issues
45
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
5381dd7f
Commit
5381dd7f
authored
Apr 11, 2016
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for configuration of Elasticsearch and Hazelcast clusters
parent
8c10b46f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
12 deletions
+21
-12
pom.xml
pom.xml
+1
-1
src/main/java/org/genesys2/spring/config/ElasticsearchConfigAWS.java
...va/org/genesys2/spring/config/ElasticsearchConfigAWS.java
+7
-2
src/main/java/org/genesys2/spring/config/ElasticsearchConfigDev.java
...va/org/genesys2/spring/config/ElasticsearchConfigDev.java
+3
-1
src/main/resources/log4j.properties
src/main/resources/log4j.properties
+1
-1
src/main/resources/spring/spring.properties
src/main/resources/spring/spring.properties
+9
-7
No files found.
pom.xml
View file @
5381dd7f
...
@@ -410,7 +410,7 @@
...
@@ -410,7 +410,7 @@
<dependency>
<dependency>
<groupId>
org.elasticsearch
</groupId>
<groupId>
org.elasticsearch
</groupId>
<artifactId>
elasticsearch
</artifactId>
<artifactId>
elasticsearch
</artifactId>
<version>
1.
3
.2
</version>
<version>
1.
5
.2
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
src/main/java/org/genesys2/spring/config/ElasticsearchConfigAWS.java
View file @
5381dd7f
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org.genesys2.spring.config
;
package
org.genesys2.spring.config
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.context.annotation.Profile
;
...
@@ -25,13 +26,17 @@ import org.springframework.data.elasticsearch.client.TransportClientFactoryBean;
...
@@ -25,13 +26,17 @@ import org.springframework.data.elasticsearch.client.TransportClientFactoryBean;
@Profile
({
"aws"
,
"cacher"
})
@Profile
({
"aws"
,
"cacher"
})
public
class
ElasticsearchConfigAWS
{
public
class
ElasticsearchConfigAWS
{
private
String
clusterName
=
"elasticsearch-genesys"
;
@Value
(
"${elasticsearch.cluster.name}"
)
private
String
clusterName
;
@Value
(
"${elasticsearch.cluster.nodes}"
)
private
String
clusterNodes
;
@Bean
@Bean
public
TransportClientFactoryBean
tcfb
()
{
public
TransportClientFactoryBean
tcfb
()
{
TransportClientFactoryBean
tcfb
=
new
TransportClientFactoryBean
();
TransportClientFactoryBean
tcfb
=
new
TransportClientFactoryBean
();
tcfb
.
setClusterName
(
clusterName
);
tcfb
.
setClusterName
(
clusterName
);
tcfb
.
setClusterNodes
(
"localhost:9300"
);
tcfb
.
setClusterNodes
(
clusterNodes
);
tcfb
.
setClientPingTimeout
(
"10s"
);
tcfb
.
setClientPingTimeout
(
"10s"
);
return
tcfb
;
return
tcfb
;
}
}
...
...
src/main/java/org/genesys2/spring/config/ElasticsearchConfigDev.java
View file @
5381dd7f
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org.genesys2.spring.config
;
package
org.genesys2.spring.config
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.context.annotation.Profile
;
...
@@ -25,7 +26,8 @@ import org.springframework.data.elasticsearch.client.NodeClientFactoryBean;
...
@@ -25,7 +26,8 @@ import org.springframework.data.elasticsearch.client.NodeClientFactoryBean;
@Profile
({
"dev"
})
@Profile
({
"dev"
})
public
class
ElasticsearchConfigDev
{
public
class
ElasticsearchConfigDev
{
private
String
clusterName
=
"elasticsearch-genesys"
;
@Value
(
"${elasticsearch.cluster.name}"
)
private
String
clusterName
;
@Bean
@Bean
public
NodeClientFactoryBean
ncfb
()
{
public
NodeClientFactoryBean
ncfb
()
{
...
...
src/main/resources/log4j.properties
View file @
5381dd7f
...
@@ -25,7 +25,7 @@ log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %t %5p %c{1}:%L - %m
...
@@ -25,7 +25,7 @@ log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %t %5p %c{1}:%L - %m
### set log levels - for more verbose logging change 'info' to 'debug' ###
### set log levels - for more verbose logging change 'info' to 'debug' ###
log4j.rootLogger
=
warn, stdout
log4j.rootLogger
=
warn, stdout
log4j.category.org.genesys2
.server.service
=
debug
log4j.category.org.genesys2
=
info
#log4j.category.org.genesys2.server.servlet.controller=debug
#log4j.category.org.genesys2.server.servlet.controller=debug
#log4j.category.org.hibernate.cfg.Configuration=debug
#log4j.category.org.hibernate.cfg.Configuration=debug
#log4j.category.org.hibernate.search=debug
#log4j.category.org.hibernate.search=debug
...
...
src/main/resources/spring/spring.properties
View file @
5381dd7f
...
@@ -106,10 +106,11 @@ executor.queue.capacity=100
...
@@ -106,10 +106,11 @@ executor.queue.capacity=100
#scheduler properties
#scheduler properties
scheduler.max.pool.size
=
16
scheduler.max.pool.size
=
16
# Hazelcast
# Hazelcast instance name
hazelcast.instanceName
=
hz-genesys
hazelcast.instanceName
=
hz-genesys-instance1
hazelcast.name
=
genesys-hz-3.5
# Hazelcast cluster configuration
hazelcast.password
=
hazelcasts
hazelcast.name
=
hz-genesys-development
hazelcast.password
=
hazelcastdevelopment
hazelcast.port
=
5701
hazelcast.port
=
5701
# AWS Autodetection
# AWS Autodetection
...
@@ -136,9 +137,10 @@ cache.tileserver.max-idle-seconds=0
...
@@ -136,9 +137,10 @@ cache.tileserver.max-idle-seconds=0
cache.tileserver.eviction-policy
=
LRU
cache.tileserver.eviction-policy
=
LRU
# Connection to Elasticsearch
# Connection to Elasticsearch
elasticsearch.url
=
http://localhost:9200/
elasticsearch.cluster.name
=
es-genesys-development
# Connect to external ES nodes. Comma separated list of hostname:port
# elasticsearch.cluster.nodes=localhost:9300,otherhost:9300
elasticsearch.cluster.nodes
=
transifex.project
=
genesys-dev
transifex.project
=
genesys-dev
transifex.username
=
Alexandr19011990
transifex.username
=
Alexandr19011990
...
...
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