diff --git a/docs/content/Broker.md b/docs/content/Broker.md index ac27bf8a69a..45fcae12434 100644 --- a/docs/content/Broker.md +++ b/docs/content/Broker.md @@ -27,3 +27,35 @@ Caching Broker nodes employ a cache with a LRU cache invalidation strategy. The broker cache stores per segment results. The cache can be local to each broker node or shared across multiple nodes using an external distributed cache such as [memcached](http://memcached.org/). Each time a broker node receives a query, it first maps the query to a set of segments. A subset of these segment results may already exist in the cache and the results can be directly pulled from the cache. For any segment results that do not exist in the cache, the broker node will forward the query to the historical nodes. Once the historical nodes return their results, the broker will store those results in the cache. Real-time segments are never cached and hence requests for real-time data will always be forwarded to real-time nodes. Real-time data is perpetually changing and caching the results would be unreliable. + +HTTP Endpoints +-------------- + +The broker node exposes several HTTP endpoints for interactions. + +### GET + +* `/status` + +Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the node. + +* `/druid/v2/datasources` + +Returns a list of queryable datasources. + +* `/druid/v2/datasources/{dataSourceName}` + +Returns the dimensions and metrics of the datasource. + +* `/druid/v2/datasources/{dataSourceName}/dimensions` + +Returns the dimensions of the datasource. + +* `/druid/v2/datasources/{dataSourceName}/metrics` + +Returns the metrics of the datasource. + +* `/druid/broker/v1/loadstatus` + +Returns a flag indicating if the broker knows about all segments in Zookeeper. This can be used to know when a broker node is ready to be queried after a restart. + diff --git a/docs/content/Coordinator.md b/docs/content/Coordinator.md index 42d1d17041d..3973878a9d7 100644 --- a/docs/content/Coordinator.md +++ b/docs/content/Coordinator.md @@ -44,67 +44,178 @@ The coordinator node exposes several HTTP endpoints for interactions. ### GET -* `/info/coordinator` +* `/status` - Returns the current true coordinator of the cluster as a JSON object. +Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the node. -* `/info/cluster` +#### Coordinator information - Returns JSON data about every node and segment in the cluster. Information about each node and each segment on each node will be returned. +* `/druid/coordinator/v1/leader` -* `/info/servers` +Returns the current leader coordinator of the cluster as a JSON object. - Returns information about servers in the cluster. Set the `?full` query parameter to get full metadata about all servers and their segments in the cluster. +* `/druid/coordinator/v1/loadstatus` -* `/info/servers/{serverName}` +Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster. - Returns full metadata about a specific server. + * `/druid/coordinator/v1/loadstatus?simple` -* `/info/servers/{serverName}/segments` +Returns the number of segments left to load until segments that should be loaded in the cluster are available for queries. This does not include replication. - Returns a list of all segments for a server. Set the `?full` query parameter to get all segment metadata included +* `/druid/coordinator/v1/loadstatus?full` -* `/info/servers/{serverName}/segments/{segmentId}` +Returns the number of segments left to load in each tier until segments that should be loaded in the cluster are all available. This includes replication. - Returns full metadata for a specific segment. +* `/druid/coordinator/v1/loadqueue` -* `/info/segments` +Returns the ids of segments to load and drop for each historical node. - Returns all segments in the cluster as a list. Set the `?full` flag to get all metadata about segments in the cluster +* `/druid/coordinator/v1/loadqueue?simple` -* `/info/segments/{segmentId}` +Returns the number of segments to load and drop, as well as the total segment load and drop size in bytes for each historical node. - Returns full metadata for a specific segment +* `/druid/coordinator/v1/loadqueue?full` -* `/info/datasources` +#### Metadata store information - Returns a list of datasources in the cluster. Set the `?full` flag to get all metadata for every datasource in the cluster +* `/druid/coordinator/v1/metadata/datasources` -* `/info/datasources/{dataSourceName}` +Returns a list of the names of enabled datasources in the cluster. - Returns full metadata for a datasource +* `/druid/coordinator/v1/metadata/datasources?includeDisabled` -* `/info/datasources/{dataSourceName}/segments` +Returns a list of the names of enabled and enabled datasources in the cluster. - Returns a list of all segments for a datasource. Set the `?full` flag to get full segment metadata for a datasource +* `/druid/coordinator/v1/metadata/datasources?full` -* `/info/datasources/{dataSourceName}/segments/{segmentId}` +Returns a list of all enabled datasources with all metadata about those datasources as stored in the metadata store. - Returns full segment metadata for a specific segment +* `/druid/coordinator/v1/metadata/datasources/{dataSourceName}` -* `/info/rules` +Returns full metadata for a datasource as stored in the metadata store. - Returns all rules for all data sources in the cluster including the default datasource. +* `/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments` -* `/info/rules/{dataSourceName}` +Returns a list of all segments for a datasource as stored in the metadata store. - Returns all rules for a specified datasource +* `/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full` + +Returns a list of all segments for a datasource with the full segment metadata as stored in the metadata store. + +* `/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}` + +Returns full segment metadata for a specific segment as stored in the metadata store. + +#### Datasources information + +* `/druid/coordinator/v1/datasources` + +Returns a list of datasource names found in the cluster. + +* `/druid/coordinator/v1/datasources?simple` + +Returns a list of JSON objects containing the name and properties of datasources found in the cluster. Properties include segment count, total segment byte size, minTime, and maxTime. + +* `/druid/coordinator/v1/datasources?full` + +Returns a list of datasource names found in the cluster with all metadata about those datasources. + +* `/druid/coordinator/v1/datasources/{dataSourceName}` + +Returns a JSON object containing the name and properties of a datasource. Properties include segment count, total segment byte size, minTime, and maxTime. + +* `/druid/coordinator/v1/datasources/{dataSourceName}?full` + +Returns full metadata for a datasource . + +* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals` + +Returns a set of segment intervals. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals?simple` + +Returns a map of an interval to a JSON object containing the total byte size of segments and number of segments for that interval. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals?full` + +Returns a map of an interval to a map of segment metadata to a set of server names that contain the segment for that interval. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}` + +Returns a set of segment ids for an ISO8601 interval. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?simple` + +Returns a map of segment intervals contained within the specified interval to a JSON object containing the total byte size of segments and number of segments for an interval. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?full` + +Returns a map of segment intervals contained within the specified interval to a map of segment metadata to a set of server names that contain the segment for an interval. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/segments` + +Returns a list of all segments for a datasource in the cluster. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/segments?full` + +Returns a list of all segments for a datasource in the cluster with the full segment metadata. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}` + +Returns full segment metadata for a specific segment in the cluster. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/tiers` + +Return the tiers that a datasource exists in. + +#### Rules + +* `/druid/coordinator/v1/rules` + +Returns all rules as JSON objects for all datasources in the cluster including the default datasource. + +* `/druid/coordinator/v1/rules/{dataSourceName}` + +Returns all rules for a specified datasource. + + +* `/druid/coordinator/v1/rules/{dataSourceName}?full` + +Returns all rules for a specified datasource and includes default datasource. ### POST -* `/info/rules/{dataSourceName}` +#### Datasources - POST with a list of rules in JSON form to update rules. +* `/druid/coordinator/v1/datasources/{dataSourceName}` + +Enables a datasource. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}` + +Enables a segment. + +#### Rules + +* `/druid/coordinator/v1/rules/{dataSourceName}` + +POST with a list of rules in JSON form to update rules. + +### DELETE + +#### Datasources + +* `/druid/coordinator/v1/datasources/{dataSourceName}` + +Disables a datasource. + +* `/druid/coordinator/v1/datasources/{dataSourceName}?kill=true&interval={myISO8601Interval}>` + +Runs a [Kill task](Tasks.html) for a given interval and datasource. + +* `/druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}` + +Disables a segment. The Coordinator Console ------------------ diff --git a/docs/content/Historical.md b/docs/content/Historical.md index d6496a5691d..d29218df3ef 100644 --- a/docs/content/Historical.md +++ b/docs/content/Historical.md @@ -35,4 +35,19 @@ Querying Segments Please see [Querying](Querying.html) for more information on querying historical nodes. -For every query that a historical node services, it will log the query and report metrics on the time taken to run the query. \ No newline at end of file +For every query that a historical node services, it will log the query and report metrics on the time taken to run the query. + +HTTP Endpoints +-------------- + +The historical node exposes several HTTP endpoints for interactions. + +### GET + +* `/status` + +Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the node. + +* `/druid/historical/v1/loadstatus` + +Returns a flag indicating if all segments in the local cache have been loaded. This can be used to know when a historical node is ready to be queried after a restart. diff --git a/docs/content/Realtime.md b/docs/content/Realtime.md index 9ce84f3e68c..5085122f426 100644 --- a/docs/content/Realtime.md +++ b/docs/content/Realtime.md @@ -42,3 +42,14 @@ Realtime integration is intended to be extended in two ways: The expectations are that the former will be very common and something that users of Druid will do on a fairly regular basis. Most users will probably never have to deal with the latter form of customization. Indeed, we hope that all potential use cases can be packaged up as part of Druid proper without requiring proprietary customization. Given those expectations, adding a firehose is straightforward and completely encapsulated inside of the interface. Adding a plumber is more involved and requires understanding of how the system works to get right, it’s not impossible, but it’s not intended that individuals new to Druid will be able to do it immediately. + +HTTP Endpoints +-------------- + +The real-time node exposes several HTTP endpoints for interactions. + +### GET + +* `/status` + +Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the node. diff --git a/docs/content/Router.md b/docs/content/Router.md index 338127f658c..d84e091da41 100644 --- a/docs/content/Router.md +++ b/docs/content/Router.md @@ -112,3 +112,30 @@ Allows defining arbitrary routing rules using a JavaScript function. The functio "function" : "function (config, query) { if (query.getAggregatorSpecs && query.getAggregatorSpecs().size() >= 3) { var size = config.getTierToBrokerMap().values().size(); if (size > 0) { return config.getTierToBrokerMap().values().toArray()[size-1] } else { return config.getDefaultBrokerServiceName() } } else { return null } }" } ``` + +HTTP Endpoints +-------------- + +The router node exposes several HTTP endpoints for interactions. + +### GET + +* `/status` + +Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the node. + +* `/druid/v2/datasources` + +Returns a list of queryable datasources. + +* `/druid/v2/datasources/{dataSourceName}` + +Returns the dimensions and metrics of the datasource. + +* `/druid/v2/datasources/{dataSourceName}/dimensions` + +Returns the dimensions of the datasource. + +* `/druid/v2/datasources/{dataSourceName}/metrics` + +Returns the metrics of the datasource.