TuningConfig
tuningConfig用于设置Task的一些优化参数。
1. TuningConfig
1.1 luceneIndexTuningConfig
luceneIndexTuningConfig一般用于离线数据Task的优化配置
"tuningConfig":{
"type":"lucene_index",
"maxRowsPerSegment": Integer maxRowsPerSegment,
"numShards": Integer numShards,
"basePersistDirectory": String basePersistDirectory,
"overwrite": Boolean overwrite,
"reportParseExceptions": Boolean reportParseExceptions,
"writeThreads": Integer writeThreads,
"writeQueueThreshold": Integer writeQueueThreshold,
"mergeThreads": Integer mergeThreads,
"scanThreads": Integer scanThreads,
"useDataSequenceMode": Boolean useDataSequenceMode,
"maxSegmentIdleSeconds": Integer maxSegmentIdleSeconds
}
| 属性名 | 值 | 类型 | 是否必需 | 默认值 | 说明 |
|---|---|---|---|---|---|
| type | lucene_index | string | 是 | - | 指定tuningConfig类型,固定值 |
| maxRowsPerSegment | 自定义 | int | 否 | 5000000 | 指定每个数据段存储的记录数 |
| numShards | 自定义 | int | 否 | -1 (表示不生效) | 指定每个interval(时间区间)生成多少个数据段, 与 maxRowsPerSegment不可同时配置 |
| basePersistDirectory | 自定义 | string | 否 | null | 指定数据段的临时存储目录, 支持 ,分隔配置多个目录 |
| overwrite | true/false | boolean | 否 | false | 是否覆盖相同interval的数据 |
| reportParseExceptions | true/false | boolean | 否 | false | 指定解析出错时是否抛出异常 |
| writeThreads | 自定义 | int | 否 | 2 | 指定写数据段的线程数, 启用 numShards时,建议二者成倍数关系 |
| writeQueueThreshold | 自定义 | int | 否 | 1000 | 指定写线程缓存的记录数 |
| mergeThreads | 自定义 | int | 否 | 2 | 指定合并数据段的线程数, 启用 numShards时,建议二者成倍数关系 |
| useDataSequenceMode | true/false | boolean | 否 | false | 指定是否使用串行读写模式 |
| scanThreads | 自定义 | int | 否 | 1 | 指定监控数据段空闲的线程数 |
| maxSegmentIdleSeconds | 自定义 | int | 否 | 60 | 指定数据段可以合并的空闲时间阈值 |
1.2 kafkaSupervisorTuningConfig
kafkaSupervisorTuningConfig一般用于实时数据kafkaSupervisor的优化配置
"tuningConfig":{
"type":"kafka",
"maxRowsInMemory": Integer maxRowsInMemory,
"maxRowsPerSegment": Integer maxRowsPerSegment,
"intermediatePersistPeriod": Period intermediatePersistPeriod,
"basePersistDirectory": String basePersistDirectory,
"basePersistDirectoryStr": String basePersistDirectoryStr,
"maxPendingPersists": Integer maxPendingPersists,
"indexSpec": IndexSpec indexSpec,
"buildV9Directly": Boolean buildV9Directly,
"reportParseExceptions": Boolean reportParseExceptions,
"handoffConditionTimeout": Long handoffConditionTimeout,
"workerThreads": Integer workerThreads,
"chatThreads": Integer chatThreads,
"chatRetries": Long chatRetries,
"httpTimeout": Period httpTimeout,
"shutdownTimeout": Period shutdownTimeout,
"maxWarmCount": Integer maxWarmCount,
"taskDealRowCount": Integer taskDealRowCount,
"consumerThreadCount": Integer consumerThreadCount
}
| 属性名 | 值 | 类型 | 是否必需 | 默认值 | 说明 |
|---|---|---|---|---|---|
| type | kafka | string | 是 | - | 指定tuningConfig类型,固定值 |
| maxRowsInMemory | 自定义 | int | 否 | 500000 | 内存最大缓存记录数 |
| maxRowsPerSegment | 自定义 | int | 否 | 20000000 | 指定每个数据段存储的记录数 |
| intermediatePersistPeriod | 参见Period配置 | string | 否 | PT10M(10分钟) | 指定数据段flush周期, 仅对 rollup数据段有效 |
| basePersistDirectory | 自定义 | string | 否 | null | 指定数据段的临时存储目录, 不支持配置多个目录 |
| basePersistDirectoryStr | 自定义 | string | 否 | null | 指定数据段的临时存储目录, 支持 ,分隔配置多个目录,若配置了 basePersistDirectory,则会被覆盖 |
| maxPendingPersists | 自定义 | int | 否 | false | 指定同时可持久化多少个数据段 |
| indexSpec | 自定义 | json | 否 | false | 待补充 |
| buildV9Directly | true/false | boolean | 否 | false | 是否使用V9格式 |
| reportParseExceptions | true/false | boolean | 否 | false | 指定解析出错时是否抛出异常 |
| handoffConditionTimeout | 自定义 | long | 否 | 0 | 等待数据段落地的超时时间,0表示一直等待 |
| workerThreads | 自定义 | int | 否 | - | 指定supervisor的工作线程数, 用于监控/启停Task; 默认为ioConfig配置的task数 |
| chatThreads | 自定义 | int | 否 | - | 指定supervisor的通讯线程数, 用于对Task发起http通讯; 默认为ioConfig配置的task数 |
| chatRetries | 自定义 | int | 否 | 8 | 指定supervisor的通讯失败的重试次数 |
| httpTimeout | 参见Period配置 | string | 否 | PT10S(10秒) | 指定supervisor的通讯超时时间 |
| shutdownTimeout | 参见Period配置 | string | 否 | PT80S(80秒) | 指定supervisor的停止的超时时间 |
| maxWarmCount | 自定义 | int | 否 | 1 | 指定支持实时查询多少interval内的数据; 比如设置了段粒度为 DAY,此参数值为2,则表示支持实时查询2天内的数据 |
| taskDealRowCount | 自定义 | int | 否 | 100000000 | 指定每个Task最大的处理数据量 |
| consumerThreadCount | 自定义 | int | 否 | 1 | 指定数据段写线程数 |