From b923c7b5a7281e423d205730d643dabb77a08900 Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Tue, 12 Sep 2023 18:12:09 -0500 Subject: [PATCH 1/3] 1.7: migrate from akka to pekko --- .../src/main/resources/metered-mailbox.conf | 6 -- .../src/test/resources/application.conf | 5 -- .../atlas/eval/graph/DefaultSettings.scala | 2 +- .../atlas/eval/graph/GraphConfig.scala | 2 +- .../netflix/atlas/eval/graph/Grapher.scala | 6 +- .../eval/model/LwcDiagnosticMessage.scala | 2 +- .../atlas/eval/model/LwcMessages.scala | 6 +- .../eval/stream/EurekaGroupsLookup.scala | 24 +++---- .../atlas/eval/stream/EurekaSource.scala | 24 +++---- .../atlas/eval/stream/EvaluationFlows.scala | 22 +++--- .../netflix/atlas/eval/stream/Evaluator.java | 18 ++--- .../atlas/eval/stream/EvaluatorImpl.scala | 50 +++++++------- .../atlas/eval/stream/ExprInterpreter.scala | 2 +- .../eval/stream/FillRemovedKeysWith.scala | 16 ++--- .../atlas/eval/stream/FinalExprEval.scala | 24 +++---- .../atlas/eval/stream/HostSource.scala | 20 +++--- .../eval/stream/LwcToAggrDatapoint.scala | 16 ++--- .../atlas/eval/stream/OnUpstreamFinish.scala | 16 ++--- .../atlas/eval/stream/ReplayLogging.scala | 2 +- .../netflix/atlas/eval/stream/SourceRef.scala | 4 +- .../atlas/eval/stream/StreamContext.scala | 26 +++---- .../netflix/atlas/eval/stream/StreamRef.scala | 2 +- .../eval/stream/SyntheticDataSource.scala | 10 +-- .../atlas/eval/stream/TimeGrouped.scala | 16 ++--- .../netflix/atlas/eval/stream/package.scala | 14 ++-- .../atlas/eval/graph/GraphUriSuite.scala | 6 +- .../atlas/eval/graph/GrapherSuite.scala | 6 +- .../atlas/eval/model/LwcMessagesSuite.scala | 4 +- .../eval/stream/EurekaGroupsLookupSuite.scala | 20 +++--- .../atlas/eval/stream/EurekaSourceSuite.scala | 30 ++++----- .../atlas/eval/stream/EvaluatorSuite.scala | 12 ++-- .../stream/FillRemovedKeysWithSuite.scala | 6 +- .../eval/stream/FinalExprEvalSuite.scala | 6 +- .../atlas/eval/stream/HostSourceSuite.scala | 28 ++++---- .../eval/stream/LwcToAggrDatapointSuite.scala | 12 ++-- .../atlas/eval/stream/TestContext.scala | 12 ++-- .../atlas/eval/stream/TimeGroupedSuite.scala | 6 +- .../atlas/eval/model/LwcMessagesParse.scala | 2 +- .../atlas/eval/stream/ByteStringDecode.scala | 2 +- .../{akka => pekko}/ByteStringReading.scala | 4 +- .../{akka => pekko}/MonitorFlowBench.scala | 32 ++++----- .../atlas/{akka => pekko}/UriParsing.scala | 4 +- .../src/main/resources/reference.conf | 4 +- .../netflix/atlas/lwcapi/EvaluateApi.scala | 14 ++-- .../netflix/atlas/lwcapi/ExpressionApi.scala | 24 +++---- .../netflix/atlas/lwcapi/QueueHandler.scala | 2 +- .../com/netflix/atlas/lwcapi/StreamsApi.scala | 14 ++-- .../netflix/atlas/lwcapi/SubscribeApi.scala | 38 +++++------ .../atlas/lwcapi/SubscriptionManager.scala | 2 +- .../lwcapi/WebSocketSessionManager.scala | 24 +++---- .../atlas/lwcapi/EvaluateApiSuite.scala | 8 +-- .../atlas/lwcapi/ExpressionApiSuite.scala | 14 ++-- .../StreamSubscriptionManagerSuite.scala | 8 +-- .../atlas/lwcapi/SubscribeApiSuite.scala | 12 ++-- .../lwcapi/WebSocketSessionManagerSuite.scala | 8 +-- .../pekko}/testkit/MUnitRouteSuite.scala | 8 +-- {atlas-akka => atlas-pekko}/README.md | 0 .../src/main/resources/metered-mailbox.conf | 6 ++ .../src/main/resources/reference.conf | 26 +++---- .../netflix/atlas/pekko}/AccessLogger.scala | 10 +-- .../netflix/atlas/pekko}/ActorService.scala | 16 ++--- .../netflix/atlas/pekko}/AkkaHttpClient.scala | 12 ++-- .../atlas/pekko}/ByteStringInputStream.scala | 4 +- .../com/netflix/atlas/pekko}/ClusterOps.scala | 32 ++++----- .../com/netflix/atlas/pekko}/ConfigApi.scala | 24 +++---- .../ConfigConnectionContextFactory.scala | 6 +- .../pekko}/ConnectionContextFactory.scala | 4 +- .../scala/com/netflix/atlas/pekko}/Cors.scala | 8 +-- .../atlas/pekko}/CustomDirectives.scala | 46 ++++++------- .../atlas/pekko}/CustomMediaTypes.scala | 6 +- .../atlas/pekko}/CustomRejection.scala | 6 +- .../atlas/pekko}/DeadLetterStatsActor.scala | 16 ++--- .../atlas/pekko}/DiagnosticMessage.scala | 10 +-- .../netflix/atlas/pekko}/HealthcheckApi.scala | 16 ++--- .../pekko}/ImperativeRequestContext.scala | 12 ++-- .../atlas/pekko}/OpportunisticEC.scala | 2 +- .../com/netflix/atlas/pekko}/Paths.scala | 4 +- .../netflix/atlas/pekko}/RequestHandler.scala | 54 +++++++-------- .../netflix/atlas/pekko}/StaticPages.scala | 12 ++-- .../com/netflix/atlas/pekko}/StreamOps.scala | 62 ++++++++--------- .../netflix/atlas/pekko}/ThreadPools.scala | 2 +- .../pekko}/UnboundedMeteredMailbox.scala | 26 +++---- .../com/netflix/atlas/pekko}/WebApi.scala | 4 +- .../com/netflix/atlas/pekko}/WebServer.scala | 20 +++--- .../src/test/resources/application.conf | 5 ++ .../src/test/resources/www/index.html | 0 .../src/test/resources/www/test | 0 .../atlas/pekko}/ActorServiceSuite.scala | 18 ++--- .../pekko}/ByteStringInputStreamSuite.scala | 4 +- .../atlas/pekko}/ClusterOpsSuite.scala | 10 +-- .../netflix/atlas/pekko}/ConfigApiSuite.scala | 8 +-- .../ConnectionContextFactorySuite.scala | 4 +- .../com/netflix/atlas/pekko}/CorsSuite.scala | 2 +- .../atlas/pekko}/CustomDirectivesSuite.scala | 36 +++++----- .../pekko}/DeadLetterStatsActorSuite.scala | 28 ++++---- .../atlas/pekko}/HealthcheckApiSuite.scala | 8 +-- .../atlas/pekko}/OpportunisticECSuite.scala | 2 +- .../com/netflix/atlas/pekko}/PathsSuite.scala | 14 ++-- .../RequestHandlerNoCompressionSuite.scala | 24 +++---- .../atlas/pekko}/RequestHandlerSuite.scala | 24 +++---- .../atlas/pekko}/StaticPagesSuite.scala | 6 +- .../netflix/atlas/pekko}/StreamOpsSuite.scala | 20 +++--- .../com/netflix/atlas/pekko}/TestApi.scala | 22 +++--- .../netflix/atlas/pekko}/TestApiSuite.scala | 6 +- .../atlas/pekko}/UriParsingSuite.scala | 6 +- .../atlas/eval/EvalConfiguration.scala | 2 +- .../lwcapi/LwcApiConfigurationSuite.scala | 2 +- .../atlas/pekko}/ActorSystemService.scala | 6 +- .../atlas/pekko}/AkkaConfiguration.scala | 6 +- .../atlas/pekko}/MaterializerService.scala | 6 +- .../atlas/pekko}/AkkaConfigurationSuite.scala | 12 ++-- .../src/main/resources/application.conf | 10 +-- .../src/main/resources/static.conf | 6 +- .../src/test/resources/application.conf | 2 +- .../src/main/resources/reference.conf | 6 +- .../com/netflix/atlas/webapi/ExprApi.scala | 16 ++--- .../atlas/webapi/FetchRequestSource.scala | 42 ++++++------ .../com/netflix/atlas/webapi/GraphApi.scala | 14 ++-- .../atlas/webapi/GraphRequestActor.scala | 16 ++--- .../atlas/webapi/LocalDatabaseActor.scala | 4 +- .../atlas/webapi/LocalPublishActor.scala | 16 ++--- .../com/netflix/atlas/webapi/PublishApi.scala | 18 ++--- .../com/netflix/atlas/webapi/TagsApi.scala | 28 ++++---- .../netflix/atlas/webapi/ExprApiSuite.scala | 10 +-- .../atlas/webapi/GraphApiMemDbSuite.scala | 14 ++-- .../netflix/atlas/webapi/GraphApiSuite.scala | 14 ++-- .../atlas/webapi/PublishApiSuite.scala | 14 ++-- .../netflix/atlas/webapi/TagsApiSuite.scala | 10 +-- build.sbt | 67 ++++++++++--------- conf/lwcapi-2.conf | 2 +- conf/lwcapi.conf | 4 +- conf/memory.conf | 6 +- project/Dependencies.scala | 27 +++----- 133 files changed, 888 insertions(+), 892 deletions(-) delete mode 100644 atlas-akka/src/main/resources/metered-mailbox.conf delete mode 100644 atlas-akka/src/test/resources/application.conf rename atlas-jmh/src/main/scala/com/netflix/atlas/{akka => pekko}/ByteStringReading.scala (97%) rename atlas-jmh/src/main/scala/com/netflix/atlas/{akka => pekko}/MonitorFlowBench.scala (81%) rename atlas-jmh/src/main/scala/com/netflix/atlas/{akka => pekko}/UriParsing.scala (96%) rename {atlas-akka-testkit/src/main/scala/com/netflix/atlas/akka => atlas-pekko-testkit/src/main/scala/com/netflix/atlas/pekko}/testkit/MUnitRouteSuite.scala (80%) rename {atlas-akka => atlas-pekko}/README.md (100%) create mode 100644 atlas-pekko/src/main/resources/metered-mailbox.conf rename {atlas-akka => atlas-pekko}/src/main/resources/reference.conf (86%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/AccessLogger.scala (94%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ActorService.scala (82%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/AkkaHttpClient.scala (83%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ByteStringInputStream.scala (95%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ClusterOps.scala (92%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ConfigApi.scala (86%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ConfigConnectionContextFactory.scala (95%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ConnectionContextFactory.scala (95%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/Cors.scala (90%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/CustomDirectives.scala (92%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/CustomMediaTypes.scala (83%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/CustomRejection.scala (85%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/DeadLetterStatsActor.scala (86%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/DiagnosticMessage.scala (87%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/HealthcheckApi.scala (79%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ImperativeRequestContext.scala (81%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/OpportunisticEC.scala (97%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/Paths.scala (95%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/RequestHandler.scala (82%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/StaticPages.scala (79%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/StreamOps.scala (86%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/ThreadPools.scala (98%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/UnboundedMeteredMailbox.scala (78%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/WebApi.scala (89%) rename {atlas-akka/src/main/scala/com/netflix/atlas/akka => atlas-pekko/src/main/scala/com/netflix/atlas/pekko}/WebServer.scala (88%) create mode 100644 atlas-pekko/src/test/resources/application.conf rename {atlas-akka => atlas-pekko}/src/test/resources/www/index.html (100%) rename {atlas-akka => atlas-pekko}/src/test/resources/www/test (100%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/ActorServiceSuite.scala (85%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/ByteStringInputStreamSuite.scala (97%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/ClusterOpsSuite.scala (95%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/ConfigApiSuite.scala (94%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/ConnectionContextFactorySuite.scala (96%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/CorsSuite.scala (97%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/CustomDirectivesSuite.scala (95%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/DeadLetterStatsActorSuite.scala (77%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/HealthcheckApiSuite.scala (91%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/OpportunisticECSuite.scala (96%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/PathsSuite.scala (77%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/RequestHandlerNoCompressionSuite.scala (86%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/RequestHandlerSuite.scala (91%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/StaticPagesSuite.scala (92%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/StreamOpsSuite.scala (94%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/TestApi.scala (82%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/TestApiSuite.scala (89%) rename {atlas-akka/src/test/scala/com/netflix/atlas/akka => atlas-pekko/src/test/scala/com/netflix/atlas/pekko}/UriParsingSuite.scala (87%) rename {atlas-spring-akka/src/main/scala/com/netflix/atlas/akka => atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko}/ActorSystemService.scala (91%) rename {atlas-spring-akka/src/main/scala/com/netflix/atlas/akka => atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko}/AkkaConfiguration.scala (95%) rename {atlas-spring-akka/src/main/scala/com/netflix/atlas/akka => atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko}/MaterializerService.scala (88%) rename {atlas-spring-akka/src/test/scala/com/netflix/atlas/akka => atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko}/AkkaConfigurationSuite.scala (87%) diff --git a/atlas-akka/src/main/resources/metered-mailbox.conf b/atlas-akka/src/main/resources/metered-mailbox.conf deleted file mode 100644 index 671fa1338..000000000 --- a/atlas-akka/src/main/resources/metered-mailbox.conf +++ /dev/null @@ -1,6 +0,0 @@ -akka.actor { - default-mailbox { - mailbox-type = "com.netflix.atlas.akka.UnboundedMeteredMailbox" - path-pattern = ${atlas.akka.path-pattern} - } -} \ No newline at end of file diff --git a/atlas-akka/src/test/resources/application.conf b/atlas-akka/src/test/resources/application.conf deleted file mode 100644 index d36f4cd93..000000000 --- a/atlas-akka/src/test/resources/application.conf +++ /dev/null @@ -1,5 +0,0 @@ - -atlas.akka.cors-host-patterns = [ - "localhost", - ".netflix.com" -] \ No newline at end of file diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/DefaultSettings.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/DefaultSettings.scala index 51fed4236..ea0e408a1 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/DefaultSettings.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/DefaultSettings.scala @@ -18,7 +18,7 @@ package com.netflix.atlas.eval.graph import java.util.concurrent.TimeUnit import java.util.regex.Pattern -import akka.http.scaladsl.model.ContentType +import org.apache.pekko.http.scaladsl.model.ContentType import com.netflix.atlas.chart.GraphEngine import com.netflix.atlas.core.model.CustomVocabulary import com.netflix.atlas.core.stacklang.Interpreter diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/GraphConfig.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/GraphConfig.scala index 6ba36e99f..e33d4365a 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/GraphConfig.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/GraphConfig.scala @@ -17,7 +17,7 @@ package com.netflix.atlas.eval.graph import java.time.Instant import java.time.ZoneId -import akka.http.scaladsl.model.ContentType +import org.apache.pekko.http.scaladsl.model.ContentType import com.netflix.atlas.chart.GraphEngine import com.netflix.atlas.chart.model.GraphDef import com.netflix.atlas.chart.model.LegendType diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/Grapher.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/Grapher.scala index fea8925cd..bcbf9c393 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/Grapher.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/Grapher.scala @@ -18,9 +18,9 @@ package com.netflix.atlas.eval.graph import java.awt.Color import java.io.ByteArrayOutputStream import java.time.Duration -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.Uri -import com.netflix.atlas.akka.Cors +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.Uri +import com.netflix.atlas.pekko.Cors import com.netflix.atlas.chart.Colors import com.netflix.atlas.chart.model.GraphDef import com.netflix.atlas.chart.model.Layout diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcDiagnosticMessage.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcDiagnosticMessage.scala index b14dd3702..39aaae52d 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcDiagnosticMessage.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcDiagnosticMessage.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.eval.model -import com.netflix.atlas.akka.DiagnosticMessage +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.json.JsonSupport /** diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcMessages.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcMessages.scala index 1165f3d8a..2e6e72c78 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcMessages.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcMessages.scala @@ -15,11 +15,11 @@ */ package com.netflix.atlas.eval.model -import akka.util.ByteString +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.core.JsonToken -import com.netflix.atlas.akka.ByteStringInputStream -import com.netflix.atlas.akka.DiagnosticMessage +import com.netflix.atlas.pekko.ByteStringInputStream +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.core.util.SmallHashMap import com.netflix.atlas.core.util.SortedTagMap import com.netflix.atlas.json.Json diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookup.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookup.scala index c1f7b510e..75ee2f3fd 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookup.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookup.scala @@ -15,18 +15,18 @@ */ package com.netflix.atlas.eval.stream -import akka.NotUsed -import akka.http.scaladsl.model.Uri -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.scaladsl.Source -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.eval.stream.EurekaSource.GroupResponse import com.netflix.atlas.eval.stream.EurekaSource.Groups import com.netflix.atlas.eval.stream.Evaluator.DataSources diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaSource.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaSource.scala index d75bbb2ac..3a4416346 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaSource.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaSource.scala @@ -15,19 +15,19 @@ */ package com.netflix.atlas.eval.stream -import akka.NotUsed -import akka.http.scaladsl.model.HttpMethods -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.stream.scaladsl.Compression -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.HttpMethods +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.stream.scaladsl.Compression +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.annotation.JsonProperty -import com.netflix.atlas.akka.ByteStringInputStream +import com.netflix.atlas.pekko.ByteStringInputStream import com.netflix.atlas.json.Json import com.typesafe.scalalogging.StrictLogging diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluationFlows.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluationFlows.scala index 6d0f2394d..f10e9736f 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluationFlows.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluationFlows.scala @@ -15,17 +15,17 @@ */ package com.netflix.atlas.eval.stream -import akka.Done -import akka.NotUsed -import akka.stream.KillSwitches -import akka.stream.Materializer -import akka.stream.ThrottleMode -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Framing -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.Done +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.KillSwitches +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.ThrottleMode +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Framing +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.netflix.spectator.api.Counter import scala.concurrent.Promise diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/Evaluator.java b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/Evaluator.java index aec6d4f54..be89600c4 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/Evaluator.java +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/Evaluator.java @@ -15,15 +15,15 @@ */ package com.netflix.atlas.eval.stream; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.Uri; -import akka.stream.Materializer; -import akka.stream.ThrottleMode; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Framing; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamConverters; -import akka.util.ByteString; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.ThrottleMode; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Framing; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamConverters; +import org.apache.pekko.util.ByteString; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluatorImpl.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluatorImpl.scala index 9432264dd..0965201e0 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluatorImpl.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EvaluatorImpl.scala @@ -22,30 +22,30 @@ import java.time.Duration import java.util.UUID import java.util.concurrent.TimeUnit import java.util.concurrent.TimeoutException -import akka.NotUsed -import akka.actor.ActorSystem -import akka.http.scaladsl.Http -import akka.http.scaladsl.model.Uri -import akka.http.scaladsl.model.ws.BinaryMessage -import akka.http.scaladsl.model.ws.TextMessage -import akka.http.scaladsl.model.ws.WebSocketRequest -import akka.stream.FlowShape -import akka.stream.Materializer -import akka.stream.OverflowStrategy -import akka.stream.ThrottleMode -import akka.stream.scaladsl.Broadcast -import akka.stream.scaladsl.BroadcastHub -import akka.stream.scaladsl.FileIO -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.GraphDSL -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Merge -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import akka.util.ByteString -import com.netflix.atlas.akka.ClusterOps -import com.netflix.atlas.akka.StreamOps -import com.netflix.atlas.akka.ThreadPools +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.Http +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.ws.BinaryMessage +import org.apache.pekko.http.scaladsl.model.ws.TextMessage +import org.apache.pekko.http.scaladsl.model.ws.WebSocketRequest +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.OverflowStrategy +import org.apache.pekko.stream.ThrottleMode +import org.apache.pekko.stream.scaladsl.Broadcast +import org.apache.pekko.stream.scaladsl.BroadcastHub +import org.apache.pekko.stream.scaladsl.FileIO +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.GraphDSL +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Merge +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.ClusterOps +import com.netflix.atlas.pekko.StreamOps +import com.netflix.atlas.pekko.ThreadPools import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.Query import com.netflix.atlas.eval.model.AggrDatapoint @@ -123,7 +123,7 @@ private[stream] abstract class EvaluatorImpl( protected def writeInputToFileImpl(uri: Uri, file: Path, duration: FiniteDuration): Unit = { // Explicit type needed in 2.5.2, but not 2.5.0. Likely related to: - // https://github.com/akka/akka/issues/22666 + // https://github.com/pekko/pekko/issues/22666 val options = Set[OpenOption]( StandardOpenOption.WRITE, StandardOpenOption.CREATE, diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ExprInterpreter.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ExprInterpreter.scala index f3d4772ad..5842617c8 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ExprInterpreter.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ExprInterpreter.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.eval.stream -import akka.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.Uri import com.netflix.atlas.core.model.CustomVocabulary import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.Expr diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWith.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWith.scala index 1528c48e6..cac93cf83 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWith.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWith.scala @@ -15,14 +15,14 @@ */ package com.netflix.atlas.eval.stream -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler import scala.collection.Map diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FinalExprEval.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FinalExprEval.scala index 57e8e927b..2b8b82f4c 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FinalExprEval.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/FinalExprEval.scala @@ -15,18 +15,18 @@ */ package com.netflix.atlas.eval.stream -import akka.NotUsed -import akka.http.scaladsl.model.Uri -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.scaladsl.Source -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.EvalContext import com.netflix.atlas.core.model.StatefulExpr diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/HostSource.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/HostSource.scala index 3530316c6..51a939f54 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/HostSource.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/HostSource.scala @@ -15,16 +15,16 @@ */ package com.netflix.atlas.eval.stream -import akka.NotUsed -import akka.http.scaladsl.model.HttpMethods -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.stream.scaladsl.Compression -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.HttpMethods +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.stream.scaladsl.Compression +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.typesafe.scalalogging.StrictLogging import scala.util.Failure diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapoint.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapoint.scala index eb33f0f05..a22df5cc3 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapoint.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapoint.scala @@ -15,14 +15,14 @@ */ package com.netflix.atlas.eval.stream -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler import com.netflix.atlas.eval.model.AggrDatapoint import com.netflix.atlas.eval.model.LwcDataExpr import com.netflix.atlas.eval.model.LwcDatapoint diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/OnUpstreamFinish.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/OnUpstreamFinish.scala index 8ab5f832d..581b22907 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/OnUpstreamFinish.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/OnUpstreamFinish.scala @@ -15,14 +15,14 @@ */ package com.netflix.atlas.eval.stream -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler /** * Performs the specified action when the upstream has finished. This is used as an diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ReplayLogging.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ReplayLogging.scala index b99da26e6..500512d9c 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ReplayLogging.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/ReplayLogging.scala @@ -17,7 +17,7 @@ package com.netflix.atlas.eval.stream import java.nio.charset.StandardCharsets -import akka.util.ByteString +import org.apache.pekko.util.ByteString import com.netflix.atlas.eval.stream.Evaluator.DataSources import com.netflix.atlas.json.Json import com.typesafe.scalalogging.StrictLogging diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SourceRef.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SourceRef.scala index 3defc6dd4..4a8dd49d9 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SourceRef.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SourceRef.scala @@ -15,8 +15,8 @@ */ package com.netflix.atlas.eval.stream -import akka.Done -import akka.stream.scaladsl.Source +import org.apache.pekko.Done +import org.apache.pekko.stream.scaladsl.Source import scala.concurrent.Promise import scala.util.Success diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamContext.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamContext.scala index 9fafe37f5..aa705d445 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamContext.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamContext.scala @@ -19,19 +19,19 @@ import java.nio.file.Path import java.nio.file.Paths import java.util.UUID -import akka.NotUsed -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.Uri -import akka.stream.IOResult -import akka.stream.Materializer -import akka.stream.scaladsl.FileIO -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Source -import akka.stream.scaladsl.StreamConverters -import akka.util.ByteString -import com.netflix.atlas.akka.AccessLogger -import com.netflix.atlas.akka.DiagnosticMessage -import com.netflix.atlas.akka.StreamOps +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.IOResult +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.FileIO +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.scaladsl.StreamConverters +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.AccessLogger +import com.netflix.atlas.pekko.DiagnosticMessage +import com.netflix.atlas.pekko.StreamOps import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.Query import com.netflix.atlas.core.util.Streams diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamRef.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamRef.scala index 0a7a86358..543d4165c 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamRef.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/StreamRef.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.eval.stream -import akka.stream.KillSwitch +import org.apache.pekko.stream.KillSwitch /** * Reference to a running stream. Has handle to terminate the stream as diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SyntheticDataSource.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SyntheticDataSource.scala index 935f8fe05..b3bbe9c64 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SyntheticDataSource.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SyntheticDataSource.scala @@ -15,11 +15,11 @@ */ package com.netflix.atlas.eval.stream -import akka.NotUsed -import akka.http.scaladsl.model.Uri -import akka.stream.IOResult -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.IOResult +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.Query import com.netflix.atlas.core.model.StyleExpr diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/TimeGrouped.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/TimeGrouped.scala index 95f6a9cdc..fcdaeba2d 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/TimeGrouped.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/TimeGrouped.scala @@ -15,14 +15,14 @@ */ package com.netflix.atlas.eval.stream -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.eval.model.AggrDatapoint import com.netflix.atlas.eval.model.AggrValuesInfo diff --git a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/package.scala b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/package.scala index 7bfd255a7..95fba0075 100644 --- a/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/package.scala +++ b/atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/package.scala @@ -15,13 +15,13 @@ */ package com.netflix.atlas.eval -import akka.NotUsed -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Source -import akka.util.ByteString -import com.netflix.atlas.akka.AccessLogger +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.AccessLogger import com.netflix.atlas.eval.stream.Evaluator.DataSource import com.netflix.atlas.eval.stream.Evaluator.DataSources import com.netflix.atlas.json.JsonSupport diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GraphUriSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GraphUriSuite.scala index fe513b398..8b9b71066 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GraphUriSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GraphUriSuite.scala @@ -15,9 +15,9 @@ */ package com.netflix.atlas.eval.graph -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.Uri -import akka.http.scaladsl.model.headers.Origin +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.headers.Origin import com.netflix.atlas.chart.model.PlotBound import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.Query diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GrapherSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GrapherSuite.scala index b85d16710..6c018b44e 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GrapherSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/GrapherSuite.scala @@ -15,9 +15,9 @@ */ package com.netflix.atlas.eval.graph -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.Uri -import akka.http.scaladsl.model.headers.Host +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.headers.Host import com.netflix.atlas.chart.util.GraphAssertions import com.netflix.atlas.chart.util.PngImage import com.netflix.atlas.chart.util.SrcPath diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/model/LwcMessagesSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/model/LwcMessagesSuite.scala index 697e8dd54..cb14a9524 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/model/LwcMessagesSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/model/LwcMessagesSuite.scala @@ -15,8 +15,8 @@ */ package com.netflix.atlas.eval.model -import akka.util.ByteString -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.core.util.Streams import com.netflix.atlas.json.Json import munit.FunSuite diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookupSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookupSuite.scala index 3be388859..7570add63 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookupSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookupSuite.scala @@ -15,16 +15,16 @@ */ package com.netflix.atlas.eval.stream -import akka.NotUsed -import akka.actor.ActorSystem -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.StatusCodes -import akka.stream.Materializer -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import com.netflix.atlas.akka.AccessLogger +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import com.netflix.atlas.pekko.AccessLogger import com.netflix.atlas.json.Json import munit.FunSuite diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaSourceSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaSourceSuite.scala index a42c7a629..fa65795f2 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaSourceSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaSourceSuite.scala @@ -19,22 +19,22 @@ import java.io.IOException import java.nio.charset.StandardCharsets import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit -import akka.actor.ActorSystem -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCode -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.stream.ConnectionException -import akka.stream.Materializer -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCode +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.stream.ConnectionException +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.databind.exc.ValueInstantiationException -import com.netflix.atlas.akka.AccessLogger +import com.netflix.atlas.pekko.AccessLogger import com.netflix.atlas.core.util.Streams import com.netflix.atlas.eval.stream.EurekaSource.GroupResponse import munit.FunSuite diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EvaluatorSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EvaluatorSuite.scala index 3fb6b621c..eb5962f8e 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EvaluatorSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EvaluatorSuite.scala @@ -20,12 +20,12 @@ import java.nio.file.Paths import java.time.Duration import java.util.concurrent.TimeoutException import java.util.concurrent.atomic.AtomicInteger -import akka.actor.ActorSystem -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.chart.util.SrcPath import com.netflix.atlas.eval.model.ArrayData import com.netflix.atlas.eval.model.LwcDatapoint diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWithSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWithSuite.scala index 93e713260..335407096 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWithSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FillRemovedKeysWithSuite.scala @@ -15,9 +15,9 @@ */ package com.netflix.atlas.eval.stream -import akka.actor.ActorSystem -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source import munit.FunSuite import scala.concurrent.Await diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FinalExprEvalSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FinalExprEvalSuite.scala index 41afc6929..97726e37f 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FinalExprEvalSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/FinalExprEvalSuite.scala @@ -15,9 +15,9 @@ */ package com.netflix.atlas.eval.stream -import akka.actor.ActorSystem -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.MathExpr import com.netflix.atlas.core.model.Query diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/HostSourceSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/HostSourceSuite.scala index 7987a86ef..087308330 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/HostSourceSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/HostSourceSuite.scala @@ -20,20 +20,20 @@ import java.nio.charset.StandardCharsets import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit -import akka.NotUsed -import akka.actor.ActorSystem -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.stream.KillSwitches -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.stream.KillSwitches +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import munit.FunSuite import scala.concurrent.Await diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapointSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapointSuite.scala index 985e132e4..6eef0e8c2 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapointSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapointSuite.scala @@ -16,12 +16,12 @@ package com.netflix.atlas.eval.stream import java.util.concurrent.ArrayBlockingQueue -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import akka.util.ByteString -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.Query import com.netflix.atlas.eval.model.AggrDatapoint diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TestContext.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TestContext.scala index 6a159ed4a..d6fd9a512 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TestContext.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TestContext.scala @@ -15,12 +15,12 @@ */ package com.netflix.atlas.eval.stream -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.StatusCodes -import akka.stream.Materializer -import akka.stream.scaladsl.Flow -import com.netflix.atlas.akka.AccessLogger +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Flow +import com.netflix.atlas.pekko.AccessLogger import com.netflix.spectator.api.NoopRegistry import com.netflix.spectator.api.Registry import com.typesafe.config.ConfigFactory diff --git a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TimeGroupedSuite.scala b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TimeGroupedSuite.scala index 418003d2c..a1afb8638 100644 --- a/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TimeGroupedSuite.scala +++ b/atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TimeGroupedSuite.scala @@ -15,9 +15,9 @@ */ package com.netflix.atlas.eval.stream -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.Query import com.netflix.atlas.eval.model.AggrDatapoint diff --git a/atlas-jmh/src/main/scala/com/netflix/atlas/eval/model/LwcMessagesParse.scala b/atlas-jmh/src/main/scala/com/netflix/atlas/eval/model/LwcMessagesParse.scala index 2ea650d5c..44b9336ad 100644 --- a/atlas-jmh/src/main/scala/com/netflix/atlas/eval/model/LwcMessagesParse.scala +++ b/atlas-jmh/src/main/scala/com/netflix/atlas/eval/model/LwcMessagesParse.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.eval.model -import akka.util.ByteString +import org.apache.pekko.util.ByteString import com.netflix.atlas.json.Json import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.Scope diff --git a/atlas-jmh/src/main/scala/com/netflix/atlas/eval/stream/ByteStringDecode.scala b/atlas-jmh/src/main/scala/com/netflix/atlas/eval/stream/ByteStringDecode.scala index 7203a1a4d..59704881d 100644 --- a/atlas-jmh/src/main/scala/com/netflix/atlas/eval/stream/ByteStringDecode.scala +++ b/atlas-jmh/src/main/scala/com/netflix/atlas/eval/stream/ByteStringDecode.scala @@ -17,7 +17,7 @@ package com.netflix.atlas.eval.stream import java.nio.charset.StandardCharsets -import akka.util.ByteString +import org.apache.pekko.util.ByteString import com.netflix.atlas.eval.model.LwcDatapoint import com.netflix.atlas.json.Json import org.openjdk.jmh.annotations.Benchmark diff --git a/atlas-jmh/src/main/scala/com/netflix/atlas/akka/ByteStringReading.scala b/atlas-jmh/src/main/scala/com/netflix/atlas/pekko/ByteStringReading.scala similarity index 97% rename from atlas-jmh/src/main/scala/com/netflix/atlas/akka/ByteStringReading.scala rename to atlas-jmh/src/main/scala/com/netflix/atlas/pekko/ByteStringReading.scala index 12fdb0f08..37a4a463e 100644 --- a/atlas-jmh/src/main/scala/com/netflix/atlas/akka/ByteStringReading.scala +++ b/atlas-jmh/src/main/scala/com/netflix/atlas/pekko/ByteStringReading.scala @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.util.Random -import akka.util.ByteString +import org.apache.pekko.util.ByteString import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.Scope import org.openjdk.jmh.annotations.State diff --git a/atlas-jmh/src/main/scala/com/netflix/atlas/akka/MonitorFlowBench.scala b/atlas-jmh/src/main/scala/com/netflix/atlas/pekko/MonitorFlowBench.scala similarity index 81% rename from atlas-jmh/src/main/scala/com/netflix/atlas/akka/MonitorFlowBench.scala rename to atlas-jmh/src/main/scala/com/netflix/atlas/pekko/MonitorFlowBench.scala index c9444c261..5f7982d8d 100644 --- a/atlas-jmh/src/main/scala/com/netflix/atlas/akka/MonitorFlowBench.scala +++ b/atlas-jmh/src/main/scala/com/netflix/atlas/pekko/MonitorFlowBench.scala @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka - -import akka.actor.ActorSystem -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler +package com.netflix.atlas.pekko + +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler import com.netflix.spectator.api.Clock import com.netflix.spectator.api.Registry import com.netflix.spectator.api.Timer @@ -88,9 +88,9 @@ object MonitorFlowBench { private final class MonitorFlow[T](registry: Registry, id: String) extends GraphStage[FlowShape[T, T]] { - private val numEvents = registry.counter("akka.stream.numEvents", "id", id) - private val upstreamTimer = registry.timer("akka.stream.upstreamDelay", "id", id) - private val downstreamTimer = registry.timer("akka.stream.downstreamDelay", "id", id) + private val numEvents = registry.counter("pekko.stream.numEvents", "id", id) + private val upstreamTimer = registry.timer("pekko.stream.upstreamDelay", "id", id) + private val downstreamTimer = registry.timer("pekko.stream.downstreamDelay", "id", id) private val in = Inlet[T]("MonitorBackpressure.in") private val out = Outlet[T]("MonitorBackpressure.out") diff --git a/atlas-jmh/src/main/scala/com/netflix/atlas/akka/UriParsing.scala b/atlas-jmh/src/main/scala/com/netflix/atlas/pekko/UriParsing.scala similarity index 96% rename from atlas-jmh/src/main/scala/com/netflix/atlas/akka/UriParsing.scala rename to atlas-jmh/src/main/scala/com/netflix/atlas/pekko/UriParsing.scala index 2546cddec..5dfb86589 100644 --- a/atlas-jmh/src/main/scala/com/netflix/atlas/akka/UriParsing.scala +++ b/atlas-jmh/src/main/scala/com/netflix/atlas/pekko/UriParsing.scala @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.Uri import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.Scope import org.openjdk.jmh.annotations.State diff --git a/atlas-lwcapi/src/main/resources/reference.conf b/atlas-lwcapi/src/main/resources/reference.conf index 4529754c9..88d9e37cf 100644 --- a/atlas-lwcapi/src/main/resources/reference.conf +++ b/atlas-lwcapi/src/main/resources/reference.conf @@ -19,8 +19,8 @@ atlas { batch-size = 100 } - akka { - api-endpoints = ${?atlas.akka.api-endpoints} [ + pekko { + api-endpoints = ${?atlas.pekko.api-endpoints} [ "com.netflix.atlas.lwcapi.EvaluateApi", "com.netflix.atlas.lwcapi.ExpressionApi", "com.netflix.atlas.lwcapi.StreamsApi", diff --git a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/EvaluateApi.scala b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/EvaluateApi.scala index 2d1874b96..1864aa410 100644 --- a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/EvaluateApi.scala +++ b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/EvaluateApi.scala @@ -15,14 +15,14 @@ */ package com.netflix.atlas.lwcapi -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.RemoteAddress -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.RemoteAddress +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.WebApi +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.core.util.SortedTagMap import com.netflix.atlas.eval.model.LwcDatapoint import com.netflix.atlas.eval.model.LwcDiagnosticMessage diff --git a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/ExpressionApi.scala b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/ExpressionApi.scala index 8938db4d6..ecbf03274 100644 --- a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/ExpressionApi.scala +++ b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/ExpressionApi.scala @@ -15,20 +15,20 @@ */ package com.netflix.atlas.lwcapi -import akka.actor.ActorRefFactory -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpHeader -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.util.ByteString +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpHeader +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.util.ByteString import com.github.benmanes.caffeine.cache.CacheLoader import com.github.benmanes.caffeine.cache.Caffeine -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.WebApi +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.core.util.FastGzipOutputStream import com.netflix.atlas.core.util.Strings import com.netflix.atlas.json.Json diff --git a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/QueueHandler.scala b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/QueueHandler.scala index a08dd0843..d4f24ca69 100644 --- a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/QueueHandler.scala +++ b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/QueueHandler.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.lwcapi -import com.netflix.atlas.akka.StreamOps +import com.netflix.atlas.pekko.StreamOps import com.netflix.atlas.json.JsonSupport import com.typesafe.scalalogging.StrictLogging diff --git a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/StreamsApi.scala b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/StreamsApi.scala index 0bc5e44f6..ee9526750 100644 --- a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/StreamsApi.scala +++ b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/StreamsApi.scala @@ -15,13 +15,13 @@ */ package com.netflix.atlas.lwcapi -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.DiagnosticMessage -import com.netflix.atlas.akka.WebApi +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.DiagnosticMessage +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.json.Json /** diff --git a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscribeApi.scala b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscribeApi.scala index 44babe3ab..8dcb08ece 100644 --- a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscribeApi.scala +++ b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscribeApi.scala @@ -15,22 +15,22 @@ */ package com.netflix.atlas.lwcapi -import akka.NotUsed -import akka.http.scaladsl.model.ws.BinaryMessage -import akka.http.scaladsl.model.ws.Message -import akka.http.scaladsl.model.ws.TextMessage -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.stream.Materializer -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source -import akka.util.ByteString -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.DiagnosticMessage -import com.netflix.atlas.akka.StreamOps -import com.netflix.atlas.akka.WebApi +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.ws.BinaryMessage +import org.apache.pekko.http.scaladsl.model.ws.Message +import org.apache.pekko.http.scaladsl.model.ws.TextMessage +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.DiagnosticMessage +import com.netflix.atlas.pekko.StreamOps +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.eval.model.LwcDataExpr import com.netflix.atlas.eval.model.LwcHeartbeat import com.netflix.atlas.eval.model.LwcMessages @@ -57,7 +57,7 @@ class SubscribeApi( with StrictLogging { import SubscribeApi._ - import com.netflix.atlas.akka.OpportunisticEC._ + import com.netflix.atlas.pekko.OpportunisticEC._ private val queueSize = config.getInt("atlas.lwcapi.queue-size") private val batchSize = config.getInt("atlas.lwcapi.batch-size") @@ -141,14 +141,14 @@ class SubscribeApi( // Create queue to allow messages coming into /evaluate to be passed to this stream // TODO - A client can connect but not send a message. When that happens, the // publisher sink from this queue will shutdown and complete the queue. See - // akka.http.client.stream-cancellation-delay. Unfortunately + // pekko.http.client.stream-cancellation-delay. Unfortunately // the websocket flow is not notified of the shutdown. If the client sends a message // after shutdown, the client flow will be terminated. (that's fine). // There is likely another way to wire this up. Alternatively we could hold a // kill switch on the createHandlerFlow...()s but some state flags are needed and // it gets messy. // For now, the queue will close and if no messages are sent from the client, the - // akka.http.server.idle-timeout will kill the client connection and we'll try to + // pekko.http.server.idle-timeout will kill the client connection and we'll try to // close a closed queue. val (queue, pub) = StreamOps .blockingQueue[Seq[JsonSupport]](registry, "SubscribeApi", queueSize) diff --git a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscriptionManager.scala b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscriptionManager.scala index a8041af2e..421636e51 100644 --- a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscriptionManager.scala +++ b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/SubscriptionManager.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.lwcapi -import com.netflix.atlas.akka.ThreadPools +import com.netflix.atlas.pekko.ThreadPools import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ScheduledThreadPoolExecutor diff --git a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/WebSocketSessionManager.scala b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/WebSocketSessionManager.scala index ebc330319..cc82541e7 100644 --- a/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/WebSocketSessionManager.scala +++ b/atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/WebSocketSessionManager.scala @@ -15,18 +15,18 @@ */ package com.netflix.atlas.lwcapi -import akka.NotUsed -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.scaladsl.Source -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler -import akka.util.ByteString -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.eval.model.LwcExpression import com.netflix.atlas.eval.model.LwcMessages import com.netflix.atlas.json.Json diff --git a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/EvaluateApiSuite.scala b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/EvaluateApiSuite.scala index 70eb62e80..882b4f995 100644 --- a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/EvaluateApiSuite.scala +++ b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/EvaluateApiSuite.scala @@ -15,10 +15,10 @@ */ package com.netflix.atlas.lwcapi -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.DiagnosticMessage -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.DiagnosticMessage +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.core.util.SortedTagMap import com.netflix.atlas.eval.model.LwcDiagnosticMessage import com.netflix.atlas.lwcapi.EvaluateApi._ diff --git a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/ExpressionApiSuite.scala b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/ExpressionApiSuite.scala index 15def0305..e86afd76f 100644 --- a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/ExpressionApiSuite.scala +++ b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/ExpressionApiSuite.scala @@ -15,13 +15,13 @@ */ package com.netflix.atlas.lwcapi -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers.RawHeader -import akka.http.scaladsl.testkit.RouteTestTimeout -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Sink -import com.netflix.atlas.akka.StreamOps -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers.RawHeader +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Sink +import com.netflix.atlas.pekko.StreamOps +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.core.util.Streams import com.netflix.atlas.json.JsonSupport import com.netflix.spectator.api.NoopRegistry diff --git a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/StreamSubscriptionManagerSuite.scala b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/StreamSubscriptionManagerSuite.scala index 40307ee98..46483676b 100644 --- a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/StreamSubscriptionManagerSuite.scala +++ b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/StreamSubscriptionManagerSuite.scala @@ -15,10 +15,10 @@ */ package com.netflix.atlas.lwcapi -import akka.actor.ActorSystem -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Sink -import com.netflix.atlas.akka.StreamOps +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Sink +import com.netflix.atlas.pekko.StreamOps import com.netflix.atlas.json.JsonSupport import com.netflix.spectator.api.NoopRegistry import munit.FunSuite diff --git a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/SubscribeApiSuite.scala b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/SubscribeApiSuite.scala index 374d6a97d..b631e3528 100644 --- a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/SubscribeApiSuite.scala +++ b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/SubscribeApiSuite.scala @@ -15,12 +15,12 @@ */ package com.netflix.atlas.lwcapi -import akka.http.scaladsl.model.ws.Message -import akka.http.scaladsl.testkit.RouteTestTimeout -import akka.http.scaladsl.testkit.WSProbe -import com.netflix.atlas.akka.DiagnosticMessage -import com.netflix.atlas.akka.RequestHandler -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.ws.Message +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import org.apache.pekko.http.scaladsl.testkit.WSProbe +import com.netflix.atlas.pekko.DiagnosticMessage +import com.netflix.atlas.pekko.RequestHandler +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.eval.model.LwcDatapoint import com.netflix.atlas.eval.model.LwcExpression import com.netflix.atlas.eval.model.LwcHeartbeat diff --git a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/WebSocketSessionManagerSuite.scala b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/WebSocketSessionManagerSuite.scala index fca1b1029..981c10cc0 100644 --- a/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/WebSocketSessionManagerSuite.scala +++ b/atlas-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/WebSocketSessionManagerSuite.scala @@ -15,10 +15,10 @@ */ package com.netflix.atlas.lwcapi -import akka.NotUsed -import akka.actor.ActorSystem -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source import com.netflix.atlas.json.JsonSupport import com.netflix.atlas.lwcapi.SubscribeApi.ErrorMsg import munit.FunSuite diff --git a/atlas-akka-testkit/src/main/scala/com/netflix/atlas/akka/testkit/MUnitRouteSuite.scala b/atlas-pekko-testkit/src/main/scala/com/netflix/atlas/pekko/testkit/MUnitRouteSuite.scala similarity index 80% rename from atlas-akka-testkit/src/main/scala/com/netflix/atlas/akka/testkit/MUnitRouteSuite.scala rename to atlas-pekko-testkit/src/main/scala/com/netflix/atlas/pekko/testkit/MUnitRouteSuite.scala index 2bb60437e..fb1ba86e8 100644 --- a/atlas-akka-testkit/src/main/scala/com/netflix/atlas/akka/testkit/MUnitRouteSuite.scala +++ b/atlas-pekko-testkit/src/main/scala/com/netflix/atlas/pekko/testkit/MUnitRouteSuite.scala @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka.testkit +package com.netflix.atlas.pekko.testkit -import akka.http.scaladsl.server.ExceptionHandler -import akka.http.scaladsl.testkit.RouteTest -import akka.http.scaladsl.testkit.TestFrameworkInterface +import org.apache.pekko.http.scaladsl.server.ExceptionHandler +import org.apache.pekko.http.scaladsl.testkit.RouteTest +import org.apache.pekko.http.scaladsl.testkit.TestFrameworkInterface import munit.FunSuite abstract class MUnitRouteSuite extends FunSuite with RouteTest with TestFrameworkInterface { diff --git a/atlas-akka/README.md b/atlas-pekko/README.md similarity index 100% rename from atlas-akka/README.md rename to atlas-pekko/README.md diff --git a/atlas-pekko/src/main/resources/metered-mailbox.conf b/atlas-pekko/src/main/resources/metered-mailbox.conf new file mode 100644 index 000000000..e047c470b --- /dev/null +++ b/atlas-pekko/src/main/resources/metered-mailbox.conf @@ -0,0 +1,6 @@ +pekko.actor { + default-mailbox { + mailbox-type = "com.netflix.atlas.pekko.UnboundedMeteredMailbox" + path-pattern = ${atlas.pekko.path-pattern} + } +} \ No newline at end of file diff --git a/atlas-akka/src/main/resources/reference.conf b/atlas-pekko/src/main/resources/reference.conf similarity index 86% rename from atlas-akka/src/main/resources/reference.conf rename to atlas-pekko/src/main/resources/reference.conf index 18ab3a20e..e7f66fc13 100644 --- a/atlas-akka/src/main/resources/reference.conf +++ b/atlas-pekko/src/main/resources/reference.conf @@ -1,24 +1,24 @@ -atlas.akka { +atlas.pekko { # Regex that determines how the path tag value to use when mapping data about an # actor into a meter. There a should be a single capture group which will be the # path to report. - path-pattern = "^akka://(?:[^/]+)/(?:system|user)/([^$\\d/]+).*?$" + path-pattern = "^pekko://(?:[^/]+)/(?:system|user)/([^$\\d/]+).*?$" # List of additional actor classes to load - actors = ${?atlas.akka.actors} [ + actors = ${?atlas.pekko.actors} [ { name = "deadLetterStats" - class = "com.netflix.atlas.akka.DeadLetterStatsActor" + class = "com.netflix.atlas.pekko.DeadLetterStatsActor" } ] # List of classes to load as API endpoints - api-endpoints = ${?atlas.akka.api-endpoints} [ - "com.netflix.atlas.akka.HealthcheckApi", - "com.netflix.atlas.akka.ConfigApi", - "com.netflix.atlas.akka.StaticPages" + api-endpoints = ${?atlas.pekko.api-endpoints} [ + "com.netflix.atlas.pekko.HealthcheckApi", + "com.netflix.atlas.pekko.ConfigApi", + "com.netflix.atlas.pekko.StaticPages" ] # Hosts that are allowed to make cross origin requests @@ -88,7 +88,7 @@ atlas.akka { #{ # port = 7102 # secure = true - # context-factory = "com.netflix.atlas.akka.ConfigConnectionContextFactory" + # context-factory = "com.netflix.atlas.pekko.ConfigConnectionContextFactory" # ssl-config { # // See https://lightbend.github.io/ssl-config/KeyStores.html # } @@ -99,11 +99,11 @@ atlas.akka { bind-timeout = 5 seconds } -akka { +pekko { # Sometimes see timeouts related to logging, maybe related to something about M1 Macs logger-startup-timeout = 30s - loggers = ["akka.event.slf4j.Slf4jLogger"] - logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] + logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter" loglevel = "INFO" actor { debug { @@ -134,7 +134,7 @@ akka { } } -akka.http { +pekko.http { client { } diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/AccessLogger.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AccessLogger.scala similarity index 94% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/AccessLogger.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AccessLogger.scala index 1bc85472b..b2666a8d0 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/AccessLogger.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AccessLogger.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse import com.netflix.spectator.api.Spectator import com.netflix.spectator.ipc.IpcLogEntry import com.netflix.spectator.ipc.IpcLogger @@ -62,9 +62,9 @@ class AccessLogger private (entry: IpcLogEntry, client: Boolean) { object AccessLogger { - private val owner = "atlas-akka" + private val owner = "atlas-pekko" - private[akka] val ipcLogger = new IpcLogger(Spectator.globalRegistry()) + private[pekko] val ipcLogger = new IpcLogger(Spectator.globalRegistry()) /** * Create a new logger for a named client. diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ActorService.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ActorService.scala similarity index 82% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ActorService.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ActorService.scala index b61c84e13..d87bc5c47 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ActorService.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ActorService.scala @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.Actor -import akka.actor.ActorSystem -import akka.actor.Props -import akka.routing.FromConfig +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.actor.Props +import org.apache.pekko.routing.FromConfig import com.netflix.iep.service.AbstractService import com.netflix.iep.service.ClassFactory import com.netflix.spectator.api.Registry @@ -29,7 +29,7 @@ import java.lang.reflect.Type /** * Exposes actor system as service for healthcheck and proper shutdown. Additional - * actors to start up can be specified using the `atlas.akka.actors` property. + * actors to start up can be specified using the `atlas.pekko.actors` property. */ class ActorService( system: ActorSystem, @@ -41,7 +41,7 @@ class ActorService( override def startImpl(): Unit = { import scala.jdk.CollectionConverters._ - config.getConfigList("atlas.akka.actors").asScala.foreach { cfg => + config.getConfigList("atlas.pekko.actors").asScala.foreach { cfg => val name = cfg.getString("name") val cls = Class.forName(cfg.getString("class")) val ref = system.actorOf(newActor(name, cls), name) @@ -56,7 +56,7 @@ class ActorService( classOf[Registry] -> registry ).withDefaultValue(null) val props = Props(classFactory.newInstance[Actor](cls, bindings.asJava)) - val routerCfgPath = s"akka.actor.deployment./$name.router" + val routerCfgPath = s"pekko.actor.deployment./$name.router" if (config.hasPath(routerCfgPath)) FromConfig.props(props) else props } diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/AkkaHttpClient.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaHttpClient.scala similarity index 83% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/AkkaHttpClient.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaHttpClient.scala index b5c973306..f9a0ed546 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/AkkaHttpClient.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaHttpClient.scala @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem -import akka.http.scaladsl.Http -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.Http +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse import scala.concurrent.Future /** @@ -27,7 +27,7 @@ import scala.concurrent.Future trait AkkaHttpClient { /** - * See akka.http.scaladsl.Http + * See pekko.http.scaladsl.Http */ def singleRequest(request: HttpRequest): Future[HttpResponse] diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ByteStringInputStream.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ByteStringInputStream.scala similarity index 95% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ByteStringInputStream.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ByteStringInputStream.scala index 9721d4184..c9e8e2121 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ByteStringInputStream.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ByteStringInputStream.scala @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.io.InputStream -import akka.util.ByteString +import org.apache.pekko.util.ByteString /** * Wraps a `ByteString` to allow it to be read from code expecting an `InputStream`. This diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ClusterOps.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ClusterOps.scala similarity index 92% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ClusterOps.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ClusterOps.scala index 889dd1e51..fa2c00be3 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ClusterOps.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ClusterOps.scala @@ -13,22 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka - -import akka.NotUsed -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.RestartSettings -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.RestartFlow -import akka.stream.scaladsl.Source -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler -import com.netflix.atlas.akka.StreamOps.SourceQueue +package com.netflix.atlas.pekko + +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.RestartSettings +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.RestartFlow +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler +import com.netflix.atlas.pekko.StreamOps.SourceQueue import com.netflix.spectator.api.NoopRegistry import com.netflix.spectator.api.Registry import com.typesafe.scalalogging.StrictLogging diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ConfigApi.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConfigApi.scala similarity index 86% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ConfigApi.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConfigApi.scala index 8d215281e..c751f735d 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ConfigApi.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConfigApi.scala @@ -13,22 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.io.StringWriter import java.util.Properties -import akka.actor.ActorRefFactory -import akka.http.scaladsl.model.ContentTypes -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.Uri -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.RequestContext -import akka.http.scaladsl.server.Route -import com.netflix.atlas.akka.CustomDirectives._ +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.http.scaladsl.model.ContentTypes +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.RequestContext +import org.apache.pekko.http.scaladsl.server.Route +import com.netflix.atlas.pekko.CustomDirectives._ import com.typesafe.config.Config import com.typesafe.config.ConfigException import com.typesafe.config.ConfigFactory diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ConfigConnectionContextFactory.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConfigConnectionContextFactory.scala similarity index 95% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ConfigConnectionContextFactory.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConfigConnectionContextFactory.scala index 0bbd28b2e..c8c53b525 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ConfigConnectionContextFactory.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConfigConnectionContextFactory.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.ConnectionContext -import akka.http.scaladsl.HttpsConnectionContext +import org.apache.pekko.http.scaladsl.ConnectionContext +import org.apache.pekko.http.scaladsl.HttpsConnectionContext import com.typesafe.config.Config import com.typesafe.sslconfig.ssl.ClientAuth import com.typesafe.sslconfig.ssl.ConfigSSLContextBuilder diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ConnectionContextFactory.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConnectionContextFactory.scala similarity index 95% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ConnectionContextFactory.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConnectionContextFactory.scala index 3442af431..d338aa121 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ConnectionContextFactory.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ConnectionContextFactory.scala @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.HttpsConnectionContext +import org.apache.pekko.http.scaladsl.HttpsConnectionContext import com.typesafe.config.Config import javax.net.ssl.SSLContext diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/Cors.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/Cors.scala similarity index 90% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/Cors.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/Cors.scala index 19ca43514..8e7c18e71 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/Cors.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/Cors.scala @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.Uri import com.netflix.iep.config.ConfigManager /** Helper functions for working with CORS requests. */ @@ -23,12 +23,12 @@ object Cors { private val allowedHostPatterns = { import scala.jdk.CollectionConverters._ - ConfigManager.get().getStringList("atlas.akka.cors-host-patterns").asScala.toList + ConfigManager.get().getStringList("atlas.pekko.cors-host-patterns").asScala.toList } /** * Return a normalized origin string with just the host name if the host is allowed based - * on the set of patterns configured in `atlas.akka.cors-host-patterns`. + * on the set of patterns configured in `atlas.pekko.cors-host-patterns`. */ def normalizedOrigin(origin: String): Option[String] = { val originHostname = extractHostname(origin) diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomDirectives.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomDirectives.scala similarity index 92% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomDirectives.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomDirectives.scala index 49c9e6128..60a82d83d 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomDirectives.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomDirectives.scala @@ -13,33 +13,33 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.io.InputStream import java.io.StringWriter import java.util.zip.GZIPInputStream -import akka.http.scaladsl.model.HttpCharsets -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpHeader -import akka.http.scaladsl.model.HttpMethods -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaType -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.server.Directive -import akka.http.scaladsl.server.Directive0 -import akka.http.scaladsl.server.Directive1 -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.MalformedRequestContentRejection -import akka.http.scaladsl.server.PathMatcher -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.server.RouteResult -import akka.http.scaladsl.server.directives.LoggingMagnet -import akka.http.scaladsl.unmarshalling.FromRequestUnmarshaller -import akka.stream.Materializer -import akka.util.ByteString +import org.apache.pekko.http.scaladsl.model.HttpCharsets +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpHeader +import org.apache.pekko.http.scaladsl.model.HttpMethods +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaType +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.server.Directive +import org.apache.pekko.http.scaladsl.server.Directive0 +import org.apache.pekko.http.scaladsl.server.Directive1 +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.MalformedRequestContentRejection +import org.apache.pekko.http.scaladsl.server.PathMatcher +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.server.RouteResult +import org.apache.pekko.http.scaladsl.server.directives.LoggingMagnet +import org.apache.pekko.http.scaladsl.unmarshalling.FromRequestUnmarshaller +import org.apache.pekko.stream.Materializer +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.module.scala.JavaTypeable import com.netflix.atlas.json.Json diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomMediaTypes.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomMediaTypes.scala similarity index 83% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomMediaTypes.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomMediaTypes.scala index f0ef39ec4..b0e195c82 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomMediaTypes.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomMediaTypes.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.MediaType -import akka.http.scaladsl.model.MediaType.Compressible +import org.apache.pekko.http.scaladsl.model.MediaType +import org.apache.pekko.http.scaladsl.model.MediaType.Compressible object CustomMediaTypes { diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomRejection.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomRejection.scala similarity index 85% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomRejection.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomRejection.scala index 331b623e7..d2282a06d 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/CustomRejection.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/CustomRejection.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.StatusCode -import akka.http.scaladsl.server.Rejection +import org.apache.pekko.http.scaladsl.model.StatusCode +import org.apache.pekko.http.scaladsl.server.Rejection /** * Rejection type that can be used with the RequestHandler to fully customize the status diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/DeadLetterStatsActor.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/DeadLetterStatsActor.scala similarity index 86% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/DeadLetterStatsActor.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/DeadLetterStatsActor.scala index 0f3a36ef0..3c4158dae 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/DeadLetterStatsActor.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/DeadLetterStatsActor.scala @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.Actor -import akka.actor.AllDeadLetters +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.AllDeadLetters import com.netflix.spectator.api.Registry import com.typesafe.config.Config import com.typesafe.scalalogging.StrictLogging /** - * Update counter for dead letters in the actor system. The counter name is `akka.deadLetters` + * Update counter for dead letters in the actor system. The counter name is `pekko.deadLetters` * and has dimensions for: * * - `class`: the type of dead letter. Value should be either DeadLetter or SuppressedDeadLetter. @@ -31,12 +31,12 @@ import com.typesafe.scalalogging.StrictLogging * * To use subscribe to the dead letters on the event stream: * - * http://doc.akka.io/docs/akka/2.4.0/scala/event-bus.html#Dead_Letters + * http://doc.pekko.io/docs/pekko/2.4.0/scala/event-bus.html#Dead_Letters * * @param registry * Spectator registry to use for metrics. * @param config - * Config to use for creating the path mapper using the `atlas.akka.path-pattern` + * Config to use for creating the path mapper using the `atlas.pekko.path-pattern` * This pattern maps an actor path to a tag value for the metric. This should be * chosen to avoid parts of the path such as incrementing counters in the path of * short lived actors. @@ -45,8 +45,8 @@ class DeadLetterStatsActor(registry: Registry, config: Config) extends Actor wit context.system.eventStream.subscribe(self, classOf[AllDeadLetters]) - private val pathMapper = Paths.createMapper(config.getConfig("atlas.akka")) - private val deadLetterId = registry.createId("akka.deadLetters") + private val pathMapper = Paths.createMapper(config.getConfig("atlas.pekko")) + private val deadLetterId = registry.createId("pekko.deadLetters") def receive: Receive = { case letter: AllDeadLetters => diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/DiagnosticMessage.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/DiagnosticMessage.scala similarity index 87% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/DiagnosticMessage.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/DiagnosticMessage.scala index df5b487d4..300be8a19 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/DiagnosticMessage.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/DiagnosticMessage.scala @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCode +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCode import com.netflix.atlas.json.JsonSupport object DiagnosticMessage { diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/HealthcheckApi.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/HealthcheckApi.scala similarity index 79% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/HealthcheckApi.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/HealthcheckApi.scala index dcb90c893..d5b43eaf2 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/HealthcheckApi.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/HealthcheckApi.scala @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import com.netflix.atlas.akka.CustomDirectives._ +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import com.netflix.atlas.pekko.CustomDirectives._ import com.netflix.atlas.json.Json import com.netflix.iep.service.ServiceManager import com.typesafe.scalalogging.StrictLogging diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ImperativeRequestContext.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ImperativeRequestContext.scala similarity index 81% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ImperativeRequestContext.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ImperativeRequestContext.scala index cd24d35ec..524ad2ae7 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ImperativeRequestContext.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ImperativeRequestContext.scala @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.server.RequestContext -import akka.http.scaladsl.server.RouteResult +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.server.RequestContext +import org.apache.pekko.http.scaladsl.server.RouteResult import scala.concurrent.Promise /** * Helper for porting some of the actor per request use-cases from spray over - * to akka-http. Based on: + * to pekko-http. Based on: * - * https://markatta.com/codemonkey/blog/2016/08/03/actor-per-request-with-akka-http/ + * https://markatta.com/codemonkey/blog/2016/08/03/actor-per-request-with-pekko-http/ */ case class ImperativeRequestContext(value: AnyRef, ctx: RequestContext) { diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/OpportunisticEC.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/OpportunisticEC.scala similarity index 97% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/OpportunisticEC.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/OpportunisticEC.scala index 712fda1bc..9d98c7f15 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/OpportunisticEC.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/OpportunisticEC.scala @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import scala.concurrent.ExecutionContext diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/Paths.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/Paths.scala similarity index 95% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/Paths.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/Paths.scala index 3dc1851fc..1106b5397 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/Paths.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/Paths.scala @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.util.regex.Pattern -import akka.actor.ActorPath +import org.apache.pekko.actor.ActorPath import com.typesafe.config.Config /** Helper for creating mapping functions to extract a tag value based on an actor path. */ diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/RequestHandler.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/RequestHandler.scala similarity index 82% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/RequestHandler.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/RequestHandler.scala index 5ca9d3bde..d1e3ca191 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/RequestHandler.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/RequestHandler.scala @@ -13,27 +13,27 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.lang.reflect.Type import java.util.zip.Deflater -import akka.http.scaladsl.coding.Coders -import akka.http.scaladsl.model.EntityStreamSizeException -import akka.http.scaladsl.model.HttpHeader -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.StatusCode -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers.RawHeader -import akka.http.scaladsl.server.AuthenticationFailedRejection -import akka.http.scaladsl.server.AuthorizationFailedRejection -import akka.http.scaladsl.server.CircuitBreakerOpenRejection -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.MalformedRequestContentRejection -import akka.http.scaladsl.server.MethodRejection -import akka.http.scaladsl.server.Rejection -import akka.http.scaladsl.server.RejectionHandler -import akka.http.scaladsl.server.Route -import akka.pattern.CircuitBreakerOpenException +import org.apache.pekko.http.scaladsl.coding.Coders +import org.apache.pekko.http.scaladsl.model.EntityStreamSizeException +import org.apache.pekko.http.scaladsl.model.HttpHeader +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.StatusCode +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers.RawHeader +import org.apache.pekko.http.scaladsl.server.AuthenticationFailedRejection +import org.apache.pekko.http.scaladsl.server.AuthorizationFailedRejection +import org.apache.pekko.http.scaladsl.server.CircuitBreakerOpenRejection +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.MalformedRequestContentRejection +import org.apache.pekko.http.scaladsl.server.MethodRejection +import org.apache.pekko.http.scaladsl.server.Rejection +import org.apache.pekko.http.scaladsl.server.RejectionHandler +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.pattern.CircuitBreakerOpenException import com.fasterxml.jackson.core.JsonProcessingException import com.netflix.iep.service.ClassFactory import com.netflix.spectator.api.Registry @@ -48,7 +48,7 @@ class RequestHandler(config: Config, registry: Registry, classFactory: ClassFact val endpoints = loadRoutesFromConfig() if (endpoints.isEmpty) RequestHandler.notFound else { - // Routes defined by the included WebApi classes from the `atlas.akka.api-endpoints` + // Routes defined by the included WebApi classes from the `atlas.pekko.api-endpoints` // config setting val routes = endpoints.tail.foldLeft(endpoints.head.routes) { case (acc, r) => acc ~ r.routes @@ -59,7 +59,7 @@ class RequestHandler(config: Config, registry: Registry, classFactory: ClassFact private def endpoints: List[String] = { import scala.jdk.CollectionConverters._ - config.getStringList("atlas.akka.api-endpoints").asScala.toList.distinct + config.getStringList("atlas.pekko.api-endpoints").asScala.toList.distinct } /** @@ -89,7 +89,7 @@ class RequestHandler(config: Config, registry: Registry, classFactory: ClassFact object RequestHandler extends StrictLogging { - import com.netflix.atlas.akka.CustomDirectives._ + import com.netflix.atlas.pekko.CustomDirectives._ private val defaultSettings = Settings(ConfigFactory.load()) @@ -97,13 +97,13 @@ object RequestHandler extends StrictLogging { val corsHostPatterns: List[String] = { import scala.jdk.CollectionConverters._ - config.getStringList("atlas.akka.cors-host-patterns").asScala.toList.distinct + config.getStringList("atlas.pekko.cors-host-patterns").asScala.toList.distinct } val diagnosticHeaders: List[HttpHeader] = { import scala.jdk.CollectionConverters._ config - .getConfigList("atlas.akka.diagnostic-headers") + .getConfigList("atlas.pekko.diagnostic-headers") .asScala .map { c => RawHeader(c.getString("name"), c.getString("value")) @@ -113,19 +113,19 @@ object RequestHandler extends StrictLogging { } val corsEnabled: Boolean = { - config.getBoolean("atlas.akka.request-handler.cors") + config.getBoolean("atlas.pekko.request-handler.cors") } val handleCompression: Boolean = { - config.getBoolean("atlas.akka.request-handler.compression") + config.getBoolean("atlas.pekko.request-handler.compression") } val enableAccessLog: Boolean = { - config.getBoolean("atlas.akka.request-handler.access-log") + config.getBoolean("atlas.pekko.request-handler.access-log") } val closeProbability: Double = { - config.getDouble("atlas.akka.request-handler.close-probability") + config.getDouble("atlas.pekko.request-handler.close-probability") } } diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/StaticPages.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StaticPages.scala similarity index 79% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/StaticPages.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StaticPages.scala index 50d3acdd4..e6b50ee5a 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/StaticPages.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StaticPages.scala @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route import com.typesafe.config.Config /** @@ -25,7 +25,7 @@ import com.typesafe.config.Config */ class StaticPages(config: Config) extends WebApi { - private val defaultPage = config.getString("atlas.akka.static.default-page") + private val defaultPage = config.getString("atlas.pekko.static.default-page") def routes: Route = { pathEndOrSingleSlash { @@ -44,7 +44,7 @@ class StaticPages(config: Config) extends WebApi { } import scala.jdk.CollectionConverters._ - val singlePagePrefixes = config.getConfigList("atlas.akka.static.single-page-prefixes") + val singlePagePrefixes = config.getConfigList("atlas.pekko.static.single-page-prefixes") singlePagePrefixes.asScala.foldLeft(staticFiles) { (acc, cfg) => val prefix = cfg.getString("prefix") val resource = cfg.getString("resource") diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/StreamOps.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StreamOps.scala similarity index 86% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/StreamOps.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StreamOps.scala index 6b9cf3c39..b55c3a191 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/StreamOps.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StreamOps.scala @@ -13,28 +13,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.util.concurrent.TimeUnit -import akka.NotUsed -import akka.stream.ActorAttributes -import akka.stream.Attributes -import akka.stream.BoundedSourceQueue -import akka.stream.FlowShape -import akka.stream.Graph -import akka.stream.Inlet -import akka.stream.Materializer -import akka.stream.Outlet -import akka.stream.QueueOfferResult -import akka.stream.SourceShape -import akka.stream.Supervision -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Source -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler -import akka.stream.stage.TimerGraphStageLogic +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.ActorAttributes +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.BoundedSourceQueue +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Graph +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.QueueOfferResult +import org.apache.pekko.stream.SourceShape +import org.apache.pekko.stream.Supervision +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler +import org.apache.pekko.stream.stage.TimerGraphStageLogic import com.netflix.spectator.api.Clock import com.netflix.spectator.api.Registry import com.typesafe.scalalogging.StrictLogging @@ -57,7 +57,7 @@ object StreamOps extends StrictLogging { def supervisionStrategy(registry: Registry): Attributes = { ActorAttributes.withSupervisionStrategy { t => registry - .counter("akka.stream.exceptions", "error", t.getClass.getSimpleName) + .counter("pekko.stream.exceptions", "error", t.getClass.getSimpleName) .increment() logger.warn(s"exception from stream stage", t) Supervision.Stop @@ -69,13 +69,13 @@ object StreamOps extends StrictLogging { * will be emitted by the source. Can be used to get metrics when using `Source.queue(size)` * that was introduced in [#29770]. * - * [#29770]: https://github.com/akka/akka/pull/29770 + * [#29770]: https://github.com/pekko/pekko/pull/29770 * * The bounded source queue should be preferred to `Source.queue(*, strategy)` * or `Source.actorRef` that can have unbounded memory use if the consumer cannot keep * up with the rate of data being offered ([#25798]). * - * [#25798]: https://github.com/akka/akka/issues/25798 + * [#25798]: https://github.com/pekko/pekko/issues/25798 * * @param registry * Spectator registry to manage metrics for this queue. @@ -90,13 +90,13 @@ object StreamOps extends StrictLogging { Source.queue(size).mapMaterializedValue(q => new SourceQueue[T](registry, id, q)) } - final class SourceQueue[T] private[akka] ( + final class SourceQueue[T] private[pekko] ( registry: Registry, id: String, queue: BoundedSourceQueue[T] ) { - private val baseId = registry.createId("akka.stream.offeredToQueue", "id", id) + private val baseId = registry.createId("pekko.stream.offeredToQueue", "id", id) private val enqueued = registry.counter(baseId.withTag("result", "enqueued")) private val dropped = registry.counter(baseId.withTag("result", "droppedQueueFull")) private val closed = registry.counter(baseId.withTag("result", "droppedQueueClosed")) @@ -138,15 +138,15 @@ object StreamOps extends StrictLogging { * Stage that measures the flow of data through the stream. It will keep track of three * meters: * - * - `akka.stream.numEvents`: a simple counter indicating the number of events that flow + * - `pekko.stream.numEvents`: a simple counter indicating the number of events that flow * through the stream. * - * - `akka.stream.downstreamDelay`: a timer measuring the delay for the downstream to + * - `pekko.stream.downstreamDelay`: a timer measuring the delay for the downstream to * request a new element from the stream after an item is pushed. This can be used to * understand if the downstream cannot keep up and is introducing significant back * pressure delays. * - * - `akka.stream.upstreamDelay`: a timer measuring the delay for the upstream to push + * - `pekko.stream.upstreamDelay`: a timer measuring the delay for the upstream to push * a new element after one has been requested. * * Updates to meters will be batched so the updates may be delayed if used for a low @@ -164,9 +164,9 @@ object StreamOps extends StrictLogging { private final class MonitorFlow[T](registry: Registry, id: String) extends GraphStage[FlowShape[T, T]] { - private val numEvents = registry.counter("akka.stream.numEvents", "id", id) - private val upstreamTimer = registry.timer("akka.stream.upstreamDelay", "id", id) - private val downstreamTimer = registry.timer("akka.stream.downstreamDelay", "id", id) + private val numEvents = registry.counter("pekko.stream.numEvents", "id", id) + private val upstreamTimer = registry.timer("pekko.stream.upstreamDelay", "id", id) + private val downstreamTimer = registry.timer("pekko.stream.downstreamDelay", "id", id) private val in = Inlet[T]("MonitorBackpressure.in") private val out = Outlet[T]("MonitorBackpressure.out") diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ThreadPools.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ThreadPools.scala similarity index 98% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/ThreadPools.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ThreadPools.scala index 605a73864..0997443b0 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/ThreadPools.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/ThreadPools.scala @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import com.netflix.spectator.api.Registry import com.netflix.spectator.api.patterns.ThreadPoolMonitor diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/UnboundedMeteredMailbox.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/UnboundedMeteredMailbox.scala similarity index 78% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/UnboundedMeteredMailbox.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/UnboundedMeteredMailbox.scala index 4af373cc0..fa040fa7f 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/UnboundedMeteredMailbox.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/UnboundedMeteredMailbox.scala @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.TimeUnit -import akka.actor.ActorPath -import akka.actor.ActorRef -import akka.actor.ActorSystem -import akka.dispatch.Envelope -import akka.dispatch.MailboxType -import akka.dispatch.MessageQueue -import akka.dispatch.ProducesMessageQueue -import akka.dispatch.UnboundedMessageQueueSemantics +import org.apache.pekko.actor.ActorPath +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.dispatch.Envelope +import org.apache.pekko.dispatch.MailboxType +import org.apache.pekko.dispatch.MessageQueue +import org.apache.pekko.dispatch.ProducesMessageQueue +import org.apache.pekko.dispatch.UnboundedMessageQueueSemantics import com.netflix.spectator.api.Spectator import com.netflix.spectator.api.patterns.PolledMeter import com.typesafe.config.Config @@ -39,12 +39,12 @@ object UnboundedMeteredMailbox { private final val queue = new ConcurrentLinkedQueue[Entry] private val registry = Spectator.globalRegistry() - private val insertCounter = registry.counter("akka.queue.insert", "path", path) - private val waitTimer = registry.timer("akka.queue.wait", "path", path) + private val insertCounter = registry.counter("pekko.queue.insert", "path", path) + private val waitTimer = registry.timer("pekko.queue.wait", "path", path) PolledMeter .using(registry) - .withName("akka.queue.size") + .withName("pekko.queue.size") .withTag("path", path) .monitorSize(queue) @@ -77,7 +77,7 @@ class UnboundedMeteredMailbox(settings: ActorSystem.Settings, config: Config) extends MailboxType with ProducesMessageQueue[UnboundedMeteredMailbox.MeteredMessageQueue] { - import com.netflix.atlas.akka.UnboundedMeteredMailbox._ + import com.netflix.atlas.pekko.UnboundedMeteredMailbox._ private val Path = config.getString("path-pattern").r diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/WebApi.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/WebApi.scala similarity index 89% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/WebApi.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/WebApi.scala index 84db56c95..e7759f3d7 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/WebApi.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/WebApi.scala @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.server.Route /** * Base trait for classes providing an API to expose via the Atlas server. diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/WebServer.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/WebServer.scala similarity index 88% rename from atlas-akka/src/main/scala/com/netflix/atlas/akka/WebServer.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/WebServer.scala index bf2a13cfb..0908e1238 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/WebServer.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/WebServer.scala @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem -import akka.http.scaladsl.Http -import akka.http.scaladsl.Http.ServerBinding -import akka.http.scaladsl.HttpsConnectionContext -import akka.http.scaladsl.server.Route -import akka.stream.Materializer +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.Http +import org.apache.pekko.http.scaladsl.Http.ServerBinding +import org.apache.pekko.http.scaladsl.HttpsConnectionContext +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.stream.Materializer import com.netflix.iep.service.AbstractService import com.netflix.iep.service.ClassFactory import com.netflix.spectator.api.Registry @@ -36,11 +36,11 @@ import scala.concurrent.duration.Duration * Web server instance. * * @param config - * System configuration used for main server settings. In particular `atlas.akka.port` + * System configuration used for main server settings. In particular `atlas.pekko.port` * is used for setting the server port. * @param classFactory * Used to create instances of class names from the config file via the injector. The - * endpoints listed in `atlas.akka.endpoints` will be created using this factory. + * endpoints listed in `atlas.pekko.endpoints` will be created using this factory. * @param registry * Metrics registry for reporting server stats. * @param system @@ -57,7 +57,7 @@ class WebServer( private implicit val executionContext: ExecutionContext = system.dispatcher - private val portConfigs = WebServer.getPortConfigs(config, "atlas.akka.ports") + private val portConfigs = WebServer.getPortConfigs(config, "atlas.pekko.ports") private var bindingFutures: List[Future[ServerBinding]] = Nil diff --git a/atlas-pekko/src/test/resources/application.conf b/atlas-pekko/src/test/resources/application.conf new file mode 100644 index 000000000..80730f31a --- /dev/null +++ b/atlas-pekko/src/test/resources/application.conf @@ -0,0 +1,5 @@ + +atlas.pekko.cors-host-patterns = [ + "localhost", + ".netflix.com" +] \ No newline at end of file diff --git a/atlas-akka/src/test/resources/www/index.html b/atlas-pekko/src/test/resources/www/index.html similarity index 100% rename from atlas-akka/src/test/resources/www/index.html rename to atlas-pekko/src/test/resources/www/index.html diff --git a/atlas-akka/src/test/resources/www/test b/atlas-pekko/src/test/resources/www/test similarity index 100% rename from atlas-akka/src/test/resources/www/test rename to atlas-pekko/src/test/resources/www/test diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ActorServiceSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ActorServiceSuite.scala similarity index 85% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/ActorServiceSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ActorServiceSuite.scala index c6dfe34b8..3e01c564d 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ActorServiceSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ActorServiceSuite.scala @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.Actor -import akka.actor.ActorSystem -import akka.util.Timeout +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.util.Timeout import com.netflix.iep.service.DefaultClassFactory import com.netflix.spectator.api.NoopRegistry import com.typesafe.config.ConfigFactory @@ -32,7 +32,7 @@ class ActorServiceSuite extends FunSuite { test("simple actor") { val config = ConfigFactory.parseString(s""" - |atlas.akka.actors = [ + |atlas.pekko.actors = [ | { | name = test | class = "${classOf[ActorServiceSuite.EchoActor].getName}" @@ -45,7 +45,7 @@ class ActorServiceSuite extends FunSuite { try { val ref = system.actorSelection("/user/test") - val v = Await.result(akka.pattern.ask(ref, "ping"), Duration.Inf) + val v = Await.result(org.apache.pekko.pattern.ask(ref, "ping"), Duration.Inf) assertEquals(v, "ping") } finally { service.stop() @@ -55,14 +55,14 @@ class ActorServiceSuite extends FunSuite { test("actor with router config") { val config = ConfigFactory.parseString(s""" - |atlas.akka.actors = [ + |atlas.pekko.actors = [ | { | name = test | class = "${classOf[ActorServiceSuite.EchoActor].getName}" | } |] | - |akka.actor.deployment { + |pekko.actor.deployment { | /test { | router = round-robin-pool | nr-of-instances = 2 @@ -75,7 +75,7 @@ class ActorServiceSuite extends FunSuite { try { val ref = system.actorSelection("/user/test") - val v = Await.result(akka.pattern.ask(ref, "ping"), Duration.Inf) + val v = Await.result(org.apache.pekko.pattern.ask(ref, "ping"), Duration.Inf) assertEquals(v, "ping") } finally { service.stop() diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ByteStringInputStreamSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ByteStringInputStreamSuite.scala similarity index 97% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/ByteStringInputStreamSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ByteStringInputStreamSuite.scala index c3948899c..3bf906bf6 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ByteStringInputStreamSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ByteStringInputStreamSuite.scala @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.io.ByteArrayInputStream import java.security.MessageDigest import java.util.Random -import akka.util.ByteString +import org.apache.pekko.util.ByteString import munit.FunSuite class ByteStringInputStreamSuite extends FunSuite { diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ClusterOpsSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ClusterOpsSuite.scala similarity index 95% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/ClusterOpsSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ClusterOpsSuite.scala index bb6480411..cc0823809 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ClusterOpsSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ClusterOpsSuite.scala @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem -import akka.stream.scaladsl.Flow -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source import munit.FunSuite import scala.concurrent.Await diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ConfigApiSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ConfigApiSuite.scala similarity index 94% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/ConfigApiSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ConfigApiSuite.scala index 230338111..3b6be967d 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ConfigApiSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ConfigApiSuite.scala @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.io.StringReader import java.util.Properties -import akka.http.scaladsl.model.StatusCodes._ -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.StatusCodes._ +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.typesafe.config.Config import com.typesafe.config.ConfigFactory diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ConnectionContextFactorySuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ConnectionContextFactorySuite.scala similarity index 96% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/ConnectionContextFactorySuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ConnectionContextFactorySuite.scala index 754739ef6..40145a542 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/ConnectionContextFactorySuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/ConnectionContextFactorySuite.scala @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.HttpsConnectionContext +import org.apache.pekko.http.scaladsl.HttpsConnectionContext import com.typesafe.config.Config import com.typesafe.config.ConfigFactory import munit.FunSuite diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/CorsSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/CorsSuite.scala similarity index 97% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/CorsSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/CorsSuite.scala index e5a84c227..a3eed1d5b 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/CorsSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/CorsSuite.scala @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import munit.FunSuite diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/CustomDirectivesSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/CustomDirectivesSuite.scala similarity index 95% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/CustomDirectivesSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/CustomDirectivesSuite.scala index 3d0c1a223..b1e86479d 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/CustomDirectivesSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/CustomDirectivesSuite.scala @@ -13,24 +13,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka - -import akka.actor.ActorRefFactory -import akka.http.scaladsl.model.ContentTypes -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpMethods -import akka.http.scaladsl.model.HttpRequest -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.Uri -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.testkit.RouteTestTimeout -import akka.stream.scaladsl.Source -import akka.util.ByteString -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +package com.netflix.atlas.pekko + +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.http.scaladsl.model.ContentTypes +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpMethods +import org.apache.pekko.http.scaladsl.model.HttpRequest +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.json.Json import com.netflix.spectator.api.DefaultRegistry import com.netflix.spectator.api.Spectator diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/DeadLetterStatsActorSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/DeadLetterStatsActorSuite.scala similarity index 77% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/DeadLetterStatsActorSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/DeadLetterStatsActorSuite.scala index c3262e16e..7bf705688 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/DeadLetterStatsActorSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/DeadLetterStatsActorSuite.scala @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.Actor -import akka.actor.ActorRef -import akka.actor.ActorSystem -import akka.actor.DeadLetter -import akka.actor.PoisonPill -import akka.actor.Props -import akka.actor.SuppressedDeadLetter -import akka.testkit.ImplicitSender -import akka.testkit.TestActorRef -import akka.testkit.TestKitBase +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.actor.DeadLetter +import org.apache.pekko.actor.PoisonPill +import org.apache.pekko.actor.Props +import org.apache.pekko.actor.SuppressedDeadLetter +import org.apache.pekko.testkit.ImplicitSender +import org.apache.pekko.testkit.TestActorRef +import org.apache.pekko.testkit.TestKitBase import com.netflix.spectator.api.DefaultRegistry import com.typesafe.config.ConfigFactory import munit.FunSuite @@ -35,7 +35,7 @@ class DeadLetterStatsActorSuite extends FunSuite with TestKitBase with ImplicitS private val config = ConfigFactory.parseString( """ - |atlas.akka.path-pattern = "^akka://(?:[^/]+)/(?:system|user)/([^/]+)(?:/.*)?$" + |atlas.pekko.path-pattern = "^pekko://(?:[^/]+)/(?:system|user)/([^/]+)(?:/.*)?$" """.stripMargin ) @@ -65,7 +65,7 @@ class DeadLetterStatsActorSuite extends FunSuite with TestKitBase with ImplicitS test("DeadLetter") { val id = registry - .createId("akka.deadLetters") + .createId("pekko.deadLetters") .withTag("class", "DeadLetter") .withTag("sender", "from") .withTag("recipient", "to") @@ -77,7 +77,7 @@ class DeadLetterStatsActorSuite extends FunSuite with TestKitBase with ImplicitS test("SuppressedDeadLetter") { val id = registry - .createId("akka.deadLetters") + .createId("pekko.deadLetters") .withTag("class", "SuppressedDeadLetter") .withTag("sender", "from") .withTag("recipient", "to") diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/HealthcheckApiSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/HealthcheckApiSuite.scala similarity index 91% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/HealthcheckApiSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/HealthcheckApiSuite.scala index 76c397675..7a46f573f 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/HealthcheckApiSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/HealthcheckApiSuite.scala @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.util.concurrent.atomic.AtomicBoolean -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.json.Json import com.netflix.iep.service.Service import com.netflix.iep.service.ServiceManager diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/OpportunisticECSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/OpportunisticECSuite.scala similarity index 96% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/OpportunisticECSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/OpportunisticECSuite.scala index 779f06229..da6a3d62a 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/OpportunisticECSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/OpportunisticECSuite.scala @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import munit.FunSuite diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/PathsSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/PathsSuite.scala similarity index 77% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/PathsSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/PathsSuite.scala index a3cb8042c..8d9c6aeff 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/PathsSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/PathsSuite.scala @@ -13,36 +13,36 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorPath +import org.apache.pekko.actor.ActorPath import com.typesafe.config.ConfigFactory import munit.FunSuite /** Sanity check the default pattern for extracting an id from the path. */ class PathsSuite extends FunSuite { - private val mapper = Paths.createMapper(ConfigFactory.load().getConfig("atlas.akka")) + private val mapper = Paths.createMapper(ConfigFactory.load().getConfig("atlas.pekko")) private def path(str: String): ActorPath = ActorPath.fromString(str) test("contains dashes") { - val id = mapper(path("akka://test/system/IO-TCP/$123")) + val id = mapper(path("pekko://test/system/IO-TCP/$123")) assertEquals("IO-TCP", id) } test("path with child") { - val id = mapper(path("akka://test/user/foo/$123")) + val id = mapper(path("pekko://test/user/foo/$123")) assertEquals("foo", id) } test("temporary actor") { - val id = mapper(path("akka://test/user/$123")) + val id = mapper(path("pekko://test/user/$123")) assertEquals("uncategorized", id) } test("stream supervisor") { - val id = mapper(path("akka://test/user/StreamSupervisor-99961")) + val id = mapper(path("pekko://test/user/StreamSupervisor-99961")) assertEquals("StreamSupervisor-", id) } } diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/RequestHandlerNoCompressionSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/RequestHandlerNoCompressionSuite.scala similarity index 86% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/RequestHandlerNoCompressionSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/RequestHandlerNoCompressionSuite.scala index 651a046e8..1f9bef4b3 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/RequestHandlerNoCompressionSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/RequestHandlerNoCompressionSuite.scala @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import java.io.ByteArrayOutputStream import java.util.zip.GZIPOutputStream -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.json.Json import com.netflix.iep.service.DefaultClassFactory import com.netflix.spectator.api.NoopRegistry @@ -38,12 +38,12 @@ class RequestHandlerNoCompressionSuite extends MUnitRouteSuite { private val config = ConfigFactory.parseString( """ - |atlas.akka.api-endpoints = [ - | "com.netflix.atlas.akka.TestApi" + |atlas.pekko.api-endpoints = [ + | "com.netflix.atlas.pekko.TestApi" |] - |atlas.akka.cors-host-patterns = [] - |atlas.akka.diagnostic-headers = [] - |atlas.akka.request-handler { + |atlas.pekko.cors-host-patterns = [] + |atlas.pekko.diagnostic-headers = [] + |atlas.pekko.request-handler { | cors = false | compression = false | access-log = false diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/RequestHandlerSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/RequestHandlerSuite.scala similarity index 91% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/RequestHandlerSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/RequestHandlerSuite.scala index 354f6249a..71be85f66 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/RequestHandlerSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/RequestHandlerSuite.scala @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import java.io.ByteArrayOutputStream import java.util.zip.GZIPOutputStream -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.json.Json import com.netflix.iep.service.DefaultClassFactory import com.netflix.spectator.api.NoopRegistry @@ -38,17 +38,17 @@ class RequestHandlerSuite extends MUnitRouteSuite { private val config = ConfigFactory.parseString( """ - |atlas.akka.api-endpoints = [ - | "com.netflix.atlas.akka.TestApi" + |atlas.pekko.api-endpoints = [ + | "com.netflix.atlas.pekko.TestApi" |] - |atlas.akka.cors-host-patterns = [".suffix.com", "www.exact-match.com", "localhost"] - |atlas.akka.diagnostic-headers = [ + |atlas.pekko.cors-host-patterns = [".suffix.com", "www.exact-match.com", "localhost"] + |atlas.pekko.diagnostic-headers = [ | { | name = "test" | value = "12345" | } |] - |atlas.akka.request-handler { + |atlas.pekko.request-handler { | cors = true | compression = true | access-log = true diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/StaticPagesSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/StaticPagesSuite.scala similarity index 92% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/StaticPagesSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/StaticPagesSuite.scala index 5be250181..c2da64214 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/StaticPagesSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/StaticPagesSuite.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.StatusCodes -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.StatusCodes +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.typesafe.config.ConfigFactory class StaticPagesSuite extends MUnitRouteSuite { diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/StreamOpsSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/StreamOpsSuite.scala similarity index 94% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/StreamOpsSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/StreamOpsSuite.scala index 9528c840d..f02927435 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/StreamOpsSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/StreamOpsSuite.scala @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit -import akka.NotUsed -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.Keep -import akka.stream.scaladsl.Sink -import akka.stream.scaladsl.Source +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Keep +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.stream.scaladsl.Source import com.netflix.spectator.api.DefaultRegistry import com.netflix.spectator.api.ManualClock import com.netflix.spectator.api.Registry @@ -49,7 +49,7 @@ class StreamOpsSuite extends FunSuite { .iterator() .asScala .flatMap(_.measure().iterator().asScala) - .filter(m => m.id().name().equals("akka.stream.offeredToQueue")) + .filter(m => m.id().name().equals("pekko.stream.offeredToQueue")) .foreach { m => val result = Utils.getTagValue(m.id(), "result") assertEquals(m.value(), expected.getOrElse(result, 0.0), result) @@ -141,7 +141,7 @@ class StreamOpsSuite extends FunSuite { .iterator() .asScala .flatMap(_.measure().iterator().asScala) - .filter(m => m.id().name().equals(s"akka.stream.$name")) + .filter(m => m.id().name().equals(s"pekko.stream.$name")) .foreach { m => val value = Utils.getTagValue(m.id(), "statistic") val stat = if (value == null) "count" else value @@ -222,7 +222,7 @@ class StreamOpsSuite extends FunSuite { .runWith(Sink.ignore) Await.ready(future, Duration.Inf) - val c = registry.counter("akka.stream.exceptions", "error", "ArithmeticException") + val c = registry.counter("pekko.stream.exceptions", "error", "ArithmeticException") assertEquals(c.count(), 1L) } diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/TestApi.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/TestApi.scala similarity index 82% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/TestApi.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/TestApi.scala index 0d2a0f602..57492f9db 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/TestApi.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/TestApi.scala @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem -import akka.http.scaladsl.model.ContentTypes -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpEntity.ChunkStreamPart -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.pattern.CircuitBreaker -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.model.ContentTypes +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpEntity.ChunkStreamPart +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.pattern.CircuitBreaker +import org.apache.pekko.stream.scaladsl.Source import scala.concurrent.ExecutionContext import scala.concurrent.Future diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/TestApiSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/TestApiSuite.scala similarity index 89% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/TestApiSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/TestApiSuite.scala index a4bcfeb9a..846e011c4 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/TestApiSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/TestApiSuite.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite class TestApiSuite extends MUnitRouteSuite { diff --git a/atlas-akka/src/test/scala/com/netflix/atlas/akka/UriParsingSuite.scala b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/UriParsingSuite.scala similarity index 87% rename from atlas-akka/src/test/scala/com/netflix/atlas/akka/UriParsingSuite.scala rename to atlas-pekko/src/test/scala/com/netflix/atlas/pekko/UriParsingSuite.scala index 8a3c2179e..f1ec265c3 100644 --- a/atlas-akka/src/test/scala/com/netflix/atlas/akka/UriParsingSuite.scala +++ b/atlas-pekko/src/test/scala/com/netflix/atlas/pekko/UriParsingSuite.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.http.scaladsl.model.IllegalUriException -import akka.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.IllegalUriException +import org.apache.pekko.http.scaladsl.model.Uri import munit.FunSuite class UriParsingSuite extends FunSuite { diff --git a/atlas-spring-eval/src/main/scala/com/netflix/atlas/eval/EvalConfiguration.scala b/atlas-spring-eval/src/main/scala/com/netflix/atlas/eval/EvalConfiguration.scala index 4a6452541..668d1e1b4 100644 --- a/atlas-spring-eval/src/main/scala/com/netflix/atlas/eval/EvalConfiguration.scala +++ b/atlas-spring-eval/src/main/scala/com/netflix/atlas/eval/EvalConfiguration.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.eval -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import com.netflix.atlas.eval.stream.Evaluator import com.netflix.spectator.api.NoopRegistry import com.netflix.spectator.api.Registry diff --git a/atlas-spring-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/LwcApiConfigurationSuite.scala b/atlas-spring-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/LwcApiConfigurationSuite.scala index 5f25f5ab1..5f90b88c5 100644 --- a/atlas-spring-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/LwcApiConfigurationSuite.scala +++ b/atlas-spring-lwcapi/src/test/scala/com/netflix/atlas/lwcapi/LwcApiConfigurationSuite.scala @@ -15,7 +15,7 @@ */ package com.netflix.atlas.lwcapi -import com.netflix.atlas.akka.ActorService +import com.netflix.atlas.pekko.ActorService import munit.FunSuite import org.springframework.context.annotation.AnnotationConfigApplicationContext diff --git a/atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/ActorSystemService.scala b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/ActorSystemService.scala similarity index 91% rename from atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/ActorSystemService.scala rename to atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/ActorSystemService.scala index ac792cfbf..e21be31f6 100644 --- a/atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/ActorSystemService.scala +++ b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/ActorSystemService.scala @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import com.netflix.iep.service.AbstractService import com.typesafe.config.Config @@ -24,7 +24,7 @@ import scala.concurrent.duration.Duration class ActorSystemService(config: Config) extends AbstractService { - val system: ActorSystem = ActorSystem(config.getString("atlas.akka.name"), config) + val system: ActorSystem = ActorSystem(config.getString("atlas.pekko.name"), config) override def startImpl(): Unit = {} diff --git a/atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/AkkaConfiguration.scala b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaConfiguration.scala similarity index 95% rename from atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/AkkaConfiguration.scala rename to atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaConfiguration.scala index 97ba28cc1..a463fe86f 100644 --- a/atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/AkkaConfiguration.scala +++ b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaConfiguration.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem -import akka.stream.Materializer +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer import com.netflix.iep.service.ClassFactory import com.netflix.spectator.api.NoopRegistry import com.netflix.spectator.api.Registry diff --git a/atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/MaterializerService.scala b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/MaterializerService.scala similarity index 88% rename from atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/MaterializerService.scala rename to atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/MaterializerService.scala index a58cb1577..41efafd28 100644 --- a/atlas-spring-akka/src/main/scala/com/netflix/atlas/akka/MaterializerService.scala +++ b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/MaterializerService.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorSystem -import akka.stream.Materializer +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer import com.netflix.iep.service.AbstractService class MaterializerService(system: ActorSystem) extends AbstractService { diff --git a/atlas-spring-akka/src/test/scala/com/netflix/atlas/akka/AkkaConfigurationSuite.scala b/atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/AkkaConfigurationSuite.scala similarity index 87% rename from atlas-spring-akka/src/test/scala/com/netflix/atlas/akka/AkkaConfigurationSuite.scala rename to atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/AkkaConfigurationSuite.scala index fb6127eaa..37bfb7384 100644 --- a/atlas-spring-akka/src/test/scala/com/netflix/atlas/akka/AkkaConfigurationSuite.scala +++ b/atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/AkkaConfigurationSuite.scala @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.netflix.atlas.akka +package com.netflix.atlas.pekko -import akka.actor.ActorRefFactory -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.actor.ActorSystem import com.netflix.iep.service.ServiceManager import com.typesafe.config.Config import com.typesafe.config.ConfigFactory @@ -28,9 +28,9 @@ import scala.util.Using class AkkaConfigurationSuite extends FunSuite { private val testCfg = ConfigFactory.parseString(""" - |atlas.akka.name = test - |atlas.akka.port = 0 - |atlas.akka.actors = [] + |atlas.pekko.name = test + |atlas.pekko.port = 0 + |atlas.pekko.actors = [] """.stripMargin) test("load module") { diff --git a/atlas-standalone/src/main/resources/application.conf b/atlas-standalone/src/main/resources/application.conf index 635b40d32..bc58a53b4 100644 --- a/atlas-standalone/src/main/resources/application.conf +++ b/atlas-standalone/src/main/resources/application.conf @@ -1,5 +1,5 @@ atlas { - akka { + pekko { // These are overridden because the standalone pulls in both webapi and lwc modules. // The user can run the one that is needed for a given test by using one of the specific // profile configurations. The default application config here ignores the setup done @@ -7,14 +7,14 @@ atlas { actors = [ { name = "deadLetterStats" - class = "com.netflix.atlas.akka.DeadLetterStatsActor" + class = "com.netflix.atlas.pekko.DeadLetterStatsActor" } ] api-endpoints = [ - "com.netflix.atlas.akka.HealthcheckApi", - "com.netflix.atlas.akka.ConfigApi", - "com.netflix.atlas.akka.StaticPages" + "com.netflix.atlas.pekko.HealthcheckApi", + "com.netflix.atlas.pekko.ConfigApi", + "com.netflix.atlas.pekko.StaticPages" ] } } diff --git a/atlas-standalone/src/main/resources/static.conf b/atlas-standalone/src/main/resources/static.conf index 1e31da72d..fa80d5b98 100644 --- a/atlas-standalone/src/main/resources/static.conf +++ b/atlas-standalone/src/main/resources/static.conf @@ -1,14 +1,14 @@ atlas { - akka { - actors = ${?atlas.akka.actors} [ + pekko { + actors = ${?atlas.pekko.actors} [ { name = "db" class = "com.netflix.atlas.webapi.LocalDatabaseActor" } ] - api-endpoints = ${?atlas.akka.api-endpoints} [ + api-endpoints = ${?atlas.pekko.api-endpoints} [ "com.netflix.atlas.webapi.TagsApi", "com.netflix.atlas.webapi.GraphApi" ] diff --git a/atlas-standalone/src/test/resources/application.conf b/atlas-standalone/src/test/resources/application.conf index 79e5609b5..9413ba01a 100644 --- a/atlas-standalone/src/test/resources/application.conf +++ b/atlas-standalone/src/test/resources/application.conf @@ -1,4 +1,4 @@ // Use a random port for the server when running tests // https://github.com/Netflix/atlas/issues/392 -atlas.akka.port = 0 \ No newline at end of file +atlas.pekko.port = 0 \ No newline at end of file diff --git a/atlas-webapi/src/main/resources/reference.conf b/atlas-webapi/src/main/resources/reference.conf index 7c2654700..512cb5642 100644 --- a/atlas-webapi/src/main/resources/reference.conf +++ b/atlas-webapi/src/main/resources/reference.conf @@ -225,15 +225,15 @@ atlas { } } - akka { - actors = ${?atlas.akka.actors} [ + pekko { + actors = ${?atlas.pekko.actors} [ { name = "db" class = "com.netflix.atlas.webapi.LocalDatabaseActor" } ] - api-endpoints = ${?atlas.akka.api-endpoints} [ + api-endpoints = ${?atlas.pekko.api-endpoints} [ "com.netflix.atlas.webapi.TagsApi", "com.netflix.atlas.webapi.GraphApi", "com.netflix.atlas.webapi.ExprApi" diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/ExprApi.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/ExprApi.scala index a1b8ceb56..7cb9851fc 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/ExprApi.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/ExprApi.scala @@ -15,14 +15,14 @@ */ package com.netflix.atlas.webapi -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.WebApi +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.core.model.Expr import com.netflix.atlas.core.model.FilterExpr import com.netflix.atlas.core.model.ModelExtractors diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/FetchRequestSource.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/FetchRequestSource.scala index f40d2e9a8..fd3e737d5 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/FetchRequestSource.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/FetchRequestSource.scala @@ -18,26 +18,26 @@ package com.netflix.atlas.webapi import java.time.Instant import java.time.temporal.ChronoUnit -import akka.NotUsed -import akka.actor.ActorRefFactory -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpEntity.ChunkStreamPart -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.stream.Attributes -import akka.stream.FlowShape -import akka.stream.Inlet -import akka.stream.Outlet -import akka.stream.ThrottleMode -import akka.stream.scaladsl.Source -import akka.stream.stage.GraphStage -import akka.stream.stage.GraphStageLogic -import akka.stream.stage.InHandler -import akka.stream.stage.OutHandler -import akka.util.ByteString -import akka.util.Timeout -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpEntity.ChunkStreamPart +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.stream.Attributes +import org.apache.pekko.stream.FlowShape +import org.apache.pekko.stream.Inlet +import org.apache.pekko.stream.Outlet +import org.apache.pekko.stream.ThrottleMode +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.stage.GraphStage +import org.apache.pekko.stream.stage.GraphStageLogic +import org.apache.pekko.stream.stage.InHandler +import org.apache.pekko.stream.stage.OutHandler +import org.apache.pekko.util.ByteString +import org.apache.pekko.util.Timeout +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.EvalContext import com.netflix.atlas.core.model.StatefulExpr @@ -61,7 +61,7 @@ object FetchRequestSource { * Create an SSE source that can be used as the entity for the HttpResponse. */ def apply(system: ActorRefFactory, graphCfg: GraphConfig): Source[ChunkStreamPart, NotUsed] = { - import akka.pattern._ + import org.apache.pekko.pattern._ import scala.concurrent.duration._ val dbRef = system.actorSelection("/user/db") diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphApi.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphApi.scala index 2e9d11d88..d87d194c1 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphApi.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphApi.scala @@ -15,13 +15,13 @@ */ package com.netflix.atlas.webapi -import akka.actor.ActorRefFactory -import akka.actor.Props -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.ImperativeRequestContext -import com.netflix.atlas.akka.WebApi +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.actor.Props +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.ImperativeRequestContext +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.core.model._ import com.netflix.atlas.eval.graph.GraphConfig import com.netflix.atlas.eval.graph.Grapher diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphRequestActor.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphRequestActor.scala index 1549426b3..820f54153 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphRequestActor.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphRequestActor.scala @@ -15,15 +15,15 @@ */ package com.netflix.atlas.webapi -import akka.actor.Actor -import akka.actor.ActorLogging -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.util.ByteString +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorLogging +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.core.JsonProcessingException -import com.netflix.atlas.akka.ImperativeRequestContext +import com.netflix.atlas.pekko.ImperativeRequestContext import com.netflix.atlas.chart.util.PngImage import com.netflix.atlas.core.model._ import com.netflix.atlas.eval.graph.GraphConfig diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalDatabaseActor.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalDatabaseActor.scala index f5fa6c6ca..73286e3db 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalDatabaseActor.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalDatabaseActor.scala @@ -15,8 +15,8 @@ */ package com.netflix.atlas.webapi -import akka.actor.Actor -import akka.actor.ActorLogging +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorLogging import com.netflix.atlas.core.db.Database import scala.util.Failure diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalPublishActor.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalPublishActor.scala index 100ec06fa..cc8ec517c 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalPublishActor.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalPublishActor.scala @@ -16,14 +16,14 @@ package com.netflix.atlas.webapi import java.util.concurrent.TimeUnit -import akka.actor.Actor -import akka.actor.ActorLogging -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCode -import akka.http.scaladsl.model.StatusCodes -import com.netflix.atlas.akka.DiagnosticMessage +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorLogging +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCode +import org.apache.pekko.http.scaladsl.model.StatusCodes +import com.netflix.atlas.pekko.DiagnosticMessage import com.netflix.atlas.core.db.Database import com.netflix.atlas.core.db.MemoryDatabase import com.netflix.atlas.core.model.DatapointTuple diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/PublishApi.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/PublishApi.scala index a7ee6edf6..7aef145c5 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/PublishApi.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/PublishApi.scala @@ -15,15 +15,15 @@ */ package com.netflix.atlas.webapi -import akka.actor.ActorRefFactory -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.RequestContext -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.server.RouteResult -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.DiagnosticMessage -import com.netflix.atlas.akka.WebApi +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.RequestContext +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.server.RouteResult +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.DiagnosticMessage +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.core.model.DatapointTuple import com.netflix.atlas.core.validation.Rule import com.netflix.atlas.core.validation.ValidationResult diff --git a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/TagsApi.scala b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/TagsApi.scala index cab3acd65..0ef2ed112 100644 --- a/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/TagsApi.scala +++ b/atlas-webapi/src/main/scala/com/netflix/atlas/webapi/TagsApi.scala @@ -15,20 +15,20 @@ */ package com.netflix.atlas.webapi -import akka.actor.ActorRefFactory -import akka.http.scaladsl.model.ContentTypes -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers.RawHeader -import akka.pattern.ask -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.RequestContext -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.server.RouteResult -import com.netflix.atlas.akka.CustomDirectives._ -import com.netflix.atlas.akka.WebApi +import org.apache.pekko.actor.ActorRefFactory +import org.apache.pekko.http.scaladsl.model.ContentTypes +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers.RawHeader +import org.apache.pekko.pattern.ask +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.RequestContext +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.server.RouteResult +import com.netflix.atlas.pekko.CustomDirectives._ +import com.netflix.atlas.pekko.WebApi import com.netflix.atlas.core.index.TagQuery import com.netflix.atlas.core.model.Query import com.netflix.atlas.core.model.QueryVocabulary diff --git a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/ExprApiSuite.scala b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/ExprApiSuite.scala index 26cb3c951..8d00b0940 100644 --- a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/ExprApiSuite.scala +++ b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/ExprApiSuite.scala @@ -15,11 +15,11 @@ */ package com.netflix.atlas.webapi -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.RequestHandler -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.RequestHandler +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.core.model.DataExpr import com.netflix.atlas.core.model.MathExpr import com.netflix.atlas.core.model.Query diff --git a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiMemDbSuite.scala b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiMemDbSuite.scala index 00b704a09..3a50e217f 100644 --- a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiMemDbSuite.scala +++ b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiMemDbSuite.scala @@ -15,13 +15,13 @@ */ package com.netflix.atlas.webapi -import akka.actor.Props -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.DiagnosticMessage -import com.netflix.atlas.akka.RequestHandler -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.actor.Props +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.DiagnosticMessage +import com.netflix.atlas.pekko.RequestHandler +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.core.db.MemoryDatabase import com.netflix.atlas.json.Json import com.typesafe.config.ConfigFactory diff --git a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiSuite.scala b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiSuite.scala index e15464a84..a8947dd09 100644 --- a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiSuite.scala +++ b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/GraphApiSuite.scala @@ -15,13 +15,13 @@ */ package com.netflix.atlas.webapi -import akka.actor.Props -import akka.http.scaladsl.model.MediaTypes -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.RequestHandler -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.actor.Props +import org.apache.pekko.http.scaladsl.model.MediaTypes +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.RequestHandler +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.chart.util.GraphAssertions import com.netflix.atlas.chart.util.PngImage import com.netflix.atlas.chart.util.SrcPath diff --git a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/PublishApiSuite.scala b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/PublishApiSuite.scala index 0f0f220fd..9d661a34d 100644 --- a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/PublishApiSuite.scala +++ b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/PublishApiSuite.scala @@ -15,13 +15,13 @@ */ package com.netflix.atlas.webapi -import akka.actor.Actor -import akka.actor.Props -import akka.http.scaladsl.model.HttpResponse -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.RequestHandler -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.Props +import org.apache.pekko.http.scaladsl.model.HttpResponse +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.RequestHandler +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.core.model.DatapointTuple import com.netflix.atlas.webapi.PublishApi.FailureMessage import com.netflix.atlas.webapi.PublishApi.PublishRequest diff --git a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/TagsApiSuite.scala b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/TagsApiSuite.scala index 693bde734..0a8fc3253 100644 --- a/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/TagsApiSuite.scala +++ b/atlas-webapi/src/test/scala/com/netflix/atlas/webapi/TagsApiSuite.scala @@ -15,11 +15,11 @@ */ package com.netflix.atlas.webapi -import akka.actor.Props -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.testkit.RouteTestTimeout -import com.netflix.atlas.akka.RequestHandler -import com.netflix.atlas.akka.testkit.MUnitRouteSuite +import org.apache.pekko.actor.Props +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout +import com.netflix.atlas.pekko.RequestHandler +import com.netflix.atlas.pekko.testkit.MUnitRouteSuite import com.netflix.atlas.core.db.Database import com.netflix.atlas.core.db.StaticDatabase import com.netflix.atlas.core.index.TagIndex diff --git a/build.sbt b/build.sbt index 5f838c3b9..e8ecbb6c3 100644 --- a/build.sbt +++ b/build.sbt @@ -2,8 +2,8 @@ lazy val atlas = project.in(file(".")) .configure(BuildSettings.profile) .aggregate( - `atlas-akka`, - `atlas-akka-testkit`, + `atlas-pekko`, + `atlas-pekko-testkit`, `atlas-chart`, `atlas-core`, `atlas-eval`, @@ -11,7 +11,7 @@ lazy val atlas = project.in(file(".")) `atlas-json`, `atlas-lwcapi`, `atlas-postgres`, - `atlas-spring-akka`, + `atlas-spring-pekko`, `atlas-spring-eval`, `atlas-spring-lwcapi`, `atlas-spring-webapi`, @@ -19,29 +19,30 @@ lazy val atlas = project.in(file(".")) `atlas-webapi`) .settings(publish / skip := true) -lazy val `atlas-akka` = project +lazy val `atlas-pekko` = project .configure(BuildSettings.profile) - .dependsOn(`atlas-json`, `atlas-akka-testkit` % "test") + .dependsOn(`atlas-json`, `atlas-pekko-testkit` % "test") .settings(libraryDependencies ++= Seq( - Dependencies.akkaActor, - Dependencies.akkaSlf4j, - Dependencies.akkaStream, + Dependencies.pekkoActor, + Dependencies.pekkoSlf4j, + Dependencies.pekkoStream, Dependencies.iepDynConfig, Dependencies.iepService, + Dependencies.scalaCompatJdk8, Dependencies.spectatorIpc, - Dependencies.akkaHttp, + Dependencies.pekkoHttp, Dependencies.typesafeConfig, - Dependencies.akkaHttpTestkit % "test", - Dependencies.akkaStreamTestkit % "test", - Dependencies.akkaTestkit % "test" + Dependencies.pekkoHttpTestkit % "test", + Dependencies.pekkoStreamTestkit % "test", + Dependencies.pekkoTestkit % "test" )) -lazy val `atlas-akka-testkit` = project +lazy val `atlas-pekko-testkit` = project .configure(BuildSettings.profile) .settings(libraryDependencies ++= Seq( - Dependencies.akkaHttpTestkit, - Dependencies.akkaStreamTestkit, - Dependencies.akkaTestkit, + Dependencies.pekkoHttpTestkit, + Dependencies.pekkoStreamTestkit, + Dependencies.pekkoTestkit, Dependencies.munit )) @@ -63,11 +64,11 @@ lazy val `atlas-core` = project lazy val `atlas-eval` = project .configure(BuildSettings.profile) - .dependsOn(`atlas-akka`, `atlas-chart`, `atlas-core`) + .dependsOn(`atlas-pekko`, `atlas-chart`, `atlas-core`) .settings(libraryDependencies ++= Seq( - Dependencies.akkaHttpTestkit % "test", - Dependencies.akkaStreamTestkit % "test", - Dependencies.akkaTestkit % "test", + Dependencies.pekkoHttpTestkit % "test", + Dependencies.pekkoStreamTestkit % "test", + Dependencies.pekkoTestkit % "test", Dependencies.equalsVerifier % "test" )) @@ -92,12 +93,12 @@ lazy val `atlas-json` = project lazy val `atlas-lwcapi` = project .configure(BuildSettings.profile) - .dependsOn(`atlas-akka`, `atlas-akka-testkit` % "test", `atlas-core`, `atlas-eval`, `atlas-json`) + .dependsOn(`atlas-pekko`, `atlas-pekko-testkit` % "test", `atlas-core`, `atlas-eval`, `atlas-json`) .settings(libraryDependencies ++= Seq( Dependencies.iepDynConfig, - Dependencies.akkaTestkit % "test", - Dependencies.akkaHttpTestkit % "test", - Dependencies.akkaStreamTestkit % "test" + Dependencies.pekkoTestkit % "test", + Dependencies.pekkoHttpTestkit % "test", + Dependencies.pekkoStreamTestkit % "test" )) lazy val `atlas-postgres` = project @@ -108,9 +109,9 @@ lazy val `atlas-postgres` = project Dependencies.postgresEmbedded % "test" )) -lazy val `atlas-spring-akka` = project +lazy val `atlas-spring-pekko` = project .configure(BuildSettings.profile) - .dependsOn(`atlas-akka`) + .dependsOn(`atlas-pekko`) .settings(libraryDependencies ++= Seq( Dependencies.iepSpring )) @@ -124,7 +125,7 @@ lazy val `atlas-spring-eval` = project lazy val `atlas-spring-lwcapi` = project .configure(BuildSettings.profile) - .dependsOn(`atlas-spring-akka`, `atlas-lwcapi`) + .dependsOn(`atlas-spring-pekko`, `atlas-lwcapi`) .settings(libraryDependencies ++= Seq( Dependencies.iepSpring, Dependencies.springContext @@ -140,7 +141,7 @@ lazy val `atlas-spring-webapi` = project lazy val `atlas-standalone` = project .configure(BuildSettings.profile) - .dependsOn(`atlas-spring-akka`, `atlas-spring-lwcapi`, `atlas-spring-webapi`) + .dependsOn(`atlas-spring-pekko`, `atlas-spring-lwcapi`, `atlas-spring-webapi`) .settings(libraryDependencies ++= Seq( Dependencies.iepSpring, Dependencies.iepSpringAtlas, @@ -153,15 +154,15 @@ lazy val `atlas-standalone` = project lazy val `atlas-webapi` = project .configure(BuildSettings.profile) .dependsOn( - `atlas-akka`, - `atlas-akka-testkit` % "test", + `atlas-pekko`, + `atlas-pekko-testkit` % "test", `atlas-chart`, `atlas-core`, `atlas-eval`, `atlas-json`) .settings(libraryDependencies ++= Seq( - Dependencies.akkaTestkit % "test", - Dependencies.akkaHttpTestkit % "test", - Dependencies.akkaStreamTestkit % "test" + Dependencies.pekkoTestkit % "test", + Dependencies.pekkoHttpTestkit % "test", + Dependencies.pekkoStreamTestkit % "test" )) diff --git a/conf/lwcapi-2.conf b/conf/lwcapi-2.conf index 98d5259b6..e980ccd9c 100644 --- a/conf/lwcapi-2.conf +++ b/conf/lwcapi-2.conf @@ -1,2 +1,2 @@ include "lwcapi.conf" -atlas.akka.port = 7102 +atlas.pekko.port = 7102 diff --git a/conf/lwcapi.conf b/conf/lwcapi.conf index 6c8b4930d..d8ee3b579 100644 --- a/conf/lwcapi.conf +++ b/conf/lwcapi.conf @@ -1,7 +1,7 @@ atlas { - akka { - api-endpoints = ${?atlas.akka.api-endpoints} [ + pekko { + api-endpoints = ${?atlas.pekko.api-endpoints} [ "com.netflix.atlas.lwcapi.EvaluateApi", "com.netflix.atlas.lwcapi.ExpressionApi", "com.netflix.atlas.lwcapi.SubscribeApi", diff --git a/conf/memory.conf b/conf/memory.conf index 047a6f5c9..5b1446036 100644 --- a/conf/memory.conf +++ b/conf/memory.conf @@ -32,18 +32,18 @@ atlas { } } - akka { + pekko { // Main server port port = 7101 - actors = ${?atlas.akka.actors} [ + actors = ${?atlas.pekko.actors} [ { name = "publish" class = "com.netflix.atlas.webapi.LocalPublishActor" } ] - api-endpoints = ${?atlas.akka.api-endpoints} [ + api-endpoints = ${?atlas.pekko.api-endpoints} [ "com.netflix.atlas.webapi.PublishApi" ] } diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 40194d7d6..f5e59cb5f 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -4,14 +4,8 @@ import sbt._ object Dependencies { object Versions { - // Do not upgrade Akka or Akka-HTTP versions, license has changed for newer - // versions: - // - // - https://www.lightbend.com/blog/why-we-are-changing-the-license-for-akka - // - https://github.com/akka/akka/pull/31561 - // - https://github.com/akka/akka-http/pull/4155 - val akka = "2.6.21" - val akkaHttpV = "10.2.10" + val pekko = "1.0.1" + val pekkoHttpV = "1.0.0" val iep = "4.2.0" val jackson = "2.15.0" @@ -26,14 +20,14 @@ object Dependencies { import Versions._ - val akkaActor = "com.typesafe.akka" %% "akka-actor" % akka - val akkaHttp = "com.typesafe.akka" %% "akka-http" % akkaHttpV - val akkaHttpCore = "com.typesafe.akka" %% "akka-http-core" % akkaHttpV - val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpV - val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % akka - val akkaStream = "com.typesafe.akka" %% "akka-stream" % akka - val akkaStreamTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % akka - val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % akka + val pekkoActor = "org.apache.pekko" %% "pekko-actor" % pekko + val pekkoHttp = "org.apache.pekko" %% "pekko-http" % pekkoHttpV + val pekkoHttpCore = "org.apache.pekko" %% "pekko-http-core" % pekkoHttpV + val pekkoHttpTestkit = "org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpV + val pekkoSlf4j = "org.apache.pekko" %% "pekko-slf4j" % pekko + val pekkoStream = "org.apache.pekko" %% "pekko-stream" % pekko + val pekkoStreamTestkit = "org.apache.pekko" %% "pekko-stream-testkit" % pekko + val pekkoTestkit = "org.apache.pekko" %% "pekko-testkit" % pekko val caffeine = "com.github.ben-manes.caffeine" % "caffeine" % "2.9.3" val datasketches = "org.apache.datasketches" % "datasketches-java" % "3.3.0" val equalsVerifier = "nl.jqno.equalsverifier" % "equalsverifier" % "3.14" @@ -62,6 +56,7 @@ object Dependencies { val postgresEmbedded = "io.zonky.test" % "embedded-postgres" % "2.0.3" val roaringBitmap = "org.roaringbitmap" % "RoaringBitmap" % "0.9.39" val scalaCompat = "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0" + val scalaCompatJdk8 = "org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2" val scalaCompiler = "org.scala-lang" % "scala-compiler" val scalaLibrary = "org.scala-lang" % "scala-library" val scalaLibraryAll = "org.scala-lang" % "scala-library-all" From 03ebd818e18abff6ca196bf1783323bc7de48ecb Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Thu, 14 Sep 2023 08:44:24 -0500 Subject: [PATCH 2/3] fix file names --- .../pekko/{AkkaHttpClient.scala => PekkoHttpClient.scala} | 8 ++++---- .../main/scala/com/netflix/atlas/pekko/StreamOps.scala | 2 +- .../{AkkaConfiguration.scala => PekkoConfiguration.scala} | 2 +- ...igurationSuite.scala => PekkoConfigurationSuite.scala} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename atlas-pekko/src/main/scala/com/netflix/atlas/pekko/{AkkaHttpClient.scala => PekkoHttpClient.scala} (86%) rename atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/{AkkaConfiguration.scala => PekkoConfiguration.scala} (98%) rename atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/{AkkaConfigurationSuite.scala => PekkoConfigurationSuite.scala} (97%) diff --git a/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaHttpClient.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala similarity index 86% rename from atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaHttpClient.scala rename to atlas-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala index f9a0ed546..157575dcd 100644 --- a/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaHttpClient.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala @@ -22,9 +22,9 @@ import org.apache.pekko.http.scaladsl.model.HttpResponse import scala.concurrent.Future /** - * A wrapper used for simple unit testing of Akka HTTP calls. + * A wrapper used for simple unit testing of Pekko HTTP calls. */ -trait AkkaHttpClient { +trait PekkoHttpClient { /** * See pekko.http.scaladsl.Http @@ -39,9 +39,9 @@ trait AkkaHttpClient { * @param name * The name to use for access logging and metrics. * @param system - * The Akka system. + * The Pekko system. */ -class DefaultAkkaHttpClient(name: String)(implicit val system: ActorSystem) extends AkkaHttpClient { +class DefaultPekkoHttpClient(name: String)(implicit val system: ActorSystem) extends PekkoHttpClient { private implicit val ec = system.dispatcher diff --git a/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StreamOps.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StreamOps.scala index b55c3a191..685e74c32 100644 --- a/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StreamOps.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/StreamOps.scala @@ -42,7 +42,7 @@ import com.typesafe.scalalogging.StrictLogging import scala.concurrent.duration.FiniteDuration /** - * Utility functions for commonly used operations on Akka streams. Most of these are for + * Utility functions for commonly used operations on Pekko streams. Most of these are for * the purpose of getting additional instrumentation into the behavior of the stream. */ object StreamOps extends StrictLogging { diff --git a/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaConfiguration.scala b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoConfiguration.scala similarity index 98% rename from atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaConfiguration.scala rename to atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoConfiguration.scala index a463fe86f..8dedddf8a 100644 --- a/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/AkkaConfiguration.scala +++ b/atlas-spring-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoConfiguration.scala @@ -32,7 +32,7 @@ import java.util.Optional * are available for `com.typesafe.config.Config` and `com.netflix.spectator.api.Registry`. */ @Configuration -class AkkaConfiguration { +class PekkoConfiguration { @Bean def actorSystemService(config: Optional[Config]): ActorSystemService = { diff --git a/atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/AkkaConfigurationSuite.scala b/atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/PekkoConfigurationSuite.scala similarity index 97% rename from atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/AkkaConfigurationSuite.scala rename to atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/PekkoConfigurationSuite.scala index 37bfb7384..ba44d5602 100644 --- a/atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/AkkaConfigurationSuite.scala +++ b/atlas-spring-pekko/src/test/scala/com/netflix/atlas/pekko/PekkoConfigurationSuite.scala @@ -25,7 +25,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import scala.util.Using -class AkkaConfigurationSuite extends FunSuite { +class PekkoConfigurationSuite extends FunSuite { private val testCfg = ConfigFactory.parseString(""" |atlas.pekko.name = test From 564631a575d73b7f5c8b98e932d8b8d998a3ca6c Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Thu, 14 Sep 2023 08:45:37 -0500 Subject: [PATCH 3/3] fix formatting --- .../main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala index 157575dcd..4d5216548 100644 --- a/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala +++ b/atlas-pekko/src/main/scala/com/netflix/atlas/pekko/PekkoHttpClient.scala @@ -41,7 +41,8 @@ trait PekkoHttpClient { * @param system * The Pekko system. */ -class DefaultPekkoHttpClient(name: String)(implicit val system: ActorSystem) extends PekkoHttpClient { +class DefaultPekkoHttpClient(name: String)(implicit val system: ActorSystem) + extends PekkoHttpClient { private implicit val ec = system.dispatcher