blob: 626bafddbc9fa6d74e2964c71f14ad462886b39e [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2331],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),m=d(n),k=r,g=m["".concat(s,".").concat(k)]||m[k]||u[k]||i;return n?a.createElement(g,l(l({ref:t},p),{},{components:n})):a.createElement(g,l({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=k;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[m]="string"==typeof e?e:r,l[1]=o;for(var d=2;d<i;d++)l[d]=n[d];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},89185:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>g,frontMatter:()=>o,metadata:()=>d,toc:()=>m});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),l=["components"],o={id:"kafka-supervisor-reference",title:"Apache Kafka supervisor reference",sidebar_label:"Apache Kafka supervisor",description:"Reference topic for Apache Kafka supervisors"},s=void 0,d={unversionedId:"development/extensions-core/kafka-supervisor-reference",id:"development/extensions-core/kafka-supervisor-reference",title:"Apache Kafka supervisor reference",description:"Reference topic for Apache Kafka supervisors",source:"@site/docs/latest/development/extensions-core/kafka-supervisor-reference.md",sourceDirName:"development/extensions-core",slug:"/development/extensions-core/kafka-supervisor-reference",permalink:"/docs/latest/development/extensions-core/kafka-supervisor-reference",draft:!1,tags:[],version:"current",frontMatter:{id:"kafka-supervisor-reference",title:"Apache Kafka supervisor reference",sidebar_label:"Apache Kafka supervisor",description:"Reference topic for Apache Kafka supervisors"},sidebar:"docs",previous:{title:"Apache Kafka ingestion",permalink:"/docs/latest/development/extensions-core/kafka-ingestion"},next:{title:"Apache Kafka operations",permalink:"/docs/latest/development/extensions-core/kafka-supervisor-operations"}},p={},m=[{value:"Supervisor I/O configuration",id:"supervisor-io-configuration",level:2},{value:"Task autoscaler properties",id:"task-autoscaler-properties",level:3},{value:"Lag based autoscaler strategy related properties",id:"lag-based-autoscaler-strategy-related-properties",level:3},{value:"Ingesting from multiple topics",id:"ingesting-from-multiple-topics",level:3},{value:"Idle supervisor configuration",id:"idle-supervisor-configuration",level:2},{value:"Consumer properties",id:"consumer-properties",level:2},{value:"Specifying data format",id:"specifying-data-format",level:2},{value:"Supervisor tuning configuration",id:"supervisor-tuning-configuration",level:2},{value:"IndexSpec",id:"indexspec",level:3}],u={toc:m},k="wrapper";function g(e){var t=e.components,n=(0,r.Z)(e,l);return(0,i.kt)(k,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"This topic contains configuration reference information for the Apache Kafka supervisor for Apache Druid."),(0,i.kt)("p",null,"The following table outlines the high-level configuration options:"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Property"),(0,i.kt)("th",{parentName:"tr",align:null},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Required"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"type")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"The supervisor type. For Kafka streaming, set to ",(0,i.kt)("inlineCode",{parentName:"td"},"kafka"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"spec")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"The container object for the supervisor configuration."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"ioConfig")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"The I/O configuration object to define the Kafka connection and I/O-related settings for the supervisor and indexing task. See ",(0,i.kt)("a",{parentName:"td",href:"#supervisor-io-configuration"},"Supervisor I/O configuration"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"dataSchema")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"The schema for the Kafka indexing task to use during ingestion."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"tuningConfig")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"The tuning configuration object to define performance-related settings for the supervisor and indexing tasks. See ",(0,i.kt)("a",{parentName:"td",href:"#supervisor-tuning-configuration"},"Supervisor tuning configuration"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No")))),(0,i.kt)("h2",{id:"supervisor-io-configuration"},"Supervisor I/O configuration"),(0,i.kt)("p",null,"The following table outlines the configuration options for ",(0,i.kt)("inlineCode",{parentName:"p"},"ioConfig"),":"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Property"),(0,i.kt)("th",{parentName:"tr",align:null},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Required"),(0,i.kt)("th",{parentName:"tr",align:null},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"topic")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"The Kafka topic to read from. Must be a specific topic. Druid does not support topic patterns."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"inputFormat")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"The input format to define input data parsing. See ",(0,i.kt)("a",{parentName:"td",href:"#specifying-data-format"},"Specifying data format")," for details about specifying the input format."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"consumerProperties")),(0,i.kt)("td",{parentName:"tr",align:null},"String, Object"),(0,i.kt)("td",{parentName:"tr",align:null},"A map of properties to pass to the Kafka consumer. See ",(0,i.kt)("a",{parentName:"td",href:"#consumer-properties"},"Consumer properties"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"pollTimeout")),(0,i.kt)("td",{parentName:"tr",align:null},"Long"),(0,i.kt)("td",{parentName:"tr",align:null},"The length of time to wait for the Kafka consumer to poll records, in milliseconds."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"100")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"replicas")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of replica sets, where 1 is a single set of tasks (no replication). Druid always assigns replicate tasks to different workers to provide resiliency against process failure."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"taskCount")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The maximum number of reading tasks in a replica set. The maximum number of reading tasks equals ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCount * replicas"),". The total number of tasks, reading and publishing, is greater than this count. See ",(0,i.kt)("a",{parentName:"td",href:"/docs/latest/development/extensions-core/kafka-supervisor-operations#capacity-planning"},"Capacity planning")," for more details. When ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCount > {numKafkaPartitions}"),", the actual number of reading tasks is less than the ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCount")," value."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"taskDuration")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"The length of time before tasks stop reading and begin publishing segments."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT1H")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"startDelay")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"The period to wait before the supervisor starts managing tasks."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT5S")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"period")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"Determines how often the supervisor executes its management logic. Note that the supervisor also runs in response to certain events, such as tasks succeeding, failing, and reaching their task duration. The ",(0,i.kt)("inlineCode",{parentName:"td"},"period")," value specifies the maximum time between iterations."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT30S")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"useEarliestOffset")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"If a supervisor manages a datasource for the first time, it obtains a set of starting offsets from Kafka. This flag determines whether it retrieves the earliest or latest offsets in Kafka. Under normal circumstances, subsequent tasks start from where the previous segments ended. Druid only uses ",(0,i.kt)("inlineCode",{parentName:"td"},"useEarliestOffset")," on the first run."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"completionTimeout")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"The length of time to wait before declaring a publishing task as failed and terminating it. If the value is too low, your tasks may never publish. The publishing clock for a task begins roughly after ",(0,i.kt)("inlineCode",{parentName:"td"},"taskDuration")," elapses."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT30M")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"lateMessageRejectionStartDateTime")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 date time"),(0,i.kt)("td",{parentName:"tr",align:null},"Configure tasks to reject messages with timestamps earlier than this date time. For example, if this property is set to ",(0,i.kt)("inlineCode",{parentName:"td"},"2016-01-01T11:00Z")," and the supervisor creates a task at ",(0,i.kt)("inlineCode",{parentName:"td"},"2016-01-01T12:00Z"),", Druid drops messages with timestamps earlier than ",(0,i.kt)("inlineCode",{parentName:"td"},"2016-01-01T11:00Z"),". This can prevent concurrency issues if your data stream has late messages and you have multiple pipelines that need to operate on the same segments, such as a realtime and a nightly batch ingestion pipeline."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"lateMessageRejectionPeriod")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"Configure tasks to reject messages with timestamps earlier than this period before the task was created. For example, if this property is set to ",(0,i.kt)("inlineCode",{parentName:"td"},"PT1H")," and the supervisor creates a task at ",(0,i.kt)("inlineCode",{parentName:"td"},"2016-01-01T12:00Z"),", Druid drops messages with timestamps earlier than ",(0,i.kt)("inlineCode",{parentName:"td"},"2016-01-01T11:00Z"),". This may help prevent concurrency issues if your data stream has late messages and you have multiple pipelines that need to operate on the same segments, such as a realtime and a nightly batch ingestion pipeline. Note that you can specify only one of the late message rejection properties."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"earlyMessageRejectionPeriod")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"Configure tasks to reject messages with timestamps later than this period after the task reached its task duration. For example, if this property is set to ",(0,i.kt)("inlineCode",{parentName:"td"},"PT1H"),", the task duration is set to ",(0,i.kt)("inlineCode",{parentName:"td"},"PT1H")," and the supervisor creates a task at ",(0,i.kt)("inlineCode",{parentName:"td"},"2016-01-01T12:00Z"),", Druid drops messages with timestamps later than ",(0,i.kt)("inlineCode",{parentName:"td"},"2016-01-01T14:00Z"),". Tasks sometimes run past their task duration, such as in cases of supervisor failover. Setting ",(0,i.kt)("inlineCode",{parentName:"td"},"earlyMessageRejectionPeriod")," too low may cause Druid to drop messages unexpectedly whenever a task runs past its originally configured task duration."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"autoScalerConfig")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"Defines auto scaling behavior for Kafka ingest tasks. See ",(0,i.kt)("a",{parentName:"td",href:"#task-autoscaler-properties"},"Task autoscaler properties"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"null")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"idleConfig")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"Defines how and when the Kafka supervisor can become idle. See ",(0,i.kt)("a",{parentName:"td",href:"#idle-supervisor-configuration"},"Idle supervisor configuration")," for more details."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"null")))),(0,i.kt)("h3",{id:"task-autoscaler-properties"},"Task autoscaler properties"),(0,i.kt)("p",null,"The following table outlines the configuration options for ",(0,i.kt)("inlineCode",{parentName:"p"},"autoScalerConfig"),":"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Property"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Required"),(0,i.kt)("th",{parentName:"tr",align:null},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"enableTaskAutoScaler")),(0,i.kt)("td",{parentName:"tr",align:null},"Enable or disable autoscaling. ",(0,i.kt)("inlineCode",{parentName:"td"},"false")," or blank disables the ",(0,i.kt)("inlineCode",{parentName:"td"},"autoScaler")," even when ",(0,i.kt)("inlineCode",{parentName:"td"},"autoScalerConfig")," is not null."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"taskCountMax")),(0,i.kt)("td",{parentName:"tr",align:null},"Maximum number of ingestion tasks. Set ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCountMax >= taskCountMin"),". If ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCountMax > {numKafkaPartitions}"),", Druid only scales reading tasks up to the ",(0,i.kt)("inlineCode",{parentName:"td"},"{numKafkaPartitions}"),". In this case, ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCountMax")," is ignored."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"taskCountMin")),(0,i.kt)("td",{parentName:"tr",align:null},"Minimum number of ingestion tasks. When you enable the autoscaler, Druid ignores the value of ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCount")," in ",(0,i.kt)("inlineCode",{parentName:"td"},"ioConfig")," and starts with the ",(0,i.kt)("inlineCode",{parentName:"td"},"taskCountMin")," number of tasks."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"minTriggerScaleActionFrequencyMillis")),(0,i.kt)("td",{parentName:"tr",align:null},"Minimum time interval between two scale actions."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"600000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"autoScalerStrategy")),(0,i.kt)("td",{parentName:"tr",align:null},"The algorithm of ",(0,i.kt)("inlineCode",{parentName:"td"},"autoScaler"),". Only supports ",(0,i.kt)("inlineCode",{parentName:"td"},"lagBased"),". See ",(0,i.kt)("a",{parentName:"td",href:"#lag-based-autoscaler-strategy-related-properties"},"Lag based autoscaler strategy related properties")," for details."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"lagBased"))))),(0,i.kt)("h3",{id:"lag-based-autoscaler-strategy-related-properties"},"Lag based autoscaler strategy related properties"),(0,i.kt)("p",null,"The following table outlines the configuration options for ",(0,i.kt)("inlineCode",{parentName:"p"},"autoScalerStrategy"),":"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Property"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Required"),(0,i.kt)("th",{parentName:"tr",align:null},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"lagCollectionIntervalMillis")),(0,i.kt)("td",{parentName:"tr",align:null},"The time period during which Druid collects lag metric points."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"30000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"lagCollectionRangeMillis")),(0,i.kt)("td",{parentName:"tr",align:null},"The total time window of lag collection. Use with ",(0,i.kt)("inlineCode",{parentName:"td"},"lagCollectionIntervalMillis")," to specify the intervals at which to collect lag metric points."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"600000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"scaleOutThreshold")),(0,i.kt)("td",{parentName:"tr",align:null},"The threshold of scale out action."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"6000000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"triggerScaleOutFractionThreshold")),(0,i.kt)("td",{parentName:"tr",align:null},"Enables scale out action if ",(0,i.kt)("inlineCode",{parentName:"td"},"triggerScaleOutFractionThreshold")," percent of lag points is higher than ",(0,i.kt)("inlineCode",{parentName:"td"},"scaleOutThreshold"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"0.3")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"scaleInThreshold")),(0,i.kt)("td",{parentName:"tr",align:null},"The threshold of scale in action."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"1000000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"triggerScaleInFractionThreshold")),(0,i.kt)("td",{parentName:"tr",align:null},"Enables scale in action if ",(0,i.kt)("inlineCode",{parentName:"td"},"triggerScaleInFractionThreshold")," percent of lag points is lower than ",(0,i.kt)("inlineCode",{parentName:"td"},"scaleOutThreshold"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"0.9")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"scaleActionStartDelayMillis")),(0,i.kt)("td",{parentName:"tr",align:null},"The number of milliseconds to delay after the supervisor starts before the first scale logic check."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"300000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"scaleActionPeriodMillis")),(0,i.kt)("td",{parentName:"tr",align:null},"The frequency in milliseconds to check if a scale action is triggered."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"60000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"scaleInStep")),(0,i.kt)("td",{parentName:"tr",align:null},"The number of tasks to reduce at once when scaling down."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"scaleOutStep")),(0,i.kt)("td",{parentName:"tr",align:null},"The number of tasks to add at once when scaling out."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"2")))),(0,i.kt)("h3",{id:"ingesting-from-multiple-topics"},"Ingesting from multiple topics"),(0,i.kt)("p",null,"To ingest data from multiple topics, you have to set ",(0,i.kt)("inlineCode",{parentName:"p"},"topicPattern")," in the supervisor I/O configuration and not set ",(0,i.kt)("inlineCode",{parentName:"p"},"topic"),".\nYou can pass multiple topics as a regex pattern as the value for ",(0,i.kt)("inlineCode",{parentName:"p"},"topicPattern")," in the I/O configuration. For example, to\ningest data from clicks and impressions, set ",(0,i.kt)("inlineCode",{parentName:"p"},"topicPattern")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"clicks|impressions")," in the I/O configuration.\nSimilarly, you can use ",(0,i.kt)("inlineCode",{parentName:"p"},"metrics-.*")," as the value for ",(0,i.kt)("inlineCode",{parentName:"p"},"topicPattern")," if you want to ingest from all the topics that\nstart with ",(0,i.kt)("inlineCode",{parentName:"p"},"metrics-"),". If new topics are added to the cluster that match the regex, Druid automatically starts\ningesting from those new topics. A topic name that only matches partially such as ",(0,i.kt)("inlineCode",{parentName:"p"},"my-metrics-12")," will not be\nincluded for ingestion. If you enable multi-topic ingestion for a datasource, downgrading to a version older than\n28.0.0 will cause the ingestion for that datasource to fail."),(0,i.kt)("p",null,"When ingesting data from multiple topics, partitions are assigned based on the hashcode of the topic name and the\nid of the partition within that topic. The partition assignment might not be uniform across all the tasks. It's also\nassumed that partitions across individual topics have similar load. It is recommended that you have a higher number of\npartitions for a high load topic and a lower number of partitions for a low load topic. Assuming that you want to\ningest from both high and low load topic in the same supervisor."),(0,i.kt)("h2",{id:"idle-supervisor-configuration"},"Idle supervisor configuration"),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"}," Note that idle state transitioning is currently designated as experimental.")),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Property"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Required"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"enabled")),(0,i.kt)("td",{parentName:"tr",align:null},"If ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),", the supervisor becomes idle if there is no data on input stream/topic for some time."),(0,i.kt)("td",{parentName:"tr",align:null},"No")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"inactiveAfterMillis")),(0,i.kt)("td",{parentName:"tr",align:null},"The supervisor becomes idle if all existing data has been read from input topic and no new data has been published for ",(0,i.kt)("inlineCode",{parentName:"td"},"inactiveAfterMillis")," milliseconds."),(0,i.kt)("td",{parentName:"tr",align:null},"No")))),(0,i.kt)("p",null,"When the supervisor enters the idle state, no new tasks are launched subsequent to the completion of the currently executing tasks. This strategy may lead to reduced costs for cluster operators while using topics that get sporadic data."),(0,i.kt)("p",null,"The following example demonstrates supervisor spec with ",(0,i.kt)("inlineCode",{parentName:"p"},"lagBased")," autoscaler and idle configuration enabled:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "type": "kafka",\n "spec": {\n "dataSchema": {\n ...\n },\n "ioConfig": {\n "topic": "metrics",\n "inputFormat": {\n "type": "json"\n },\n "consumerProperties": {\n "bootstrap.servers": "localhost:9092"\n },\n "autoScalerConfig": {\n "enableTaskAutoScaler": true,\n "taskCountMax": 6,\n "taskCountMin": 2,\n "minTriggerScaleActionFrequencyMillis": 600000,\n "autoScalerStrategy": "lagBased",\n "lagCollectionIntervalMillis": 30000,\n "lagCollectionRangeMillis": 600000,\n "scaleOutThreshold": 6000000,\n "triggerScaleOutFractionThreshold": 0.3,\n "scaleInThreshold": 1000000,\n "triggerScaleInFractionThreshold": 0.9,\n "scaleActionStartDelayMillis": 300000,\n "scaleActionPeriodMillis": 60000,\n "scaleInStep": 1,\n "scaleOutStep": 2\n },\n "taskCount":1,\n "replicas":1,\n "taskDuration":"PT1H",\n "idleConfig": {\n "enabled": true,\n "inactiveAfterMillis": 600000 \n }\n },\n "tuningConfig":{\n ...\n }\n }\n}\n')),(0,i.kt)("h2",{id:"consumer-properties"},"Consumer properties"),(0,i.kt)("p",null,"Consumer properties must contain a property ",(0,i.kt)("inlineCode",{parentName:"p"},"bootstrap.servers")," with a list of Kafka brokers in the form: ",(0,i.kt)("inlineCode",{parentName:"p"},"<BROKER_1>:<PORT_1>,<BROKER_2>:<PORT_2>,..."),".\nBy default, ",(0,i.kt)("inlineCode",{parentName:"p"},"isolation.level")," is set to ",(0,i.kt)("inlineCode",{parentName:"p"},"read_committed"),". If you use older versions of Kafka servers without transactions support or don't want Druid to consume only committed transactions, set ",(0,i.kt)("inlineCode",{parentName:"p"},"isolation.level")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"read_uncommitted"),"."),(0,i.kt)("p",null,"In some cases, you may need to fetch consumer properties at runtime. For example, when ",(0,i.kt)("inlineCode",{parentName:"p"},"bootstrap.servers")," is not known upfront, or is not static. To enable SSL connections, you must provide passwords for ",(0,i.kt)("inlineCode",{parentName:"p"},"keystore"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"truststore")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"key")," secretly. You can provide configurations at runtime with a dynamic config provider implementation like the environment variable config provider that comes with Druid. For more information, see ",(0,i.kt)("a",{parentName:"p",href:"/docs/latest/operations/dynamic-config-provider"},"Dynamic config provider"),"."),(0,i.kt)("p",null,"For example, if you are using SASL and SSL with Kafka, set the following environment variables for the Druid user on the machines running the Overlord and the Peon services:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"export KAFKA_JAAS_CONFIG=\"org.apache.kafka.common.security.plain.PlainLoginModule required username='admin_user' password='admin_password';\"\nexport SSL_KEY_PASSWORD=mysecretkeypassword\nexport SSL_KEYSTORE_PASSWORD=mysecretkeystorepassword\nexport SSL_TRUSTSTORE_PASSWORD=mysecrettruststorepassword\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},' "druid.dynamic.config.provider": {\n "type": "environment",\n "variables": {\n "sasl.jaas.config": "KAFKA_JAAS_CONFIG",\n "ssl.key.password": "SSL_KEY_PASSWORD",\n "ssl.keystore.password": "SSL_KEYSTORE_PASSWORD",\n "ssl.truststore.password": "SSL_TRUSTSTORE_PASSWORD"\n }\n }\n }\n')),(0,i.kt)("p",null,"Verify that you've changed the values for all configurations to match your own environment. You can use the environment variable config provider syntax in the ",(0,i.kt)("strong",{parentName:"p"},"Consumer properties")," field on the ",(0,i.kt)("strong",{parentName:"p"},"Connect tab")," in the ",(0,i.kt)("strong",{parentName:"p"},"Load Data")," UI in the web console. When connecting to Kafka, Druid replaces the environment variables with their corresponding values."),(0,i.kt)("p",null,"You can provide SSL connections with ",(0,i.kt)("a",{parentName:"p",href:"/docs/latest/operations/password-provider"},"Password provider")," interface to define the ",(0,i.kt)("inlineCode",{parentName:"p"},"keystore"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"truststore"),", and ",(0,i.kt)("inlineCode",{parentName:"p"},"key"),", but this feature is deprecated."),(0,i.kt)("h2",{id:"specifying-data-format"},"Specifying data format"),(0,i.kt)("p",null,"The Kafka indexing service supports both ",(0,i.kt)("a",{parentName:"p",href:"/docs/latest/ingestion/data-formats#input-format"},(0,i.kt)("inlineCode",{parentName:"a"},"inputFormat"))," and ",(0,i.kt)("a",{parentName:"p",href:"/docs/latest/ingestion/data-formats#parser"},(0,i.kt)("inlineCode",{parentName:"a"},"parser"))," to specify the data format.\nUse the ",(0,i.kt)("inlineCode",{parentName:"p"},"inputFormat")," to specify the data format for Kafka indexing service unless you need a format only supported by the legacy ",(0,i.kt)("inlineCode",{parentName:"p"},"parser"),"."),(0,i.kt)("p",null,"Druid supports the following input formats:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"csv")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"tsv")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"json")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"kafka")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"avro_stream")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"avro_ocf")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"protobuf"))),(0,i.kt)("p",null,"For more information, see ",(0,i.kt)("a",{parentName:"p",href:"/docs/latest/ingestion/data-formats"},"Data formats"),". You can also read ",(0,i.kt)("a",{parentName:"p",href:"/docs/latest/development/extensions-contrib/thrift"},(0,i.kt)("inlineCode",{parentName:"a"},"thrift"))," formats using ",(0,i.kt)("inlineCode",{parentName:"p"},"parser"),"."),(0,i.kt)("h2",{id:"supervisor-tuning-configuration"},"Supervisor tuning configuration"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"tuningConfig")," object is optional. If you don't specify the ",(0,i.kt)("inlineCode",{parentName:"p"},"tuningConfig")," object, Druid uses the default configuration settings."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Property"),(0,i.kt)("th",{parentName:"tr",align:null},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Required"),(0,i.kt)("th",{parentName:"tr",align:null},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"type")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"The indexing task type. This should always be ",(0,i.kt)("inlineCode",{parentName:"td"},"kafka"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"Yes"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsInMemory")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of rows to aggregate before persisting. This number represents the post-aggregation rows. It is not equivalent to the number of input events, but the resulting number of aggregated rows. Druid uses ",(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsInMemory")," to manage the required JVM heap size. The maximum heap memory usage for indexing scales is ",(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsInMemory * (2 + maxPendingPersists)"),". Normally, you do not need to set this, but depending on the nature of data, if rows are short in terms of bytes, you may not want to store a million rows in memory and this value should be set."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"150000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"maxBytesInMemory")),(0,i.kt)("td",{parentName:"tr",align:null},"Long"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of bytes to aggregate in heap memory before persisting. This is based on a rough estimate of memory usage and not actual usage. Normally, this is computed internally. The maximum heap memory usage for indexing is ",(0,i.kt)("inlineCode",{parentName:"td"},"maxBytesInMemory * (2 + maxPendingPersists)"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"One-sixth of max JVM memory")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"skipBytesInMemoryOverheadCheck")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"The calculation of ",(0,i.kt)("inlineCode",{parentName:"td"},"maxBytesInMemory")," takes into account overhead objects created during ingestion and each intermediate persist. To exclude the bytes of these overhead objects from the ",(0,i.kt)("inlineCode",{parentName:"td"},"maxBytesInMemory")," check, set ",(0,i.kt)("inlineCode",{parentName:"td"},"skipBytesInMemoryOverheadCheck")," to ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsPerSegment")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of rows to store in a segment. This number is post-aggregation rows. Handoff occurs when ",(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsPerSegment")," or ",(0,i.kt)("inlineCode",{parentName:"td"},"maxTotalRows")," is reached or every ",(0,i.kt)("inlineCode",{parentName:"td"},"intermediateHandoffPeriod"),", whichever happens first."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"5000000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"maxTotalRows")),(0,i.kt)("td",{parentName:"tr",align:null},"Long"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of rows to aggregate across all segments; this number is post-aggregation rows. Handoff happens either if ",(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsPerSegment")," or ",(0,i.kt)("inlineCode",{parentName:"td"},"maxTotalRows")," is reached or every ",(0,i.kt)("inlineCode",{parentName:"td"},"intermediateHandoffPeriod"),", whichever happens earlier."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"20000000")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"intermediateHandoffPeriod")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"The period that determines how often tasks hand off segments. Handoff occurs if ",(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsPerSegment")," or ",(0,i.kt)("inlineCode",{parentName:"td"},"maxTotalRows")," is reached or every ",(0,i.kt)("inlineCode",{parentName:"td"},"intermediateHandoffPeriod"),", whichever happens first."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"P2147483647D")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"intermediatePersistPeriod")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"The period that determines the rate at which intermediate persists occur."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT10M")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"maxPendingPersists")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"Maximum number of persists that can be pending but not started. If a new intermediate persist exceeds this limit, Druid blocks ingestion until the currently running persist finishes. One persist can be running concurrently with ingestion, and none can be queued up. The maximum heap memory usage for indexing scales is ",(0,i.kt)("inlineCode",{parentName:"td"},"maxRowsInMemory * (2 + maxPendingPersists)"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"0")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"indexSpec")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"Defines how Druid indexes the data. See ",(0,i.kt)("a",{parentName:"td",href:"#indexspec"},"IndexSpec")," for more information."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"indexSpecForIntermediatePersists")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"Defines segment storage format options to use at indexing time for intermediate persisted temporary segments. You can use ",(0,i.kt)("inlineCode",{parentName:"td"},"indexSpecForIntermediatePersists")," to disable dimension/metric compression on intermediate segments to reduce memory required for final merging. However, disabling compression on intermediate segments might increase page cache use while they are used before getting merged into final segment published. See ",(0,i.kt)("a",{parentName:"td",href:"#indexspec"},"IndexSpec")," for possible values."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"Same as ",(0,i.kt)("inlineCode",{parentName:"td"},"indexSpec"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"reportParseExceptions")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"DEPRECATED. If ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),", Druid throws exceptions encountered during parsing causing ingestion to halt. If ",(0,i.kt)("inlineCode",{parentName:"td"},"false"),", Druid skips unparseable rows and fields. Setting ",(0,i.kt)("inlineCode",{parentName:"td"},"reportParseExceptions")," to ",(0,i.kt)("inlineCode",{parentName:"td"},"true")," overrides existing configurations for ",(0,i.kt)("inlineCode",{parentName:"td"},"maxParseExceptions")," and ",(0,i.kt)("inlineCode",{parentName:"td"},"maxSavedParseExceptions"),", setting ",(0,i.kt)("inlineCode",{parentName:"td"},"maxParseExceptions")," to 0 and limiting ",(0,i.kt)("inlineCode",{parentName:"td"},"maxSavedParseExceptions")," to not more than 1."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"handoffConditionTimeout")),(0,i.kt)("td",{parentName:"tr",align:null},"Long"),(0,i.kt)("td",{parentName:"tr",align:null},"Number of milliseconds to wait for segment handoff. Set to a value >= 0, where 0 means to wait indefinitely."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"900000 (15 minutes)")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"resetOffsetAutomatically")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"Controls behavior when Druid needs to read Kafka messages that are no longer available, when ",(0,i.kt)("inlineCode",{parentName:"td"},"offsetOutOfRangeException")," is encountered.",(0,i.kt)("br",null),"If ",(0,i.kt)("inlineCode",{parentName:"td"},"false"),", the exception bubbles up causing tasks to fail and ingestion to halt. If this occurs, manual intervention is required to correct the situation, potentially using the ",(0,i.kt)("a",{parentName:"td",href:"/docs/latest/api-reference/supervisor-api"},"Reset Supervisor API"),". This mode is useful for production, since it will make you aware of issues with ingestion.",(0,i.kt)("br",null),"If ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),", Druid will automatically reset to the earlier or latest offset available in Kafka, based on the value of the ",(0,i.kt)("inlineCode",{parentName:"td"},"useEarliestOffset")," property (earliest if ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),", latest if ",(0,i.kt)("inlineCode",{parentName:"td"},"false"),"). Note that this can lead to dropping data (if ",(0,i.kt)("inlineCode",{parentName:"td"},"useEarliestSequenceNumber")," is ",(0,i.kt)("inlineCode",{parentName:"td"},"false"),") or duplicating data (if ",(0,i.kt)("inlineCode",{parentName:"td"},"useEarliestSequenceNumber")," is ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),") without your knowledge. Druid logs messages indicating that a reset has occurred without interrupting ingestion. This mode is useful for non-production situations since it enables Druid to recover from problems automatically, even if they lead to quiet dropping or duplicating of data. This feature behaves similarly to the Kafka ",(0,i.kt)("inlineCode",{parentName:"td"},"auto.offset.reset")," consumer property."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"workerThreads")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of threads that the supervisor uses to handle requests/responses for worker tasks, along with any other internal asynchronous operation."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"min(10, taskCount)"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"chatAsync")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"If ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),", use asynchronous communication with indexing tasks, and ignore the ",(0,i.kt)("inlineCode",{parentName:"td"},"chatThreads")," parameter. If ",(0,i.kt)("inlineCode",{parentName:"td"},"false"),", use synchronous communication in a thread pool of size ",(0,i.kt)("inlineCode",{parentName:"td"},"chatThreads"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"true"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"chatThreads")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of threads to use for communicating with indexing tasks. Ignored if ",(0,i.kt)("inlineCode",{parentName:"td"},"chatAsync")," is ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"min(10, taskCount * replicas)"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"chatRetries")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The number of times HTTP requests to indexing tasks are retried before considering tasks unresponsive."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"8")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"httpTimeout")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"The period of time to wait for a HTTP response from an indexing task."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT10S")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"shutdownTimeout")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"The period of time to wait for the supervisor to attempt a graceful shutdown of tasks before exiting."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT80S")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"offsetFetchPeriod")),(0,i.kt)("td",{parentName:"tr",align:null},"ISO 8601 period"),(0,i.kt)("td",{parentName:"tr",align:null},"Determines how often the supervisor queries Kafka and the indexing tasks to fetch current offsets and calculate lag. If the user-specified value is below the minimum value of ",(0,i.kt)("inlineCode",{parentName:"td"},"PT5S"),", the supervisor ignores the value and uses the minimum value instead."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"PT30S")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"segmentWriteOutMediumFactory")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"The segment write-out medium to use when creating segments. See ",(0,i.kt)("a",{parentName:"td",href:"/docs/latest/configuration/#segmentwriteoutmediumfactory"},"Additional Peon configuration: SegmentWriteOutMediumFactory")," for explanation and available options."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"If not specified, Druid uses the value from ",(0,i.kt)("inlineCode",{parentName:"td"},"druid.peon.defaultSegmentWriteOutMediumFactory.type"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"logParseExceptions")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"If ",(0,i.kt)("inlineCode",{parentName:"td"},"true"),", Druid logs an error message when a parsing exception occurs, containing information about the row where the error occurred."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"maxParseExceptions")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"The maximum number of parse exceptions that can occur before the task halts ingestion and fails. Overridden if ",(0,i.kt)("inlineCode",{parentName:"td"},"reportParseExceptions")," is set."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"unlimited")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"maxSavedParseExceptions")),(0,i.kt)("td",{parentName:"tr",align:null},"Integer"),(0,i.kt)("td",{parentName:"tr",align:null},"When a parse exception occurs, Druid keeps track of the most recent parse exceptions. ",(0,i.kt)("inlineCode",{parentName:"td"},"maxSavedParseExceptions")," limits the number of saved exception instances. These saved exceptions are available after the task finishes in the ",(0,i.kt)("a",{parentName:"td",href:"/docs/latest/ingestion/tasks#task-reports"},"task completion report"),". Overridden if ",(0,i.kt)("inlineCode",{parentName:"td"},"reportParseExceptions")," is set."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"0")))),(0,i.kt)("h3",{id:"indexspec"},"IndexSpec"),(0,i.kt)("p",null,"The following table outlines the configuration options for ",(0,i.kt)("inlineCode",{parentName:"p"},"indexSpec"),":"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Property"),(0,i.kt)("th",{parentName:"tr",align:null},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Required"),(0,i.kt)("th",{parentName:"tr",align:null},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"bitmap")),(0,i.kt)("td",{parentName:"tr",align:null},"Object"),(0,i.kt)("td",{parentName:"tr",align:null},"Compression format for bitmap indexes. Druid supports roaring and concise bitmap types."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},"Roaring")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"dimensionCompression")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"Compression format for dimension columns. Choose from ",(0,i.kt)("inlineCode",{parentName:"td"},"LZ4"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"LZF"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"ZSTD")," or ",(0,i.kt)("inlineCode",{parentName:"td"},"uncompressed"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"LZ4"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"metricCompression")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"Compression format for primitive type metric columns. Choose from ",(0,i.kt)("inlineCode",{parentName:"td"},"LZ4"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"LZF"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"ZSTD"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"uncompressed")," or ",(0,i.kt)("inlineCode",{parentName:"td"},"none"),"."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"LZ4"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"longEncoding")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"Encoding format for metric and dimension columns with type long. Choose from ",(0,i.kt)("inlineCode",{parentName:"td"},"auto")," or ",(0,i.kt)("inlineCode",{parentName:"td"},"longs"),". ",(0,i.kt)("inlineCode",{parentName:"td"},"auto")," encodes the values using offset or lookup table depending on column cardinality, and store them with variable size. ",(0,i.kt)("inlineCode",{parentName:"td"},"longs")," stores the value as is with 8 bytes each."),(0,i.kt)("td",{parentName:"tr",align:null},"No"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"longs"))))))}g.isMDXComponent=!0}}]);