{"id":37016171,"url":"https://github.com/leonchen83/redis-rdb-cli-api","last_synced_at":"2026-01-14T01:48:51.322Z","repository":{"id":57726753,"uuid":"309320139","full_name":"leonchen83/redis-rdb-cli-api","owner":"leonchen83","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-09T07:53:08.000Z","size":96,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T08:42:09.123Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leonchen83.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-02T09:29:03.000Z","updated_at":"2025-06-09T07:53:12.000Z","dependencies_parsed_at":"2025-06-09T08:31:52.240Z","dependency_job_id":"13871793-d813-4f31-bf55-de9b9c04cd5f","html_url":"https://github.com/leonchen83/redis-rdb-cli-api","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/leonchen83/redis-rdb-cli-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonchen83%2Fredis-rdb-cli-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonchen83%2Fredis-rdb-cli-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonchen83%2Fredis-rdb-cli-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonchen83%2Fredis-rdb-cli-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonchen83","download_url":"https://codeload.github.com/leonchen83/redis-rdb-cli-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonchen83%2Fredis-rdb-cli-api/sbom","scorecard":{"id":585047,"data":{"date":"2025-08-11","repo":{"name":"github.com/leonchen83/redis-rdb-cli-api","commit":"af017ced7e7ea092e91aee04add8e68cdfd6d5d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/leonchen83/redis-rdb-cli-api/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/leonchen83/redis-rdb-cli-api/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/leonchen83/redis-rdb-cli-api/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/leonchen83/redis-rdb-cli-api/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/leonchen83/redis-rdb-cli-api/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/leonchen83/redis-rdb-cli-api/release.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:10"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T20:13:38.084Z","repository_id":57726753,"created_at":"2025-08-20T20:13:38.084Z","updated_at":"2025-08-20T20:13:38.084Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T01:48:50.523Z","updated_at":"2026-01-14T01:48:51.308Z","avatar_url":"https://github.com/leonchen83.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redis-rdb-cli-api\n\nThis project used as API in project [redis-rdb-cli](https://github.com/leonchen83/redis-rdb-cli).\n\n\n# Usage\n\n## 1. Create a maven project with pom.xml\n\n```java  \n\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cproject xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"\u003e\n    \u003cmodelVersion\u003e4.0.0\u003c/modelVersion\u003e\n    \n    \u003cgroupId\u003ecom.your.company\u003c/groupId\u003e\n    \u003cartifactId\u003eyour-service\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n    \n    \u003cproperties\u003e\n        \u003cproject.build.sourceEncoding\u003eUTF-8\u003c/project.build.sourceEncoding\u003e\n        \u003cmaven.compiler.source\u003e1.8\u003c/maven.compiler.source\u003e\n        \u003cmaven.compiler.target\u003e1.8\u003c/maven.compiler.target\u003e\n    \u003c/properties\u003e\n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.moilioncircle\u003c/groupId\u003e\n            \u003cartifactId\u003eredis-rdb-cli-api\u003c/artifactId\u003e\n            \u003cversion\u003e1.8.0\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.moilioncircle\u003c/groupId\u003e\n            \u003cartifactId\u003eredis-replicator\u003c/artifactId\u003e\n            \u003cversion\u003e[3.6.4, )\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.slf4j\u003c/groupId\u003e\n            \u003cartifactId\u003eslf4j-api\u003c/artifactId\u003e\n            \u003cversion\u003e1.7.25\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \n        \u003c!-- \n        \u003cdependency\u003e\n            other dependencies\n        \u003c/dependency\u003e\n        --\u003e\n        \n    \u003c/dependencies\u003e\n    \n    \u003cbuild\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cartifactId\u003emaven-assembly-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e3.1.0\u003c/version\u003e\n                \u003cconfiguration\u003e\n                    \u003cdescriptorRefs\u003e\n                        \u003cdescriptorRef\u003ejar-with-dependencies\u003c/descriptorRef\u003e\n                    \u003c/descriptorRefs\u003e\n                \u003c/configuration\u003e\n                \u003cexecutions\u003e\n                    \u003cexecution\u003e\n                        \u003cid\u003emake-assembly\u003c/id\u003e\n                        \u003cphase\u003epackage\u003c/phase\u003e\n                        \u003cgoals\u003e\n                            \u003cgoal\u003esingle\u003c/goal\u003e\n                        \u003c/goals\u003e\n                    \u003c/execution\u003e\n                \u003c/executions\u003e\n            \u003c/plugin\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n                \u003cartifactId\u003emaven-compiler-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e3.8.1\u003c/version\u003e\n                \u003cconfiguration\u003e\n                    \u003csource\u003e${maven.compiler.source}\u003c/source\u003e\n                    \u003ctarget\u003e${maven.compiler.target}\u003c/target\u003e\n                    \u003cencoding\u003e${project.build.sourceEncoding}\u003c/encoding\u003e\n                \u003c/configuration\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/build\u003e\n\u003c/project\u003e\n\n```\n\n## 2. Implement sink service\n\n* create `YourSinkService` implement `SinkService`  \n\n```java  \n\npublic class YourSinkService implements SinkService {\n\n    @Override\n    public String sink() {\n        return \"your-sink-service\";\n    }\n\n    @Override\n    public void init(File config) throws IOException {\n        // parse your external sink config\n    }\n\n    @Override\n    public void onEvent(Replicator replicator, Event event) {\n        // your sink business\n    }\n}\n\n```\n\n* register this service using Java SPI  \n\n```java  \n# create com.moilioncircle.redis.rdb.cli.api.sink.SinkService file in src/main/resources/META-INF/services/\n\n|-src\n|____main\n| |____resources\n| | |____META-INF\n| | | |____services\n| | | | |____com.moilioncircle.redis.rdb.cli.api.sink.SinkService\n\n# add following content in com.moilioncircle.redis.rdb.cli.api.sink.SinkService\n\nyour.package.YourSinkService\n\n```\n\n## 3. Implement formatter service\n\n* create `YourFormatterService` extend `AbstractFormatterService`  \n\n```java  \n\npublic class YourFormatterService extends AbstractFormatterService {\n\n    @Override\n    public String format() {\n        return \"test\";\n    }\n\n    @Override\n    public Event applyString(Replicator replicator, RedisInputStream in, int version, byte[] key, int type, ContextKeyValuePair context) throws IOException {\n        byte[] val = new DefaultRdbValueVisitor(replicator).applyString(in, version);\n        getEscaper().encode(key, getOutputStream());\n        getEscaper().encode(val, getOutputStream());\n        getOutputStream().write('\\n');\n        return context;\n    }\n}\n\n```\n\n* register this formatter using Java SPI  \n\n```java  \n# create com.moilioncircle.redis.rdb.cli.api.format.FormatterService file in src/main/resources/META-INF/services/\n\n|-src\n|____main\n| |____resources\n| | |____META-INF\n| | | |____services\n| | | | |____com.moilioncircle.redis.rdb.cli.api.format.FormatterService\n\n# add following content in com.moilioncircle.redis.rdb.cli.api.format.FormatterService\n\nyour.package.YourFormatterService\n\n```\n\n## 4. Package and deploy\n\n```java  \n\nmvn clean install\n\ncp ./target/your-service-1.0.0-jar-with-dependencies.jar /path/to/redis-rdb-cli/lib\n```\n## 5. Run\n\n* run your sink service\n\n```java  \n\nret -s redis://127.0.0.1:6379 -c config.conf -n your-sink-service\n```\n\n* run your formatter service\n\n```java  \n\nrct -f test -s redis://127.0.0.1:6379 -o ./out.csv -t string -d 0 -e json\n```\n\n## 6. Debug sink service\n\n```java  \n\n    public static void main(String[] args) throws Exception {\n        Replicator replicator = new RedisReplicator(\"redis://127.0.0.1:6379\");\n        Runtime.getRuntime().addShutdownHook(new Thread(() -\u003e {\n            Replicators.closeQuietly(replicator);\n        }));\n        replicator.addExceptionListener((rep, tx, e) -\u003e {\n            throw new RuntimeException(tx.getMessage(), tx);\n        });\n        SinkService sink = new YourSinkService();\n        sink.init(new File(\"/path/to/your-sink.conf\"));\n        replicator.addEventListener(new AsyncEventListener(sink, replicator, 4, Executors.defaultThreadFactory()));\n        replicator.open();\n    }\n\n```\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonchen83%2Fredis-rdb-cli-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonchen83%2Fredis-rdb-cli-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonchen83%2Fredis-rdb-cli-api/lists"}