{"id":13470746,"url":"https://github.com/spotify/heroic","last_synced_at":"2025-10-04T16:31:53.064Z","repository":{"id":32889429,"uuid":"36483902","full_name":"spotify/heroic","owner":"spotify","description":"The Heroic Time Series Database","archived":true,"fork":false,"pushed_at":"2021-03-26T19:35:27.000Z","size":9886,"stargazers_count":847,"open_issues_count":70,"forks_count":109,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-01-23T06:36:41.153Z","etag":null,"topics":["cassandra","elasticsearch","google-bigtable","google-pubsub","ha","java","monitoring","time-series","tsdb"],"latest_commit_sha":null,"homepage":"https://spotify.github.io/heroic/","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/spotify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-29T05:20:53.000Z","updated_at":"2025-01-03T21:44:37.000Z","dependencies_parsed_at":"2022-08-07T18:15:59.353Z","dependency_job_id":null,"html_url":"https://github.com/spotify/heroic","commit_stats":null,"previous_names":[],"tags_count":98,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fheroic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fheroic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fheroic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fheroic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spotify","download_url":"https://codeload.github.com/spotify/heroic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235285425,"owners_count":18965324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cassandra","elasticsearch","google-bigtable","google-pubsub","ha","java","monitoring","time-series","tsdb"],"created_at":"2024-07-31T16:00:35.438Z","updated_at":"2025-10-04T16:31:47.386Z","avatar_url":"https://github.com/spotify.png","language":"Java","readme":"# DEPRECATION NOTICE\n\n**This repo is no longer actively maintained. While it should continue to work and there are no major known bugs, we will not be improving Heroic or releasing new versions.**\n\n# [![Heroic](/logo.42.png?raw=true \"The Heroic Time Series Database\")](/assets/logo_on_light.svg) Heroic\n\n[![Build Status](https://circleci.com/gh/spotify/heroic.svg?style=svg)](https://circleci.com/gh/spotify/heroic)\n[![Codecov](https://img.shields.io/codecov/c/github/spotify/heroic.svg)](https://codecov.io/gh/spotify/heroic)\n[![License](https://img.shields.io/github/license/spotify/heroic.svg)](LICENSE)\n\nA scalable time series database based on Bigtable, Cassandra, and Elasticsearch.\nGo to https://spotify.github.io/heroic/ for documentation.\n\nThis project adheres to the [Open Code of Conduct](https://github.com/spotify/code-of-conduct/blob/master/code-of-conduct.md).\nBy participating, you are expected to honor this code.\n\n## Install\n\n### Docker\n\nDocker images are available on [Docker Hub](https://hub.docker.com/r/spotify/heroic).\n\n    $ docker run -p 8080:8080 -p 9091:9091 spotify/heroic\n\nHeroic will now be reachable at http://localhost:8080/status.\n\nIn production it's advised to use a tagged version.\n\n\n## Configuration\nFor help on how to write a configuration file, see the [Configuration Section][configuration] of the official documentation.\n\n[configuration]: http://spotify.github.io/heroic/#!/docs/config\n\nHeroic has been tested with the following services:\n\n* Cassandra (`2.1.x`, `3.5`) when using [metric/datastax](/metric/datastax).\n* [Cloud Bigtable](https://cloud.google.com/bigtable/docs/) when using\n  [metric/bigtable](/metric/bigtable).\n* Elasticsearch (`7.x`) when using\n  [metadata/elasticsearch](/metadata/elasticsearch) or\n  [suggest/elasticsearch](/suggest/elasticsearch).\n* Kafka (`0.8.x`) when using [consumer/kafka](/consumer/kafka).\n\n\n## Developing\n\n### Building from source\n\nIn order to compile Heroic, you'll need:\n\n- A Java 11 JDK\n- Maven 3\n- Gradle\n\nThe project is built using Gradle:\n\n```bash\n# full build, runs all tests and builds the shaded jar\n./gradlew build\n\n# only compile\n./gradlew assemble\n\n# build a single module\n./gradlew heroic-metric-bigtable:build\n```\n\nThe `heroic-dist` module can be used to produce a shaded jar that contains all required dependencies:\n\n```\n./gradlew heroic-dist:shadowJar\n```\n\nAfter building, the entry point of the service is\n[`com.spotify.heroic.HeroicService`](/heroic-dist/src/main/java/com/spotify/heroic/HeroicService.java).\nThe following is an example of how this can be run:\n\n```\n./gradlew heroic-dist:runShadow \u003cconfig\u003e\n```\n\nwhich is the equivalent of doing:\n\n```\njava -jar $PWD/heroic-dist/build/libs/heroic-dist-0.0.1-SNAPSHOT-shaded.jar \u003cconfig\u003e\n```\n\n\n### Building with Docker\n\n```\n$ docker build -t heroic:latest .\n```\n\nThis is a multi-stage build and will first build Heroic via a `./gradlew clean build` and then copy the resulting shaded jar into the runtime container.\n\nRunning heroic via docker can be done:\n\n```\n$ docker run -d -p 8080:8080 -p 9091:9091 -v /path/to/config.yml:/heroic.yml spotify/heroic:latest\n```\n\n\n### Logging\n\nLogging is captured using [SLF4J](http://www.slf4j.org/), and forwarded to\n[Log4j](http://logging.apache.org/log4j/).\n\nTo configure logging, define the `-Dlog4j.configurationFile=\u003cpath\u003e`\nparameter. You can use [docs/log4j2-file.xml](/docs/log4j2-file.xml) as a base.\n\n### Testing\n\nWe run tests with Gradle:\n\n```\n# run unit tests\n./gradlew test\n\n# run integration tests\n./gradlew integrationTest\n```\n\nor to run a more comprehensive set of checks:\n\n```\n./gradlew check\n```\n\nThis will run:\n\n* unit tests\n* integration tests\n* [Checkstyle](http://checkstyle.sourceforge.net/)\n* [Coverage Reporting with Jacoco](http://eclemma.org/jacoco/)\n\nIt is strongly recommended that you run the full test suite before setting up a\npull request, otherwise it will be rejected by Travis.\n\n#### Full Cluster Tests\n\nFull cluster tests are defined in [heroic-dist/src/test/java](/heroic-dist/src/test/java).\n\nThis way, they have access to all the modules and parts of Heroic.\n\nThe [JVM RPC](/rpc/jvm) module is specifically designed to allow for rapid\nexecution of integration tests. It allows multiple cores to be defined and\ncommunicate with each other in the same JVM instance.\n\n* See [AbstractClusterQueryIT](/heroic-dist/src/test/java/com/spotify/heroic/AbstractClusterQueryIT.java)\n* JVM-based [JvmClusterQueryIT](/heroic-dist/src/test/java/com/spotify/heroic/JvmClusterQueryIT.java)\n* gRPC-based [GrpcClusterQueryIT](/heroic-dist/src/test/java/com/spotify/heroic/GrpcClusterQueryIT.java)\n\n\n### Code Coverage\n\n[![Coverage](https://codecov.io/gh/spotify/heroic/branch/master/graphs/icicle.svg)](https://codecov.io/gh/spotify/heroic/branch/master)\n\nThere's an ongoing project to improve test coverage.\nClicking the above graph will bring you to [codecov.io](https://codecov.io/gh/spotify/heroic/branches/master), where you can find areas to focus on.\n\n#### Bypassing Validation\n\nTo bypass automatic formatting and checkstyle validation you can use the\nfollowing stanza:\n\n```java\n// @formatter:off\nfinal List\u003cString\u003e list = ImmutableList.of(\n   \"Welcome to...\",\n   \"... The Wild West\"\n);\n// @formatter:on\n```\n\nTo bypass a FindBugs error, you should use the `@SupressFBWarnings` annotation.\n\n```java\n@SupressFBWarnings(value=\"FINDBUGS_ERROR_CODE\", justification=\"I Know Better Than FindBugs\")\npublic class IKnowBetterThanFindbugs() {\n    // ...\n}\n```\n\n### Module Orientation\n\nThe Heroic project is split into a couple of modules.\n\nThe most critical one is [`heroic-component`](heroic-component). It contains\ninterfaces, value objects, and the basic set of dependencies necessary to glue\ndifferent components together.\n\nSubmodules include [`metric`](metric), [`suggest`](suggest),\n[`metadata`](metadata), and [`aggregation`](aggregation). The first three\ncontain various implementations of the given backend type, while the latter\nprovides aggregation methods.\n\n[`heroic-core`](heroic-core) contains the\n[`com.spotify.heroic.HeroicCore`](heroic-core/src/main/java/com/spotify/heroic/HeroicCore.java)\nclass which is the central building block for setting up a Heroic instance.\n\n[`heroic-elasticsearch-utils`](heroic-elasticsearch-utils) is a collection of\nutilities for interacting with Elasticsearch. This is separate since we have\nmore than one backend that needs to talk with elasticsearch.\n\nFinally there is [`heroic-dist`](heroic-dist), a small project that depends on all module. Here is where everything is bound together into a distribution\n\u0026mdash; a shaded jar. It also provides the entry-point for services, namely\n[`com.spotify.heroic.HeroicService`](heroic-dist/src/main/java/com/spotify/heroic/HeroicService.java)\nor through an interactive shell [`com.spotify.heroic.HeroicShell`](heroic-shell/src/main/java/com/spotify/heroic/HeroicShell.java).\nThe shell can either be run standalone or connected to an existing Heroic instance for administration.\n\n## Contributing\n\nGuidelines for contributing can be found [here](https://github.com/spotify/heroic/blob/master/CONTRIBUTING.md).\n","funding_links":[],"categories":["Java","Big Data","Databases","数据库","Tools"],"sub_categories":["Bigtable","Databases"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fheroic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspotify%2Fheroic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fheroic/lists"}