blob: 8bb6f35bc885e4a0d402a4648dc82b47701cbc48 [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5005],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=u(n),m=r,k=d["".concat(s,".").concat(m)]||d[m]||c[m]||i;return n?a.createElement(k,l(l({ref:t},p),{},{components:n})):a.createElement(k,l({ref:t},p))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:r,l[1]=o;for(var u=2;u<i;u++)l[u]=n[u];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},85162:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(67294),r=n(86010);const i={tabItem:"tabItem_Ymn6"};function l(e){var t=e.children,n=e.hidden,l=e.className;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>b});var a=n(87462),r=n(67294),i=n(86010),l=n(12466),o=n(16550),s=n(91980),u=n(67392),p=n(50012);function d(e){return function(e){var t,n;return null!=(t=null==(n=r.Children.map(e,(function(e){if(!e||(0,r.isValidElement)(e)&&(t=e.props)&&"object"==typeof t&&"value"in t)return e;var t;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:n.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function c(e){var t=e.values,n=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:d(n);return function(e){var t=(0,u.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in <Tabs>. Every value needs to be unique.')}(e),e}),[t,n])}function m(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function k(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,i=(0,o.k6)(),l=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)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!=a?a:null}({queryString:n,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((function(e){if(l){var t=new URLSearchParams(i.location.search);t.set(l,e),i.replace(Object.assign({},i.location,{search:t.toString()}))}}),[l,i])]}function g(e){var t,n,a,i,l=e.defaultValue,o=e.queryString,s=void 0!==o&&o,u=e.groupId,d=c(e),g=(0,r.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(n){if(!m({value:n,tabValues:a}))throw new Error('Docusaurus error: The <Tabs> has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var r=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:l,tabValues:d})})),f=g[0],y=g[1],v=k({queryString:s,groupId:u}),h=v[0],T=v[1],b=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,p.Nk)(t),a=n[0],i=n[1],[a,(0,r.useCallback)((function(e){t&&i.set(e)}),[t,i])]),S=b[0],N=b[1],R=function(){var e=null!=h?h:S;return m({value:e,tabValues:d})?e:null}();return(0,r.useLayoutEffect)((function(){R&&y(R)}),[R]),{selectedValue:f,selectValue:(0,r.useCallback)((function(e){if(!m({value:e,tabValues:d}))throw new Error("Can't select invalid tab value="+e);y(e),T(e),N(e)}),[T,N,d]),tabValues:d}}var f=n(72389);const y={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){var t=e.className,n=e.block,o=e.selectedValue,s=e.selectValue,u=e.tabValues,p=[],d=(0,l.o5)().blockElementScrollPositionUntilNextRender,c=function(e){var t=e.currentTarget,n=p.indexOf(t),a=u[n].value;a!==o&&(d(t),s(a))},m=function(e){var t,n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var a,r=p.indexOf(e.currentTarget)+1;n=null!=(a=p[r])?a:p[0];break;case"ArrowLeft":var i,l=p.indexOf(e.currentTarget)-1;n=null!=(i=p[l])?i:p[p.length-1]}null==(t=n)||t.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},u.map((function(e){var t=e.value,n=e.label,l=e.attributes;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:function(e){return p.push(e)},onKeyDown:m,onClick:c},l,{className:(0,i.Z)("tabs__item",y.tabItem,null==l?void 0:l.className,{"tabs__item--active":o===t})}),null!=n?n:t)})))}function h(e){var t=e.lazy,n=e.children,a=e.selectedValue,i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=i.find((function(e){return e.props.value===a}));return l?(0,r.cloneElement)(l,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function T(e){var t=g(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",y.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(h,(0,a.Z)({},e,t)))}function b(e){var t=(0,f.Z)();return r.createElement(T,(0,a.Z)({key:String(t)},e))}},95605:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>p,default:()=>f,frontMatter:()=>u,metadata:()=>d,toc:()=>m});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),l=n(74866),o=n(85162),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}],k={toc:m},g="wrapper";function f(e){var t=e.components,n=(0,r.Z)(e,s);return(0,i.kt)(g,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"This document describes the API endpoints to retrieve and manage dynamic configurations for the ",(0,i.kt)("a",{parentName:"p",href:"/docs/29.0.0/design/coordinator"},"Coordinator")," and ",(0,i.kt)("a",{parentName:"p",href:"/docs/29.0.0/design/overlord"},"Overlord")," in Apache Druid."),(0,i.kt)("p",null,"In this topic, ",(0,i.kt)("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.kt)("inlineCode",{parentName:"p"},"http://localhost:8888")," for quickstart deployments."),(0,i.kt)("h2",{id:"coordinator-dynamic-configuration"},"Coordinator dynamic configuration"),(0,i.kt)("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.kt)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#dynamic-configuration"},"Coordinator dynamic configuration"),"."),(0,i.kt)("h3",{id:"get-dynamic-configuration"},"Get dynamic configuration"),(0,i.kt)("p",null,"Retrieves the current Coordinator dynamic configuration. Returns a JSON object with the dynamic configuration properties."),(0,i.kt)("h4",{id:"url"},"URL"),(0,i.kt)("code",{class:"getAPI"},"GET")," ",(0,i.kt)("code",null,"/druid/coordinator/v1/config"),(0,i.kt)("h4",{id:"responses"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"1",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully retrieved dynamic configuration")))),(0,i.kt)("hr",null),(0,i.kt)("h4",{id:"sample-request"},"Sample request"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"2",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config"\n'))),(0,i.kt)(o.Z,{value:"3",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/coordinator/v1/config HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.kt)("h4",{id:"sample-response"},"Sample response"),(0,i.kt)("details",null,(0,i.kt)("summary",null,"Click to show sample response"),(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h3",{id:"update-dynamic-configuration"},"Update dynamic configuration"),(0,i.kt)("p",null,"Submits a JSON-based dynamic configuration spec to the Coordinator.\nFor information on the supported properties, see ",(0,i.kt)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#dynamic-configuration"},"Dynamic configuration"),"."),(0,i.kt)("h4",{id:"url-1"},"URL"),(0,i.kt)("code",{class:"postAPI"},"POST")," ",(0,i.kt)("code",null,"/druid/coordinator/v1/config"),(0,i.kt)("h4",{id:"header-parameters"},"Header parameters"),(0,i.kt)("p",null,"The endpoint supports a set of optional header parameters to populate the ",(0,i.kt)("inlineCode",{parentName:"p"},"author")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"comment")," fields in the configuration history."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"X-Druid-Author"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: String"),(0,i.kt)("li",{parentName:"ul"},"Author of the configuration change."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"X-Druid-Comment"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: String"),(0,i.kt)("li",{parentName:"ul"},"Description for the update.")))),(0,i.kt)("h4",{id:"responses-1"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"4",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully updated dynamic configuration")))),(0,i.kt)("hr",null),(0,i.kt)("h4",{id:"sample-request-1"},"Sample request"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"5",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)(o.Z,{value:"6",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h4",{id:"sample-response-1"},"Sample response"),(0,i.kt)("p",null,"A successful request returns an HTTP ",(0,i.kt)("inlineCode",{parentName:"p"},"200 OK")," message code and an empty response body."),(0,i.kt)("h3",{id:"get-dynamic-configuration-history"},"Get dynamic configuration history"),(0,i.kt)("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.kt)("h4",{id:"url-2"},"URL"),(0,i.kt)("code",{class:"getAPI"},"GET")," ",(0,i.kt)("code",null,"/druid/coordinator/v1/config/history"),(0,i.kt)("h4",{id:"query-parameters"},"Query parameters"),(0,i.kt)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"interval")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: String"),(0,i.kt)("li",{parentName:"ul"},"Limit the results to the specified time interval in ISO 8601 format delimited with ",(0,i.kt)("inlineCode",{parentName:"li"},"/"),". For example, ",(0,i.kt)("inlineCode",{parentName:"li"},"2023-07-13/2023-07-19"),". The default interval is one week. You can change this period by setting ",(0,i.kt)("inlineCode",{parentName:"li"},"druid.audit.manager.auditHistoryMillis")," in the ",(0,i.kt)("inlineCode",{parentName:"li"},"runtime.properties")," file for the Coordinator."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"count")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: Integer"),(0,i.kt)("li",{parentName:"ul"},"Limit the number of results to the last ",(0,i.kt)("inlineCode",{parentName:"li"},"n")," entries.")))),(0,i.kt)("h4",{id:"responses-2"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"7",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully retrieved history")))),(0,i.kt)("hr",null),(0,i.kt)("h4",{id:"sample-request-2"},"Sample request"),(0,i.kt)("p",null,"The following example retrieves the dynamic configuration history between ",(0,i.kt)("inlineCode",{parentName:"p"},"2022-07-13")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"2024-07-19"),". The response is limited to 10 entries."),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"8",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)(o.Z,{value:"9",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h4",{id:"sample-response-2"},"Sample response"),(0,i.kt)("details",null,(0,i.kt)("summary",null,"Click to show sample response"),(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h2",{id:"overlord-dynamic-configuration"},"Overlord dynamic configuration"),(0,i.kt)("p",null,"The Overlord has dynamic configurations to tune how Druid assigns tasks to workers.\nFor information on the supported properties, see ",(0,i.kt)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#overlord-dynamic-configuration"},"Overlord dynamic configuration"),"."),(0,i.kt)("h3",{id:"get-dynamic-configuration-1"},"Get dynamic configuration"),(0,i.kt)("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.kt)("h4",{id:"url-3"},"URL"),(0,i.kt)("code",{class:"getAPI"},"GET")," ",(0,i.kt)("code",null,"/druid/indexer/v1/worker"),(0,i.kt)("h4",{id:"responses-3"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"10",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully retrieved dynamic configuration")))),(0,i.kt)("h4",{id:"sample-request-3"},"Sample request"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"11",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/worker"\n'))),(0,i.kt)(o.Z,{value:"12",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/worker HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.kt)("h4",{id:"sample-response-3"},"Sample response"),(0,i.kt)("details",null,(0,i.kt)("summary",null,"Click to show sample response"),(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h3",{id:"update-dynamic-configuration-1"},"Update dynamic configuration"),(0,i.kt)("p",null,"Submits a JSON-based dynamic configuration spec to the Overlord.\nFor information on the supported properties, see ",(0,i.kt)("a",{parentName:"p",href:"/docs/29.0.0/configuration/#overlord-dynamic-configuration"},"Overlord dynamic configuration"),"."),(0,i.kt)("h4",{id:"url-4"},"URL"),(0,i.kt)("code",{class:"postAPI"},"POST"),(0,i.kt)("code",null,"/druid/indexer/v1/worker"),(0,i.kt)("h4",{id:"header-parameters-1"},"Header parameters"),(0,i.kt)("p",null,"The endpoint supports a set of optional header parameters to populate the ",(0,i.kt)("inlineCode",{parentName:"p"},"author")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"comment")," fields in the configuration history."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"X-Druid-Author"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: String"),(0,i.kt)("li",{parentName:"ul"},"Author of the configuration change."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"X-Druid-Comment"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: String"),(0,i.kt)("li",{parentName:"ul"},"Description for the update.")))),(0,i.kt)("h4",{id:"responses-4"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"13",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully updated dynamic configuration")))),(0,i.kt)("hr",null),(0,i.kt)("h4",{id:"sample-request-4"},"Sample request"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"14",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)(o.Z,{value:"15",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h4",{id:"sample-response-4"},"Sample response"),(0,i.kt)("p",null,"A successful request returns an HTTP ",(0,i.kt)("inlineCode",{parentName:"p"},"200 OK")," message code and an empty response body."),(0,i.kt)("h3",{id:"get-dynamic-configuration-history-1"},"Get dynamic configuration history"),(0,i.kt)("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.kt)("h4",{id:"url-5"},"URL"),(0,i.kt)("code",{class:"getAPI"},"GET")," ",(0,i.kt)("code",null,"/druid/indexer/v1/worker/history"),(0,i.kt)("h4",{id:"query-parameters-1"},"Query parameters"),(0,i.kt)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"interval")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: String"),(0,i.kt)("li",{parentName:"ul"},"Limit the results to the specified time interval in ISO 8601 format delimited with ",(0,i.kt)("inlineCode",{parentName:"li"},"/"),". For example, ",(0,i.kt)("inlineCode",{parentName:"li"},"2023-07-13/2023-07-19"),". The default interval is one week. You can change this period by setting ",(0,i.kt)("inlineCode",{parentName:"li"},"druid.audit.manager.auditHistoryMillis")," in the ",(0,i.kt)("inlineCode",{parentName:"li"},"runtime.properties")," file for the Overlord."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"count")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Type: Integer"),(0,i.kt)("li",{parentName:"ul"},"Limit the number of results to the last ",(0,i.kt)("inlineCode",{parentName:"li"},"n")," entries.")))),(0,i.kt)("h4",{id:"responses-5"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"16",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully retrieved history")))),(0,i.kt)("hr",null),(0,i.kt)("h4",{id:"sample-request-5"},"Sample request"),(0,i.kt)("p",null,"The following example retrieves the dynamic configuration history between ",(0,i.kt)("inlineCode",{parentName:"p"},"2022-07-13")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"2024-07-19"),". The response is limited to 10 entries."),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"17",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)(o.Z,{value:"18",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h4",{id:"sample-response-5"},"Sample response"),(0,i.kt)("details",null,(0,i.kt)("summary",null,"Click to show sample response"),(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h3",{id:"get-an-array-of-worker-nodes-in-the-cluster"},"Get an array of worker nodes in the cluster"),(0,i.kt)("p",null,"Returns an array of all the worker nodes in the cluster along with its corresponding metadata."),(0,i.kt)("code",{class:"getAPI"},"GET"),(0,i.kt)("code",null,"/druid/indexer/v1/workers"),(0,i.kt)("h4",{id:"responses-6"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"19",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully retrieved worker nodes")))),(0,i.kt)("hr",null),(0,i.kt)("h4",{id:"sample-request-6"},"Sample request"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"20",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/workers"\n'))),(0,i.kt)(o.Z,{value:"21",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/workers HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.kt)("h4",{id:"sample-response-6"},"Sample response"),(0,i.kt)("details",null,(0,i.kt)("summary",null,"Click to show sample response"),(0,i.kt)("pre",null,(0,i.kt)("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.kt)("h3",{id:"get-scaling-events"},"Get scaling events"),(0,i.kt)("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.kt)("h4",{id:"url-6"},"URL"),(0,i.kt)("code",{class:"getAPI"},"GET"),(0,i.kt)("code",null,"/druid/indexer/v1/scaling"),(0,i.kt)("h4",{id:"responses-7"},"Responses"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"22",label:"200 SUCCESS",mdxType:"TabItem"},(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Successfully retrieved scaling events")))),(0,i.kt)("hr",null),(0,i.kt)("h4",{id:"sample-request-7"},"Sample request"),(0,i.kt)(l.Z,{mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"23",label:"cURL",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/scaling"\n'))),(0,i.kt)(o.Z,{value:"24",label:"HTTP",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/scaling HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,i.kt)("h4",{id:"sample-response-7"},"Sample response"),(0,i.kt)("p",null,"A successful request returns a ",(0,i.kt)("inlineCode",{parentName:"p"},"200 OK")," response and an array of scaling events."))}f.isMDXComponent=!0}}]);