blob: d89913c0e7f2552362e9e056a0b81144445ac4b1 [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5744],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>f});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function s(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),d=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=d(e.components);return n.createElement(l.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),m=d(a),c=r,f=m["".concat(l,".").concat(c)]||m[c]||p[c]||o;return a?n.createElement(f,i(i({ref:t},u),{},{components:a})):n.createElement(f,i({ref:t},u))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,i=new Array(o);i[0]=c;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:r,i[1]=s;for(var d=2;d<o;d++)i[d]=a[d];return n.createElement.apply(null,i)}return n.createElement.apply(null,a)}c.displayName="MDXCreateElement"},2890:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>f,frontMatter:()=>s,metadata:()=>d,toc:()=>m});var n=a(87462),r=a(63366),o=(a(67294),a(3905)),i=["components"],s={id:"legacy-metadata-api",title:"Legacy metadata API",sidebar_label:"Legacy metadata"},l=void 0,d={unversionedId:"api-reference/legacy-metadata-api",id:"api-reference/legacy-metadata-api",title:"Legacy metadata API",description:"\x3c!--",source:"@site/docs/27.0.0/api-reference/legacy-metadata-api.md",sourceDirName:"api-reference",slug:"/api-reference/legacy-metadata-api",permalink:"/docs/27.0.0/api-reference/legacy-metadata-api",draft:!1,tags:[],version:"current",frontMatter:{id:"legacy-metadata-api",title:"Legacy metadata API",sidebar_label:"Legacy metadata"},sidebar:"docs",previous:{title:"Dynamic configuration",permalink:"/docs/27.0.0/api-reference/dynamic-configuration-api"},next:{title:"SQL JDBC driver",permalink:"/docs/27.0.0/api-reference/sql-jdbc"}},u={},m=[{value:"Segment loading",id:"segment-loading",level:2},{value:"Segment loading by datasource",id:"segment-loading-by-datasource",level:2},{value:"Metadata store information",id:"metadata-store-information",level:2},{value:"Datasources",id:"datasources",level:2},{value:"Intervals",id:"intervals",level:2},{value:"Server information",id:"server-information",level:2},{value:"Query server",id:"query-server",level:2},{value:"Broker",id:"broker",level:3},{value:"Datasource information",id:"datasource-information",level:4}],p={toc:m},c="wrapper";function f(e){var t=e.components,a=(0,r.Z)(e,i);return(0,o.kt)(c,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This document describes the legacy API endpoints to retrieve datasource metadata from Apache Druid. Use the ",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/sql-metadata-tables"},"SQL metadata tables")," to retrieve datasource metadata instead."),(0,o.kt)("h2",{id:"segment-loading"},"Segment loading"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus")),(0,o.kt)("p",null,"Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus?simple")),(0,o.kt)("p",null,"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 segment replication counts."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus?full")),(0,o.kt)("p",null,"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 segment replication counts."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus?full&computeUsingClusterView")),(0,o.kt)("p",null,"Returns the number of segments not yet loaded for each tier until all segments loading in the cluster are available.\nThe result includes segment replication counts. It also factors in the number of available nodes that are of a service type that can load the segment when computing the number of segments remaining to load.\nA segment is considered fully loaded when:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Druid has replicated it the number of times configured in the corresponding load rule."),(0,o.kt)("li",{parentName:"ul"},"Or the number of replicas for the segment in each tier where it is configured to be replicated equals the available nodes of a service type that are currently allowed to load the segment in the tier.")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadqueue")),(0,o.kt)("p",null,"Returns the ids of segments to load and drop for each Historical process."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadqueue?simple")),(0,o.kt)("p",null,"Returns the number of segments to load and drop, as well as the total segment load and drop size in bytes for each Historical process."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadqueue?full")),(0,o.kt)("p",null,"Returns the serialized JSON of segments to load and drop for each Historical process."),(0,o.kt)("h2",{id:"segment-loading-by-datasource"},"Segment loading by datasource"),(0,o.kt)("p",null,"Note that all ",(0,o.kt)("em",{parentName:"p"},"interval")," query parameters are ISO 8601 strings","\u2014","for example, 2016-06-27/2016-06-28.\nAlso note that these APIs only guarantees that the segments are available at the time of the call.\nSegments can still become missing because of historical process failures or any other reasons afterward."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?forceMetadataRefresh={boolean}&interval={myInterval}")),(0,o.kt)("p",null,"Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster for the given\ndatasource over the given interval (or last 2 weeks if interval is not given). ",(0,o.kt)("inlineCode",{parentName:"p"},"forceMetadataRefresh")," is required to be set. "),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Setting ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to true will force the coordinator to poll latest segment metadata from the metadata store\n(Note: ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh=true")," refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms\nof the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)"),(0,o.kt)("li",{parentName:"ul"},"Setting ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to false will use the metadata cached on the coordinator from the last force/periodic refresh.\nIf no used segments are found for the given inputs, this API returns ",(0,o.kt)("inlineCode",{parentName:"li"},"204 No Content"))),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?simple&forceMetadataRefresh={boolean}&interval={myInterval}")),(0,o.kt)("p",null,"Returns the number of segments left to load until segments that should be loaded in the cluster are available for the given datasource\nover the given interval (or last 2 weeks if interval is not given). This does not include segment replication counts. ",(0,o.kt)("inlineCode",{parentName:"p"},"forceMetadataRefresh")," is required to be set. "),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Setting ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to true will force the coordinator to poll latest segment metadata from the metadata store\n(Note: ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh=true")," refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms\nof the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)"),(0,o.kt)("li",{parentName:"ul"},"Setting ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to false will use the metadata cached on the coordinator from the last force/periodic refresh.\nIf no used segments are found for the given inputs, this API returns ",(0,o.kt)("inlineCode",{parentName:"li"},"204 No Content"))),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?full&forceMetadataRefresh={boolean}&interval={myInterval}")),(0,o.kt)("p",null,"Returns the number of segments left to load in each tier until segments that should be loaded in the cluster are all available for the given datasource over the given interval (or last 2 weeks if interval is not given). This includes segment replication counts. ",(0,o.kt)("inlineCode",{parentName:"p"},"forceMetadataRefresh")," is required to be set. "),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Setting ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to true will force the coordinator to poll latest segment metadata from the metadata store\n(Note: ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh=true")," refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms\nof the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)"),(0,o.kt)("li",{parentName:"ul"},"Setting ",(0,o.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to false will use the metadata cached on the coordinator from the last force/periodic refresh. ")),(0,o.kt)("p",null,"You can pass the optional query parameter ",(0,o.kt)("inlineCode",{parentName:"p"},"computeUsingClusterView")," to factor in the available cluster services when calculating\nthe segments left to load. See ",(0,o.kt)("a",{parentName:"p",href:"#segment-loading"},"Coordinator Segment Loading")," for details.\nIf no used segments are found for the given inputs, this API returns ",(0,o.kt)("inlineCode",{parentName:"p"},"204 No Content")),(0,o.kt)("h2",{id:"metadata-store-information"},"Metadata store information"),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL\n",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/sql-metadata-tables#segments-table"},(0,o.kt)("inlineCode",{parentName:"a"},"sys.segments"))," table.")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments")),(0,o.kt)("p",null,"Returns a list of all segments for each datasource enabled in the cluster."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments?datasources={dataSourceName1}&datasources={dataSourceName2}")),(0,o.kt)("p",null,"Returns a list of all segments for one or more specific datasources enabled in the cluster."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus")),(0,o.kt)("p",null,"Returns a list of all segments for each datasource with the full segment metadata and an extra field ",(0,o.kt)("inlineCode",{parentName:"p"},"overshadowed"),"."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&datasources={dataSourceName1}&datasources={dataSourceName2}")),(0,o.kt)("p",null,"Returns a list of all segments for one or more specific datasources with the full segment metadata and an extra field ",(0,o.kt)("inlineCode",{parentName:"p"},"overshadowed"),"."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources")),(0,o.kt)("p",null,"Returns a list of the names of datasources with at least one used segment in the cluster, retrieved from the metadata database. Users should call this API to get the eventual state that the system will be in."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources?includeUnused")),(0,o.kt)("p",null,"Returns a list of the names of datasources, regardless of whether there are used segments belonging to those datasources in the cluster or not."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources?includeDisabled")),(0,o.kt)("p",null,"Returns a list of the names of datasources, regardless of whether the datasource is disabled or not."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources?full")),(0,o.kt)("p",null,"Returns a list of all datasources with at least one used segment in the cluster. Returns all metadata about those datasources as stored in the metadata store."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}")),(0,o.kt)("p",null,"Returns full metadata for a datasource as stored in the metadata store."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments")),(0,o.kt)("p",null,"Returns a list of all segments for a datasource as stored in the metadata store."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full")),(0,o.kt)("p",null,"Returns a list of all segments for a datasource with the full segment metadata as stored in the metadata store."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}")),(0,o.kt)("p",null,"Returns full segment metadata for a specific segment as stored in the metadata store, if the segment is used. If the\nsegment is unused, or is unknown, a 404 response is returned."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments")),(0,o.kt)("p",null,"Returns a list of all segments, overlapping with any of given intervals, for a datasource as stored in the metadata store. Request body is array of string IS0 8601 intervals like ",(0,o.kt)("inlineCode",{parentName:"p"},"[interval1, interval2,...]"),"\u2014","for example, ",(0,o.kt)("inlineCode",{parentName:"p"},'["2012-01-01T00:00:00.000/2012-01-03T00:00:00.000", "2012-01-05T00:00:00.000/2012-01-07T00:00:00.000"]'),"."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full")),(0,o.kt)("p",null,"Returns a list of all segments, overlapping with any of given intervals, for a datasource with the full segment metadata as stored in the metadata store. Request body is array of string ISO 8601 intervals like ",(0,o.kt)("inlineCode",{parentName:"p"},"[interval1, interval2,...]"),"\u2014","for example, ",(0,o.kt)("inlineCode",{parentName:"p"},'["2012-01-01T00:00:00.000/2012-01-03T00:00:00.000", "2012-01-05T00:00:00.000/2012-01-07T00:00:00.000"]'),"."),(0,o.kt)("a",{name:"coordinator-datasources"}),(0,o.kt)("h2",{id:"datasources"},"Datasources"),(0,o.kt)("p",null,"Note that all ",(0,o.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,o.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,o.kt)("inlineCode",{parentName:"p"},"/"),"\u2014","for example, ",(0,o.kt)("inlineCode",{parentName:"p"},"2016-06-27_2016-06-28"),"."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources")),(0,o.kt)("p",null,"Returns a list of datasource names found in the cluster as seen by the coordinator. This view is updated every ",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/configuration/#coordinator-operation"},(0,o.kt)("inlineCode",{parentName:"a"},"druid.coordinator.period")),"."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources?simple")),(0,o.kt)("p",null,"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, replicated total segment byte size, minTime, and maxTime."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources?full")),(0,o.kt)("p",null,"Returns a list of datasource names found in the cluster with all metadata about those datasources."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}")),(0,o.kt)("p",null,"Returns a JSON object containing the name and properties of a datasource. Properties include segment count, total segment byte size, replicated total segment byte size, minTime, and maxTime."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}?full")),(0,o.kt)("p",null,"Returns full metadata for a datasource."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals")),(0,o.kt)("p",null,"Returns a set of segment intervals."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?simple")),(0,o.kt)("p",null,"Returns a map of an interval to a JSON object containing the total byte size of segments and number of segments for that interval."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?full")),(0,o.kt)("p",null,"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."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}")),(0,o.kt)("p",null,"Returns a set of segment ids for an interval."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?simple")),(0,o.kt)("p",null,"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."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?full")),(0,o.kt)("p",null,"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."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}/serverview")),(0,o.kt)("p",null,"Returns a map of segment intervals contained within the specified interval to information about the servers that contain the segment for an interval."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/segments")),(0,o.kt)("p",null,"Returns a list of all segments for a datasource in the cluster."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/segments?full")),(0,o.kt)("p",null,"Returns a list of all segments for a datasource in the cluster with the full segment metadata."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}")),(0,o.kt)("p",null,"Returns full segment metadata for a specific segment in the cluster."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/tiers")),(0,o.kt)("p",null,"Return the tiers that a datasource exists in."),(0,o.kt)("h2",{id:"intervals"},"Intervals"),(0,o.kt)("p",null,"Note that all ",(0,o.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,o.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,o.kt)("inlineCode",{parentName:"p"},"/")," as in ",(0,o.kt)("inlineCode",{parentName:"p"},"2016-06-27_2016-06-28"),"."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals")),(0,o.kt)("p",null,"Returns all intervals for all datasources with total size and count."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals/{interval}")),(0,o.kt)("p",null,"Returns aggregated total size and count for all intervals that intersect given ISO interval."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals/{interval}?simple")),(0,o.kt)("p",null,"Returns total size and count for each interval within given ISO interval."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals/{interval}?full")),(0,o.kt)("p",null,"Returns total size and count for each datasource for each interval within given ISO interval."),(0,o.kt)("h2",{id:"server-information"},"Server information"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/servers")),(0,o.kt)("p",null,"Returns a list of servers URLs using the format ",(0,o.kt)("inlineCode",{parentName:"p"},"{hostname}:{port}"),". Note that\nprocesses that run with different types will appear multiple times with different\nports."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/servers?simple")),(0,o.kt)("p",null,"Returns a list of server data objects in which each object has the following keys:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"host"),": host URL include (",(0,o.kt)("inlineCode",{parentName:"li"},"{hostname}:{port}"),")"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"type"),": process type (",(0,o.kt)("inlineCode",{parentName:"li"},"indexer-executor"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"historical"),")"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"currSize"),": storage size currently used"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"maxSize"),": maximum storage size"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"priority")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"tier"))),(0,o.kt)("h2",{id:"query-server"},"Query server"),(0,o.kt)("p",null,"This section documents the API endpoints for the processes that reside on Query servers (Brokers) in the suggested ",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/design/processes#server-types"},"three-server configuration"),"."),(0,o.kt)("h3",{id:"broker"},"Broker"),(0,o.kt)("h4",{id:"datasource-information"},"Datasource information"),(0,o.kt)("p",null,"Note that all ",(0,o.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,o.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,o.kt)("inlineCode",{parentName:"p"},"/"),"\nas in ",(0,o.kt)("inlineCode",{parentName:"p"},"2016-06-27_2016-06-28"),"."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL\n",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/sql-metadata-tables#tables-table"},(0,o.kt)("inlineCode",{parentName:"a"},"INFORMATION_SCHEMA.TABLES")),",\n",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/sql-metadata-tables#columns-table"},(0,o.kt)("inlineCode",{parentName:"a"},"INFORMATION_SCHEMA.COLUMNS")),", and\n",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/sql-metadata-tables#segments-table"},(0,o.kt)("inlineCode",{parentName:"a"},"sys.segments"))," tables.")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources")),(0,o.kt)("p",null,"Returns a list of queryable datasources."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}")),(0,o.kt)("p",null,'Returns the dimensions and metrics of the datasource. Optionally, you can provide request parameter "full" to get list of served intervals with dimensions and metrics being served for those intervals. You can also provide request param "interval" explicitly to refer to a particular interval.'),(0,o.kt)("p",null,"If no interval is specified, a default interval spanning a configurable period before the current time will be used. The default duration of this interval is specified in ISO 8601 duration format via: ",(0,o.kt)("inlineCode",{parentName:"p"},"druid.query.segmentMetadata.defaultHistory")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/dimensions")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"This API is deprecated and will be removed in future releases. Please use ",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/segmentmetadataquery"},"SegmentMetadataQuery")," instead\nwhich provides more comprehensive information and supports all dataSource types including streaming dataSources. It's also encouraged to use ",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/sql-metadata-tables"},"INFORMATION_SCHEMA tables"),"\nif you're using SQL.")),(0,o.kt)("p",null,"Returns the dimensions of the datasource."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/metrics")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"This API is deprecated and will be removed in future releases. Please use ",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/segmentmetadataquery"},"SegmentMetadataQuery")," instead\nwhich provides more comprehensive information and supports all dataSource types including streaming dataSources. It's also encouraged to use ",(0,o.kt)("a",{parentName:"p",href:"/docs/27.0.0/querying/sql-metadata-tables"},"INFORMATION_SCHEMA tables"),"\nif you're using SQL.")),(0,o.kt)("p",null,"Returns the metrics of the datasource."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/candidates?intervals={comma-separated-intervals}&numCandidates={numCandidates}")),(0,o.kt)("p",null,'Returns segment information lists including server locations for the given datasource and intervals. If "numCandidates" is not specified, it will return all servers for each interval.'))}f.isMDXComponent=!0}}]);