blob: 06c9ba1a51b89a669d0d615de5a886eadd56bb87 [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5550],{15680:(e,n,a)=>{a.d(n,{xA:()=>p,yg:()=>g});var r=a(96540);function t(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function i(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?i(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function o(e,n){if(null==e)return{};var a,r,t=function(e,n){if(null==e)return{};var a,r,t={},i=Object.keys(e);for(r=0;r<i.length;r++)a=i[r],n.indexOf(a)>=0||(t[a]=e[a]);return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],n.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}var s=r.createContext({}),u=function(e){var n=r.useContext(s),a=n;return e&&(a="function"==typeof e?e(n):l(l({},n),e)),a},p=function(e){var n=u(e.components);return r.createElement(s.Provider,{value:n},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var a=e.components,t=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=u(a),m=t,g=d["".concat(s,".").concat(m)]||d[m]||c[m]||i;return a?r.createElement(g,l(l({ref:n},p),{},{components:a})):r.createElement(g,l({ref:n},p))}));function g(e,n){var a=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var i=a.length,l=new Array(i);l[0]=m;var o={};for(var s in n)hasOwnProperty.call(n,s)&&(o[s]=n[s]);o.originalType=e,o[d]="string"==typeof e?e:t,l[1]=o;for(var u=2;u<i;u++)l[u]=a[u];return r.createElement.apply(null,l)}return r.createElement.apply(null,a)}m.displayName="MDXCreateElement"},19365:(e,n,a)=>{a.d(n,{A:()=>l});var r=a(96540),t=a(20053);const i={tabItem:"tabItem_Ymn6"};function l(e){var n=e.children,a=e.hidden,l=e.className;return r.createElement("div",{role:"tabpanel",className:(0,t.A)(i.tabItem,l),hidden:a},n)}},11470:(e,n,a)=>{a.d(n,{A:()=>S});var r=a(58168),t=a(96540),i=a(20053),l=a(23104),o=a(56347),s=a(57485),u=a(31682),p=a(89466);function d(e){return function(e){var n,a;return null!=(n=null==(a=t.Children.map(e,(function(e){if(!e||(0,t.isValidElement)(e)&&(n=e.props)&&"object"==typeof n&&"value"in n)return e;var n;throw new Error("Docusaurus error: Bad <Tabs> child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function c(e){var n=e.values,a=e.children;return(0,t.useMemo)((function(){var e=null!=n?n:d(a);return function(e){var n=(0,u.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in <Tabs>. Every value needs to be unique.')}(e),e}),[n,a])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function g(e){var n=e.queryString,a=void 0!==n&&n,r=e.groupId,i=(0,o.W6)(),l=function(e){var n=e.queryString,a=void 0!==n&&n,r=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!r)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:a,groupId:r});return[(0,s.aZ)(l),(0,t.useCallback)((function(e){if(l){var n=new URLSearchParams(i.location.search);n.set(l,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[l,i])]}function y(e){var n,a,r,i,l=e.defaultValue,o=e.queryString,s=void 0!==o&&o,u=e.groupId,d=c(e),y=(0,t.useState)((function(){return function(e){var n,a=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(a){if(!m({value:a,tabValues:r}))throw new Error('Docusaurus error: The <Tabs> has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var t=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:l,tabValues:d})})),f=y[0],v=y[1],h=g({queryString:s,groupId:u}),T=h[0],b=h[1],S=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),a=(0,p.Dv)(n),r=a[0],i=a[1],[r,(0,t.useCallback)((function(e){n&&i.set(e)}),[n,i])]),N=S[0],R=S[1],O=function(){var e=null!=T?T:N;return m({value:e,tabValues:d})?e:null}();return(0,t.useLayoutEffect)((function(){O&&v(O)}),[O]),{selectedValue:f,selectValue:(0,t.useCallback)((function(e){if(!m({value:e,tabValues:d}))throw new Error("Can't select invalid tab value="+e);v(e),b(e),R(e)}),[b,R,d]),tabValues:d}}var f=a(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){var n=e.className,a=e.block,o=e.selectedValue,s=e.selectValue,u=e.tabValues,p=[],d=(0,l.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,a=p.indexOf(n),r=u[a].value;r!==o&&(d(n),s(r))},m=function(e){var n,a=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var r,t=p.indexOf(e.currentTarget)+1;a=null!=(r=p[t])?r:p[0];break;case"ArrowLeft":var i,l=p.indexOf(e.currentTarget)-1;a=null!=(i=p[l])?i:p[p.length-1]}null==(n=a)||n.focus()};return t.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":a},n)},u.map((function(e){var n=e.value,a=e.label,l=e.attributes;return t.createElement("li",(0,r.A)({role:"tab",tabIndex:o===n?0:-1,"aria-selected":o===n,key:n,ref:function(e){return p.push(e)},onKeyDown:m,onClick:c},l,{className:(0,i.A)("tabs__item",v.tabItem,null==l?void 0:l.className,{"tabs__item--active":o===n})}),null!=a?a:n)})))}function T(e){var n=e.lazy,a=e.children,r=e.selectedValue,i=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){var l=i.find((function(e){return e.props.value===r}));return l?(0,t.cloneElement)(l,{className:"margin-top--md"}):null}return t.createElement("div",{className:"margin-top--md"},i.map((function(e,n){return(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==r})})))}function b(e){var n=y(e);return t.createElement("div",{className:(0,i.A)("tabs-container",v.tabList)},t.createElement(h,(0,r.A)({},e,n)),t.createElement(T,(0,r.A)({},e,n)))}function S(e){var n=(0,f.A)();return t.createElement(b,(0,r.A)({key:String(n)},e))}},24810:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>p,default:()=>f,frontMatter:()=>u,metadata:()=>d,toc:()=>m});var r=a(58168),t=a(98587),i=(a(96540),a(15680)),l=a(11470),o=a(19365),s=["components"],u={id:"dynamic-configuration-api",title:"Dynamic configuration API",sidebar_label:"Dynamic configuration"},p=void 0,d={unversionedId:"api-reference/dynamic-configuration-api",id:"api-reference/dynamic-configuration-api",title:"Dynamic configuration API",description:"\x3c!--",source:"@site/docs/29.0.0/api-reference/dynamic-configuration-api.md",sourceDirName:"api-reference",slug:"/api-reference/dynamic-configuration-api",permalink:"/docs/29.0.0/api-reference/dynamic-configuration-api",draft:!1,tags:[],version:"current",frontMatter:{id:"dynamic-configuration-api",title:"Dynamic configuration API",sidebar_label:"Dynamic configuration"},sidebar:"docs",previous:{title:"Service status",permalink:"/docs/29.0.0/api-reference/service-status-api"},next:{title:"Legacy metadata",permalink:"/docs/29.0.0/api-reference/legacy-metadata-api"}},c={},m=[{value:"Coordinator dynamic configuration",id:"coordinator-dynamic-configuration",level:2},{value:"Get dynamic configuration",id:"get-dynamic-configuration",level:3},{value:"URL",id:"url",level:4},{value:"Responses",id:"responses",level:4},{value:"Sample request",id:"sample-request",level:4},{value:"Sample response",id:"sample-response",level:4},{value:"Update dynamic configuration",id:"update-dynamic-configuration",level:3},{value:"URL",id:"url-1",level:4},{value:"Header parameters",id:"header-parameters",level:4},{value:"Responses",id:"responses-1",level:4},{value:"Sample request",id:"sample-request-1",level:4},{value:"Sample response",id:"sample-response-1",level:4},{value:"Get dynamic configuration history",id:"get-dynamic-configuration-history",level:3},{value:"URL",id:"url-2",level:4},{value:"Query parameters",id:"query-parameters",level:4},{value:"Responses",id:"responses-2",level:4},{value:"Sample request",id:"sample-request-2",level:4},{value:"Sample response",id:"sample-response-2",level:4},{value:"Overlord dynamic configuration",id:"overlord-dynamic-configuration",level:2},{value:"Get dynamic configuration",id:"get-dynamic-configuration-1",level:3},{value:"URL",id:"url-3",level:4},{value:"Responses",id:"responses-3",level:4},{value:"Sample request",id:"sample-request-3",level:4},{value:"Sample response",id:"sample-response-3",level:4},{value:"Update dynamic configuration",id:"update-dynamic-configuration-1",level:3},{value:"URL",id:"url-4",level:4},{value:"Header parameters",id:"header-parameters-1",level:4},{value:"Responses",id:"responses-4",level:4},{value:"Sample request",id:"sample-request-4",level:4},{value:"Sample response",id:"sample-response-4",level:4},{value:"Get dynamic configuration history",id:"get-dynamic-configuration-history-1",level:3},{value:"URL",id:"url-5",level:4},{value:"Query parameters",id:"query-parameters-1",level:4},{value:"Responses",id:"responses-5",level:4},{value:"Sample request",id:"sample-request-5",level:4},{value:"Sample response",id:"sample-response-5",level:4},{value:"Get an array of worker nodes in the cluster",id:"get-an-array-of-worker-nodes-in-the-cluster",level:3},{value:"Responses",id:"responses-6",level:4},{value:"Sample request",id:"sample-request-6",level:4},{value:"Sample response",id:"sample-response-6",level:4},{value:"Get scaling events",id:"get-scaling-events",level:3},{value:"URL",id:"url-6",level:4},{value:"Responses",id:"responses-7",level:4},{value:"Sample request",id:"sample-request-7",level:4},{value:"Sample response",id:"sample-response-7",level:4}],g={toc:m},y="wrapper";function f(e){var n=e.components,a=(0,t.A)(e,s);return(0,i.yg)(y,(0,r.A)({},g,a,{components:n,mdxType:"MDXLayout"}),(0,i.yg)("p",null,"This document describes the API endpoints to retrieve and manage dynamic configurations for the ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/design/coordinator"},"Coordinator")," and ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/design/overlord"},"Overlord")," in Apache Druid."),(0,i.yg)("p",null,"In this topic, ",(0,i.yg)("inlineCode",{parentName:"p"},"http://ROUTER_IP:ROUTER_PORT")," is a placeholder for your Router service address and port.\nReplace it with the information for your deployment.\nFor example, use ",(0,i.yg)("inlineCode",{parentName:"p"},"http://localhost:8888")," for quickstart deployments."),(0,i.yg)("h2",{id:"coordinator-dynamic-configuration"},"Coordinator dynamic configuration"),(0,i.yg)("p",null,"The Coordinator has dynamic configurations to tune certain behavior on the fly, without requiring a service restart.\nFor information on the supported properties, see ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#dynamic-configuration"},"Coordinator dynamic configuration"),"."),(0,i.yg)("h3",{id:"get-dynamic-configuration"},"Get dynamic configuration"),(0,i.yg)("p",null,"Retrieves the current Coordinator dynamic configuration. Returns a JSON object with the dynamic configuration properties."),(0,i.yg)("h4",{id:"url"},"URL"),(0,i.yg)("code",{class:"getAPI"},"GET")," ",(0,i.yg)("code",null,"/druid/coordinator/v1/config"),(0,i.yg)("h4",{id:"responses"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"1",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully retrieved dynamic configuration")))),(0,i.yg)("hr",null),(0,i.yg)("h4",{id:"sample-request"},"Sample request"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"2",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config"\n'))),(0,i.yg)(o.A,{value:"3",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/coordinator/v1/config HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.yg)("h4",{id:"sample-response"},"Sample response"),(0,i.yg)("details",null,(0,i.yg)("summary",null,"Click to show sample response"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{\n "millisToWaitBeforeDeleting": 900000,\n "mergeBytesLimit": 524288000,\n "mergeSegmentsLimit": 100,\n "maxSegmentsToMove": 100,\n "replicantLifetime": 15,\n "replicationThrottleLimit": 500,\n "balancerComputeThreads": 1,\n "killDataSourceWhitelist": [],\n "killPendingSegmentsSkipList": [],\n "maxSegmentsInNodeLoadingQueue": 500,\n "decommissioningNodes": [],\n "decommissioningMaxPercentOfMaxSegmentsToMove": 70,\n "pauseCoordination": false,\n "replicateAfterLoadTimeout": false,\n "maxNonPrimaryReplicantsToLoad": 2147483647,\n "useRoundRobinSegmentAssignment": true,\n "smartSegmentLoading": true,\n "debugDimensions": null\n}\n'))),(0,i.yg)("h3",{id:"update-dynamic-configuration"},"Update dynamic configuration"),(0,i.yg)("p",null,"Submits a JSON-based dynamic configuration spec to the Coordinator.\nFor information on the supported properties, see ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#dynamic-configuration"},"Dynamic configuration"),"."),(0,i.yg)("h4",{id:"url-1"},"URL"),(0,i.yg)("code",{class:"postAPI"},"POST")," ",(0,i.yg)("code",null,"/druid/coordinator/v1/config"),(0,i.yg)("h4",{id:"header-parameters"},"Header parameters"),(0,i.yg)("p",null,"The endpoint supports a set of optional header parameters to populate the ",(0,i.yg)("inlineCode",{parentName:"p"},"author")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"comment")," fields in the configuration history."),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"X-Druid-Author"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: String"),(0,i.yg)("li",{parentName:"ul"},"Author of the configuration change."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"X-Druid-Comment"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: String"),(0,i.yg)("li",{parentName:"ul"},"Description for the update.")))),(0,i.yg)("h4",{id:"responses-1"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"4",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully updated dynamic configuration")))),(0,i.yg)("hr",null),(0,i.yg)("h4",{id:"sample-request-1"},"Sample request"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"5",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config" \\\n--header \'Content-Type: application/json\' \\\n--data \'{\n "millisToWaitBeforeDeleting": 900000,\n "mergeBytesLimit": 524288000,\n "mergeSegmentsLimit": 100,\n "maxSegmentsToMove": 5,\n "percentOfSegmentsToConsiderPerMove": 100,\n "useBatchedSegmentSampler": true,\n "replicantLifetime": 15,\n "replicationThrottleLimit": 10,\n "balancerComputeThreads": 1,\n "emitBalancingStats": true,\n "killDataSourceWhitelist": [],\n "killPendingSegmentsSkipList": [],\n "maxSegmentsInNodeLoadingQueue": 100,\n "decommissioningNodes": [],\n "decommissioningMaxPercentOfMaxSegmentsToMove": 70,\n "pauseCoordination": false,\n "replicateAfterLoadTimeout": false,\n "maxNonPrimaryReplicantsToLoad": 2147483647,\n "useRoundRobinSegmentAssignment": true\n}\'\n'))),(0,i.yg)(o.A,{value:"6",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},'POST /druid/coordinator/v1/config HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\nContent-Type: application/json\nContent-Length: 683\n\n{\n "millisToWaitBeforeDeleting": 900000,\n "mergeBytesLimit": 524288000,\n "mergeSegmentsLimit": 100,\n "maxSegmentsToMove": 5,\n "percentOfSegmentsToConsiderPerMove": 100,\n "useBatchedSegmentSampler": true,\n "replicantLifetime": 15,\n "replicationThrottleLimit": 10,\n "balancerComputeThreads": 1,\n "emitBalancingStats": true,\n "killDataSourceWhitelist": [],\n "killPendingSegmentsSkipList": [],\n "maxSegmentsInNodeLoadingQueue": 100,\n "decommissioningNodes": [],\n "decommissioningMaxPercentOfMaxSegmentsToMove": 70,\n "pauseCoordination": false,\n "replicateAfterLoadTimeout": false,\n "maxNonPrimaryReplicantsToLoad": 2147483647,\n "useRoundRobinSegmentAssignment": true\n}\n')))),(0,i.yg)("h4",{id:"sample-response-1"},"Sample response"),(0,i.yg)("p",null,"A successful request returns an HTTP ",(0,i.yg)("inlineCode",{parentName:"p"},"200 OK")," message code and an empty response body."),(0,i.yg)("h3",{id:"get-dynamic-configuration-history"},"Get dynamic configuration history"),(0,i.yg)("p",null,"Retrieves the history of changes to Coordinator dynamic configuration over an interval of time. Returns an empty array if there are no history records available."),(0,i.yg)("h4",{id:"url-2"},"URL"),(0,i.yg)("code",{class:"getAPI"},"GET")," ",(0,i.yg)("code",null,"/druid/coordinator/v1/config/history"),(0,i.yg)("h4",{id:"query-parameters"},"Query parameters"),(0,i.yg)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"interval")),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: String"),(0,i.yg)("li",{parentName:"ul"},"Limit the results to the specified time interval in ISO 8601 format delimited with ",(0,i.yg)("inlineCode",{parentName:"li"},"/"),". For example, ",(0,i.yg)("inlineCode",{parentName:"li"},"2023-07-13/2023-07-19"),". The default interval is one week. You can change this period by setting ",(0,i.yg)("inlineCode",{parentName:"li"},"druid.audit.manager.auditHistoryMillis")," in the ",(0,i.yg)("inlineCode",{parentName:"li"},"runtime.properties")," file for the Coordinator."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"count")),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: Integer"),(0,i.yg)("li",{parentName:"ul"},"Limit the number of results to the last ",(0,i.yg)("inlineCode",{parentName:"li"},"n")," entries.")))),(0,i.yg)("h4",{id:"responses-2"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"7",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully retrieved history")))),(0,i.yg)("hr",null),(0,i.yg)("h4",{id:"sample-request-2"},"Sample request"),(0,i.yg)("p",null,"The following example retrieves the dynamic configuration history between ",(0,i.yg)("inlineCode",{parentName:"p"},"2022-07-13")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"2024-07-19"),". The response is limited to 10 entries."),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"8",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config/history?interval=2022-07-13%2F2024-07-19&count=10"\n'))),(0,i.yg)(o.A,{value:"9",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/coordinator/v1/config/history?interval=2022-07-13/2024-07-19&count=10 HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.yg)("h4",{id:"sample-response-2"},"Sample response"),(0,i.yg)("details",null,(0,i.yg)("summary",null,"Click to show sample response"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'[\n {\n "key": "coordinator.config",\n "type": "coordinator.config",\n "auditInfo": {\n "author": "",\n "comment": "",\n "ip": "127.0.0.1"\n },\n "payload": "{\\"millisToWaitBeforeDeleting\\":900000,\\"mergeBytesLimit\\":524288000,\\"mergeSegmentsLimit\\":100,\\"maxSegmentsToMove\\":5,\\"replicantLifetime\\":15,\\"replicationThrottleLimit\\":10,\\"balancerComputeThreads\\":1,\\"killDataSourceWhitelist\\":[],\\"killPendingSegmentsSkipList\\":[],\\"maxSegmentsInNodeLoadingQueue\\":100,\\"decommissioningNodes\\":[],\\"decommissioningMaxPercentOfMaxSegmentsToMove\\":70,\\"pauseCoordination\\":false,\\"replicateAfterLoadTimeout\\":false,\\"maxNonPrimaryReplicantsToLoad\\":2147483647,\\"useRoundRobinSegmentAssignment\\":true,\\"smartSegmentLoading\\":true,\\"debugDimensions\\":null}",\n "auditTime": "2023-10-03T20:59:51.622Z"\n }\n]\n'))),(0,i.yg)("h2",{id:"overlord-dynamic-configuration"},"Overlord dynamic configuration"),(0,i.yg)("p",null,"The Overlord has dynamic configurations to tune how Druid assigns tasks to workers.\nFor information on the supported properties, see ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#overlord-dynamic-configuration"},"Overlord dynamic configuration"),"."),(0,i.yg)("h3",{id:"get-dynamic-configuration-1"},"Get dynamic configuration"),(0,i.yg)("p",null,"Retrieves the current Overlord dynamic configuration.\nReturns a JSON object with the dynamic configuration properties.\nReturns an empty response body if there is no current Overlord dynamic configuration."),(0,i.yg)("h4",{id:"url-3"},"URL"),(0,i.yg)("code",{class:"getAPI"},"GET")," ",(0,i.yg)("code",null,"/druid/indexer/v1/worker"),(0,i.yg)("h4",{id:"responses-3"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"10",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully retrieved dynamic configuration")))),(0,i.yg)("h4",{id:"sample-request-3"},"Sample request"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"11",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/worker"\n'))),(0,i.yg)(o.A,{value:"12",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/worker HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.yg)("h4",{id:"sample-response-3"},"Sample response"),(0,i.yg)("details",null,(0,i.yg)("summary",null,"Click to show sample response"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{\n "type": "default",\n "selectStrategy": {\n "type": "fillCapacityWithCategorySpec",\n "workerCategorySpec": {\n "categoryMap": {},\n "strong": true\n }\n },\n "autoScaler": null\n}\n'))),(0,i.yg)("h3",{id:"update-dynamic-configuration-1"},"Update dynamic configuration"),(0,i.yg)("p",null,"Submits a JSON-based dynamic configuration spec to the Overlord.\nFor information on the supported properties, see ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#overlord-dynamic-configuration"},"Overlord dynamic configuration"),"."),(0,i.yg)("h4",{id:"url-4"},"URL"),(0,i.yg)("code",{class:"postAPI"},"POST"),(0,i.yg)("code",null,"/druid/indexer/v1/worker"),(0,i.yg)("h4",{id:"header-parameters-1"},"Header parameters"),(0,i.yg)("p",null,"The endpoint supports a set of optional header parameters to populate the ",(0,i.yg)("inlineCode",{parentName:"p"},"author")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"comment")," fields in the configuration history."),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"X-Druid-Author"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: String"),(0,i.yg)("li",{parentName:"ul"},"Author of the configuration change."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"X-Druid-Comment"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: String"),(0,i.yg)("li",{parentName:"ul"},"Description for the update.")))),(0,i.yg)("h4",{id:"responses-4"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"13",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully updated dynamic configuration")))),(0,i.yg)("hr",null),(0,i.yg)("h4",{id:"sample-request-4"},"Sample request"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"14",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/worker" \\\n--header \'Content-Type: application/json\' \\\n--data \'{\n "type": "default",\n "selectStrategy": {\n "type": "fillCapacityWithCategorySpec",\n "workerCategorySpec": {\n "categoryMap": {},\n "strong": true\n }\n },\n "autoScaler": null\n}\'\n'))),(0,i.yg)(o.A,{value:"15",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},'POST /druid/indexer/v1/worker HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\nContent-Type: application/json\nContent-Length: 196\n\n{\n "type": "default",\n "selectStrategy": {\n "type": "fillCapacityWithCategorySpec",\n "workerCategorySpec": {\n "categoryMap": {},\n "strong": true\n }\n },\n "autoScaler": null\n}\n')))),(0,i.yg)("h4",{id:"sample-response-4"},"Sample response"),(0,i.yg)("p",null,"A successful request returns an HTTP ",(0,i.yg)("inlineCode",{parentName:"p"},"200 OK")," message code and an empty response body."),(0,i.yg)("h3",{id:"get-dynamic-configuration-history-1"},"Get dynamic configuration history"),(0,i.yg)("p",null,"Retrieves the history of changes to Overlord dynamic configuration over an interval of time. Returns an empty array if there are no history records available."),(0,i.yg)("h4",{id:"url-5"},"URL"),(0,i.yg)("code",{class:"getAPI"},"GET")," ",(0,i.yg)("code",null,"/druid/indexer/v1/worker/history"),(0,i.yg)("h4",{id:"query-parameters-1"},"Query parameters"),(0,i.yg)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"interval")),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: String"),(0,i.yg)("li",{parentName:"ul"},"Limit the results to the specified time interval in ISO 8601 format delimited with ",(0,i.yg)("inlineCode",{parentName:"li"},"/"),". For example, ",(0,i.yg)("inlineCode",{parentName:"li"},"2023-07-13/2023-07-19"),". The default interval is one week. You can change this period by setting ",(0,i.yg)("inlineCode",{parentName:"li"},"druid.audit.manager.auditHistoryMillis")," in the ",(0,i.yg)("inlineCode",{parentName:"li"},"runtime.properties")," file for the Overlord."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"count")),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Type: Integer"),(0,i.yg)("li",{parentName:"ul"},"Limit the number of results to the last ",(0,i.yg)("inlineCode",{parentName:"li"},"n")," entries.")))),(0,i.yg)("h4",{id:"responses-5"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"16",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully retrieved history")))),(0,i.yg)("hr",null),(0,i.yg)("h4",{id:"sample-request-5"},"Sample request"),(0,i.yg)("p",null,"The following example retrieves the dynamic configuration history between ",(0,i.yg)("inlineCode",{parentName:"p"},"2022-07-13")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"2024-07-19"),". The response is limited to 10 entries."),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"17",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/worker/history?interval=2022-07-13%2F2024-07-19&count=10"\n'))),(0,i.yg)(o.A,{value:"18",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/worker/history?interval=2022-07-13%2F2024-07-19&count=10 HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.yg)("h4",{id:"sample-response-5"},"Sample response"),(0,i.yg)("details",null,(0,i.yg)("summary",null,"Click to show sample response"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'[\n {\n "key": "worker.config",\n "type": "worker.config",\n "auditInfo": {\n "author": "",\n "comment": "",\n "ip": "127.0.0.1"\n },\n "payload": "{\\"type\\":\\"default\\",\\"selectStrategy\\":{\\"type\\":\\"fillCapacityWithCategorySpec\\",\\"workerCategorySpec\\":{\\"categoryMap\\":{},\\"strong\\":true}},\\"autoScaler\\":null}",\n "auditTime": "2023-10-03T21:49:49.991Z"\n }\n]\n'))),(0,i.yg)("h3",{id:"get-an-array-of-worker-nodes-in-the-cluster"},"Get an array of worker nodes in the cluster"),(0,i.yg)("p",null,"Returns an array of all the worker nodes in the cluster along with its corresponding metadata."),(0,i.yg)("code",{class:"getAPI"},"GET"),(0,i.yg)("code",null,"/druid/indexer/v1/workers"),(0,i.yg)("h4",{id:"responses-6"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"19",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully retrieved worker nodes")))),(0,i.yg)("hr",null),(0,i.yg)("h4",{id:"sample-request-6"},"Sample request"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"20",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/workers"\n'))),(0,i.yg)(o.A,{value:"21",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/workers HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.yg)("h4",{id:"sample-response-6"},"Sample response"),(0,i.yg)("details",null,(0,i.yg)("summary",null,"Click to show sample response"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'[\n {\n "worker": {\n "scheme": "http",\n "host": "localhost:8091",\n "ip": "198.51.100.0",\n "capacity": 2,\n "version": "0",\n "category": "_default_worker_category"\n },\n "currCapacityUsed": 0,\n "currParallelIndexCapacityUsed": 0,\n "availabilityGroups": [],\n "runningTasks": [],\n "lastCompletedTaskTime": "2023-09-29T19:13:05.505Z",\n "blacklistedUntil": null\n }\n]\n'))),(0,i.yg)("h3",{id:"get-scaling-events"},"Get scaling events"),(0,i.yg)("p",null,"Returns Overlord scaling events if autoscaling runners are in use.\nReturns an empty response body if there are no Overlord scaling events."),(0,i.yg)("h4",{id:"url-6"},"URL"),(0,i.yg)("code",{class:"getAPI"},"GET"),(0,i.yg)("code",null,"/druid/indexer/v1/scaling"),(0,i.yg)("h4",{id:"responses-7"},"Responses"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"22",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.yg)("p",null,(0,i.yg)("em",{parentName:"p"},"Successfully retrieved scaling events")))),(0,i.yg)("hr",null),(0,i.yg)("h4",{id:"sample-request-7"},"Sample request"),(0,i.yg)(l.A,{mdxType:"Tabs"},(0,i.yg)(o.A,{value:"23",label:"cURL",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/scaling"\n'))),(0,i.yg)(o.A,{value:"24",label:"HTTP",mdxType:"TabItem"},(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/scaling HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.yg)("h4",{id:"sample-response-7"},"Sample response"),(0,i.yg)("p",null,"A successful request returns a ",(0,i.yg)("inlineCode",{parentName:"p"},"200 OK")," response and an array of scaling events."))}f.isMDXComponent=!0}}]);