diff --git a/tools/ci/licenserc.yml b/.github/config/licenserc.yml similarity index 100% rename from tools/ci/licenserc.yml rename to .github/config/licenserc.yml diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml index c7ced331569..e140dab9b33 100644 --- a/.github/workflows/kvrocks.yaml +++ b/.github/workflows/kvrocks.yaml @@ -47,7 +47,7 @@ jobs: sudo apt install -y clang-format-12 clang-tidy-12 - uses: apache/skywalking-eyes/header@v0.4.0 with: - config: tools/ci/licenserc.yml + config: .github/config/licenserc.yml - name: Check with clang-format id: check-format run: ./x.py check format --clang-format-path clang-format-12 diff --git a/CMakeLists.txt b/CMakeLists.txt index 9177509b729..e7a2160b52c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,7 +206,7 @@ add_executable(kvrocks src/main.cc) target_link_libraries(kvrocks PRIVATE kvrocks_objs ${EXTERNAL_LIBS}) # kvrocks2redis sync tool -file(GLOB KVROCKS2REDIS_SRCS tools/kvrocks2redis/*.cc) +file(GLOB KVROCKS2REDIS_SRCS utils/kvrocks2redis/*.cc) add_executable(kvrocks2redis ${KVROCKS2REDIS_SRCS}) target_link_libraries(kvrocks2redis PRIVATE kvrocks_objs ${EXTERNAL_LIBS}) diff --git a/tools/kvrocks2redis/tests/README.md b/tools/kvrocks2redis/tests/README.md deleted file mode 100644 index aadc9c5667a..00000000000 --- a/tools/kvrocks2redis/tests/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## Populate data and append new data script - -* for testing the kvrocks2redis, manually check generate aof ) - -## Usage - -* Start kvrocks and kvrocks2redis - * TODO automatic create docker env -* install dependency:: - * pip install git+https://github.com/andymccurdy/redis-py.git@2.10.3 -* Usage - -``` -# populate data -python populate-kvrocks.py -# check generated aof file -# append new data -python append-data-to-kvrocks.py -# check appended new aof data -``` diff --git a/tools/try_cluster/.gitignore b/utils/create-cluster/.gitignore similarity index 100% rename from tools/try_cluster/.gitignore rename to utils/create-cluster/.gitignore diff --git a/tools/try_cluster/try_cluster.sh b/utils/create-cluster/create-cluster similarity index 100% rename from tools/try_cluster/try_cluster.sh rename to utils/create-cluster/create-cluster diff --git a/tools/try_cluster/default.conf b/utils/create-cluster/default.conf similarity index 100% rename from tools/try_cluster/default.conf rename to utils/create-cluster/default.conf diff --git a/tools/kvrocks2redis/README.md b/utils/kvrocks2redis/README.md similarity index 100% rename from tools/kvrocks2redis/README.md rename to utils/kvrocks2redis/README.md diff --git a/tools/kvrocks2redis/config.cc b/utils/kvrocks2redis/config.cc similarity index 100% rename from tools/kvrocks2redis/config.cc rename to utils/kvrocks2redis/config.cc diff --git a/tools/kvrocks2redis/config.h b/utils/kvrocks2redis/config.h similarity index 100% rename from tools/kvrocks2redis/config.h rename to utils/kvrocks2redis/config.h diff --git a/tools/kvrocks2redis/kvrocks2redis.conf b/utils/kvrocks2redis/kvrocks2redis.conf similarity index 100% rename from tools/kvrocks2redis/kvrocks2redis.conf rename to utils/kvrocks2redis/kvrocks2redis.conf diff --git a/tools/kvrocks2redis/main.cc b/utils/kvrocks2redis/main.cc similarity index 100% rename from tools/kvrocks2redis/main.cc rename to utils/kvrocks2redis/main.cc diff --git a/tools/kvrocks2redis/parser.cc b/utils/kvrocks2redis/parser.cc similarity index 100% rename from tools/kvrocks2redis/parser.cc rename to utils/kvrocks2redis/parser.cc diff --git a/tools/kvrocks2redis/parser.h b/utils/kvrocks2redis/parser.h similarity index 100% rename from tools/kvrocks2redis/parser.h rename to utils/kvrocks2redis/parser.h diff --git a/tools/kvrocks2redis/redis_writer.cc b/utils/kvrocks2redis/redis_writer.cc similarity index 100% rename from tools/kvrocks2redis/redis_writer.cc rename to utils/kvrocks2redis/redis_writer.cc diff --git a/tools/kvrocks2redis/redis_writer.h b/utils/kvrocks2redis/redis_writer.h similarity index 100% rename from tools/kvrocks2redis/redis_writer.h rename to utils/kvrocks2redis/redis_writer.h diff --git a/tools/kvrocks2redis/sync.cc b/utils/kvrocks2redis/sync.cc similarity index 100% rename from tools/kvrocks2redis/sync.cc rename to utils/kvrocks2redis/sync.cc diff --git a/tools/kvrocks2redis/sync.h b/utils/kvrocks2redis/sync.h similarity index 100% rename from tools/kvrocks2redis/sync.h rename to utils/kvrocks2redis/sync.h diff --git a/utils/kvrocks2redis/tests/README.md b/utils/kvrocks2redis/tests/README.md new file mode 100644 index 00000000000..17c6d687ae0 --- /dev/null +++ b/utils/kvrocks2redis/tests/README.md @@ -0,0 +1,20 @@ +## Populate data and append new data script + +For testing the `kvrocks2redis` utility, manually check generate AOF. + +## Usage + +* Start `kvrocks` and `kvrocks2redis` + * [ ] TODO automatic create docker env +* Install dependency:: + * pip install git+https://github.com/andymccurdy/redis-py.git@2.10.3 +* Usage: + +```bash +# populate data +python populate-kvrocks.py +# check generated aof file +# append new data +python append-data-to-kvrocks.py +# check appended new aof data +``` diff --git a/tools/kvrocks2redis/tests/append-data-to-kvrocks.py b/utils/kvrocks2redis/tests/append-data-to-kvrocks.py similarity index 100% rename from tools/kvrocks2redis/tests/append-data-to-kvrocks.py rename to utils/kvrocks2redis/tests/append-data-to-kvrocks.py diff --git a/tools/kvrocks2redis/tests/populate-kvrocks.py b/utils/kvrocks2redis/tests/populate-kvrocks.py similarity index 100% rename from tools/kvrocks2redis/tests/populate-kvrocks.py rename to utils/kvrocks2redis/tests/populate-kvrocks.py diff --git a/tools/kvrocks2redis/writer.cc b/utils/kvrocks2redis/writer.cc similarity index 100% rename from tools/kvrocks2redis/writer.cc rename to utils/kvrocks2redis/writer.cc diff --git a/tools/kvrocks2redis/writer.h b/utils/kvrocks2redis/writer.h similarity index 100% rename from tools/kvrocks2redis/writer.h rename to utils/kvrocks2redis/writer.h diff --git a/systemd/kvrocks.service b/utils/systemd/kvrocks.service similarity index 100% rename from systemd/kvrocks.service rename to utils/systemd/kvrocks.service diff --git a/x.py b/x.py index 5369be3174a..5aecb8541ea 100755 --- a/x.py +++ b/x.py @@ -142,8 +142,8 @@ def get_source_files() -> List[str]: *glob("src/**/*.cc", recursive=True), *glob("tests/cppunit/**/*.h", recursive=True), *glob("tests/cppunit/**/*.cc", recursive=True), - *glob("tools/kvrocks2redis/**/*.h", recursive=True), - *glob("tools/kvrocks2redis/**/*.cc", recursive=True), + *glob("utils/kvrocks2redis/**/*.h", recursive=True), + *glob("utils/kvrocks2redis/**/*.cc", recursive=True), ]