blob: e7e6feaf3afef37374ed3963ad3bba54c3d885b9 [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4205],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});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 l(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 s(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),d=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},p=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=d(a),k=r,c=u["".concat(o,".").concat(k)]||u[k]||m[k]||l;return a?n.createElement(c,s(s({ref:t},p),{},{components:a})):n.createElement(c,s({ref:t},p))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,s=new Array(l);s[0]=k;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[u]="string"==typeof e?e:r,s[1]=i;for(var d=2;d<l;d++)s[d]=a[d];return n.createElement.apply(null,s)}return n.createElement.apply(null,a)}k.displayName="MDXCreateElement"},85162:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(67294),r=a(86010);const l={tabItem:"tabItem_Ymn6"};function s(e){var t=e.children,a=e.hidden,s=e.className;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,s),hidden:a},t)}},74866:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(87462),r=a(67294),l=a(86010),s=a(12466),i=a(16550),o=a(91980),d=a(67392),p=a(50012);function u(e){return function(e){var t,a;return null!=(t=null==(a=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:a.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 m(e){var t=e.values,a=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:u(a);return function(e){var t=(0,d.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,a])}function k(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function c(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId,l=(0,i.k6)(),s=function(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!n)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!=n?n:null}({queryString:a,groupId:n});return[(0,o._X)(s),(0,r.useCallback)((function(e){if(s){var t=new URLSearchParams(l.location.search);t.set(s,e),l.replace(Object.assign({},l.location,{search:t.toString()}))}}),[s,l])]}function g(e){var t,a,n,l,s=e.defaultValue,i=e.queryString,o=void 0!==i&&i,d=e.groupId,u=m(e),g=(0,r.useState)((function(){return function(e){var t,a=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(a){if(!k({value:a,tabValues:n}))throw new Error('Docusaurus error: The <Tabs> has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:s,tabValues:u})})),T=g[0],h=g[1],f=c({queryString:o,groupId:d}),b=f[0],y=f[1],N=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),a=(0,p.Nk)(t),n=a[0],l=a[1],[n,(0,r.useCallback)((function(e){t&&l.set(e)}),[t,l])]),v=N[0],S=N[1],_=function(){var e=null!=b?b:v;return k({value:e,tabValues:u})?e:null}();return(0,r.useLayoutEffect)((function(){_&&h(_)}),[_]),{selectedValue:T,selectValue:(0,r.useCallback)((function(e){if(!k({value:e,tabValues:u}))throw new Error("Can't select invalid tab value="+e);h(e),y(e),S(e)}),[y,S,u]),tabValues:u}}var T=a(72389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function f(e){var t=e.className,a=e.block,i=e.selectedValue,o=e.selectValue,d=e.tabValues,p=[],u=(0,s.o5)().blockElementScrollPositionUntilNextRender,m=function(e){var t=e.currentTarget,a=p.indexOf(t),n=d[a].value;n!==i&&(u(t),o(n))},k=function(e){var t,a=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":var n,r=p.indexOf(e.currentTarget)+1;a=null!=(n=p[r])?n:p[0];break;case"ArrowLeft":var l,s=p.indexOf(e.currentTarget)-1;a=null!=(l=p[s])?l:p[p.length-1]}null==(t=a)||t.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},d.map((function(e){var t=e.value,a=e.label,s=e.attributes;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:function(e){return p.push(e)},onKeyDown:k,onClick:m},s,{className:(0,l.Z)("tabs__item",h.tabItem,null==s?void 0:s.className,{"tabs__item--active":i===t})}),null!=a?a:t)})))}function b(e){var t=e.lazy,a=e.children,n=e.selectedValue,l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var s=l.find((function(e){return e.props.value===n}));return s?(0,r.cloneElement)(s,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n})})))}function y(e){var t=g(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(f,(0,n.Z)({},e,t)),r.createElement(b,(0,n.Z)({},e,t)))}function N(e){var t=(0,T.Z)();return r.createElement(y,(0,n.Z)({key:String(t)},e))}},87074:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>T,frontMatter:()=>d,metadata:()=>u,toc:()=>k});var n=a(87462),r=a(63366),l=(a(67294),a(3905)),s=a(74866),i=a(85162),o=["components"],d={id:"tasks-api",title:"Tasks API",sidebar_label:"Tasks"},p=void 0,u={unversionedId:"api-reference/tasks-api",id:"api-reference/tasks-api",title:"Tasks API",description:"\x3c!--",source:"@site/docs/29.0.1/api-reference/tasks-api.md",sourceDirName:"api-reference",slug:"/api-reference/tasks-api",permalink:"/docs/29.0.1/api-reference/tasks-api",draft:!1,tags:[],version:"current",frontMatter:{id:"tasks-api",title:"Tasks API",sidebar_label:"Tasks"},sidebar:"docs",previous:{title:"JSON querying",permalink:"/docs/29.0.1/api-reference/json-querying-api"},next:{title:"Supervisors",permalink:"/docs/29.0.1/api-reference/supervisor-api"}},m={},k=[{value:"Task information and retrieval",id:"task-information-and-retrieval",level:2},{value:"Get an array of tasks",id:"get-an-array-of-tasks",level:3},{value:"URL",id:"url",level:4},{value:"Query parameters",id:"query-parameters",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:"Get an array of complete tasks",id:"get-an-array-of-complete-tasks",level:3},{value:"URL",id:"url-1",level:4},{value:"Query parameters",id:"query-parameters-1",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 an array of running tasks",id:"get-an-array-of-running-tasks",level:3},{value:"URL",id:"url-2",level:4},{value:"Query parameters",id:"query-parameters-2",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:"Get an array of waiting tasks",id:"get-an-array-of-waiting-tasks",level:3},{value:"URL",id:"url-3",level:4},{value:"Query parameters",id:"query-parameters-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:"Get an array of pending tasks",id:"get-an-array-of-pending-tasks",level:3},{value:"URL",id:"url-4",level:4},{value:"Query parameters",id:"query-parameters-4",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 task payload",id:"get-task-payload",level:3},{value:"URL",id:"url-5",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 task status",id:"get-task-status",level:3},{value:"URL",id:"url-6",level:4},{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 task segments",id:"get-task-segments",level:3},{value:"URL",id:"url-7",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},{value:"Get task log",id:"get-task-log",level:3},{value:"URL",id:"url-8",level:4},{value:"URL",id:"url-9",level:4},{value:"Query parameters",id:"query-parameters-5",level:4},{value:"Responses",id:"responses-8",level:4},{value:"Sample request",id:"sample-request-8",level:4},{value:"Sample response",id:"sample-response-8",level:4},{value:"Get task completion report",id:"get-task-completion-report",level:3},{value:"URL",id:"url-10",level:4},{value:"Responses",id:"responses-9",level:4},{value:"Sample request",id:"sample-request-9",level:4},{value:"Sample response",id:"sample-response-9",level:4},{value:"Task operations",id:"task-operations",level:2},{value:"Submit a task",id:"submit-a-task",level:3},{value:"URL",id:"url-11",level:4},{value:"Responses",id:"responses-10",level:4},{value:"Sample request",id:"sample-request-10",level:4},{value:"Sample response",id:"sample-response-10",level:4},{value:"Shut down a task",id:"shut-down-a-task",level:3},{value:"URL",id:"url-12",level:4},{value:"Responses",id:"responses-11",level:4},{value:"Sample request",id:"sample-request-11",level:4},{value:"Sample response",id:"sample-response-11",level:4},{value:"Shut down all tasks for a datasource",id:"shut-down-all-tasks-for-a-datasource",level:3},{value:"URL",id:"url-13",level:4},{value:"Responses",id:"responses-12",level:4},{value:"Sample request",id:"sample-request-12",level:4},{value:"Sample response",id:"sample-response-12",level:4},{value:"Task management",id:"task-management",level:2},{value:"Retrieve status objects for tasks",id:"retrieve-status-objects-for-tasks",level:3},{value:"URL",id:"url-14",level:4},{value:"Responses",id:"responses-13",level:4},{value:"Sample request",id:"sample-request-13",level:4},{value:"Sample response",id:"sample-response-13",level:4},{value:"Clean up pending segments for a datasource",id:"clean-up-pending-segments-for-a-datasource",level:3},{value:"URL",id:"url-15",level:4},{value:"Responses",id:"responses-14",level:4},{value:"Sample request",id:"sample-request-14",level:4},{value:"Sample response",id:"sample-response-14",level:4}],c={toc:k},g="wrapper";function T(e){var t=e.components,a=(0,r.Z)(e,o);return(0,l.kt)(g,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"This document describes the API endpoints for task retrieval, submission, and deletion for Apache Druid. Tasks are individual jobs performed by Druid to complete operations such as ingestion, querying, and compaction."),(0,l.kt)("p",null,"In this topic, ",(0,l.kt)("inlineCode",{parentName:"p"},"http://ROUTER_IP:ROUTER_PORT")," is a placeholder for the Router service address and port. For example, on the quickstart configuration, use ",(0,l.kt)("inlineCode",{parentName:"p"},"http://localhost:8888"),"."),(0,l.kt)("h2",{id:"task-information-and-retrieval"},"Task information and retrieval"),(0,l.kt)("h3",{id:"get-an-array-of-tasks"},"Get an array of tasks"),(0,l.kt)("p",null,"Retrieves an array of all tasks in the Druid cluster. Each task object includes information on its ID, status, associated datasource, and other metadata. For definitions of the response properties, see the ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/querying/sql-metadata-tables#tasks-table"},"Tasks table"),"."),(0,l.kt)("h4",{id:"url"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/tasks"),(0,l.kt)("h4",{id:"query-parameters"},"Query parameters"),(0,l.kt)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"state")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Filter list of tasks by task state, valid options are ",(0,l.kt)("inlineCode",{parentName:"td"},"running"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"complete"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"waiting"),", and ",(0,l.kt)("inlineCode",{parentName:"td"},"pending"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"datasource")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks filtered by Druid datasource.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"createdTimeInterval")),(0,l.kt)("td",{parentName:"tr",align:null},"String (ISO-8601)"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks created within the specified interval. Use ",(0,l.kt)("inlineCode",{parentName:"td"},"_")," as the delimiter for the interval string. Do not use ",(0,l.kt)("inlineCode",{parentName:"td"},"/"),". For example, ",(0,l.kt)("inlineCode",{parentName:"td"},"2023-06-27_2023-06-28"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"max")),(0,l.kt)("td",{parentName:"tr",align:null},"Integer"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum number of ",(0,l.kt)("inlineCode",{parentName:"td"},"complete")," tasks to return. Only applies when ",(0,l.kt)("inlineCode",{parentName:"td"},"state")," is set to ",(0,l.kt)("inlineCode",{parentName:"td"},"complete"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"type")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Filter tasks by task type. See ",(0,l.kt)("a",{parentName:"td",href:"/docs/29.0.1/ingestion/tasks"},"task documentation")," for more details.")))),(0,l.kt)("h4",{id:"responses"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"1",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved list of tasks"))),(0,l.kt)(i.Z,{value:"2",label:"400 BAD REQUEST",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Invalid ",(0,l.kt)("inlineCode",{parentName:"em"},"state")," query parameter value"))),(0,l.kt)(i.Z,{value:"3",label:"500 SERVER ERROR",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Invalid query parameter")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request"},"Sample request"),(0,l.kt)("p",null,"The following example shows how to retrieve a list of tasks filtered with the following query parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"State: ",(0,l.kt)("inlineCode",{parentName:"li"},"complete")),(0,l.kt)("li",{parentName:"ul"},"Datasource: ",(0,l.kt)("inlineCode",{parentName:"li"},"wikipedia_api")),(0,l.kt)("li",{parentName:"ul"},"Time interval: between ",(0,l.kt)("inlineCode",{parentName:"li"},"2015-09-12")," and ",(0,l.kt)("inlineCode",{parentName:"li"},"2015-09-13")),(0,l.kt)("li",{parentName:"ul"},"Max entries returned: ",(0,l.kt)("inlineCode",{parentName:"li"},"10")),(0,l.kt)("li",{parentName:"ul"},"Task type: ",(0,l.kt)("inlineCode",{parentName:"li"},"query_worker"))),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"4",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/tasks/?state=complete&datasource=wikipedia_api&createdTimeInterval=2015-09-12_2015-09-13&max=10&type=query_worker"\n'))),(0,l.kt)(i.Z,{value:"5",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/tasks/?state=complete&datasource=wikipedia_api&createdTimeInterval=2015-09-12_2015-09-13&max=10&type=query_worker HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "id": "query-223549f8-b993-4483-b028-1b0d54713cad-worker0_0",\n "groupId": "query-223549f8-b993-4483-b028-1b0d54713cad",\n "type": "query_worker",\n "createdTime": "2023-06-22T22:11:37.012Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "SUCCESS",\n "status": "SUCCESS",\n "runnerStatusCode": "NONE",\n "duration": 17897,\n "location": {\n "host": "localhost",\n "port": 8101,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n },\n {\n "id": "query-fa82fa40-4c8c-4777-b832-cabbee5f519f-worker0_0",\n "groupId": "query-fa82fa40-4c8c-4777-b832-cabbee5f519f",\n "type": "query_worker",\n "createdTime": "2023-06-20T22:51:21.302Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "SUCCESS",\n "status": "SUCCESS",\n "runnerStatusCode": "NONE",\n "duration": 16911,\n "location": {\n "host": "localhost",\n "port": 8101,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n },\n {\n "id": "query-5419da7a-b270-492f-90e6-920ecfba766a-worker0_0",\n "groupId": "query-5419da7a-b270-492f-90e6-920ecfba766a",\n "type": "query_worker",\n "createdTime": "2023-06-20T22:45:53.909Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "SUCCESS",\n "status": "SUCCESS",\n "runnerStatusCode": "NONE",\n "duration": 17030,\n "location": {\n "host": "localhost",\n "port": 8101,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n }\n]\n'))),(0,l.kt)("h3",{id:"get-an-array-of-complete-tasks"},"Get an array of complete tasks"),(0,l.kt)("p",null,"Retrieves an array of completed tasks in the Druid cluster. This is functionally equivalent to ",(0,l.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=complete"),". For definitions of the response properties, see the ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/querying/sql-metadata-tables#tasks-table"},"Tasks table"),"."),(0,l.kt)("h4",{id:"url-1"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/completeTasks"),(0,l.kt)("h4",{id:"query-parameters-1"},"Query parameters"),(0,l.kt)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"datasource")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks filtered by Druid datasource.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"createdTimeInterval")),(0,l.kt)("td",{parentName:"tr",align:null},"String (ISO-8601)"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks created within the specified interval. The interval string should be delimited by ",(0,l.kt)("inlineCode",{parentName:"td"},"_")," instead of ",(0,l.kt)("inlineCode",{parentName:"td"},"/"),". For example, ",(0,l.kt)("inlineCode",{parentName:"td"},"2023-06-27_2023-06-28"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"max")),(0,l.kt)("td",{parentName:"tr",align:null},"Integer"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum number of ",(0,l.kt)("inlineCode",{parentName:"td"},"complete")," tasks to return. Only applies when ",(0,l.kt)("inlineCode",{parentName:"td"},"state")," is set to ",(0,l.kt)("inlineCode",{parentName:"td"},"complete"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"type")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Filter tasks by task type. See ",(0,l.kt)("a",{parentName:"td",href:"/docs/29.0.1/ingestion/tasks"},"task documentation")," for more details.")))),(0,l.kt)("h4",{id:"responses-1"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"6",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved list of complete tasks"))),(0,l.kt)(i.Z,{value:"7",label:"404 NOT FOUND",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Request sent to incorrect service")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-1"},"Sample request"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"8",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/completeTasks"\n'))),(0,l.kt)(i.Z,{value:"9",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/completeTasks HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-1"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "id": "query-223549f8-b993-4483-b028-1b0d54713cad-worker0_0",\n "groupId": "query-223549f8-b993-4483-b028-1b0d54713cad",\n "type": "query_worker",\n "createdTime": "2023-06-22T22:11:37.012Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "SUCCESS",\n "status": "SUCCESS",\n "runnerStatusCode": "NONE",\n "duration": 17897,\n "location": {\n "host": "localhost",\n "port": 8101,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n },\n {\n "id": "query-223549f8-b993-4483-b028-1b0d54713cad",\n "groupId": "query-223549f8-b993-4483-b028-1b0d54713cad",\n "type": "query_controller",\n "createdTime": "2023-06-22T22:11:28.367Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "SUCCESS",\n "status": "SUCCESS",\n "runnerStatusCode": "NONE",\n "duration": 30317,\n "location": {\n "host": "localhost",\n "port": 8100,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n }\n]\n'))),(0,l.kt)("h3",{id:"get-an-array-of-running-tasks"},"Get an array of running tasks"),(0,l.kt)("p",null,"Retrieves an array of running task objects in the Druid cluster. It is functionally equivalent to ",(0,l.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=running"),". For definitions of the response properties, see the ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/querying/sql-metadata-tables#tasks-table"},"Tasks table"),"."),(0,l.kt)("h4",{id:"url-2"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/runningTasks"),(0,l.kt)("h4",{id:"query-parameters-2"},"Query parameters"),(0,l.kt)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"datasource")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks filtered by Druid datasource.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"createdTimeInterval")),(0,l.kt)("td",{parentName:"tr",align:null},"String (ISO-8601)"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks created within the specified interval. The interval string should be delimited by ",(0,l.kt)("inlineCode",{parentName:"td"},"_")," instead of ",(0,l.kt)("inlineCode",{parentName:"td"},"/"),". For example, ",(0,l.kt)("inlineCode",{parentName:"td"},"2023-06-27_2023-06-28"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"max")),(0,l.kt)("td",{parentName:"tr",align:null},"Integer"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum number of ",(0,l.kt)("inlineCode",{parentName:"td"},"complete")," tasks to return. Only applies when ",(0,l.kt)("inlineCode",{parentName:"td"},"state")," is set to ",(0,l.kt)("inlineCode",{parentName:"td"},"complete"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"type")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Filter tasks by task type. See ",(0,l.kt)("a",{parentName:"td",href:"/docs/29.0.1/ingestion/tasks"},"task documentation")," for more details.")))),(0,l.kt)("h4",{id:"responses-2"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"10",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved list of running tasks")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-2"},"Sample request"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"11",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/runningTasks"\n'))),(0,l.kt)(i.Z,{value:"12",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/runningTasks HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-2"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "id": "query-32663269-ead9-405a-8eb6-0817a952ef47",\n "groupId": "query-32663269-ead9-405a-8eb6-0817a952ef47",\n "type": "query_controller",\n "createdTime": "2023-06-22T22:54:43.170Z",\n "queueInsertionTime": "2023-06-22T22:54:43.170Z",\n "statusCode": "RUNNING",\n "status": "RUNNING",\n "runnerStatusCode": "RUNNING",\n "duration": -1,\n "location": {\n "host": "localhost",\n "port": 8100,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n }\n]\n'))),(0,l.kt)("h3",{id:"get-an-array-of-waiting-tasks"},"Get an array of waiting tasks"),(0,l.kt)("p",null,"Retrieves an array of waiting tasks in the Druid cluster. It is functionally equivalent to ",(0,l.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=waiting"),". For definitions of the response properties, see the ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/querying/sql-metadata-tables#tasks-table"},"Tasks table"),"."),(0,l.kt)("h4",{id:"url-3"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/waitingTasks"),(0,l.kt)("h4",{id:"query-parameters-3"},"Query parameters"),(0,l.kt)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"datasource")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks filtered by Druid datasource.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"createdTimeInterval")),(0,l.kt)("td",{parentName:"tr",align:null},"String (ISO-8601)"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks created within the specified interval. The interval string should be delimited by ",(0,l.kt)("inlineCode",{parentName:"td"},"_")," instead of ",(0,l.kt)("inlineCode",{parentName:"td"},"/"),". For example, ",(0,l.kt)("inlineCode",{parentName:"td"},"2023-06-27_2023-06-28"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"max")),(0,l.kt)("td",{parentName:"tr",align:null},"Integer"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum number of ",(0,l.kt)("inlineCode",{parentName:"td"},"complete")," tasks to return. Only applies when ",(0,l.kt)("inlineCode",{parentName:"td"},"state")," is set to ",(0,l.kt)("inlineCode",{parentName:"td"},"complete"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"type")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Filter tasks by task type. See ",(0,l.kt)("a",{parentName:"td",href:"/docs/29.0.1/ingestion/tasks"},"task documentation")," for more details.")))),(0,l.kt)("h4",{id:"responses-3"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"13",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved list of waiting tasks")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-3"},"Sample request"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"14",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/waitingTasks"\n'))),(0,l.kt)(i.Z,{value:"15",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/waitingTasks HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-3"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "id": "index_parallel_wikipedia_auto_biahcbmf_2023-06-26T21:08:05.216Z",\n "groupId": "index_parallel_wikipedia_auto_biahcbmf_2023-06-26T21:08:05.216Z",\n "type": "index_parallel",\n "createdTime": "2023-06-26T21:08:05.217Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "RUNNING",\n "status": "RUNNING",\n "runnerStatusCode": "WAITING",\n "duration": -1,\n "location": {\n "host": null,\n "port": -1,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_auto",\n "errorMsg": null\n },\n {\n "id": "index_parallel_wikipedia_auto_afggfiec_2023-06-26T21:08:05.546Z",\n "groupId": "index_parallel_wikipedia_auto_afggfiec_2023-06-26T21:08:05.546Z",\n "type": "index_parallel",\n "createdTime": "2023-06-26T21:08:05.548Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "RUNNING",\n "status": "RUNNING",\n "runnerStatusCode": "WAITING",\n "duration": -1,\n "location": {\n "host": null,\n "port": -1,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_auto",\n "errorMsg": null\n },\n {\n "id": "index_parallel_wikipedia_auto_jmmddihf_2023-06-26T21:08:06.644Z",\n "groupId": "index_parallel_wikipedia_auto_jmmddihf_2023-06-26T21:08:06.644Z",\n "type": "index_parallel",\n "createdTime": "2023-06-26T21:08:06.671Z",\n "queueInsertionTime": "1970-01-01T00:00:00.000Z",\n "statusCode": "RUNNING",\n "status": "RUNNING",\n "runnerStatusCode": "WAITING",\n "duration": -1,\n "location": {\n "host": null,\n "port": -1,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_auto",\n "errorMsg": null\n }\n]\n'))),(0,l.kt)("h3",{id:"get-an-array-of-pending-tasks"},"Get an array of pending tasks"),(0,l.kt)("p",null,"Retrieves an array of pending tasks in the Druid cluster. It is functionally equivalent to ",(0,l.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=pending"),". For definitions of the response properties, see the ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/querying/sql-metadata-tables#tasks-table"},"Tasks table"),"."),(0,l.kt)("h4",{id:"url-4"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/pendingTasks"),(0,l.kt)("h4",{id:"query-parameters-4"},"Query parameters"),(0,l.kt)("p",null,"The endpoint supports a set of optional query parameters to filter results."),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"datasource")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks filtered by Druid datasource.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"createdTimeInterval")),(0,l.kt)("td",{parentName:"tr",align:null},"String (ISO-8601)"),(0,l.kt)("td",{parentName:"tr",align:null},"Return tasks created within the specified interval. The interval string should be delimited by ",(0,l.kt)("inlineCode",{parentName:"td"},"_")," instead of ",(0,l.kt)("inlineCode",{parentName:"td"},"/"),". For example, ",(0,l.kt)("inlineCode",{parentName:"td"},"2023-06-27_2023-06-28"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"max")),(0,l.kt)("td",{parentName:"tr",align:null},"Integer"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum number of ",(0,l.kt)("inlineCode",{parentName:"td"},"complete")," tasks to return. Only applies when ",(0,l.kt)("inlineCode",{parentName:"td"},"state")," is set to ",(0,l.kt)("inlineCode",{parentName:"td"},"complete"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"type")),(0,l.kt)("td",{parentName:"tr",align:null},"String"),(0,l.kt)("td",{parentName:"tr",align:null},"Filter tasks by task type. See ",(0,l.kt)("a",{parentName:"td",href:"/docs/29.0.1/ingestion/tasks"},"task documentation")," for more details.")))),(0,l.kt)("h4",{id:"responses-4"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"16",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved list of pending tasks")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-4"},"Sample request"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"17",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/pendingTasks"\n'))),(0,l.kt)(i.Z,{value:"18",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/pendingTasks HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-4"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "id": "query-7b37c315-50a0-4b68-aaa8-b1ef1f060e67",\n "groupId": "query-7b37c315-50a0-4b68-aaa8-b1ef1f060e67",\n "type": "query_controller",\n "createdTime": "2023-06-23T19:53:06.037Z",\n "queueInsertionTime": "2023-06-23T19:53:06.037Z",\n "statusCode": "RUNNING",\n "status": "RUNNING",\n "runnerStatusCode": "PENDING",\n "duration": -1,\n "location": {\n "host": null,\n "port": -1,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n },\n {\n "id": "query-544f0c41-f81d-4504-b98b-f9ab8b36ef36",\n "groupId": "query-544f0c41-f81d-4504-b98b-f9ab8b36ef36",\n "type": "query_controller",\n "createdTime": "2023-06-23T19:53:06.616Z",\n "queueInsertionTime": "2023-06-23T19:53:06.616Z",\n "statusCode": "RUNNING",\n "status": "RUNNING",\n "runnerStatusCode": "PENDING",\n "duration": -1,\n "location": {\n "host": null,\n "port": -1,\n "tlsPort": -1\n },\n "dataSource": "wikipedia_api",\n "errorMsg": null\n }\n]\n'))),(0,l.kt)("h3",{id:"get-task-payload"},"Get task payload"),(0,l.kt)("p",null,"Retrieves the payload of a task given the task ID. It returns a JSON object with the task ID and payload that includes task configuration details and relevant specifications associated with the execution of the task."),(0,l.kt)("h4",{id:"url-5"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task/:taskId"),(0,l.kt)("h4",{id:"responses-5"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"19",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved payload of task"))),(0,l.kt)(i.Z,{value:"20",label:"404 NOT FOUND",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Cannot find task with ID")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-5"},"Sample request"),(0,l.kt)("p",null,"The following examples shows how to retrieve the task payload of a task with the specified ID ",(0,l.kt)("inlineCode",{parentName:"p"},"index_parallel_wikipedia_short_iajoonnd_2023-07-07T17:53:12.174Z"),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"21",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/index_parallel_wikipedia_short_iajoonnd_2023-07-07T17:53:12.174Z"\n'))),(0,l.kt)(i.Z,{value:"22",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/task/index_parallel_wikipedia_short_iajoonnd_2023-07-07T17:53:12.174Z HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-5"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "task": "index_parallel_wikipedia_short_iajoonnd_2023-07-07T17:53:12.174Z",\n "payload": {\n "type": "index_parallel",\n "id": "index_parallel_wikipedia_short_iajoonnd_2023-07-07T17:53:12.174Z",\n "groupId": "index_parallel_wikipedia_short_iajoonnd_2023-07-07T17:53:12.174Z",\n "resource": {\n "availabilityGroup": "index_parallel_wikipedia_short_iajoonnd_2023-07-07T17:53:12.174Z",\n "requiredCapacity": 1\n },\n "spec": {\n "dataSchema": {\n "dataSource": "wikipedia_short",\n "timestampSpec": {\n "column": "time",\n "format": "iso",\n "missingValue": null\n },\n "dimensionsSpec": {\n "dimensions": [\n {\n "type": "string",\n "name": "cityName",\n "multiValueHandling": "SORTED_ARRAY",\n "createBitmapIndex": true\n },\n {\n "type": "string",\n "name": "countryName",\n "multiValueHandling": "SORTED_ARRAY",\n "createBitmapIndex": true\n },\n {\n "type": "string",\n "name": "regionName",\n "multiValueHandling": "SORTED_ARRAY",\n "createBitmapIndex": true\n }\n ],\n "dimensionExclusions": [\n "__time",\n "time"\n ],\n "includeAllDimensions": false,\n "useSchemaDiscovery": false\n },\n "metricsSpec": [],\n "granularitySpec": {\n "type": "uniform",\n "segmentGranularity": "DAY",\n "queryGranularity": {\n "type": "none"\n },\n "rollup": false,\n "intervals": [\n "2015-09-12T00:00:00.000Z/2015-09-13T00:00:00.000Z"\n ]\n },\n "transformSpec": {\n "filter": null,\n "transforms": []\n }\n },\n "ioConfig": {\n "type": "index_parallel",\n "inputSource": {\n "type": "local",\n "baseDir": "quickstart/tutorial",\n "filter": "wikiticker-2015-09-12-sampled.json.gz"\n },\n "inputFormat": {\n "type": "json",\n "keepNullColumns": false,\n "assumeNewlineDelimited": false,\n "useJsonNodeReader": false\n },\n "appendToExisting": false,\n "dropExisting": false\n },\n "tuningConfig": {\n "type": "index_parallel",\n "maxRowsPerSegment": 5000000,\n "appendableIndexSpec": {\n "type": "onheap",\n "preserveExistingMetrics": false\n },\n "maxRowsInMemory": 25000,\n "maxBytesInMemory": 0,\n "skipBytesInMemoryOverheadCheck": false,\n "maxTotalRows": null,\n "numShards": null,\n "splitHintSpec": null,\n "partitionsSpec": {\n "type": "dynamic",\n "maxRowsPerSegment": 5000000,\n "maxTotalRows": null\n },\n "indexSpec": {\n "bitmap": {\n "type": "roaring"\n },\n "dimensionCompression": "lz4",\n "stringDictionaryEncoding": {\n "type": "utf8"\n },\n "metricCompression": "lz4",\n "longEncoding": "longs"\n },\n "indexSpecForIntermediatePersists": {\n "bitmap": {\n "type": "roaring"\n },\n "dimensionCompression": "lz4",\n "stringDictionaryEncoding": {\n "type": "utf8"\n },\n "metricCompression": "lz4",\n "longEncoding": "longs"\n },\n "maxPendingPersists": 0,\n "forceGuaranteedRollup": false,\n "reportParseExceptions": false,\n "pushTimeout": 0,\n "segmentWriteOutMediumFactory": null,\n "maxNumConcurrentSubTasks": 1,\n "maxRetry": 3,\n "taskStatusCheckPeriodMs": 1000,\n "chatHandlerTimeout": "PT10S",\n "chatHandlerNumRetries": 5,\n "maxNumSegmentsToMerge": 100,\n "totalNumMergeTasks": 10,\n "logParseExceptions": false,\n "maxParseExceptions": 2147483647,\n "maxSavedParseExceptions": 0,\n "maxColumnsToMerge": -1,\n "awaitSegmentAvailabilityTimeoutMillis": 0,\n "maxAllowedLockCount": -1,\n "partitionDimensions": []\n }\n },\n "context": {\n "forceTimeChunkLock": true,\n "useLineageBasedSegmentAllocation": true\n },\n "dataSource": "wikipedia_short"\n }\n}\n'))),(0,l.kt)("h3",{id:"get-task-status"},"Get task status"),(0,l.kt)("p",null,"Retrieves the status of a task given the task ID. It returns a JSON object with the task's status code, runner status, task type, datasource, and other relevant metadata."),(0,l.kt)("h4",{id:"url-6"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task/:taskId/status"),(0,l.kt)("h4",{id:"responses-6"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"23",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved task status"))),(0,l.kt)(i.Z,{value:"24",label:"404 NOT FOUND",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Cannot find task with ID")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-6"},"Sample request"),(0,l.kt)("p",null,"The following examples shows how to retrieve the status of a task with the specified ID ",(0,l.kt)("inlineCode",{parentName:"p"},"query-223549f8-b993-4483-b028-1b0d54713cad"),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"25",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/query-223549f8-b993-4483-b028-1b0d54713cad/status"\n'))),(0,l.kt)(i.Z,{value:"26",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/task/query-223549f8-b993-4483-b028-1b0d54713cad/status HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-6"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},"{\n 'task': 'query-223549f8-b993-4483-b028-1b0d54713cad',\n 'status': {\n 'id': 'query-223549f8-b993-4483-b028-1b0d54713cad',\n 'groupId': 'query-223549f8-b993-4483-b028-1b0d54713cad',\n 'type': 'query_controller',\n 'createdTime': '2023-06-22T22:11:28.367Z',\n 'queueInsertionTime': '1970-01-01T00:00:00.000Z',\n 'statusCode': 'RUNNING',\n 'status': 'RUNNING',\n 'runnerStatusCode': 'RUNNING',\n 'duration': -1,\n 'location': {'host': 'localhost', 'port': 8100, 'tlsPort': -1},\n 'dataSource': 'wikipedia_api',\n 'errorMsg': None\n }\n}\n"))),(0,l.kt)("h3",{id:"get-task-segments"},"Get task segments"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"}," This API is deprecated and will be removed in future releases.")),(0,l.kt)("p",null,"Retrieves information about segments generated by the task given the task ID. To hit this endpoint, make sure to enable the audit log config on the Overlord with ",(0,l.kt)("inlineCode",{parentName:"p"},"druid.indexer.auditLog.enabled = true"),"."),(0,l.kt)("p",null,"In addition to enabling audit logs, configure a cleanup strategy to prevent overloading the metadata store with old audit logs which may cause performance issues. To enable automated cleanup of audit logs on the Coordinator, set ",(0,l.kt)("inlineCode",{parentName:"p"},"druid.coordinator.kill.audit.on"),". You may also manually export the audit logs to external storage. For more information, see ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/operations/clean-metadata-store#audit-records"},"Audit records"),"."),(0,l.kt)("h4",{id:"url-7"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task/:taskId/segments"),(0,l.kt)("h4",{id:"responses-7"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"27",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved task segments")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-7"},"Sample request"),(0,l.kt)("p",null,"The following examples shows how to retrieve the task segment of the task with the specified ID ",(0,l.kt)("inlineCode",{parentName:"p"},"query-52a8aafe-7265-4427-89fe-dc51275cc470"),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"28",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/query-52a8aafe-7265-4427-89fe-dc51275cc470/reports"\n'))),(0,l.kt)(i.Z,{value:"29",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/task/query-52a8aafe-7265-4427-89fe-dc51275cc470/reports HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-7"},"Sample response"),(0,l.kt)("p",null,"A successful request returns a ",(0,l.kt)("inlineCode",{parentName:"p"},"200 OK")," response and an array of the task segments."),(0,l.kt)("h3",{id:"get-task-log"},"Get task log"),(0,l.kt)("p",null,"Retrieves the event log associated with a task. It returns a list of logged events during the lifecycle of the task. The endpoint is useful for providing information about the execution of the task, including any errors or warnings raised."),(0,l.kt)("p",null,"Task logs are automatically retrieved from the Middle Manager/Indexer or in long-term storage. For reference, see ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/ingestion/tasks#task-logs"},"Task logs"),"."),(0,l.kt)("h4",{id:"url-8"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task/:taskId/log"),(0,l.kt)("h4",{id:"url-9"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task/:taskId/log"),(0,l.kt)("h4",{id:"query-parameters-5"},"Query parameters"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"offset")," (optional)",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Type: Int"),(0,l.kt)("li",{parentName:"ul"},"Exclude the first passed in number of entries from the response.")))),(0,l.kt)("h4",{id:"responses-8"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"30",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved task log")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-8"},"Sample request"),(0,l.kt)("p",null,"The following examples shows how to retrieve the task log of a task with the specified ID ",(0,l.kt)("inlineCode",{parentName:"p"},"index_kafka_social_media_0e905aa31037879_nommnaeg"),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"31",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/index_kafka_social_media_0e905aa31037879_nommnaeg/log"\n'))),(0,l.kt)(i.Z,{value:"32",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/task/index_kafka_social_media_0e905aa31037879_nommnaeg/log HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-8"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},' 2023-07-03T22:11:17,891 INFO [qtp1251996697-122] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Sequence[index_kafka_social_media_0e905aa31037879_0] end offsets updated from [{0=9223372036854775807}] to [{0=230985}].\n 2023-07-03T22:11:17,900 INFO [qtp1251996697-122] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Saved sequence metadata to disk: [SequenceMetadata{sequenceId=0, sequenceName=\'index_kafka_social_media_0e905aa31037879_0\', assignments=[0], startOffsets={0=230985}, exclusiveStartPartitions=[], endOffsets={0=230985}, sentinel=false, checkpointed=true}]\n 2023-07-03T22:11:17,901 INFO [task-runner-0-priority-0] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Received resume command, resuming ingestion.\n 2023-07-03T22:11:17,901 INFO [task-runner-0-priority-0] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Finished reading partition[0], up to[230985].\n 2023-07-03T22:11:17,902 INFO [task-runner-0-priority-0] org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-kafka-supervisor-dcanhmig-1, groupId=kafka-supervisor-dcanhmig] Resetting generation and member id due to: consumer pro-actively leaving the group\n 2023-07-03T22:11:17,902 INFO [task-runner-0-priority-0] org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-kafka-supervisor-dcanhmig-1, groupId=kafka-supervisor-dcanhmig] Request joining group due to: consumer pro-actively leaving the group\n 2023-07-03T22:11:17,902 INFO [task-runner-0-priority-0] org.apache.kafka.clients.consumer.KafkaConsumer - [Consumer clientId=consumer-kafka-supervisor-dcanhmig-1, groupId=kafka-supervisor-dcanhmig] Unsubscribed all topics or patterns and assigned partitions\n 2023-07-03T22:11:17,912 INFO [task-runner-0-priority-0] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Persisted rows[0] and (estimated) bytes[0]\n 2023-07-03T22:11:17,916 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-appenderator-persist] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Flushed in-memory data with commit metadata [AppenderatorDriverMetadata{segments={}, lastSegmentIds={}, callerMetadata={nextPartitions=SeekableStreamEndSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}}}}] for segments:\n 2023-07-03T22:11:17,917 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-appenderator-persist] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Persisted stats: processed rows: [0], persisted rows[0], sinks: [0], total fireHydrants (across sinks): [0], persisted fireHydrants (across sinks): [0]\n 2023-07-03T22:11:17,919 INFO [task-runner-0-priority-0] org.apache.druid.segment.realtime.appenderator.BaseAppenderatorDriver - Pushing [0] segments in background\n 2023-07-03T22:11:17,921 INFO [task-runner-0-priority-0] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Persisted rows[0] and (estimated) bytes[0]\n 2023-07-03T22:11:17,924 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-appenderator-persist] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Flushed in-memory data with commit metadata [AppenderatorDriverMetadata{segments={}, lastSegmentIds={}, callerMetadata={nextPartitions=SeekableStreamStartSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}, exclusivePartitions=[]}, publishPartitions=SeekableStreamEndSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}}}}] for segments:\n 2023-07-03T22:11:17,924 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-appenderator-persist] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Persisted stats: processed rows: [0], persisted rows[0], sinks: [0], total fireHydrants (across sinks): [0], persisted fireHydrants (across sinks): [0]\n 2023-07-03T22:11:17,925 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-appenderator-merge] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Preparing to push (stats): processed rows: [0], sinks: [0], fireHydrants (across sinks): [0]\n 2023-07-03T22:11:17,925 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-appenderator-merge] org.apache.druid.segment.realtime.appenderator.StreamAppenderator - Push complete...\n 2023-07-03T22:11:17,929 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-publish] org.apache.druid.indexing.seekablestream.SequenceMetadata - With empty segment set, start offsets [SeekableStreamStartSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}, exclusivePartitions=[]}] and end offsets [SeekableStreamEndSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}}] are the same, skipping metadata commit.\n 2023-07-03T22:11:17,930 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-publish] org.apache.druid.segment.realtime.appenderator.BaseAppenderatorDriver - Published [0] segments with commit metadata [{nextPartitions=SeekableStreamStartSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}, exclusivePartitions=[]}, publishPartitions=SeekableStreamEndSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}}}]\n 2023-07-03T22:11:17,930 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-publish] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Published 0 segments for sequence [index_kafka_social_media_0e905aa31037879_0] with metadata [AppenderatorDriverMetadata{segments={}, lastSegmentIds={}, callerMetadata={nextPartitions=SeekableStreamStartSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}, exclusivePartitions=[]}, publishPartitions=SeekableStreamEndSequenceNumbers{stream=\'social_media\', partitionSequenceNumberMap={0=230985}}}}].\n 2023-07-03T22:11:17,931 INFO [[index_kafka_social_media_0e905aa31037879_nommnaeg]-publish] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Saved sequence metadata to disk: []\n 2023-07-03T22:11:17,932 INFO [task-runner-0-priority-0] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Handoff complete for segments:\n 2023-07-03T22:11:17,932 INFO [task-runner-0-priority-0] org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-kafka-supervisor-dcanhmig-1, groupId=kafka-supervisor-dcanhmig] Resetting generation and member id due to: consumer pro-actively leaving the group\n 2023-07-03T22:11:17,932 INFO [task-runner-0-priority-0] org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-kafka-supervisor-dcanhmig-1, groupId=kafka-supervisor-dcanhmig] Request joining group due to: consumer pro-actively leaving the group\n 2023-07-03T22:11:17,933 INFO [task-runner-0-priority-0] org.apache.kafka.common.metrics.Metrics - Metrics scheduler closed\n 2023-07-03T22:11:17,933 INFO [task-runner-0-priority-0] org.apache.kafka.common.metrics.Metrics - Closing reporter org.apache.kafka.common.metrics.JmxReporter\n 2023-07-03T22:11:17,933 INFO [task-runner-0-priority-0] org.apache.kafka.common.metrics.Metrics - Metrics reporters closed\n 2023-07-03T22:11:17,935 INFO [task-runner-0-priority-0] org.apache.kafka.common.utils.AppInfoParser - App info kafka.consumer for consumer-kafka-supervisor-dcanhmig-1 unregistered\n 2023-07-03T22:11:17,936 INFO [task-runner-0-priority-0] org.apache.druid.curator.announcement.Announcer - Unannouncing [/druid/internal-discovery/PEON/localhost:8100]\n 2023-07-03T22:11:17,972 INFO [task-runner-0-priority-0] org.apache.druid.curator.discovery.CuratorDruidNodeAnnouncer - Unannounced self [{"druidNode":{"service":"druid/middleManager","host":"localhost","bindOnHost":false,"plaintextPort":8100,"port":-1,"tlsPort":-1,"enablePlaintextPort":true,"enableTlsPort":false},"nodeType":"peon","services":{"dataNodeService":{"type":"dataNodeService","tier":"_default_tier","maxSize":0,"type":"indexer-executor","serverType":"indexer-executor","priority":0},"lookupNodeService":{"type":"lookupNodeService","lookupTier":"__default"}}}].\n 2023-07-03T22:11:17,972 INFO [task-runner-0-priority-0] org.apache.druid.curator.announcement.Announcer - Unannouncing [/druid/announcements/localhost:8100]\n 2023-07-03T22:11:17,996 INFO [task-runner-0-priority-0] org.apache.druid.indexing.worker.executor.ExecutorLifecycle - Task completed with status: {\n "id" : "index_kafka_social_media_0e905aa31037879_nommnaeg",\n "status" : "SUCCESS",\n "duration" : 3601130,\n "errorMsg" : null,\n "location" : {\n "host" : null,\n "port" : -1,\n "tlsPort" : -1\n }\n }\n 2023-07-03T22:11:17,998 INFO [main] org.apache.druid.java.util.common.lifecycle.Lifecycle - Stopping lifecycle [module] stage [ANNOUNCEMENTS]\n 2023-07-03T22:11:18,005 INFO [main] org.apache.druid.java.util.common.lifecycle.Lifecycle - Stopping lifecycle [module] stage [SERVER]\n 2023-07-03T22:11:18,009 INFO [main] org.eclipse.jetty.server.AbstractConnector - Stopped ServerConnector@6491006{HTTP/1.1, (http/1.1)}{0.0.0.0:8100}\n 2023-07-03T22:11:18,009 INFO [main] org.eclipse.jetty.server.session - node0 Stopped scavenging\n 2023-07-03T22:11:18,012 INFO [main] org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@742aa00a{/,null,STOPPED}\n 2023-07-03T22:11:18,014 INFO [main] org.apache.druid.java.util.common.lifecycle.Lifecycle - Stopping lifecycle [module] stage [NORMAL]\n 2023-07-03T22:11:18,014 INFO [main] org.apache.druid.server.coordination.ZkCoordinator - Stopping ZkCoordinator for [DruidServerMetadata{name=\'localhost:8100\', hostAndPort=\'localhost:8100\', hostAndTlsPort=\'null\', maxSize=0, tier=\'_default_tier\', type=indexer-executor, priority=0}]\n 2023-07-03T22:11:18,014 INFO [main] org.apache.druid.server.coordination.SegmentLoadDropHandler - Stopping...\n 2023-07-03T22:11:18,014 INFO [main] org.apache.druid.server.coordination.SegmentLoadDropHandler - Stopped.\n 2023-07-03T22:11:18,014 INFO [main] org.apache.druid.indexing.overlord.SingleTaskBackgroundRunner - Starting graceful shutdown of task[index_kafka_social_media_0e905aa31037879_nommnaeg].\n 2023-07-03T22:11:18,014 INFO [main] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Stopping forcefully (status: [PUBLISHING])\n 2023-07-03T22:11:18,019 INFO [LookupExtractorFactoryContainerProvider-MainThread] org.apache.druid.query.lookup.LookupReferencesManager - Lookup Management loop exited. Lookup notices are not handled anymore.\n 2023-07-03T22:11:18,020 INFO [main] org.apache.druid.query.lookup.LookupReferencesManager - Closed lookup [name].\n 2023-07-03T22:11:18,020 INFO [Curator-Framework-0] org.apache.curator.framework.imps.CuratorFrameworkImpl - backgroundOperationsLoop exiting\n 2023-07-03T22:11:18,147 INFO [main] org.apache.zookeeper.ZooKeeper - Session: 0x1000097ceaf0007 closed\n 2023-07-03T22:11:18,147 INFO [main-EventThread] org.apache.zookeeper.ClientCnxn - EventThread shut down for session: 0x1000097ceaf0007\n 2023-07-03T22:11:18,151 INFO [main] org.apache.druid.java.util.common.lifecycle.Lifecycle - Stopping lifecycle [module] stage [INIT]\n Finished peon task\n'))),(0,l.kt)("h3",{id:"get-task-completion-report"},"Get task completion report"),(0,l.kt)("p",null,"Retrieves a ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/ingestion/tasks#task-reports"},"task completion report")," for a task. It returns a JSON object with information about the number of rows ingested, and any parse exceptions that Druid raised."),(0,l.kt)("h4",{id:"url-10"},"URL"),(0,l.kt)("code",{class:"getAPI"},"GET")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task/:taskId/reports"),(0,l.kt)("h4",{id:"responses-9"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"33",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved task report")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-9"},"Sample request"),(0,l.kt)("p",null,"The following examples shows how to retrieve the completion report of a task with the specified ID ",(0,l.kt)("inlineCode",{parentName:"p"},"query-52a8aafe-7265-4427-89fe-dc51275cc470"),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"34",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/query-52a8aafe-7265-4427-89fe-dc51275cc470/reports"\n'))),(0,l.kt)(i.Z,{value:"35",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"GET /druid/indexer/v1/task/query-52a8aafe-7265-4427-89fe-dc51275cc470/reports HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-9"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "ingestionStatsAndErrors": {\n "type": "ingestionStatsAndErrors",\n "taskId": "query-52a8aafe-7265-4427-89fe-dc51275cc470",\n "payload": {\n "ingestionState": "COMPLETED",\n "unparseableEvents": {},\n "rowStats": {\n "determinePartitions": {\n "processed": 0,\n "processedBytes": 0,\n "processedWithError": 0,\n "thrownAway": 0,\n "unparseable": 0\n },\n "buildSegments": {\n "processed": 39244,\n "processedBytes": 17106256,\n "processedWithError": 0,\n "thrownAway": 0,\n "unparseable": 0\n }\n },\n "errorMsg": null,\n "segmentAvailabilityConfirmed": false,\n "segmentAvailabilityWaitTimeMs": 0\n }\n }\n}\n'))),(0,l.kt)("h2",{id:"task-operations"},"Task operations"),(0,l.kt)("h3",{id:"submit-a-task"},"Submit a task"),(0,l.kt)("p",null,"Submits a JSON-based ingestion spec or supervisor spec to the Overlord. It returns the task ID of the submitted task. For information on creating an ingestion spec, refer to the ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/ingestion/ingestion-spec"},"ingestion spec reference"),"."),(0,l.kt)("p",null,"Note that for most batch ingestion use cases, you should use the ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/api-reference/sql-ingestion-api"},"SQL-ingestion API")," instead of JSON-based batch ingestion."),(0,l.kt)("h4",{id:"url-11"},"URL"),(0,l.kt)("code",{class:"postAPI"},"POST")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task"),(0,l.kt)("h4",{id:"responses-10"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"36",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully submitted task"))),(0,l.kt)(i.Z,{value:"37",label:"400 BAD REQUEST",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Missing information in query"))),(0,l.kt)(i.Z,{value:"38",label:"415 UNSUPPORTED MEDIA TYPE",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Incorrect request body media type"))),(0,l.kt)(i.Z,{value:"39",label:"500 Server Error",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Unexpected token or characters in request body")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-10"},"Sample request"),(0,l.kt)("p",null,"The following request is an example of submitting a task to create a datasource named ",(0,l.kt)("inlineCode",{parentName:"p"},'"wikipedia auto"'),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"40",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task" \\\n--header \'Content-Type: application/json\' \\\n--data \'{\n "type" : "index_parallel",\n "spec" : {\n "dataSchema" : {\n "dataSource" : "wikipedia_auto",\n "timestampSpec": {\n "column": "time",\n "format": "iso"\n },\n "dimensionsSpec" : {\n "useSchemaDiscovery": true\n },\n "metricsSpec" : [],\n "granularitySpec" : {\n "type" : "uniform",\n "segmentGranularity" : "day",\n "queryGranularity" : "none",\n "intervals" : ["2015-09-12/2015-09-13"],\n "rollup" : false\n }\n },\n "ioConfig" : {\n "type" : "index_parallel",\n "inputSource" : {\n "type" : "local",\n "baseDir" : "quickstart/tutorial/",\n "filter" : "wikiticker-2015-09-12-sampled.json.gz"\n },\n "inputFormat" : {\n "type" : "json"\n },\n "appendToExisting" : false\n },\n "tuningConfig" : {\n "type" : "index_parallel",\n "maxRowsPerSegment" : 5000000,\n "maxRowsInMemory" : 25000\n }\n }\n}\'\n\n'))),(0,l.kt)(i.Z,{value:"41",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},'POST /druid/indexer/v1/task HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\nContent-Type: application/json\nContent-Length: 952\n\n{\n "type" : "index_parallel",\n "spec" : {\n "dataSchema" : {\n "dataSource" : "wikipedia_auto",\n "timestampSpec": {\n "column": "time",\n "format": "iso"\n },\n "dimensionsSpec" : {\n "useSchemaDiscovery": true\n },\n "metricsSpec" : [],\n "granularitySpec" : {\n "type" : "uniform",\n "segmentGranularity" : "day",\n "queryGranularity" : "none",\n "intervals" : ["2015-09-12/2015-09-13"],\n "rollup" : false\n }\n },\n "ioConfig" : {\n "type" : "index_parallel",\n "inputSource" : {\n "type" : "local",\n "baseDir" : "quickstart/tutorial/",\n "filter" : "wikiticker-2015-09-12-sampled.json.gz"\n },\n "inputFormat" : {\n "type" : "json"\n },\n "appendToExisting" : false\n },\n "tuningConfig" : {\n "type" : "index_parallel",\n "maxRowsPerSegment" : 5000000,\n "maxRowsInMemory" : 25000\n }\n }\n}\n')))),(0,l.kt)("h4",{id:"sample-response-10"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "task": "index_parallel_wikipedia_odofhkle_2023-06-23T21:07:28.226Z"\n}\n'))),(0,l.kt)("h3",{id:"shut-down-a-task"},"Shut down a task"),(0,l.kt)("p",null,"Shuts down a task if it not already complete. Returns a JSON object with the ID of the task that was shut down successfully."),(0,l.kt)("h4",{id:"url-12"},"URL"),(0,l.kt)("code",{class:"postAPI"},"POST")," ",(0,l.kt)("code",null,"/druid/indexer/v1/task/:taskId/shutdown"),(0,l.kt)("h4",{id:"responses-11"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"42",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully shut down task"))),(0,l.kt)(i.Z,{value:"43",label:"404 NOT FOUND",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Cannot find task with ID or task is no longer running")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-11"},"Sample request"),(0,l.kt)("p",null,"The following request shows how to shut down a task with the ID ",(0,l.kt)("inlineCode",{parentName:"p"},"query-52as 8aafe-7265-4427-89fe-dc51275cc470"),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"44",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/task/query-52as 8aafe-7265-4427-89fe-dc51275cc470/shutdown"\n'))),(0,l.kt)(i.Z,{value:"45",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"POST /druid/indexer/v1/task/query-52as 8aafe-7265-4427-89fe-dc51275cc470/shutdown HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-11"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},"{\n 'task': 'query-577a83dd-a14e-4380-bd01-c942b781236b'\n}\n"))),(0,l.kt)("h3",{id:"shut-down-all-tasks-for-a-datasource"},"Shut down all tasks for a datasource"),(0,l.kt)("p",null,"Shuts down all tasks for a specified datasource. If successful, it returns a JSON object with the name of the datasource whose tasks are shut down."),(0,l.kt)("h4",{id:"url-13"},"URL"),(0,l.kt)("code",{class:"postAPI"},"POST")," ",(0,l.kt)("code",null,"/druid/indexer/v1/datasources/:datasource/shutdownAllTasks"),(0,l.kt)("h4",{id:"responses-12"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"46",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully shut down tasks"))),(0,l.kt)(i.Z,{value:"47",label:"404 NOT FOUND",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Error or datasource does not have a running task")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-12"},"Sample request"),(0,l.kt)("p",null,"The following request is an example of shutting down all tasks for datasource ",(0,l.kt)("inlineCode",{parentName:"p"},"wikipedia_auto"),"."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"48",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/datasources/wikipedia_auto/shutdownAllTasks"\n'))),(0,l.kt)(i.Z,{value:"49",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"POST /druid/indexer/v1/datasources/wikipedia_auto/shutdownAllTasks HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-12"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "dataSource": "wikipedia_api"\n}\n'))),(0,l.kt)("h2",{id:"task-management"},"Task management"),(0,l.kt)("h3",{id:"retrieve-status-objects-for-tasks"},"Retrieve status objects for tasks"),(0,l.kt)("p",null,"Retrieves list of task status objects for list of task ID strings in request body. It returns a set of JSON objects with the status, duration, location of each task, and any error messages."),(0,l.kt)("h4",{id:"url-14"},"URL"),(0,l.kt)("code",{class:"postAPI"},"POST")," ",(0,l.kt)("code",null,"/druid/indexer/v1/taskStatus"),(0,l.kt)("h4",{id:"responses-13"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"50",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully retrieved status objects"))),(0,l.kt)(i.Z,{value:"51",label:"415 UNSUPPORTED MEDIA TYPE",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Missing request body or incorrect request body type")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-13"},"Sample request"),(0,l.kt)("p",null,"The following request is an example of retrieving status objects for task ID ",(0,l.kt)("inlineCode",{parentName:"p"},"index_parallel_wikipedia_auto_jndhkpbo_2023-06-26T17:23:05.308Z")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"index_parallel_wikipedia_auto_jbgiianh_2023-06-26T23:17:56.769Z")," ."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"52",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/taskStatus" \\\n--header \'Content-Type: application/json\' \\\n--data \'["index_parallel_wikipedia_auto_jndhkpbo_2023-06-26T17:23:05.308Z","index_parallel_wikipedia_auto_jbgiianh_2023-06-26T23:17:56.769Z"]\'\n'))),(0,l.kt)(i.Z,{value:"53",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},'POST /druid/indexer/v1/taskStatus HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\nContent-Type: application/json\nContent-Length: 134\n\n["index_parallel_wikipedia_auto_jndhkpbo_2023-06-26T17:23:05.308Z", "index_parallel_wikipedia_auto_jbgiianh_2023-06-26T23:17:56.769Z"]\n')))),(0,l.kt)("h4",{id:"sample-response-13"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "index_parallel_wikipedia_auto_jbgiianh_2023-06-26T23:17:56.769Z": {\n "id": "index_parallel_wikipedia_auto_jbgiianh_2023-06-26T23:17:56.769Z",\n "status": "SUCCESS",\n "duration": 10630,\n "errorMsg": null,\n "location": {\n "host": "localhost",\n "port": 8100,\n "tlsPort": -1\n }\n },\n "index_parallel_wikipedia_auto_jndhkpbo_2023-06-26T17:23:05.308Z": {\n "id": "index_parallel_wikipedia_auto_jndhkpbo_2023-06-26T17:23:05.308Z",\n "status": "SUCCESS",\n "duration": 11012,\n "errorMsg": null,\n "location": {\n "host": "localhost",\n "port": 8100,\n "tlsPort": -1\n }\n }\n}\n'))),(0,l.kt)("h3",{id:"clean-up-pending-segments-for-a-datasource"},"Clean up pending segments for a datasource"),(0,l.kt)("p",null,"Manually clean up pending segments table in metadata storage for ",(0,l.kt)("inlineCode",{parentName:"p"},"datasource"),". It returns a JSON object response with\n",(0,l.kt)("inlineCode",{parentName:"p"},"numDeleted")," for the number of rows deleted from the pending segments table. This API is used by the\n",(0,l.kt)("inlineCode",{parentName:"p"},"druid.coordinator.kill.pendingSegments.on")," ",(0,l.kt)("a",{parentName:"p",href:"/docs/29.0.1/configuration/#coordinator-operation"},"Coordinator setting"),"\nwhich automates this operation to perform periodically."),(0,l.kt)("h4",{id:"url-15"},"URL"),(0,l.kt)("code",{class:"deleteAPI"},"DELETE")," ",(0,l.kt)("code",null,"/druid/indexer/v1/pendingSegments/:datasource"),(0,l.kt)("h4",{id:"responses-14"},"Responses"),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"54",label:"200 SUCCESS",mdxType:"TabItem"},(0,l.kt)("br",null),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Successfully deleted pending segments")))),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"sample-request-14"},"Sample request"),(0,l.kt)("p",null,"The following request is an example of cleaning up pending segments for the ",(0,l.kt)("inlineCode",{parentName:"p"},"wikipedia_api")," datasource."),(0,l.kt)(s.Z,{mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"55",label:"cURL",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'curl --request DELETE "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/pendingSegments/wikipedia_api"\n'))),(0,l.kt)(i.Z,{value:"56",label:"HTTP",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-HTTP"},"DELETE /druid/indexer/v1/pendingSegments/wikipedia_api HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n")))),(0,l.kt)("h4",{id:"sample-response-14"},"Sample response"),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Click to show sample response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "numDeleted": 2\n}\n'))))}T.isMDXComponent=!0}}]);