From fea0799654f45dd443ddcb1cd0ab928cfb441655 Mon Sep 17 00:00:00 2001 From: acarbonetto Date: Mon, 25 Sep 2023 15:06:51 -0700 Subject: [PATCH] Refactor/Rename jabushka to javabushka Signed-off-by: acarbonetto --- java/.cargo/config.toml | 3 --- java/{jabushka => }/benchmarks/build.gradle | 2 +- .../javababushka/benchmarks}/BenchmarkingApp.java | 10 +++++----- .../javababushka/benchmarks}/jedis/JedisClient.java | 2 +- .../benchmarks}/lettuce/LettuceAsyncClient.java | 2 +- .../benchmarks}/lettuce/LettuceClient.java | 2 +- .../benchmarks}/utils/Benchmarking.java | 2 +- .../benchmarks}/utils/ChosenAction.java | 2 +- .../benchmarks}/utils/LatencyResults.java | 2 +- .../benchmarks}/jedis/JedisClientIT.java | 6 +++--- .../benchmarks}/lettuce/LettuceAsyncClientIT.java | 2 +- .../benchmarks}/lettuce/LettuceClientIT.java | 6 +++--- java/{jabushka => }/build.gradle | 0 java/{jabushka/jabushka => client}/build.gradle | 0 java/{jabushka => }/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 java/{jabushka => }/gradlew | 0 java/{jabushka => }/gradlew.bat | 0 java/{jabushka => }/integTest/build.gradle | 0 java/jabushka/settings.gradle | 5 ----- java/rust_client/.cargo/config.toml | 3 +++ java/{ => rust_client}/Cargo.toml | 10 +++++----- java/{ => rust_client}/src/lib.rs | 0 java/settings.gradle | 5 +++++ 25 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 java/.cargo/config.toml rename java/{jabushka => }/benchmarks/build.gradle (94%) rename java/{jabushka/benchmarks/src/main/java/javabushka/client => benchmarks/src/main/java/javababushka/benchmarks}/BenchmarkingApp.java (97%) rename java/{jabushka/benchmarks/src/main/java/javabushka/client => benchmarks/src/main/java/javababushka/benchmarks}/jedis/JedisClient.java (95%) rename java/{jabushka/benchmarks/src/main/java/javabushka/client => benchmarks/src/main/java/javababushka/benchmarks}/lettuce/LettuceAsyncClient.java (97%) rename java/{jabushka/benchmarks/src/main/java/javabushka/client => benchmarks/src/main/java/javababushka/benchmarks}/lettuce/LettuceClient.java (95%) rename java/{jabushka/benchmarks/src/main/java/javabushka/client => benchmarks/src/main/java/javababushka/benchmarks}/utils/Benchmarking.java (99%) rename java/{jabushka/benchmarks/src/main/java/javabushka/client => benchmarks/src/main/java/javababushka/benchmarks}/utils/ChosenAction.java (64%) rename java/{jabushka/benchmarks/src/main/java/javabushka/client => benchmarks/src/main/java/javababushka/benchmarks}/utils/LatencyResults.java (93%) rename java/{jabushka/benchmarks/src/test/java/javabushka/client => benchmarks/src/test/java/javababushka/benchmarks}/jedis/JedisClientIT.java (92%) rename java/{jabushka/benchmarks/src/test/java/javabushka/client => benchmarks/src/test/java/javababushka/benchmarks}/lettuce/LettuceAsyncClientIT.java (98%) rename java/{jabushka/benchmarks/src/test/java/javabushka/client => benchmarks/src/test/java/javababushka/benchmarks}/lettuce/LettuceClientIT.java (87%) rename java/{jabushka => }/build.gradle (100%) rename java/{jabushka/jabushka => client}/build.gradle (100%) rename java/{jabushka => }/gradle.properties (100%) rename java/{jabushka => }/gradle/wrapper/gradle-wrapper.jar (100%) rename java/{jabushka => }/gradle/wrapper/gradle-wrapper.properties (100%) rename java/{jabushka => }/gradlew (100%) rename java/{jabushka => }/gradlew.bat (100%) rename java/{jabushka => }/integTest/build.gradle (100%) delete mode 100644 java/jabushka/settings.gradle create mode 100644 java/rust_client/.cargo/config.toml rename java/{ => rust_client}/Cargo.toml (58%) rename java/{ => rust_client}/src/lib.rs (100%) create mode 100644 java/settings.gradle diff --git a/java/.cargo/config.toml b/java/.cargo/config.toml deleted file mode 100644 index 24a6f21533..0000000000 --- a/java/.cargo/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[env] -BABUSHKA_NAME = { value = "BabushkaPy", force = true } -BABUSHKA_VERSION = "0.1.0" diff --git a/java/jabushka/benchmarks/build.gradle b/java/benchmarks/build.gradle similarity index 94% rename from java/jabushka/benchmarks/build.gradle rename to java/benchmarks/build.gradle index 5e21fe3ea6..f0febb7bc5 100644 --- a/java/jabushka/benchmarks/build.gradle +++ b/java/benchmarks/build.gradle @@ -28,7 +28,7 @@ java { application { // Define the main class for the application. - mainClass = 'javabushka.client.BenchmarkingApp' + mainClass = 'javababushka.benchmarks.BenchmarkingApp' } tasks.withType(Test) { diff --git a/java/jabushka/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java b/java/benchmarks/src/main/java/javababushka/benchmarks/BenchmarkingApp.java similarity index 97% rename from java/jabushka/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java rename to java/benchmarks/src/main/java/javababushka/benchmarks/BenchmarkingApp.java index c0341c8da3..bba849f2e3 100644 --- a/java/jabushka/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/BenchmarkingApp.java @@ -1,4 +1,4 @@ -package javabushka.client; +package javababushka.benchmarks; import java.io.FileWriter; import java.io.IOException; @@ -8,10 +8,10 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -import javabushka.client.jedis.JedisClient; -import javabushka.client.lettuce.LettuceAsyncClient; -import javabushka.client.utils.Benchmarking; -import javabushka.client.utils.ChosenAction; +import javababushka.benchmarks.jedis.JedisClient; +import javababushka.benchmarks.lettuce.LettuceAsyncClient; +import javababushka.benchmarks.utils.Benchmarking; +import javababushka.benchmarks.utils.ChosenAction; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; diff --git a/java/jabushka/benchmarks/src/main/java/javabushka/client/jedis/JedisClient.java b/java/benchmarks/src/main/java/javababushka/benchmarks/jedis/JedisClient.java similarity index 95% rename from java/jabushka/benchmarks/src/main/java/javabushka/client/jedis/JedisClient.java rename to java/benchmarks/src/main/java/javababushka/benchmarks/jedis/JedisClient.java index b3f9e3ee69..3a41794d8c 100644 --- a/java/jabushka/benchmarks/src/main/java/javabushka/client/jedis/JedisClient.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/jedis/JedisClient.java @@ -1,7 +1,7 @@ /* * This Java source file was generated by the Gradle 'init' task. */ -package javabushka.client.jedis; +package javababushka.benchmarks.jedis; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; diff --git a/java/jabushka/benchmarks/src/main/java/javabushka/client/lettuce/LettuceAsyncClient.java b/java/benchmarks/src/main/java/javababushka/benchmarks/lettuce/LettuceAsyncClient.java similarity index 97% rename from java/jabushka/benchmarks/src/main/java/javabushka/client/lettuce/LettuceAsyncClient.java rename to java/benchmarks/src/main/java/javababushka/benchmarks/lettuce/LettuceAsyncClient.java index 6c0c8f5083..46920033f9 100644 --- a/java/jabushka/benchmarks/src/main/java/javabushka/client/lettuce/LettuceAsyncClient.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/lettuce/LettuceAsyncClient.java @@ -1,7 +1,7 @@ /* * This Java source file was generated by the Gradle 'init' task. */ -package javabushka.client.lettuce; +package javababushka.benchmarks.lettuce; import io.lettuce.core.RedisClient; import io.lettuce.core.RedisFuture; diff --git a/java/jabushka/benchmarks/src/main/java/javabushka/client/lettuce/LettuceClient.java b/java/benchmarks/src/main/java/javababushka/benchmarks/lettuce/LettuceClient.java similarity index 95% rename from java/jabushka/benchmarks/src/main/java/javabushka/client/lettuce/LettuceClient.java rename to java/benchmarks/src/main/java/javababushka/benchmarks/lettuce/LettuceClient.java index c0dc6a38f0..d06800dfc0 100644 --- a/java/jabushka/benchmarks/src/main/java/javabushka/client/lettuce/LettuceClient.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/lettuce/LettuceClient.java @@ -1,7 +1,7 @@ /* * This Java source file was generated by the Gradle 'init' task. */ -package javabushka.client.lettuce; +package javababushka.benchmarks.lettuce; import io.lettuce.core.RedisClient; import io.lettuce.core.api.StatefulRedisConnection; diff --git a/java/jabushka/benchmarks/src/main/java/javabushka/client/utils/Benchmarking.java b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java similarity index 99% rename from java/jabushka/benchmarks/src/main/java/javabushka/client/utils/Benchmarking.java rename to java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java index 182b062c99..3e1553a5d9 100644 --- a/java/jabushka/benchmarks/src/main/java/javabushka/client/utils/Benchmarking.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java @@ -1,4 +1,4 @@ -package javabushka.client.utils; +package javababushka.benchmarks.utils; import java.io.FileWriter; import java.io.IOException; diff --git a/java/jabushka/benchmarks/src/main/java/javabushka/client/utils/ChosenAction.java b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/ChosenAction.java similarity index 64% rename from java/jabushka/benchmarks/src/main/java/javabushka/client/utils/ChosenAction.java rename to java/benchmarks/src/main/java/javababushka/benchmarks/utils/ChosenAction.java index 0bded99ddc..bd9f01fd90 100644 --- a/java/jabushka/benchmarks/src/main/java/javabushka/client/utils/ChosenAction.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/ChosenAction.java @@ -1,4 +1,4 @@ -package javabushka.client.utils; +package javababushka.benchmarks.utils; public enum ChosenAction { GET_NON_EXISTING, diff --git a/java/jabushka/benchmarks/src/main/java/javabushka/client/utils/LatencyResults.java b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/LatencyResults.java similarity index 93% rename from java/jabushka/benchmarks/src/main/java/javabushka/client/utils/LatencyResults.java rename to java/benchmarks/src/main/java/javababushka/benchmarks/utils/LatencyResults.java index d81deaa7fe..8e2baa3a2b 100644 --- a/java/jabushka/benchmarks/src/main/java/javabushka/client/utils/LatencyResults.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/LatencyResults.java @@ -1,4 +1,4 @@ -package javabushka.client.utils; +package javababushka.benchmarks.utils; // Raw timing results in nanoseconds public class LatencyResults { diff --git a/java/jabushka/benchmarks/src/test/java/javabushka/client/jedis/JedisClientIT.java b/java/benchmarks/src/test/java/javababushka/benchmarks/jedis/JedisClientIT.java similarity index 92% rename from java/jabushka/benchmarks/src/test/java/javabushka/client/jedis/JedisClientIT.java rename to java/benchmarks/src/test/java/javababushka/benchmarks/jedis/JedisClientIT.java index 09a0e7ef35..3d4015ee9d 100644 --- a/java/jabushka/benchmarks/src/test/java/javabushka/client/jedis/JedisClientIT.java +++ b/java/benchmarks/src/test/java/javababushka/benchmarks/jedis/JedisClientIT.java @@ -1,14 +1,14 @@ /* * This Java source file was generated by the Gradle 'init' task. */ -package javabushka.client.jedis; +package javababushka.benchmarks.jedis; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.HashMap; import java.util.Map; -import javabushka.client.utils.Benchmarking; -import javabushka.client.utils.ChosenAction; +import javababushka.benchmarks.utils.ChosenAction; +import javababushka.benchmarks.utils.Benchmarking; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/java/jabushka/benchmarks/src/test/java/javabushka/client/lettuce/LettuceAsyncClientIT.java b/java/benchmarks/src/test/java/javababushka/benchmarks/lettuce/LettuceAsyncClientIT.java similarity index 98% rename from java/jabushka/benchmarks/src/test/java/javabushka/client/lettuce/LettuceAsyncClientIT.java rename to java/benchmarks/src/test/java/javababushka/benchmarks/lettuce/LettuceAsyncClientIT.java index ddc03c77a2..23deeba981 100644 --- a/java/jabushka/benchmarks/src/test/java/javabushka/client/lettuce/LettuceAsyncClientIT.java +++ b/java/benchmarks/src/test/java/javababushka/benchmarks/lettuce/LettuceAsyncClientIT.java @@ -1,7 +1,7 @@ /* * This Java source file was generated by the Gradle 'init' task. */ -package javabushka.client.lettuce; +package javababushka.benchmarks.lettuce; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; diff --git a/java/jabushka/benchmarks/src/test/java/javabushka/client/lettuce/LettuceClientIT.java b/java/benchmarks/src/test/java/javababushka/benchmarks/lettuce/LettuceClientIT.java similarity index 87% rename from java/jabushka/benchmarks/src/test/java/javabushka/client/lettuce/LettuceClientIT.java rename to java/benchmarks/src/test/java/javababushka/benchmarks/lettuce/LettuceClientIT.java index 5180489876..445cc5b584 100644 --- a/java/jabushka/benchmarks/src/test/java/javabushka/client/lettuce/LettuceClientIT.java +++ b/java/benchmarks/src/test/java/javababushka/benchmarks/lettuce/LettuceClientIT.java @@ -1,11 +1,11 @@ /* * This Java source file was generated by the Gradle 'init' task. */ -package javabushka.client.lettuce; +package javababushka.benchmarks.lettuce; import java.util.HashMap; -import javabushka.client.utils.Benchmarking; -import javabushka.client.utils.ChosenAction; +import javababushka.benchmarks.utils.Benchmarking; +import javababushka.benchmarks.utils.ChosenAction; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/java/jabushka/build.gradle b/java/build.gradle similarity index 100% rename from java/jabushka/build.gradle rename to java/build.gradle diff --git a/java/jabushka/jabushka/build.gradle b/java/client/build.gradle similarity index 100% rename from java/jabushka/jabushka/build.gradle rename to java/client/build.gradle diff --git a/java/jabushka/gradle.properties b/java/gradle.properties similarity index 100% rename from java/jabushka/gradle.properties rename to java/gradle.properties diff --git a/java/jabushka/gradle/wrapper/gradle-wrapper.jar b/java/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from java/jabushka/gradle/wrapper/gradle-wrapper.jar rename to java/gradle/wrapper/gradle-wrapper.jar diff --git a/java/jabushka/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from java/jabushka/gradle/wrapper/gradle-wrapper.properties rename to java/gradle/wrapper/gradle-wrapper.properties diff --git a/java/jabushka/gradlew b/java/gradlew similarity index 100% rename from java/jabushka/gradlew rename to java/gradlew diff --git a/java/jabushka/gradlew.bat b/java/gradlew.bat similarity index 100% rename from java/jabushka/gradlew.bat rename to java/gradlew.bat diff --git a/java/jabushka/integTest/build.gradle b/java/integTest/build.gradle similarity index 100% rename from java/jabushka/integTest/build.gradle rename to java/integTest/build.gradle diff --git a/java/jabushka/settings.gradle b/java/jabushka/settings.gradle deleted file mode 100644 index f549b8010a..0000000000 --- a/java/jabushka/settings.gradle +++ /dev/null @@ -1,5 +0,0 @@ -rootProject.name = 'babushka' - -include 'jabushka' -include 'integTest' -include 'benchmarks' diff --git a/java/rust_client/.cargo/config.toml b/java/rust_client/.cargo/config.toml new file mode 100644 index 0000000000..65aa65898f --- /dev/null +++ b/java/rust_client/.cargo/config.toml @@ -0,0 +1,3 @@ +[env] +BABUSHKA_NAME = { value = "JavaBabushka", force = true } +BABUSHKA_VERSION = "0.1.0" diff --git a/java/Cargo.toml b/java/rust_client/Cargo.toml similarity index 58% rename from java/Cargo.toml rename to java/rust_client/Cargo.toml index ccde88c26d..42d0352230 100644 --- a/java/Cargo.toml +++ b/java/rust_client/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "jabushka" -version = "0.0.0" +name = "JavaBabushka" +version = "0.1.0" edition = "2021" license = "BSD-3-Clause" @@ -10,10 +10,10 @@ name = "jabushka" crate-type = ["cdylib"] [dependencies] -redis = { path = "../submodules/redis-rs/redis", features = ["aio", "tokio-comp", "connection-manager", "tls", "tokio-rustls-comp"] } -babushka = { path = "../babushka-core" } +redis = { path = "../../submodules/redis-rs/redis", features = ["aio", "tokio-comp", "connection-manager", "tls", "tokio-rustls-comp"] } +babushka = { path = "../../babushka-core" } tokio = { version = "^1", features = ["rt", "macros", "rt-multi-thread", "time"] } -logger_core = {path = "../logger_core"} +logger_core = {path = "../../logger_core"} tracing-subscriber = "0.3.16" [profile.release] diff --git a/java/src/lib.rs b/java/rust_client/src/lib.rs similarity index 100% rename from java/src/lib.rs rename to java/rust_client/src/lib.rs diff --git a/java/settings.gradle b/java/settings.gradle new file mode 100644 index 0000000000..b67b7ebde5 --- /dev/null +++ b/java/settings.gradle @@ -0,0 +1,5 @@ +rootProject.name = 'java-babushka' + +include 'client' +include 'integTest' +include 'benchmarks'