Rename akka to pekko in configuration (#63)

Resolves https://github.com/apache/incubator-pekko/issues/54
This commit is contained in:
Greg Methvin 2022-12-02 04:53:48 -08:00 committed by GitHub
parent 708da8caec
commit 3d93dbcb81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1047 changed files with 4472 additions and 4464 deletions

View file

@ -55,7 +55,7 @@ public class ActorDocTest extends AbstractJavaTest {
public static Config config =
ConfigFactory.parseString(
"akka {\n"
"pekko {\n"
+ " loggers = [\"org.apache.pekko.testkit.TestEventListener\"]\n"
+ " loglevel = \"WARNING\"\n"
+ " stdout-loglevel = \"WARNING\"\n"

View file

@ -41,8 +41,8 @@ public class FaultHandlingDocSample {
public static void main(String[] args) {
Config config =
ConfigFactory.parseString(
"akka.loglevel = \"DEBUG\"\n"
+ "akka.actor.debug {\n"
"pekko.loglevel = \"DEBUG\"\n"
+ "pekko.actor.debug {\n"
+ " receive = on\n"
+ " lifecycle = on\n"
+ "}\n");

View file

@ -44,7 +44,7 @@ public class FaultHandlingTest extends AbstractJavaTest {
public static Config config =
ConfigFactory.parseString(
"akka {\n"
"pekko {\n"
+ " loggers = [\"org.apache.pekko.testkit.TestEventListener\"]\n"
+ " loglevel = \"WARNING\"\n"
+ " stdout-loglevel = \"WARNING\"\n"

View file

@ -18,7 +18,7 @@ public class FactorialFrontendMain {
final int upToN = 200;
final Config config =
ConfigFactory.parseString("akka.cluster.roles = [frontend]")
ConfigFactory.parseString("pekko.cluster.roles = [frontend]")
.withFallback(ConfigFactory.load("factorial"));
final ActorSystem system = ActorSystem.create("ClusterSystem", config);

View file

@ -30,8 +30,8 @@ public class StatsSampleOneMasterMain {
for (String port : ports) {
// Override the configuration of the port
Config config =
ConfigFactory.parseString("akka.remote.classic.netty.tcp.port=" + port)
.withFallback(ConfigFactory.parseString("akka.cluster.roles = [compute]"))
ConfigFactory.parseString("pekko.remote.classic.netty.tcp.port=" + port)
.withFallback(ConfigFactory.parseString("pekko.cluster.roles = [compute]"))
.withFallback(ConfigFactory.load("stats2"));
ActorSystem system = ActorSystem.create("ClusterSystem", config);

View file

@ -20,7 +20,7 @@ public class ConfigDocTest {
public void customConfig() {
// #custom-config
Config customConf = ConfigFactory.parseString("akka.log-config-on-start = on");
Config customConf = ConfigFactory.parseString("pekko.log-config-on-start = on");
// ConfigFactory.load sandwiches customConfig between default reference
// config and default overrides, and then resolves it.
ActorSystem<Void> system =

View file

@ -49,7 +49,7 @@ public class DnsDiscoveryDocTest extends JUnitSuite {
result.toCompletableFuture().get(5, TimeUnit.SECONDS);
} catch (Exception e) {
system.log().warning("Failed lookup akka.io, but ignoring: " + e);
system.log().warning("Failed lookup pekko.io, but ignoring: " + e);
// don't fail this test
}
}

View file

@ -17,7 +17,7 @@ import com.typesafe.config.ConfigFactory;
public class EchoServer {
public static void main(String[] args) throws InterruptedException {
final Config config = ConfigFactory.parseString("akka.loglevel=DEBUG");
final Config config = ConfigFactory.parseString("pekko.loglevel=DEBUG");
final ActorSystem system = ActorSystem.create("EchoServer", config);
try {
final CountDownLatch latch = new CountDownLatch(1);

View file

@ -139,8 +139,8 @@ public class LambdaPersistencePluginDocTest {
public MyJournalSpecTest() {
super(
ConfigFactory.parseString(
"akka.persistence.journal.plugin = "
+ "\"akka.persistence.journal.leveldb-shared\""));
"pekko.persistence.journal.plugin = "
+ "\"pekko.persistence.journal.leveldb-shared\""));
}
@Override
@ -160,8 +160,8 @@ public class LambdaPersistencePluginDocTest {
public MySnapshotStoreTest() {
super(
ConfigFactory.parseString(
"akka.persistence.snapshot-store.plugin = "
+ "\"akka.persistence.snapshot-store.local\""));
"pekko.persistence.snapshot-store.plugin = "
+ "\"pekko.persistence.snapshot-store.local\""));
}
}
// #snapshot-store-tck-java
@ -180,13 +180,13 @@ public class LambdaPersistencePluginDocTest {
super(
ConfigFactory.parseString(
"persistence.journal.plugin = "
+ "\"akka.persistence.journal.leveldb-shared\""));
+ "\"pekko.persistence.journal.leveldb-shared\""));
Config config = system().settings().config();
storageLocations.add(
new File(config.getString("akka.persistence.journal.leveldb.dir")));
new File(config.getString("pekko.persistence.journal.leveldb.dir")));
storageLocations.add(
new File(config.getString("akka.persistence.snapshot-store.local.dir")));
new File(config.getString("pekko.persistence.snapshot-store.local.dir")));
}
@Override

View file

@ -30,13 +30,13 @@ public class PersistenceMultiDocTest {
// Absolute path to the journal plugin configuration entry in the `reference.conf`
@Override
public String journalPluginId() {
return "akka.persistence.chronicle.journal";
return "pekko.persistence.chronicle.journal";
}
// Absolute path to the snapshot store plugin configuration entry in the `reference.conf`
@Override
public String snapshotPluginId() {
return "akka.persistence.chronicle.snapshot-store";
return "pekko.persistence.chronicle.snapshot-store";
}
}
// #override-plugins

View file

@ -100,8 +100,8 @@ public class PersistenceQueryDocTest {
* You can use `NoOffset` to retrieve all events with a given tag or retrieve a subset of all
* events by specifying a `Sequence` `offset`. The `offset` corresponds to an ordered sequence
* number for the specific tag. Note that the corresponding offset of each event is provided in
* the [[akka.persistence.query.EventEnvelope]], which makes it possible to resume the stream at
* a later point from a given offset.
* the [[pekko.persistence.query.EventEnvelope]], which makes it possible to resume the stream
* at a later point from a given offset.
*
* <p>The `offset` is exclusive, i.e. the event with the exact same sequence number will not be
* included in the returned stream. This means that you can use the offset that is returned in
@ -207,7 +207,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// issue query to journal
Source<EventEnvelope, NotUsed> source =
@ -222,7 +222,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// #all-persistence-ids-live
readJournal.persistenceIds();
@ -235,7 +235,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// #all-persistence-ids-snap
readJournal.currentPersistenceIds();
@ -248,7 +248,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// #events-by-persistent-id
readJournal.eventsByPersistenceId("user-us-1337", 0L, Long.MAX_VALUE);
@ -261,7 +261,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// #events-by-tag
// assuming journal is able to work with numeric offsets we can:
@ -294,7 +294,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// #advanced-journal-query-usage
@ -339,7 +339,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// #projection-into-different-store-rs
final ReactiveStreamsCompatibleDBDriver driver = new ReactiveStreamsCompatibleDBDriver();
@ -371,7 +371,7 @@ public class PersistenceQueryDocTest {
final MyJavadslReadJournal readJournal =
PersistenceQuery.get(system)
.getReadJournalFor(
MyJavadslReadJournal.class, "akka.persistence.query.my-read-journal");
MyJavadslReadJournal.class, "pekko.persistence.query.my-read-journal");
// #projection-into-different-store-simple
final ExampleStore store = new ExampleStore();

View file

@ -28,10 +28,10 @@ public class PersistenceInitTest extends AbstractJavaTest {
public static final TestKitJunitResource testKit =
new TestKitJunitResource(
ConfigFactory.parseString(
"akka.persistence.journal.plugin = \"akka.persistence.journal.inmem\" \n"
+ "akka.persistence.journal.inmem.test-serialization = on \n"
+ "akka.persistence.snapshot-store.plugin = \"akka.persistence.snapshot-store.local\" \n"
+ "akka.persistence.snapshot-store.local.dir = \"target/snapshot-"
"pekko.persistence.journal.plugin = \"pekko.persistence.journal.inmem\" \n"
+ "pekko.persistence.journal.inmem.test-serialization = on \n"
+ "pekko.persistence.snapshot-store.plugin = \"pekko.persistence.snapshot-store.local\" \n"
+ "pekko.persistence.snapshot-store.local.dir = \"target/snapshot-"
+ UUID.randomUUID().toString()
+ "\" \n")
.withFallback(ConfigFactory.defaultApplication()));

View file

@ -40,10 +40,10 @@ public class RemoteDeploymentDocTest extends AbstractJavaTest {
new AkkaJUnitActorSystemResource(
"RemoteDeploymentDocTest",
ConfigFactory.parseString(
" akka.actor.provider = remote\n"
+ " akka.remote.classic.netty.tcp.port = 0\n"
+ " akka.remote.artery.canonical.port = 0\n"
+ " akka.remote.use-unsafe-remote-features-outside-cluster = on")
" pekko.actor.provider = remote\n"
+ " pekko.remote.classic.netty.tcp.port = 0\n"
+ " pekko.remote.artery.canonical.port = 0\n"
+ " pekko.remote.use-unsafe-remote-features-outside-cluster = on")
.withFallback(AkkaSpec.testConf()));
private final ActorSystem system = actorSystemResource.getSystem();
@ -81,12 +81,12 @@ public class RemoteDeploymentDocTest extends AbstractJavaTest {
@Test
public void demonstrateProgrammaticConfig() {
// #programmatic
ConfigFactory.parseString("akka.remote.classic.netty.tcp.hostname=\"1.2.3.4\"")
ConfigFactory.parseString("pekko.remote.classic.netty.tcp.hostname=\"1.2.3.4\"")
.withFallback(ConfigFactory.load());
// #programmatic
// #programmatic-artery
ConfigFactory.parseString("akka.remote.artery.canonical.hostname=\"1.2.3.4\"")
ConfigFactory.parseString("pekko.remote.artery.canonical.hostname=\"1.2.3.4\"")
.withFallback(ConfigFactory.load());
// #programmatic-artery
}

View file

@ -125,7 +125,7 @@ public class FlowDocTest extends AbstractJavaTest {
final Object tick = new Object();
final Duration oneSecond = Duration.ofSeconds(1);
// akka.actor.Cancellable
// pekko.actor.Cancellable
final Source<Object, Cancellable> timer = Source.tick(oneSecond, oneSecond, tick);
Sink.ignore().runWith(timer, system);

View file

@ -58,7 +58,7 @@ public class IntegrationDocTest extends AbstractJavaTest {
+ " core-pool-size-max = 10 \n"
+ " } \n"
+ "} \n"
+ "akka.actor.default-mailbox.mailbox-type = akka.dispatch.UnboundedMailbox\n");
+ "pekko.actor.default-mailbox.mailbox-type = pekko.dispatch.UnboundedMailbox\n");
system = ActorSystem.create("IntegrationDocTest", config);
ref = system.actorOf(Props.create(Translator.class));

View file

@ -31,7 +31,7 @@ public class RecipeLoggingElements extends RecipeTest {
ActorSystem.create(
"RecipeLoggingElements",
ConfigFactory.parseString(
"akka.loglevel=DEBUG\nakka.loggers = [org.apache.pekko.testkit.TestEventListener]"));
"pekko.loglevel=DEBUG\npekko.loggers = [org.apache.pekko.testkit.TestEventListener]"));
}
@AfterClass

View file

@ -28,7 +28,7 @@ public class RecipeSourceFromFunction extends RecipeTest {
ActorSystem.create(
"RecipeSourceFromFunction",
ConfigFactory.parseString(
"akka.loglevel=DEBUG\nakka.loggers = [org.apache.pekko.testkit.TestEventListener]"));
"pekko.loglevel=DEBUG\nakka.loggers = [org.apache.pekko.testkit.TestEventListener]"));
}
@AfterClass

View file

@ -40,33 +40,33 @@ public class Restart {
forever.runWith(
Sink.foreach((Creator<Integer> nr) -> system.log().info("{}", nr.create())), system);
// logs
// [INFO] [12/10/2019 13:51:58.300] [default-akka.test.stream-dispatcher-7]
// [akka.actor.ActorSystemImpl(default)] 1
// [INFO] [12/10/2019 13:51:58.301] [default-akka.test.stream-dispatcher-7]
// [akka.actor.ActorSystemImpl(default)] 2
// [INFO] [12/10/2019 13:51:58.302] [default-akka.test.stream-dispatcher-7]
// [akka.actor.ActorSystemImpl(default)] 3
// [WARN] [12/10/2019 13:51:58.310] [default-akka.test.stream-dispatcher-7]
// [INFO] [12/10/2019 13:51:58.300] [default-pekko.test.stream-dispatcher-7]
// [pekko.actor.ActorSystemImpl(default)] 1
// [INFO] [12/10/2019 13:51:58.301] [default-pekko.test.stream-dispatcher-7]
// [pekko.actor.ActorSystemImpl(default)] 2
// [INFO] [12/10/2019 13:51:58.302] [default-pekko.test.stream-dispatcher-7]
// [pekko.actor.ActorSystemImpl(default)] 3
// [WARN] [12/10/2019 13:51:58.310] [default-pekko.test.stream-dispatcher-7]
// [RestartWithBackoffSource(akka://default)] Restarting graph due to failure. stack_trace:
// (RuntimeException: darn)
// --> 1 second gap
// [INFO] [12/10/2019 13:51:59.379] [default-akka.test.stream-dispatcher-8]
// [akka.actor.ActorSystemImpl(default)] 1
// [INFO] [12/10/2019 13:51:59.382] [default-akka.test.stream-dispatcher-8]
// [akka.actor.ActorSystemImpl(default)] 2
// [INFO] [12/10/2019 13:51:59.383] [default-akka.test.stream-dispatcher-8]
// [akka.actor.ActorSystemImpl(default)] 3
// [WARN] [12/10/2019 13:51:59.386] [default-akka.test.stream-dispatcher-8]
// [INFO] [12/10/2019 13:51:59.379] [default-pekko.test.stream-dispatcher-8]
// [pekko.actor.ActorSystemImpl(default)] 1
// [INFO] [12/10/2019 13:51:59.382] [default-pekko.test.stream-dispatcher-8]
// [pekko.actor.ActorSystemImpl(default)] 2
// [INFO] [12/10/2019 13:51:59.383] [default-pekko.test.stream-dispatcher-8]
// [pekko.actor.ActorSystemImpl(default)] 3
// [WARN] [12/10/2019 13:51:59.386] [default-pekko.test.stream-dispatcher-8]
// [RestartWithBackoffSource(akka://default)] Restarting graph due to failure. stack_trace:
// (RuntimeException: darn)
// --> 2 second gap
// [INFO] [12/10/2019 13:52:01.594] [default-akka.test.stream-dispatcher-8]
// [akka.actor.ActorSystemImpl(default)] 1
// [INFO] [12/10/2019 13:52:01.595] [default-akka.test.stream-dispatcher-8]
// [akka.actor.ActorSystemImpl(default)] 2
// [INFO] [12/10/2019 13:52:01.595] [default-akka.test.stream-dispatcher-8]
// [akka.actor.ActorSystemImpl(default)] 3
// [WARN] [12/10/2019 13:52:01.596] [default-akka.test.stream-dispatcher-8]
// [INFO] [12/10/2019 13:52:01.594] [default-pekko.test.stream-dispatcher-8]
// [pekko.actor.ActorSystemImpl(default)] 1
// [INFO] [12/10/2019 13:52:01.595] [default-pekko.test.stream-dispatcher-8]
// [pekko.actor.ActorSystemImpl(default)] 2
// [INFO] [12/10/2019 13:52:01.595] [default-pekko.test.stream-dispatcher-8]
// [pekko.actor.ActorSystemImpl(default)] 3
// [WARN] [12/10/2019 13:52:01.596] [default-pekko.test.stream-dispatcher-8]
// [RestartWithBackoffSource(akka://default)] Restarting graph due to failure. stack_trace:
// (RuntimeException: darn)
// #restart-failure-inner-failure

View file

@ -21,7 +21,8 @@ public class ParentChildTest extends AbstractJavaTest {
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
"TestKitDocTest",
ConfigFactory.parseString("akka.loggers = [org.apache.pekko.testkit.TestEventListener]"));
ConfigFactory.parseString(
"pekko.loggers = [org.apache.pekko.testkit.TestEventListener]"));
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -44,7 +44,8 @@ public class TestKitDocTest extends AbstractJavaTest {
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
"TestKitDocTest",
ConfigFactory.parseString("akka.loggers = [org.apache.pekko.testkit.TestEventListener]"));
ConfigFactory.parseString(
"pekko.loggers = [org.apache.pekko.testkit.TestEventListener]"));
private final ActorSystem system = actorSystemResource.getSystem();