{"id":13795558,"url":"https://github.com/redBorder/druid_config","last_synced_at":"2025-05-12T23:32:23.811Z","repository":{"id":143877237,"uuid":"45031492","full_name":"redBorder/druid_config","owner":"redBorder","description":"A Ruby gem to access the information about Druid cluster status","archived":false,"fork":false,"pushed_at":"2025-04-14T13:28:42.000Z","size":76,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T14:45:16.460Z","etag":null,"topics":["library","redborder","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redBorder.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-10-27T09:53:07.000Z","updated_at":"2025-04-14T13:28:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b3a2ad7-fd4c-4896-89e3-4743cc3c45cd","html_url":"https://github.com/redBorder/druid_config","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Fdruid_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Fdruid_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Fdruid_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redBorder%2Fdruid_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redBorder","download_url":"https://codeload.github.com/redBorder/druid_config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253840991,"owners_count":21972574,"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":["library","redborder","ruby"],"created_at":"2024-08-03T23:00:58.638Z","updated_at":"2025-05-12T23:32:23.528Z","avatar_url":"https://github.com/redBorder.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/druid_config.svg)](https://badge.fury.io/rb/druid_config) \n[![Build Status](https://travis-ci.org/redBorder/druid_config.svg)](https://travis-ci.org/redBorder/druid_config)\n[![Codacy Badge](https://api.codacy.com/project/badge/grade/41da188b22f44f748b09dfdf7c541ac5)](https://www.codacy.com/app/redBorder/druid_config)\n\n# DruidConfig\n\nDruidConfig is a gem to access the information about Druid cluster status. You can check a node capacity, number of segments, tiers... It uses [zookeeper](https://zookeeper.apache.org/) to get coordinator and overlord URIs.\n\nTo use in your application, add this line to your Gemfile:\n\n```ruby\ngem 'druid_config'\n```\n\n## Query Druid data\n\nThe purpose of this gem is to query Druid cluster status. If you want to query Druid data, I recommend you to use [ruby-druid gem](https://github.com/ruby-druid/ruby-druid).\n\n# Initialization\n\n`Cluster` is the base class to perform queries. To initialize it send the Zookeeper URI and options as arguments:\n\n```ruby\ncluster = DruidConfig::Cluster.new(zookeeper_uri, options)\n```\n\nAvailable options:\n* discovery_path: string with the discovery path of druid inside Zookeeper directory structure.\n\n# Usage\n\nCall methods defined in `DruidConfig::Cluster` to access to the data. To get more information about data returned in methods, check [Druid documentation](http://druid.io/docs/0.8.1/design/coordinator.html).\n\n* `leader`: leader\n* `load_status`: load status\n* `load_status`: load queue\n* `metadata_datasources`: Hash with metadata of datasources\n* `metadata_datasources_segments`: Hash with metadata of segments\n* `datasources`: all data sources\n* `datasource`: a concrete data source\n* `rules`: all rules defined in the cluster\n* `tiers`: tiers\n* `servers` or `nodes`: all nodes of the cluster\n* `physical_servers` or `physical_nodes`: array of URIs of nodes\n* `historicals`: historical nodes\n* `realtimes`: realtime nodes\n* `workers`: worker nodes\n* `physical_workers`: array of URIs of worker nodes\n* `running_tasks`, `pending_tasks`, `waiting_tasks`, `complete_tasks`: tasks in the cluster based in their status\n* `task`: load a task based on an identifier\n* `services`: Hash with physical nodes and the services they are running\n\n## Entities\n\nSome methods return an instance of an `Entity` class. These entities provide multiple methods to access data. Defined entities are inside `druid_config/entities` folder.\n\n* [DataSource](https://github.com/redBorder/druid_config/blob/master/lib/druid_config/entities/data_source.rb)\n* [Segment](https://github.com/redBorder/druid_config/blob/master/lib/druid_config/entities/segment.rb)\n* [Tier](https://github.com/redBorder/druid_config/blob/master/lib/druid_config/entities/tier.rb)\n* [Node](https://github.com/redBorder/druid_config/blob/master/lib/druid_config/entities/node.rb)\n* [Worker](https://github.com/redBorder/druid_config/blob/master/lib/druid_config/entities/worker.rb)\n* [Task](https://github.com/redBorder/druid_config/blob/master/lib/druid_config/entities/task.rb)\n\n## Exceptions\n\n### DruidConfig::Exceptions::NotAvailableNodes\n\nThis exception will be raised when you try to perform a query to a Druid Coordinator or Overlord but there aren't any node of that type available.\n\n### DruidConfig::Exceptions::DruidApiError\n\nSometimes the Gem have available nodes, but it can't access to Druid API. In this case, the gem automatically will reset the Zookeeper connection and retry the query. If second query fails too, a `DruidConfig::Exceptions::DruidApiError` exception will be raised.\n\n# Collaborate\n\nTo contribute DruidConfig:\n\n* Create an issue with the contribution: bug, enhancement or feature\n* Fork the repository and make all changes you need\n* Write test on new changes\n* Create a pull request when you finish\n\n# License\n\nDruidConfig gem is released under the Affero GPL license. Copyright [redBorder](http://redborder.net)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FredBorder%2Fdruid_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FredBorder%2Fdruid_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FredBorder%2Fdruid_config/lists"}