blob: 89c18245c4507974f62e28d5c5b35c98b0e79221 [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[904],{22596:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>r,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"api-reference/automatic-compaction-api","title":"Automatic compaction API","description":"\x3c!--","source":"@site/docs/latest/api-reference/automatic-compaction-api.md","sourceDirName":"api-reference","slug":"/api-reference/automatic-compaction-api","permalink":"/docs/latest/api-reference/automatic-compaction-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"automatic-compaction-api","title":"Automatic compaction API","sidebar_label":"Automatic compaction"},"sidebar":"docs","previous":{"title":"Data management","permalink":"/docs/latest/api-reference/data-management-api"},"next":{"title":"Lookups","permalink":"/docs/latest/api-reference/lookups-api"}}');var i=a(74848),o=a(28453),s=a(65537),l=a(79329);const r={id:"automatic-compaction-api",title:"Automatic compaction API",sidebar_label:"Automatic compaction"},c=void 0,u={},d=[{value:"Manage automatic compaction",id:"manage-automatic-compaction",level:2},{value:"Create or update automatic compaction configuration",id:"create-or-update-automatic-compaction-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:"Remove automatic compaction configuration",id:"remove-automatic-compaction-configuration",level:3},{value:"URL",id:"url-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:"Update capacity for compaction tasks",id:"update-capacity-for-compaction-tasks",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:"View automatic compaction configuration",id:"view-automatic-compaction-configuration",level:2},{value:"Get all automatic compaction configurations",id:"get-all-automatic-compaction-configurations",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:"Get automatic compaction configuration",id:"get-automatic-compaction-configuration",level:3},{value:"URL",id:"url-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 automatic compaction configuration history",id:"get-automatic-compaction-configuration-history",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:"View automatic compaction status",id:"view-automatic-compaction-status",level:2},{value:"Get segments awaiting compaction",id:"get-segments-awaiting-compaction",level:3},{value:"URL",id:"url-6",level:4},{value:"Query parameter",id:"query-parameter",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 compaction status and statistics",id:"get-compaction-status-and-statistics",level:3},{value:"URL",id:"url-7",level:4},{value:"Query parameters",id:"query-parameters-2",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}];function p(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components},{Details:a}=n;return a||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["This topic describes the status and configuration API endpoints for ",(0,i.jsx)(n.a,{href:"/docs/latest/data-management/automatic-compaction#auto-compaction-using-coordinator-duties",children:"automatic compaction using Coordinator duties"})," in Apache Druid. You can configure automatic compaction in the Druid web console or API."]}),"\n",(0,i.jsx)(n.admonition,{title:"Experimental",type:"info",children:(0,i.jsxs)(n.p,{children:["Instead of the automatic compaction API, you can use the supervisor API to submit auto-compaction jobs using compaction supervisors. For more information, see ",(0,i.jsx)(n.a,{href:"/docs/latest/data-management/automatic-compaction#auto-compaction-using-compaction-supervisors",children:"Auto-compaction using compaction supervisors"}),"."]})}),"\n",(0,i.jsxs)(n.p,{children:["In this topic, ",(0,i.jsx)(n.code,{children:"http://ROUTER_IP:ROUTER_PORT"})," is a placeholder for your Router service address and port. Replace it with the information for your deployment. For example, use ",(0,i.jsx)(n.code,{children:"http://localhost:8888"})," for quickstart deployments."]}),"\n",(0,i.jsx)(n.h2,{id:"manage-automatic-compaction",children:"Manage automatic compaction"}),"\n",(0,i.jsx)(n.h3,{id:"create-or-update-automatic-compaction-configuration",children:"Create or update automatic compaction configuration"}),"\n",(0,i.jsx)(n.p,{children:"Creates or updates the automatic compaction configuration for a datasource. Pass the automatic compaction as a JSON object in the request body."}),"\n",(0,i.jsxs)(n.p,{children:["The automatic compaction configuration requires only the ",(0,i.jsx)(n.code,{children:"dataSource"})," property. Druid fills all other properties with default values if not specified. See ",(0,i.jsx)(n.a,{href:"/docs/latest/configuration/#automatic-compaction-dynamic-configuration",children:"Automatic compaction dynamic configuration"})," for configuration details."]}),"\n",(0,i.jsxs)(n.p,{children:["Note that this endpoint returns an HTTP ",(0,i.jsx)(n.code,{children:"200 OK"})," message code even if the datasource name does not exist."]}),"\n",(0,i.jsx)(n.h4,{id:"url",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"POST"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/config/compaction"})]}),"\n",(0,i.jsx)(n.h4,{id:"responses",children:"Responses"}),"\n",(0,i.jsx)(s.A,{children:(0,i.jsx)(l.A,{value:"1",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Successfully submitted auto compaction configuration"})})})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request",children:"Sample request"}),"\n",(0,i.jsxs)(n.p,{children:["The following example creates an automatic compaction configuration for the datasource ",(0,i.jsx)(n.code,{children:"wikipedia_hour"}),", which was ingested with ",(0,i.jsx)(n.code,{children:"HOUR"})," segment granularity. This automatic compaction configuration performs compaction on ",(0,i.jsx)(n.code,{children:"wikipedia_hour"}),", resulting in compacted segments that represent a day interval of data."]}),"\n",(0,i.jsx)(n.p,{children:"In this example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"wikipedia_hour"})," is a datasource with ",(0,i.jsx)(n.code,{children:"HOUR"})," segment granularity."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"skipOffsetFromLatest"})," is set to ",(0,i.jsx)(n.code,{children:"PT0S"}),", meaning that no data is skipped."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"partitionsSpec"})," is set to the default ",(0,i.jsx)(n.code,{children:"dynamic"}),", allowing Druid to dynamically determine the optimal partitioning strategy."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"type"})," is set to ",(0,i.jsx)(n.code,{children:"index_parallel"}),", meaning that parallel indexing is used."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"segmentGranularity"})," is set to ",(0,i.jsx)(n.code,{children:"DAY"}),", meaning that each compacted segment is a day of data."]}),"\n"]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"2",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config/compaction"\\\n--header \'Content-Type: application/json\' \\\n--data \'{\n "dataSource": "wikipedia_hour",\n "skipOffsetFromLatest": "PT0S",\n "tuningConfig": {\n "partitionsSpec": {\n "type": "dynamic"\n },\n "type": "index_parallel"\n },\n "granularitySpec": {\n "segmentGranularity": "DAY"\n }\n}\'\n'})})}),(0,i.jsx)(l.A,{value:"3",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:'POST /druid/coordinator/v1/config/compaction HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\nContent-Type: application/json\nContent-Length: 281\n\n{\n "dataSource": "wikipedia_hour",\n "skipOffsetFromLatest": "PT0S",\n "tuningConfig": {\n "partitionsSpec": {\n "type": "dynamic"\n },\n "type": "index_parallel"\n },\n "granularitySpec": {\n "segmentGranularity": "DAY"\n }\n}\n'})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response",children:"Sample response"}),"\n",(0,i.jsxs)(n.p,{children:["A successful request returns an HTTP ",(0,i.jsx)(n.code,{children:"200 OK"})," message code and an empty response body."]}),"\n",(0,i.jsx)(n.h3,{id:"remove-automatic-compaction-configuration",children:"Remove automatic compaction configuration"}),"\n",(0,i.jsx)(n.p,{children:'Removes the automatic compaction configuration for a datasource. This updates the compaction status of the datasource to "Not enabled."'}),"\n",(0,i.jsx)(n.h4,{id:"url-1",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"DELETE"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/config/compaction/{dataSource}"})]}),"\n",(0,i.jsx)(n.h4,{id:"responses-1",children:"Responses"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"4",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Successfully deleted automatic compaction configuration"})})}),(0,i.jsx)(l.A,{value:"5",label:"404 NOT FOUND",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Datasource does not have automatic compaction or invalid datasource name"})})})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request-1",children:"Sample request"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"6",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl --request DELETE "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config/compaction/wikipedia_hour"\n'})})}),(0,i.jsx)(l.A,{value:"7",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:"DELETE /druid/coordinator/v1/config/compaction/wikipedia_hour HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n"})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response-1",children:"Sample response"}),"\n",(0,i.jsxs)(n.p,{children:["A successful request returns an HTTP ",(0,i.jsx)(n.code,{children:"200 OK"})," message code and an empty response body."]}),"\n",(0,i.jsx)(n.h3,{id:"update-capacity-for-compaction-tasks",children:"Update capacity for compaction tasks"}),"\n",(0,i.jsx)(n.p,{children:"Updates the capacity for compaction tasks. The minimum number of compaction tasks is 1 and the maximum is 2147483647."}),"\n",(0,i.jsx)(n.p,{children:"Note that while the max compaction tasks can theoretically be set to 2147483647, the practical limit is determined by the available cluster capacity and is capped at 10% of the cluster's total capacity."}),"\n",(0,i.jsx)(n.h4,{id:"url-2",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"POST"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/config/compaction/taskslots"})]}),"\n",(0,i.jsx)(n.h4,{id:"query-parameters",children:"Query parameters"}),"\n",(0,i.jsxs)(n.p,{children:["To limit the maximum number of compaction tasks, use the optional query parameters ",(0,i.jsx)(n.code,{children:"ratio"})," and ",(0,i.jsx)(n.code,{children:"max"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ratio"})," (optional)","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Type: Float"}),"\n",(0,i.jsx)(n.li,{children:"Default: 0.1"}),"\n",(0,i.jsx)(n.li,{children:"Limits the ratio of the total task slots to compaction task slots."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"max"})," (optional)","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Type: Int"}),"\n",(0,i.jsx)(n.li,{children:"Default: 2147483647"}),"\n",(0,i.jsx)(n.li,{children:"Limits the maximum number of task slots for compaction tasks."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"responses-2",children:"Responses"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"8",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Successfully updated compaction configuration"})})}),(0,i.jsx)(l.A,{value:"9",label:"404 NOT FOUND",children:(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.em,{children:["Invalid ",(0,i.jsx)(n.code,{children:"max"})," value"]})})})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request-2",children:"Sample request"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"10",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config/compaction/taskslots?ratio=0.2&max=250000"\n'})})}),(0,i.jsx)(l.A,{value:"11",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:"POST /druid/coordinator/v1/config/compaction/taskslots?ratio=0.2&max=250000 HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n"})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response-2",children:"Sample response"}),"\n",(0,i.jsxs)(n.p,{children:["A successful request returns an HTTP ",(0,i.jsx)(n.code,{children:"200 OK"})," message code and an empty response body."]}),"\n",(0,i.jsx)(n.h2,{id:"view-automatic-compaction-configuration",children:"View automatic compaction configuration"}),"\n",(0,i.jsx)(n.h3,{id:"get-all-automatic-compaction-configurations",children:"Get all automatic compaction configurations"}),"\n",(0,i.jsxs)(n.p,{children:["Retrieves all automatic compaction configurations. Returns a ",(0,i.jsx)(n.code,{children:"compactionConfigs"})," object containing the active automatic compaction configurations of all datasources."]}),"\n",(0,i.jsxs)(n.p,{children:["You can use this endpoint to retrieve ",(0,i.jsx)(n.code,{children:"compactionTaskSlotRatio"})," and ",(0,i.jsx)(n.code,{children:"maxCompactionTaskSlots"})," values for managing resource allocation of compaction tasks."]}),"\n",(0,i.jsx)(n.h4,{id:"url-3",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"GET"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/config/compaction"})]}),"\n",(0,i.jsx)(n.h4,{id:"responses-3",children:"Responses"}),"\n",(0,i.jsx)(s.A,{children:(0,i.jsx)(l.A,{value:"12",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Successfully retrieved automatic compaction configurations"})})})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request-3",children:"Sample request"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"13",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config/compaction"\n'})})}),(0,i.jsx)(l.A,{value:"14",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:"GET /druid/coordinator/v1/config/compaction HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n"})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response-3",children:"Sample response"}),"\n",(0,i.jsxs)(a,{children:[(0,i.jsx)("summary",{children:"View the response"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "compactionConfigs": [\n {\n "dataSource": "wikipedia_hour",\n "taskPriority": 25,\n "inputSegmentSizeBytes": 100000000000000,\n "maxRowsPerSegment": null,\n "skipOffsetFromLatest": "PT0S",\n "tuningConfig": {\n "maxRowsInMemory": null,\n "appendableIndexSpec": null,\n "maxBytesInMemory": null,\n "maxTotalRows": null,\n "splitHintSpec": null,\n "partitionsSpec": {\n "type": "dynamic",\n "maxRowsPerSegment": 5000000,\n "maxTotalRows": null\n },\n "indexSpec": null,\n "indexSpecForIntermediatePersists": null,\n "maxPendingPersists": null,\n "pushTimeout": null,\n "segmentWriteOutMediumFactory": null,\n "maxNumConcurrentSubTasks": null,\n "maxRetry": null,\n "taskStatusCheckPeriodMs": null,\n "chatHandlerTimeout": null,\n "chatHandlerNumRetries": null,\n "maxNumSegmentsToMerge": null,\n "totalNumMergeTasks": null,\n "maxColumnsToMerge": null,\n "type": "index_parallel",\n "forceGuaranteedRollup": false\n },\n "granularitySpec": {\n "segmentGranularity": "DAY",\n "queryGranularity": null,\n "rollup": null\n },\n "dimensionsSpec": null,\n "metricsSpec": null,\n "transformSpec": null,\n "ioConfig": null,\n "taskContext": null\n },\n {\n "dataSource": "wikipedia",\n "taskPriority": 25,\n "inputSegmentSizeBytes": 100000000000000,\n "maxRowsPerSegment": null,\n "skipOffsetFromLatest": "PT0S",\n "tuningConfig": {\n "maxRowsInMemory": null,\n "appendableIndexSpec": null,\n "maxBytesInMemory": null,\n "maxTotalRows": null,\n "splitHintSpec": null,\n "partitionsSpec": {\n "type": "dynamic",\n "maxRowsPerSegment": 5000000,\n "maxTotalRows": null\n },\n "indexSpec": null,\n "indexSpecForIntermediatePersists": null,\n "maxPendingPersists": null,\n "pushTimeout": null,\n "segmentWriteOutMediumFactory": null,\n "maxNumConcurrentSubTasks": null,\n "maxRetry": null,\n "taskStatusCheckPeriodMs": null,\n "chatHandlerTimeout": null,\n "chatHandlerNumRetries": null,\n "maxNumSegmentsToMerge": null,\n "totalNumMergeTasks": null,\n "maxColumnsToMerge": null,\n "type": "index_parallel",\n "forceGuaranteedRollup": false\n },\n "granularitySpec": {\n "segmentGranularity": "DAY",\n "queryGranularity": null,\n "rollup": null\n },\n "dimensionsSpec": null,\n "metricsSpec": null,\n "transformSpec": null,\n "ioConfig": null,\n "taskContext": null\n }\n ],\n "compactionTaskSlotRatio": 0.1,\n "maxCompactionTaskSlots": 2147483647,\n "useAutoScaleSlots": false\n}\n'})})]}),"\n",(0,i.jsx)(n.h3,{id:"get-automatic-compaction-configuration",children:"Get automatic compaction configuration"}),"\n",(0,i.jsx)(n.p,{children:"Retrieves the automatic compaction configuration for a datasource."}),"\n",(0,i.jsx)(n.h4,{id:"url-4",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"GET"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/config/compaction/{dataSource}"})]}),"\n",(0,i.jsx)(n.h4,{id:"responses-4",children:"Responses"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"15",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Successfully retrieved configuration for datasource"})})}),(0,i.jsx)(l.A,{value:"16",label:"404 NOT FOUND",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Invalid datasource or datasource does not have automatic compaction enabled"})})})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request-4",children:"Sample request"}),"\n",(0,i.jsxs)(n.p,{children:["The following example retrieves the automatic compaction configuration for datasource ",(0,i.jsx)(n.code,{children:"wikipedia_hour"}),"."]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"17",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config/compaction/wikipedia_hour"\n'})})}),(0,i.jsx)(l.A,{value:"18",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:"GET /druid/coordinator/v1/config/compaction/wikipedia_hour HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n"})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response-4",children:"Sample response"}),"\n",(0,i.jsxs)(a,{children:[(0,i.jsx)("summary",{children:"View the response"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "dataSource": "wikipedia_hour",\n "taskPriority": 25,\n "inputSegmentSizeBytes": 100000000000000,\n "maxRowsPerSegment": null,\n "skipOffsetFromLatest": "PT0S",\n "tuningConfig": {\n "maxRowsInMemory": null,\n "appendableIndexSpec": null,\n "maxBytesInMemory": null,\n "maxTotalRows": null,\n "splitHintSpec": null,\n "partitionsSpec": {\n "type": "dynamic",\n "maxRowsPerSegment": 5000000,\n "maxTotalRows": null\n },\n "indexSpec": null,\n "indexSpecForIntermediatePersists": null,\n "maxPendingPersists": null,\n "pushTimeout": null,\n "segmentWriteOutMediumFactory": null,\n "maxNumConcurrentSubTasks": null,\n "maxRetry": null,\n "taskStatusCheckPeriodMs": null,\n "chatHandlerTimeout": null,\n "chatHandlerNumRetries": null,\n "maxNumSegmentsToMerge": null,\n "totalNumMergeTasks": null,\n "maxColumnsToMerge": null,\n "type": "index_parallel",\n "forceGuaranteedRollup": false\n },\n "granularitySpec": {\n "segmentGranularity": "DAY",\n "queryGranularity": null,\n "rollup": null\n },\n "dimensionsSpec": null,\n "metricsSpec": null,\n "transformSpec": null,\n "ioConfig": null,\n "taskContext": null\n}\n'})})]}),"\n",(0,i.jsx)(n.h3,{id:"get-automatic-compaction-configuration-history",children:"Get automatic compaction configuration history"}),"\n",(0,i.jsx)(n.p,{children:"Retrieves the history of the automatic compaction configuration for a datasource. Returns an empty list if the datasource does not exist or there is no compaction history for the datasource."}),"\n",(0,i.jsx)(n.p,{children:"The response contains a list of objects with the following keys:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"globalConfig"}),": A JSON object containing automatic compaction configuration that applies to the entire cluster."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"compactionConfig"}),": A JSON object containing the automatic compaction configuration for the datasource."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"auditInfo"}),": A JSON object containing information about the change made, such as ",(0,i.jsx)(n.code,{children:"author"}),", ",(0,i.jsx)(n.code,{children:"comment"})," or ",(0,i.jsx)(n.code,{children:"ip"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"auditTime"}),": The date and time when the change was made."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"url-5",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"GET"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/config/compaction/{dataSource}/history"})]}),"\n",(0,i.jsx)(n.h4,{id:"query-parameters-1",children:"Query parameters"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"interval"})," (optional)","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Type: ISO-8601"}),"\n",(0,i.jsxs)(n.li,{children:["Limits the results within a specified interval. Use ",(0,i.jsx)(n.code,{children:"/"})," as the delimiter for the interval string."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"count"})," (optional)","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Type: Int"}),"\n",(0,i.jsx)(n.li,{children:"Limits the number of results."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"responses-5",children:"Responses"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"19",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Successfully retrieved configuration history"})})}),(0,i.jsx)(l.A,{value:"20",label:"400 BAD REQUEST",children:(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.em,{children:["Invalid ",(0,i.jsx)(n.code,{children:"count"})," value"]})})})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request-5",children:"Sample request"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"21",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config/compaction/wikipedia_hour/history"\n'})})}),(0,i.jsx)(l.A,{value:"22",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:"GET /druid/coordinator/v1/config/compaction/wikipedia_hour/history HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n"})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response-5",children:"Sample response"}),"\n",(0,i.jsxs)(a,{children:[(0,i.jsx)("summary",{children:"View the response"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[\n {\n "globalConfig": {\n "compactionTaskSlotRatio": 0.1,\n "maxCompactionTaskSlots": 2147483647,\n "useAutoScaleSlots": false\n },\n "compactionConfig": {\n "dataSource": "wikipedia_hour",\n "taskPriority": 25,\n "inputSegmentSizeBytes": 100000000000000,\n "maxRowsPerSegment": null,\n "skipOffsetFromLatest": "P1D",\n "tuningConfig": null,\n "granularitySpec": {\n "segmentGranularity": "DAY",\n "queryGranularity": null,\n "rollup": null\n },\n "dimensionsSpec": null,\n "metricsSpec": null,\n "transformSpec": null,\n "ioConfig": null,\n "taskContext": null\n },\n "auditInfo": {\n "author": "",\n "comment": "",\n "ip": "127.0.0.1"\n },\n "auditTime": "2023-07-31T18:15:19.302Z"\n },\n {\n "globalConfig": {\n "compactionTaskSlotRatio": 0.1,\n "maxCompactionTaskSlots": 2147483647,\n "useAutoScaleSlots": false\n },\n "compactionConfig": {\n "dataSource": "wikipedia_hour",\n "taskPriority": 25,\n "inputSegmentSizeBytes": 100000000000000,\n "maxRowsPerSegment": null,\n "skipOffsetFromLatest": "PT0S",\n "tuningConfig": {\n "maxRowsInMemory": null,\n "appendableIndexSpec": null,\n "maxBytesInMemory": null,\n "maxTotalRows": null,\n "splitHintSpec": null,\n "partitionsSpec": {\n "type": "dynamic",\n "maxRowsPerSegment": 5000000,\n "maxTotalRows": null\n },\n "indexSpec": null,\n "indexSpecForIntermediatePersists": null,\n "maxPendingPersists": null,\n "pushTimeout": null,\n "segmentWriteOutMediumFactory": null,\n "maxNumConcurrentSubTasks": null,\n "maxRetry": null,\n "taskStatusCheckPeriodMs": null,\n "chatHandlerTimeout": null,\n "chatHandlerNumRetries": null,\n "maxNumSegmentsToMerge": null,\n "totalNumMergeTasks": null,\n "maxColumnsToMerge": null,\n "type": "index_parallel",\n "forceGuaranteedRollup": false\n },\n "granularitySpec": {\n "segmentGranularity": "DAY",\n "queryGranularity": null,\n "rollup": null\n },\n "dimensionsSpec": null,\n "metricsSpec": null,\n "transformSpec": null,\n "ioConfig": null,\n "taskContext": null\n },\n "auditInfo": {\n "author": "",\n "comment": "",\n "ip": "127.0.0.1"\n },\n "auditTime": "2023-07-31T18:16:16.362Z"\n }\n]\n'})})]}),"\n",(0,i.jsx)(n.h2,{id:"view-automatic-compaction-status",children:"View automatic compaction status"}),"\n",(0,i.jsx)(n.h3,{id:"get-segments-awaiting-compaction",children:"Get segments awaiting compaction"}),"\n",(0,i.jsx)(n.p,{children:"Returns the total size of segments awaiting compaction for a given datasource. Returns a 404 response if a datasource does not have automatic compaction enabled."}),"\n",(0,i.jsx)(n.h4,{id:"url-6",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"GET"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/compaction/progress?dataSource={dataSource}"})]}),"\n",(0,i.jsx)(n.h4,{id:"query-parameter",children:"Query parameter"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dataSource"})," (required)","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Type: String"}),"\n",(0,i.jsx)(n.li,{children:"Name of the datasource for this status information."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"responses-6",children:"Responses"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"23",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Successfully retrieved segment size awaiting compaction"})})}),(0,i.jsx)(l.A,{value:"24",label:"404 NOT FOUND",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Unknown datasource name or datasource does not have automatic compaction enabled"})})})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request-6",children:"Sample request"}),"\n",(0,i.jsxs)(n.p,{children:["The following example retrieves the remaining segments to be compacted for datasource ",(0,i.jsx)(n.code,{children:"wikipedia_hour"}),"."]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"25",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/compaction/progress?dataSource=wikipedia_hour"\n'})})}),(0,i.jsx)(l.A,{value:"26",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:"GET /druid/coordinator/v1/compaction/progress?dataSource=wikipedia_hour HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n"})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response-6",children:"Sample response"}),"\n",(0,i.jsxs)(a,{children:[(0,i.jsx)("summary",{children:"View the response"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "remainingSegmentSize": 7615837\n}\n'})})]}),"\n",(0,i.jsx)(n.h3,{id:"get-compaction-status-and-statistics",children:"Get compaction status and statistics"}),"\n",(0,i.jsxs)(n.p,{children:["Retrieves an array of ",(0,i.jsx)(n.code,{children:"latestStatus"})," objects representing the status and statistics from the latest automatic compaction run for all datasources with automatic compaction enabled."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"latestStatus"})," object has the following properties:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dataSource"}),": Name of the datasource for this status information."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"scheduleStatus"}),": Automatic compaction scheduling status. Possible values are ",(0,i.jsx)(n.code,{children:"NOT_ENABLED"})," and ",(0,i.jsx)(n.code,{children:"RUNNING"}),". Returns ",(0,i.jsx)(n.code,{children:"RUNNING "})," if the datasource has an active automatic compaction configuration submitted. Otherwise, returns ",(0,i.jsx)(n.code,{children:"NOT_ENABLED"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"bytesAwaitingCompaction"}),": Total bytes of this datasource waiting to be compacted by the automatic compaction (only consider intervals/segments that are eligible for automatic compaction)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"bytesCompacted"}),": Total bytes of this datasource that are already compacted with the spec set in the automatic compaction configuration."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"bytesSkipped"}),": Total bytes of this datasource that are skipped (not eligible for automatic compaction) by the automatic compaction."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"segmentCountAwaitingCompaction"}),": Total number of segments of this datasource waiting to be compacted by the automatic compaction (only consider intervals/segments that are eligible for automatic compaction)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"segmentCountCompacted"}),": Total number of segments of this datasource that are already compacted with the spec set in the automatic compaction configuration."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"segmentCountSkipped"}),": Total number of segments of this datasource that are skipped (not eligible for automatic compaction) by the automatic compaction."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"intervalCountAwaitingCompaction"}),": Total number of intervals of this datasource waiting to be compacted by the automatic compaction (only consider intervals/segments that are eligible for automatic compaction)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"intervalCountCompacted"}),": Total number of intervals of this datasource that are already compacted with the spec set in the automatic compaction configuration."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"intervalCountSkipped"}),": Total number of intervals of this datasource that are skipped (not eligible for automatic compaction) by the automatic compaction."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"url-7",children:"URL"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"GET"})," ",(0,i.jsx)(n.code,{children:"/druid/coordinator/v1/compaction/status"})]}),"\n",(0,i.jsx)(n.h4,{id:"query-parameters-2",children:"Query parameters"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dataSource"})," (optional)","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Type: String"}),"\n",(0,i.jsx)(n.li,{children:"Filter the result by name of a specific datasource."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"responses-7",children:"Responses"}),"\n",(0,i.jsx)(s.A,{children:(0,i.jsx)(l.A,{value:"27",label:"200 SUCCESS",children:(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.em,{children:["Successfully retrieved ",(0,i.jsx)(n.code,{children:"latestStatus"})," object"]})})})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h4,{id:"sample-request-7",children:"Sample request"}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(l.A,{value:"28",label:"cURL",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:'curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/compaction/status"\n'})})}),(0,i.jsx)(l.A,{value:"29",label:"HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-HTTP",children:"GET /druid/coordinator/v1/compaction/status HTTP/1.1\nHost: http://ROUTER_IP:ROUTER_PORT\n"})})})]}),"\n",(0,i.jsx)(n.h4,{id:"sample-response-7",children:"Sample response"}),"\n",(0,i.jsxs)(a,{children:[(0,i.jsx)("summary",{children:"View the response"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "latestStatus": [\n {\n "dataSource": "wikipedia_api",\n "scheduleStatus": "RUNNING",\n "bytesAwaitingCompaction": 0,\n "bytesCompacted": 0,\n "bytesSkipped": 64133616,\n "segmentCountAwaitingCompaction": 0,\n "segmentCountCompacted": 0,\n "segmentCountSkipped": 8,\n "intervalCountAwaitingCompaction": 0,\n "intervalCountCompacted": 0,\n "intervalCountSkipped": 1\n },\n {\n "dataSource": "wikipedia_hour",\n "scheduleStatus": "RUNNING",\n "bytesAwaitingCompaction": 0,\n "bytesCompacted": 5998634,\n "bytesSkipped": 0,\n "segmentCountAwaitingCompaction": 0,\n "segmentCountCompacted": 1,\n "segmentCountSkipped": 0,\n "intervalCountAwaitingCompaction": 0,\n "intervalCountCompacted": 1,\n "intervalCountSkipped": 0\n }\n ]\n}\n'})})]})]})}function m(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>l});var t=a(96540);const i={},o=t.createContext(i);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:n},e.children)}},65537:(e,n,a)=>{a.d(n,{A:()=>y});var t=a(96540),i=a(18215),o=a(65627),s=a(56347),l=a(50372),r=a(30604),c=a(11861),u=a(78749);function d(e){var n,a;return null!=(n=null==(a=t.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,t.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad <Tabs> child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?n:[]}function p(e){var n=e.values,a=e.children;return(0,t.useMemo)((function(){var e=null!=n?n:function(e){return d(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(a);return function(e){var n=(0,c.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in <Tabs>. Every value needs to be unique.')}(e),e}),[n,a])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function h(e){var n=e.queryString,a=void 0!==n&&n,i=e.groupId,o=(0,s.W6)(),l=function(e){var n=e.queryString,a=void 0!==n&&n,t=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!t)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!=t?t:null}({queryString:a,groupId:i});return[(0,r.aZ)(l),(0,t.useCallback)((function(e){if(l){var n=new URLSearchParams(o.location.search);n.set(l,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[l,o])]}function x(e){var n,a,i,o,s=e.defaultValue,r=e.queryString,c=void 0!==r&&r,d=e.groupId,x=p(e),j=(0,t.useState)((function(){return function(e){var n,a=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(a){if(!m({value:a,tabValues:t}))throw new Error('Docusaurus error: The <Tabs> has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+t.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var i=null!=(n=t.find((function(e){return e.default})))?n:t[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:s,tabValues:x})})),g=j[0],f=j[1],v=h({queryString:c,groupId:d}),T=v[0],S=v[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),a=(0,u.Dv)(n),i=a[0],o=a[1],[i,(0,t.useCallback)((function(e){n&&o.set(e)}),[n,o])]),R=y[0],b=y[1],w=function(){var e=null!=T?T:R;return m({value:e,tabValues:x})?e:null}();return(0,l.A)((function(){w&&f(w)}),[w]),{selectedValue:g,selectValue:(0,t.useCallback)((function(e){if(!m({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);f(e),S(e),b(e)}),[S,b,x]),tabValues:x}}var j=a(9136);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=a(74848);function v(e){var n=e.className,a=e.block,t=e.selectedValue,s=e.selectValue,l=e.tabValues,r=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var n=e.currentTarget,a=r.indexOf(n),i=l[a].value;i!==t&&(c(n),s(i))},d=function(e){var n,a=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var t,i=r.indexOf(e.currentTarget)+1;a=null!=(t=r[i])?t:r[0];break;case"ArrowLeft":var o,s=r.indexOf(e.currentTarget)-1;a=null!=(o=r[s])?o:r[r.length-1]}null==(n=a)||n.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":a},n),children:l.map((function(e){var n=e.value,a=e.label,o=e.attributes;return(0,f.jsx)("li",Object.assign({role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:function(e){r.push(e)},onKeyDown:d,onClick:u},o,{className:(0,i.A)("tabs__item",g.tabItem,null==o?void 0:o.className,{"tabs__item--active":t===n}),children:null!=a?a:n}),n)}))})}function T(e){var n=e.lazy,a=e.children,o=e.selectedValue,s=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){var l=s.find((function(e){return e.props.value===o}));return l?(0,t.cloneElement)(l,{className:(0,i.A)("margin-top--md",l.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==o})}))})}function S(e){var n=x(e);return(0,f.jsxs)("div",{className:(0,i.A)("tabs-container",g.tabList),children:[(0,f.jsx)(v,Object.assign({},n,e)),(0,f.jsx)(T,Object.assign({},n,e))]})}function y(e){var n=(0,j.A)();return(0,f.jsx)(S,Object.assign({},e,{children:d(e.children)}),String(n))}},79329:(e,n,a)=>{a.d(n,{A:()=>s});a(96540);var t=a(18215);const i={tabItem:"tabItem_Ymn6"};var o=a(74848);function s(e){var n=e.children,a=e.hidden,s=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,t.A)(i.tabItem,s),hidden:a,children:n})}}}]);