Skip to content

Commit 5c19bba

Browse files
authored
Pekko (#257)
* migrate to Pekko * update dep versions * use jackson-module-guice7
1 parent 55ba822 commit 5c19bba

File tree

79 files changed

+476
-458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+476
-458
lines changed

README.md

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The configuration specifies:
5454
* minConnectionTimeout - The minimum aggregation server client connection timeout in ISO-8601 period notation.
5555
* jvmMetricsCollectionInterval - The JVM metrics collection interval in ISO-8601 period notation.
5656
* rebalanceConfiguration - Configuration for aggregator shard rebalancing.
57-
* akkaConfiguration - Configuration of Akka.
57+
* pekkoConfiguration - Configuration of Pekko.
5858

5959
For example:
6060

@@ -74,38 +74,24 @@ For example:
7474
"maxParallel": 100,
7575
"threshold": 500
7676
},
77-
"akkaConfiguration": {
78-
"akka": {
79-
"loggers": ["akka.event.slf4j.Slf4jLogger"],
77+
"pekkoConfiguration": {
78+
"pekko": {
79+
"loggers": ["org.apache.pekko.event.slf4j.Slf4jLogger"],
8080
"loglevel": "DEBUG",
8181
"stdout-loglevel": "DEBUG",
82-
"logging-filter": "akka.event.slf4j.Slf4jLoggingFilter",
82+
"logging-filter": "org.apache.pekko.event.slf4j.Slf4jLoggingFilter",
8383
"actor": {
84-
"provider": "akka.cluster.ClusterActorRefProvider",
84+
"provider": "org.apache.pekko.cluster.ClusterActorRefProvider",
8585
"debug": {
8686
"unhandled": "on"
87-
},
88-
"serializers": {
89-
"kryo": "com.romix.akka.serialization.kryo.KryoSerializer"
90-
},
91-
"serialization-bindings": {
92-
"java.lang.Object": "kryo",
93-
"java.io.Serializable": "none"
94-
},
95-
"kryo": {
96-
"type": "graph",
97-
"idstrategy": "default",
98-
"buffer-size": 4096,
99-
"max-buffer-size": -1,
100-
"kryo-custom-serializer-init": "com.arpnetworking.clusteraggregator.kryo.KryoInitialization"
10187
}
10288
},
10389
"cluster": {
10490
"sharding": {
10591
"state-store-mode": "persistence"
10692
},
10793
"seed-nodes": [
108-
"akka.tcp://[email protected]:2551"
94+
"pekko.tcp://[email protected]:2551"
10995
]
11096
},
11197
"remote": {

config/config.conf

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ reaggregationDimensions=["host"]
5353
#reaggregationInjectClusterAsHost=True
5454
#reaggregationTimeout="PT1M"
5555

56-
# Akka
56+
# Pekko
5757
# ~~~~
5858
rebalanceConfiguration {
5959
maxParallel=100
6060
threshold=500
6161
}
62-
akkaConfiguration {
63-
akka {
64-
loggers=["akka.event.slf4j.Slf4jLogger"]
62+
pekkoConfiguration {
63+
pekko {
64+
loggers=["org.apache.pekko.event.slf4j.Slf4jLogger"]
6565
loglevel="DEBUG"
6666
stdout-loglevel="DEBUG"
67-
logging-filter="akka.event.slf4j.Slf4jLoggingFilter"
67+
logging-filter="org.apache.pekko.event.slf4j.Slf4jLoggingFilter"
6868
actor {
6969
provider="cluster"
7070
serializers {
71-
proto="akka.remote.serialization.ProtobufSerializer"
71+
proto="org.apache.pekko.remote.serialization.ProtobufSerializer"
7272
}
7373
serialization-bindings {
7474
"com.arpnetworking.metrics.aggregation.protocol.Messages$StatisticSetRecord"="proto"
@@ -78,8 +78,8 @@ akkaConfiguration {
7878
}
7979
}
8080
cluster {
81-
seed-nodes=["akka://[email protected]:2551"]
82-
downing-provider-class = "akka.cluster.sbr.SplitBrainResolverProvider"
81+
seed-nodes=["pekko://[email protected]:2551"]
82+
downing-provider-class = "org.apache.pekko.cluster.sbr.SplitBrainResolverProvider"
8383
sharding {
8484
state-store-mode="persistence"
8585
passivate-idle-entity-after="300s"
@@ -95,13 +95,23 @@ akkaConfiguration {
9595
}
9696
persistence {
9797
journal {
98-
plugin = "akka.persistence.journal.leveldb"
99-
leveldb.dir = "/opt/cluster-aggregator/data/journal"
98+
plugin = "jdbc-journal"
10099
}
101100
snapshot-store {
102-
plugin = "akka.persistence.snapshot-store.local"
103-
local.dir = "/opt/cluster-aggregator/data/snapshots"
101+
plugin = "jdbc-snapshot-store"
104102
}
105103
}
106104
}
105+
slick {
106+
profile = "slick.jdbc.H2Profile$"
107+
db {
108+
url = "jdbc:h2:mem:test-database;DATABASE_TO_UPPER=false;"
109+
user = "root"
110+
password = "root"
111+
driver = "org.h2.Driver"
112+
numThreads = 5
113+
maxConnections = 5
114+
minConnections = 1
115+
}
116+
}
107117
}

config/logback-docker.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2014 Brandon Arp
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<configuration>
18+
<import class="ch.qos.logback.core.ConsoleAppender"/>
19+
<appender name="cagg-logger" class="ConsoleAppender">
20+
<encoder class="com.arpnetworking.logback.StenoEncoder">
21+
<injectContextLogger>true</injectContextLogger>
22+
<compressLoggerName>true</compressLoggerName>
23+
<jacksonModule class="com.fasterxml.jackson.datatype.guava.GuavaModule" />
24+
<jacksonModule class="com.fasterxml.jackson.datatype.jdk8.Jdk8Module" />
25+
<jacksonModule class="com.fasterxml.jackson.datatype.jsr310.JavaTimeModule" />
26+
<jacksonModule class="com.arpnetworking.configuration.jackson.pekko.PekkoLoggingModule" />
27+
<injectBeanIdentifier>true</injectBeanIdentifier>
28+
</encoder>
29+
</appender>
30+
31+
32+
<appender name="cagg-async" class="ch.qos.logback.classic.AsyncAppender">
33+
<appender-ref ref="cagg-logger"/>
34+
<discardingThreshold>50</discardingThreshold>
35+
<queueSize>500</queueSize>
36+
</appender>
37+
38+
<logger name="org.reflections.Reflections" level="ERROR" />
39+
40+
<root level="INFO">
41+
<appender-ref ref="cagg-async"/>
42+
</root>
43+
</configuration>

config/logback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<jacksonModule class="com.fasterxml.jackson.datatype.guava.GuavaModule" />
3333
<jacksonModule class="com.fasterxml.jackson.datatype.jdk8.Jdk8Module" />
3434
<jacksonModule class="com.fasterxml.jackson.datatype.jsr310.JavaTimeModule" />
35-
<jacksonModule class="com.arpnetworking.configuration.jackson.akka.AkkaLoggingModule" />
35+
<jacksonModule class="com.arpnetworking.configuration.jackson.pekko.PekkoLoggingModule" />
3636
<injectBeanIdentifier>true</injectBeanIdentifier>
3737
</encoder>
3838
</appender>

0 commit comments

Comments
 (0)