mirror of https://github.com/apache/druid.git
add config to optionally disable all compression in intermediate segment persists while ingestion (#7919)
* disable all compression in intermediate segment persists while ingestion * more changes and build fix * by default retain existing indexingSpec for intermediate persisted segments * document indexSpecForIntermediatePersists index tuning config * fix build issues * update serde tests
This commit is contained in:
parent
fcf56f2330
commit
14aec7fcec
|
@ -139,7 +139,8 @@ The tuningConfig is optional and default parameters will be used if no tuningCon
|
||||||
|`maxTotalRows`|Long|The number of rows to aggregate across all segments; this number is post-aggregation rows. Handoff will happen either if `maxRowsPerSegment` or `maxTotalRows` is hit or every `intermediateHandoffPeriod`, whichever happens earlier.|no (default == unlimited)|
|
|`maxTotalRows`|Long|The number of rows to aggregate across all segments; this number is post-aggregation rows. Handoff will happen either if `maxRowsPerSegment` or `maxTotalRows` is hit or every `intermediateHandoffPeriod`, whichever happens earlier.|no (default == unlimited)|
|
||||||
|`intermediatePersistPeriod`|ISO8601 Period|The period that determines the rate at which intermediate persists occur.|no (default == PT10M)|
|
|`intermediatePersistPeriod`|ISO8601 Period|The period that determines the rate at which intermediate persists occur.|no (default == PT10M)|
|
||||||
|`maxPendingPersists`|Integer|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|no (default == 0, meaning one persist can be running concurrently with ingestion, and none can be queued up)|
|
|`maxPendingPersists`|Integer|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|no (default == 0, meaning one persist can be running concurrently with ingestion, and none can be queued up)|
|
||||||
|`indexSpec`|Object|Tune how data is indexed, see 'IndexSpec' below for more details.|no|
|
|indexSpec|Object|Tune how data is indexed. See [IndexSpec](#indexspec) for more information.|no|
|
||||||
|
|indexSpecForIntermediatePersists|defines segment storage format options to be used at indexing time for intermediate persisted temporary segments. this can be used 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 [IndexSpec](#indexspec) for possible values.|no (default = same as indexSpec)|
|
||||||
|`reportParseExceptions`|Boolean|*DEPRECATED*. If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped. Setting `reportParseExceptions` to true will override existing configurations for `maxParseExceptions` and `maxSavedParseExceptions`, setting `maxParseExceptions` to 0 and limiting `maxSavedParseExceptions` to no more than 1.|no (default == false)|
|
|`reportParseExceptions`|Boolean|*DEPRECATED*. If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped. Setting `reportParseExceptions` to true will override existing configurations for `maxParseExceptions` and `maxSavedParseExceptions`, setting `maxParseExceptions` to 0 and limiting `maxSavedParseExceptions` to no more than 1.|no (default == false)|
|
||||||
|`handoffConditionTimeout`|Long|Milliseconds to wait for segment handoff. It must be >= 0, where 0 means to wait forever.|no (default == 0)|
|
|`handoffConditionTimeout`|Long|Milliseconds to wait for segment handoff. It must be >= 0, where 0 means to wait forever.|no (default == 0)|
|
||||||
|`resetOffsetAutomatically`|Boolean|Whether to reset the consumer offset if the next offset that it is trying to fetch is less than the earliest available offset for that particular partition. The consumer offset will be reset to either the earliest or latest offset depending on `useEarliestOffset` property of `KafkaSupervisorIOConfig` (see below). This situation typically occurs when messages in Kafka are no longer available for consumption and therefore won't be ingested into Druid. If set to false then ingestion for that particular partition will halt and manual intervention is required to correct the situation, please see `Reset Supervisor` API below.|no (default == false)|
|
|`resetOffsetAutomatically`|Boolean|Whether to reset the consumer offset if the next offset that it is trying to fetch is less than the earliest available offset for that particular partition. The consumer offset will be reset to either the earliest or latest offset depending on `useEarliestOffset` property of `KafkaSupervisorIOConfig` (see below). This situation typically occurs when messages in Kafka are no longer available for consumption and therefore won't be ingested into Druid. If set to false then ingestion for that particular partition will halt and manual intervention is required to correct the situation, please see `Reset Supervisor` API below.|no (default == false)|
|
||||||
|
|
|
@ -135,7 +135,8 @@ The tuningConfig is optional and default parameters will be used if no tuningCon
|
||||||
|`maxTotalRows`|Long|The number of rows to aggregate across all segments; this number is post-aggregation rows. Handoff will happen either if `maxRowsPerSegment` or `maxTotalRows` is hit or every `intermediateHandoffPeriod`, whichever happens earlier.|no (default == unlimited)|
|
|`maxTotalRows`|Long|The number of rows to aggregate across all segments; this number is post-aggregation rows. Handoff will happen either if `maxRowsPerSegment` or `maxTotalRows` is hit or every `intermediateHandoffPeriod`, whichever happens earlier.|no (default == unlimited)|
|
||||||
|`intermediatePersistPeriod`|ISO8601 Period|The period that determines the rate at which intermediate persists occur.|no (default == PT10M)|
|
|`intermediatePersistPeriod`|ISO8601 Period|The period that determines the rate at which intermediate persists occur.|no (default == PT10M)|
|
||||||
|`maxPendingPersists`|Integer|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|no (default == 0, meaning one persist can be running concurrently with ingestion, and none can be queued up)|
|
|`maxPendingPersists`|Integer|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|no (default == 0, meaning one persist can be running concurrently with ingestion, and none can be queued up)|
|
||||||
|`indexSpec`|Object|Tune how data is indexed, see 'IndexSpec' below for more details.|no|
|
|indexSpec|Object|Tune how data is indexed. See [IndexSpec](#indexspec) for more information.|no|
|
||||||
|
|indexSpecForIntermediatePersists|defines segment storage format options to be used at indexing time for intermediate persisted temporary segments. this can be used 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 [IndexSpec](#indexspec) for possible values.|no (default = same as indexSpec)|
|
||||||
|`reportParseExceptions`|Boolean|If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped.|no (default == false)|
|
|`reportParseExceptions`|Boolean|If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped.|no (default == false)|
|
||||||
|`handoffConditionTimeout`|Long|Milliseconds to wait for segment handoff. It must be >= 0, where 0 means to wait forever.|no (default == 0)|
|
|`handoffConditionTimeout`|Long|Milliseconds to wait for segment handoff. It must be >= 0, where 0 means to wait forever.|no (default == 0)|
|
||||||
|`resetOffsetAutomatically`|Boolean|Whether to reset the consumer sequence numbers if the next sequence number that it is trying to fetch is less than the earliest available sequence number for that particular shard. The sequence number will be reset to either the earliest or latest sequence number depending on `useEarliestOffset` property of `KinesisSupervisorIOConfig` (see below). This situation typically occurs when messages in Kinesis are no longer available for consumption and therefore won't be ingested into Druid. If set to false then ingestion for that particular shard will halt and manual intervention is required to correct the situation, please see `Reset Supervisor` API below.|no (default == false)|
|
|`resetOffsetAutomatically`|Boolean|Whether to reset the consumer sequence numbers if the next sequence number that it is trying to fetch is less than the earliest available sequence number for that particular shard. The sequence number will be reset to either the earliest or latest sequence number depending on `useEarliestOffset` property of `KinesisSupervisorIOConfig` (see below). This situation typically occurs when messages in Kinesis are no longer available for consumption and therefore won't be ingested into Druid. If set to false then ingestion for that particular shard will halt and manual intervention is required to correct the situation, please see `Reset Supervisor` API below.|no (default == false)|
|
||||||
|
|
|
@ -192,7 +192,8 @@ The tuningConfig is optional and default parameters will be used if no tuningCon
|
||||||
|combineText|Boolean|Use CombineTextInputFormat to combine multiple files into a file split. This can speed up Hadoop jobs when processing a large number of small files.|no (default == false)|
|
|combineText|Boolean|Use CombineTextInputFormat to combine multiple files into a file split. This can speed up Hadoop jobs when processing a large number of small files.|no (default == false)|
|
||||||
|useCombiner|Boolean|Use Hadoop combiner to merge rows at mapper if possible.|no (default == false)|
|
|useCombiner|Boolean|Use Hadoop combiner to merge rows at mapper if possible.|no (default == false)|
|
||||||
|jobProperties|Object|A map of properties to add to the Hadoop job configuration, see below for details.|no (default == null)|
|
|jobProperties|Object|A map of properties to add to the Hadoop job configuration, see below for details.|no (default == null)|
|
||||||
|indexSpec|Object|Tune how data is indexed. See below for more information.|no|
|
|indexSpec|Object|Tune how data is indexed. See [IndexSpec](#indexspec) for more information.|no|
|
||||||
|
|indexSpecForIntermediatePersists|defines segment storage format options to be used at indexing time for intermediate persisted temporary segments. this can be used 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 [IndexSpec](#indexspec) for possible values.|no (default = same as indexSpec)|
|
||||||
|numBackgroundPersistThreads|Integer|The number of new background threads to use for incremental persists. Using this feature causes a notable increase in memory pressure and cpu usage but will make the job finish more quickly. If changing from the default of 0 (use current thread for persists), we recommend setting it to 1.|no (default == 0)|
|
|numBackgroundPersistThreads|Integer|The number of new background threads to use for incremental persists. Using this feature causes a notable increase in memory pressure and cpu usage but will make the job finish more quickly. If changing from the default of 0 (use current thread for persists), we recommend setting it to 1.|no (default == 0)|
|
||||||
|forceExtendableShardSpecs|Boolean|Forces use of extendable shardSpecs. Hash-based partitioning always uses an extendable shardSpec. For single-dimension partitioning, this option should be set to true to use an extendable shardSpec. For partitioning, please check [Partitioning specification](#partitioning-specification). This option can be useful when you need to append more data to existing dataSource.|no (default = false)|
|
|forceExtendableShardSpecs|Boolean|Forces use of extendable shardSpecs. Hash-based partitioning always uses an extendable shardSpec. For single-dimension partitioning, this option should be set to true to use an extendable shardSpec. For partitioning, please check [Partitioning specification](#partitioning-specification). This option can be useful when you need to append more data to existing dataSource.|no (default = false)|
|
||||||
|useExplicitVersion|Boolean|Forces HadoopIndexTask to use version.|no (default = false)|
|
|useExplicitVersion|Boolean|Forces HadoopIndexTask to use version.|no (default = false)|
|
||||||
|
|
|
@ -185,6 +185,7 @@ The tuningConfig is optional and default parameters will be used if no tuningCon
|
||||||
|maxTotalRows|Total number of rows in segments waiting for being pushed. Used in determining when intermediate pushing should occur.|20000000|no|
|
|maxTotalRows|Total number of rows in segments waiting for being pushed. Used in determining when intermediate pushing should occur.|20000000|no|
|
||||||
|numShards|Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data. numShards cannot be specified if maxRowsPerSegment is set.|null|no|
|
|numShards|Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data. numShards cannot be specified if maxRowsPerSegment is set.|null|no|
|
||||||
|indexSpec|defines segment storage format options to be used at indexing time, see [IndexSpec](#indexspec)|null|no|
|
|indexSpec|defines segment storage format options to be used at indexing time, see [IndexSpec](#indexspec)|null|no|
|
||||||
|
|indexSpecForIntermediatePersists|defines segment storage format options to be used at indexing time for intermediate persisted temporary segments. this can be used 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 [IndexSpec](#indexspec) for possible values.|same as indexSpec|no|
|
||||||
|maxPendingPersists|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|0 (meaning one persist can be running concurrently with ingestion, and none can be queued up)|no|
|
|maxPendingPersists|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|0 (meaning one persist can be running concurrently with ingestion, and none can be queued up)|no|
|
||||||
|reportParseExceptions|If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped.|false|no|
|
|reportParseExceptions|If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped.|false|no|
|
||||||
|pushTimeout|Milliseconds to wait for pushing segments. It must be >= 0, where 0 means to wait forever.|0|no|
|
|pushTimeout|Milliseconds to wait for pushing segments. It must be >= 0, where 0 means to wait forever.|0|no|
|
||||||
|
@ -375,6 +376,14 @@ An example of the result is
|
||||||
"metricCompression": "lz4",
|
"metricCompression": "lz4",
|
||||||
"longEncoding": "longs"
|
"longEncoding": "longs"
|
||||||
},
|
},
|
||||||
|
"indexSpecForIntermediatePersists": {
|
||||||
|
"bitmap": {
|
||||||
|
"type": "concise"
|
||||||
|
},
|
||||||
|
"dimensionCompression": "lz4",
|
||||||
|
"metricCompression": "lz4",
|
||||||
|
"longEncoding": "longs"
|
||||||
|
},
|
||||||
"maxPendingPersists": 0,
|
"maxPendingPersists": 0,
|
||||||
"reportParseExceptions": false,
|
"reportParseExceptions": false,
|
||||||
"pushTimeout": 0,
|
"pushTimeout": 0,
|
||||||
|
@ -555,6 +564,7 @@ The tuningConfig is optional and default parameters will be used if no tuningCon
|
||||||
|numShards|Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data. numShards cannot be specified if maxRowsPerSegment is set.|null|no|
|
|numShards|Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data. numShards cannot be specified if maxRowsPerSegment is set.|null|no|
|
||||||
|partitionDimensions|The dimensions to partition on. Leave blank to select all dimensions. Only used with `forceGuaranteedRollup` = true, will be ignored otherwise.|null|no|
|
|partitionDimensions|The dimensions to partition on. Leave blank to select all dimensions. Only used with `forceGuaranteedRollup` = true, will be ignored otherwise.|null|no|
|
||||||
|indexSpec|defines segment storage format options to be used at indexing time, see [IndexSpec](#indexspec)|null|no|
|
|indexSpec|defines segment storage format options to be used at indexing time, see [IndexSpec](#indexspec)|null|no|
|
||||||
|
|indexSpecForIntermediatePersists|defines segment storage format options to be used at indexing time for intermediate persisted temporary segments. this can be used 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 [IndexSpec](#indexspec) for possible values.|same as indexSpec|no|
|
||||||
|maxPendingPersists|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|0 (meaning one persist can be running concurrently with ingestion, and none can be queued up)|no|
|
|maxPendingPersists|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with maxRowsInMemory * (2 + maxPendingPersists).|0 (meaning one persist can be running concurrently with ingestion, and none can be queued up)|no|
|
||||||
|forceGuaranteedRollup|Forces guaranteeing the [perfect rollup](../ingestion/index.html#roll-up-modes). The perfect rollup optimizes the total size of generated segments and querying time while indexing time will be increased. If this is set to true, the index task will read the entire input data twice: one for finding the optimal number of partitions per time chunk and one for generating segments. Note that the result segments would be hash-partitioned. You can set `forceExtendableShardSpecs` if you plan to append more data to the same time range in the future. This flag cannot be used with `appendToExisting` of IOConfig. For more details, see the below __Segment pushing modes__ section.|false|no|
|
|forceGuaranteedRollup|Forces guaranteeing the [perfect rollup](../ingestion/index.html#roll-up-modes). The perfect rollup optimizes the total size of generated segments and querying time while indexing time will be increased. If this is set to true, the index task will read the entire input data twice: one for finding the optimal number of partitions per time chunk and one for generating segments. Note that the result segments would be hash-partitioned. You can set `forceExtendableShardSpecs` if you plan to append more data to the same time range in the future. This flag cannot be used with `appendToExisting` of IOConfig. For more details, see the below __Segment pushing modes__ section.|false|no|
|
||||||
|reportParseExceptions|DEPRECATED. If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped. Setting `reportParseExceptions` to true will override existing configurations for `maxParseExceptions` and `maxSavedParseExceptions`, setting `maxParseExceptions` to 0 and limiting `maxSavedParseExceptions` to no more than 1.|false|no|
|
|reportParseExceptions|DEPRECATED. If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped. Setting `reportParseExceptions` to true will override existing configurations for `maxParseExceptions` and `maxSavedParseExceptions`, setting `maxParseExceptions` to 0 and limiting `maxSavedParseExceptions` to no more than 1.|false|no|
|
||||||
|
|
|
@ -179,6 +179,7 @@ public class MaterializedViewSupervisorSpec implements SupervisorSpec
|
||||||
tuningConfig.getPartitionsSpec(),
|
tuningConfig.getPartitionsSpec(),
|
||||||
tuningConfig.getShardSpecs(),
|
tuningConfig.getShardSpecs(),
|
||||||
tuningConfig.getIndexSpec(),
|
tuningConfig.getIndexSpec(),
|
||||||
|
tuningConfig.getIndexSpecForIntermediatePersists(),
|
||||||
tuningConfig.getRowFlushBoundary(),
|
tuningConfig.getRowFlushBoundary(),
|
||||||
tuningConfig.getMaxBytesInMemory(),
|
tuningConfig.getMaxBytesInMemory(),
|
||||||
tuningConfig.isLeaveIntermediate(),
|
tuningConfig.isLeaveIntermediate(),
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class KafkaIndexTaskTuningConfig extends SeekableStreamIndexTaskTuningCon
|
||||||
@JsonProperty("basePersistDirectory") @Nullable File basePersistDirectory,
|
@JsonProperty("basePersistDirectory") @Nullable File basePersistDirectory,
|
||||||
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
||||||
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
||||||
@JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
||||||
@Deprecated @JsonProperty("reportParseExceptions") @Nullable Boolean reportParseExceptions,
|
@Deprecated @JsonProperty("reportParseExceptions") @Nullable Boolean reportParseExceptions,
|
||||||
|
@ -62,6 +63,7 @@ public class KafkaIndexTaskTuningConfig extends SeekableStreamIndexTaskTuningCon
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
true,
|
true,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
@ -87,6 +89,7 @@ public class KafkaIndexTaskTuningConfig extends SeekableStreamIndexTaskTuningCon
|
||||||
dir,
|
dir,
|
||||||
getMaxPendingPersists(),
|
getMaxPendingPersists(),
|
||||||
getIndexSpec(),
|
getIndexSpec(),
|
||||||
|
getIndexSpecForIntermediatePersists(),
|
||||||
true,
|
true,
|
||||||
isReportParseExceptions(),
|
isReportParseExceptions(),
|
||||||
getHandoffConditionTimeout(),
|
getHandoffConditionTimeout(),
|
||||||
|
@ -112,6 +115,7 @@ public class KafkaIndexTaskTuningConfig extends SeekableStreamIndexTaskTuningCon
|
||||||
", basePersistDirectory=" + getBasePersistDirectory() +
|
", basePersistDirectory=" + getBasePersistDirectory() +
|
||||||
", maxPendingPersists=" + getMaxPendingPersists() +
|
", maxPendingPersists=" + getMaxPendingPersists() +
|
||||||
", indexSpec=" + getIndexSpec() +
|
", indexSpec=" + getIndexSpec() +
|
||||||
|
", indexSpecForIntermediatePersists=" + getIndexSpecForIntermediatePersists() +
|
||||||
", reportParseExceptions=" + isReportParseExceptions() +
|
", reportParseExceptions=" + isReportParseExceptions() +
|
||||||
", handoffConditionTimeout=" + getHandoffConditionTimeout() +
|
", handoffConditionTimeout=" + getHandoffConditionTimeout() +
|
||||||
", resetOffsetAutomatically=" + isResetOffsetAutomatically() +
|
", resetOffsetAutomatically=" + isResetOffsetAutomatically() +
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class KafkaSupervisorSpec extends SeekableStreamSupervisorSpec
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
null
|
null
|
||||||
),
|
),
|
||||||
ioConfig,
|
ioConfig,
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class KafkaSupervisorTuningConfig extends KafkaIndexTaskTuningConfig
|
||||||
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
||||||
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
||||||
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
||||||
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
||||||
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
||||||
|
@ -80,6 +81,7 @@ public class KafkaSupervisorTuningConfig extends KafkaIndexTaskTuningConfig
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
true,
|
true,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
@ -186,6 +188,7 @@ public class KafkaSupervisorTuningConfig extends KafkaIndexTaskTuningConfig
|
||||||
getBasePersistDirectory(),
|
getBasePersistDirectory(),
|
||||||
getMaxPendingPersists(),
|
getMaxPendingPersists(),
|
||||||
getIndexSpec(),
|
getIndexSpec(),
|
||||||
|
getIndexSpecForIntermediatePersists(),
|
||||||
true,
|
true,
|
||||||
isReportParseExceptions(),
|
isReportParseExceptions(),
|
||||||
getHandoffConditionTimeout(),
|
getHandoffConditionTimeout(),
|
||||||
|
|
|
@ -2456,6 +2456,7 @@ public class KafkaIndexTaskTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.apache.druid.indexing.kafka.supervisor.KafkaSupervisorTuningConfig;
|
||||||
import org.apache.druid.indexing.kafka.test.TestModifiedKafkaIndexTaskTuningConfig;
|
import org.apache.druid.indexing.kafka.test.TestModifiedKafkaIndexTaskTuningConfig;
|
||||||
import org.apache.druid.jackson.DefaultObjectMapper;
|
import org.apache.druid.jackson.DefaultObjectMapper;
|
||||||
import org.apache.druid.segment.IndexSpec;
|
import org.apache.druid.segment.IndexSpec;
|
||||||
|
import org.apache.druid.segment.data.CompressionStrategy;
|
||||||
import org.apache.druid.segment.indexing.TuningConfig;
|
import org.apache.druid.segment.indexing.TuningConfig;
|
||||||
import org.joda.time.Period;
|
import org.joda.time.Period;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
@ -65,6 +66,7 @@ public class KafkaIndexTaskTuningConfigTest
|
||||||
Assert.assertEquals(new Period("PT10M"), config.getIntermediatePersistPeriod());
|
Assert.assertEquals(new Period("PT10M"), config.getIntermediatePersistPeriod());
|
||||||
Assert.assertEquals(0, config.getMaxPendingPersists());
|
Assert.assertEquals(0, config.getMaxPendingPersists());
|
||||||
Assert.assertEquals(new IndexSpec(), config.getIndexSpec());
|
Assert.assertEquals(new IndexSpec(), config.getIndexSpec());
|
||||||
|
Assert.assertEquals(new IndexSpec(), config.getIndexSpecForIntermediatePersists());
|
||||||
Assert.assertEquals(false, config.isReportParseExceptions());
|
Assert.assertEquals(false, config.isReportParseExceptions());
|
||||||
Assert.assertEquals(0, config.getHandoffConditionTimeout());
|
Assert.assertEquals(0, config.getHandoffConditionTimeout());
|
||||||
}
|
}
|
||||||
|
@ -81,7 +83,9 @@ public class KafkaIndexTaskTuningConfigTest
|
||||||
+ " \"intermediatePersistPeriod\": \"PT1H\",\n"
|
+ " \"intermediatePersistPeriod\": \"PT1H\",\n"
|
||||||
+ " \"maxPendingPersists\": 100,\n"
|
+ " \"maxPendingPersists\": 100,\n"
|
||||||
+ " \"reportParseExceptions\": true,\n"
|
+ " \"reportParseExceptions\": true,\n"
|
||||||
+ " \"handoffConditionTimeout\": 100\n"
|
+ " \"handoffConditionTimeout\": 100,\n"
|
||||||
|
+ " \"indexSpec\": { \"metricCompression\" : \"NONE\" },\n"
|
||||||
|
+ " \"indexSpecForIntermediatePersists\": { \"dimensionCompression\" : \"uncompressed\" }\n"
|
||||||
+ "}";
|
+ "}";
|
||||||
|
|
||||||
KafkaIndexTaskTuningConfig config = (KafkaIndexTaskTuningConfig) mapper.readValue(
|
KafkaIndexTaskTuningConfig config = (KafkaIndexTaskTuningConfig) mapper.readValue(
|
||||||
|
@ -103,6 +107,8 @@ public class KafkaIndexTaskTuningConfigTest
|
||||||
Assert.assertEquals(100, config.getMaxPendingPersists());
|
Assert.assertEquals(100, config.getMaxPendingPersists());
|
||||||
Assert.assertEquals(true, config.isReportParseExceptions());
|
Assert.assertEquals(true, config.isReportParseExceptions());
|
||||||
Assert.assertEquals(100, config.getHandoffConditionTimeout());
|
Assert.assertEquals(100, config.getHandoffConditionTimeout());
|
||||||
|
Assert.assertEquals(new IndexSpec(null, null, CompressionStrategy.NONE, null), config.getIndexSpec());
|
||||||
|
Assert.assertEquals(new IndexSpec(null, CompressionStrategy.UNCOMPRESSED, null, null), config.getIndexSpecForIntermediatePersists());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -117,6 +123,7 @@ public class KafkaIndexTaskTuningConfigTest
|
||||||
new File("/tmp/xxx"),
|
new File("/tmp/xxx"),
|
||||||
4,
|
4,
|
||||||
new IndexSpec(),
|
new IndexSpec(),
|
||||||
|
new IndexSpec(),
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
5L,
|
5L,
|
||||||
|
@ -159,6 +166,7 @@ public class KafkaIndexTaskTuningConfigTest
|
||||||
new File("/tmp/xxx"),
|
new File("/tmp/xxx"),
|
||||||
4,
|
4,
|
||||||
new IndexSpec(),
|
new IndexSpec(),
|
||||||
|
new IndexSpec(),
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
5L,
|
5L,
|
||||||
|
@ -206,6 +214,7 @@ public class KafkaIndexTaskTuningConfigTest
|
||||||
new File("/tmp/xxx"),
|
new File("/tmp/xxx"),
|
||||||
4,
|
4,
|
||||||
new IndexSpec(),
|
new IndexSpec(),
|
||||||
|
new IndexSpec(),
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
5L,
|
5L,
|
||||||
|
@ -252,6 +261,7 @@ public class KafkaIndexTaskTuningConfigTest
|
||||||
config.getBasePersistDirectory(),
|
config.getBasePersistDirectory(),
|
||||||
0,
|
0,
|
||||||
config.getIndexSpec(),
|
config.getIndexSpec(),
|
||||||
|
config.getIndexSpecForIntermediatePersists(),
|
||||||
true,
|
true,
|
||||||
config.isReportParseExceptions(),
|
config.isReportParseExceptions(),
|
||||||
config.getHandoffConditionTimeout(),
|
config.getHandoffConditionTimeout(),
|
||||||
|
|
|
@ -213,6 +213,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
new File("/test"),
|
new File("/test"),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
|
@ -3051,6 +3052,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
new File("/test"),
|
new File("/test"),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -24,6 +24,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.apache.druid.indexing.kafka.KafkaIndexTaskModule;
|
import org.apache.druid.indexing.kafka.KafkaIndexTaskModule;
|
||||||
import org.apache.druid.jackson.DefaultObjectMapper;
|
import org.apache.druid.jackson.DefaultObjectMapper;
|
||||||
import org.apache.druid.segment.IndexSpec;
|
import org.apache.druid.segment.IndexSpec;
|
||||||
|
import org.apache.druid.segment.data.CompressionStrategy;
|
||||||
import org.apache.druid.segment.indexing.TuningConfig;
|
import org.apache.druid.segment.indexing.TuningConfig;
|
||||||
import org.joda.time.Duration;
|
import org.joda.time.Duration;
|
||||||
import org.joda.time.Period;
|
import org.joda.time.Period;
|
||||||
|
@ -63,6 +64,7 @@ public class KafkaSupervisorTuningConfigTest
|
||||||
Assert.assertEquals(new Period("PT10M"), config.getIntermediatePersistPeriod());
|
Assert.assertEquals(new Period("PT10M"), config.getIntermediatePersistPeriod());
|
||||||
Assert.assertEquals(0, config.getMaxPendingPersists());
|
Assert.assertEquals(0, config.getMaxPendingPersists());
|
||||||
Assert.assertEquals(new IndexSpec(), config.getIndexSpec());
|
Assert.assertEquals(new IndexSpec(), config.getIndexSpec());
|
||||||
|
Assert.assertEquals(new IndexSpec(), config.getIndexSpecForIntermediatePersists());
|
||||||
Assert.assertEquals(false, config.isReportParseExceptions());
|
Assert.assertEquals(false, config.isReportParseExceptions());
|
||||||
Assert.assertEquals(0, config.getHandoffConditionTimeout());
|
Assert.assertEquals(0, config.getHandoffConditionTimeout());
|
||||||
Assert.assertNull(config.getWorkerThreads());
|
Assert.assertNull(config.getWorkerThreads());
|
||||||
|
@ -90,7 +92,9 @@ public class KafkaSupervisorTuningConfigTest
|
||||||
+ " \"chatRetries\": 14,\n"
|
+ " \"chatRetries\": 14,\n"
|
||||||
+ " \"httpTimeout\": \"PT15S\",\n"
|
+ " \"httpTimeout\": \"PT15S\",\n"
|
||||||
+ " \"shutdownTimeout\": \"PT95S\",\n"
|
+ " \"shutdownTimeout\": \"PT95S\",\n"
|
||||||
+ " \"offsetFetchPeriod\": \"PT20S\"\n"
|
+ " \"offsetFetchPeriod\": \"PT20S\",\n"
|
||||||
|
+ " \"indexSpec\": { \"metricCompression\" : \"NONE\" },\n"
|
||||||
|
+ " \"indexSpecForIntermediatePersists\": { \"dimensionCompression\" : \"uncompressed\" }\n"
|
||||||
+ "}";
|
+ "}";
|
||||||
|
|
||||||
KafkaSupervisorTuningConfig config = (KafkaSupervisorTuningConfig) mapper.readValue(
|
KafkaSupervisorTuningConfig config = (KafkaSupervisorTuningConfig) mapper.readValue(
|
||||||
|
@ -116,6 +120,8 @@ public class KafkaSupervisorTuningConfigTest
|
||||||
Assert.assertEquals(Duration.standardSeconds(15), config.getHttpTimeout());
|
Assert.assertEquals(Duration.standardSeconds(15), config.getHttpTimeout());
|
||||||
Assert.assertEquals(Duration.standardSeconds(95), config.getShutdownTimeout());
|
Assert.assertEquals(Duration.standardSeconds(95), config.getShutdownTimeout());
|
||||||
Assert.assertEquals(Duration.standardSeconds(20), config.getOffsetFetchPeriod());
|
Assert.assertEquals(Duration.standardSeconds(20), config.getOffsetFetchPeriod());
|
||||||
|
Assert.assertEquals(new IndexSpec(null, null, CompressionStrategy.NONE, null), config.getIndexSpec());
|
||||||
|
Assert.assertEquals(new IndexSpec(null, CompressionStrategy.UNCOMPRESSED, null, null), config.getIndexSpecForIntermediatePersists());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class TestModifiedKafkaIndexTaskTuningConfig extends KafkaIndexTaskTuning
|
||||||
@JsonProperty("basePersistDirectory") @Nullable File basePersistDirectory,
|
@JsonProperty("basePersistDirectory") @Nullable File basePersistDirectory,
|
||||||
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
||||||
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
||||||
@JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
||||||
@Deprecated @JsonProperty("reportParseExceptions") @Nullable Boolean reportParseExceptions,
|
@Deprecated @JsonProperty("reportParseExceptions") @Nullable Boolean reportParseExceptions,
|
||||||
|
@ -67,6 +68,7 @@ public class TestModifiedKafkaIndexTaskTuningConfig extends KafkaIndexTaskTuning
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
true,
|
true,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class KinesisIndexTaskTuningConfig extends SeekableStreamIndexTaskTuningC
|
||||||
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
||||||
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
||||||
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
||||||
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
||||||
@JsonProperty("handoffConditionTimeout") Long handoffConditionTimeout,
|
@JsonProperty("handoffConditionTimeout") Long handoffConditionTimeout,
|
||||||
|
@ -85,6 +86,7 @@ public class KinesisIndexTaskTuningConfig extends SeekableStreamIndexTaskTuningC
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
true,
|
true,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
@ -160,6 +162,7 @@ public class KinesisIndexTaskTuningConfig extends SeekableStreamIndexTaskTuningC
|
||||||
dir,
|
dir,
|
||||||
getMaxPendingPersists(),
|
getMaxPendingPersists(),
|
||||||
getIndexSpec(),
|
getIndexSpec(),
|
||||||
|
getIndexSpecForIntermediatePersists(),
|
||||||
true,
|
true,
|
||||||
isReportParseExceptions(),
|
isReportParseExceptions(),
|
||||||
getHandoffConditionTimeout(),
|
getHandoffConditionTimeout(),
|
||||||
|
|
|
@ -96,6 +96,7 @@ public class KinesisSupervisorSpec extends SeekableStreamSupervisorSpec
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
null
|
null
|
||||||
),
|
),
|
||||||
ioConfig,
|
ioConfig,
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class KinesisSupervisorTuningConfig extends KinesisIndexTaskTuningConfig
|
||||||
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
||||||
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
||||||
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
||||||
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
||||||
@JsonProperty("handoffConditionTimeout") Long handoffConditionTimeout,
|
@JsonProperty("handoffConditionTimeout") Long handoffConditionTimeout,
|
||||||
|
@ -81,6 +82,7 @@ public class KinesisSupervisorTuningConfig extends KinesisIndexTaskTuningConfig
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
buildV9Directly,
|
buildV9Directly,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
@ -191,6 +193,7 @@ public class KinesisSupervisorTuningConfig extends KinesisIndexTaskTuningConfig
|
||||||
getBasePersistDirectory(),
|
getBasePersistDirectory(),
|
||||||
getMaxPendingPersists(),
|
getMaxPendingPersists(),
|
||||||
getIndexSpec(),
|
getIndexSpec(),
|
||||||
|
getIndexSpecForIntermediatePersists(),
|
||||||
true,
|
true,
|
||||||
isReportParseExceptions(),
|
isReportParseExceptions(),
|
||||||
getHandoffConditionTimeout(),
|
getHandoffConditionTimeout(),
|
||||||
|
|
|
@ -2629,6 +2629,7 @@ public class KinesisIndexTaskTest extends EasyMockSupport
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
|
|
@ -144,6 +144,7 @@ public class KinesisIndexTaskTuningConfigTest
|
||||||
new File("/tmp/xxx"),
|
new File("/tmp/xxx"),
|
||||||
4,
|
4,
|
||||||
new IndexSpec(),
|
new IndexSpec(),
|
||||||
|
new IndexSpec(),
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
5L,
|
5L,
|
||||||
|
@ -202,6 +203,7 @@ public class KinesisIndexTaskTuningConfigTest
|
||||||
new File("/tmp/xxx"),
|
new File("/tmp/xxx"),
|
||||||
4,
|
4,
|
||||||
new IndexSpec(),
|
new IndexSpec(),
|
||||||
|
new IndexSpec(),
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
5L,
|
5L,
|
||||||
|
@ -288,6 +290,7 @@ public class KinesisIndexTaskTuningConfigTest
|
||||||
new File("/tmp/xxx"),
|
new File("/tmp/xxx"),
|
||||||
4,
|
4,
|
||||||
new IndexSpec(),
|
new IndexSpec(),
|
||||||
|
new IndexSpec(),
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
5L,
|
5L,
|
||||||
|
|
|
@ -168,6 +168,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
new File("/test"),
|
new File("/test"),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
|
@ -3678,6 +3679,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
new File("/test"),
|
new File("/test"),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class TestModifiedKinesisIndexTaskTuningConfig extends KinesisIndexTaskTu
|
||||||
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
@JsonProperty("basePersistDirectory") File basePersistDirectory,
|
||||||
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
||||||
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
||||||
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
||||||
@JsonProperty("handoffConditionTimeout") Long handoffConditionTimeout,
|
@JsonProperty("handoffConditionTimeout") Long handoffConditionTimeout,
|
||||||
|
@ -73,6 +74,7 @@ public class TestModifiedKinesisIndexTaskTuningConfig extends KinesisIndexTaskTu
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
buildV9Directly,
|
buildV9Directly,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
|
@ -104,6 +106,7 @@ public class TestModifiedKinesisIndexTaskTuningConfig extends KinesisIndexTaskTu
|
||||||
base.getBasePersistDirectory(),
|
base.getBasePersistDirectory(),
|
||||||
base.getMaxPendingPersists(),
|
base.getMaxPendingPersists(),
|
||||||
base.getIndexSpec(),
|
base.getIndexSpec(),
|
||||||
|
base.getIndexSpecForIntermediatePersists(),
|
||||||
base.getBuildV9Directly(),
|
base.getBuildV9Directly(),
|
||||||
base.isReportParseExceptions(),
|
base.isReportParseExceptions(),
|
||||||
base.getHandoffConditionTimeout(),
|
base.getHandoffConditionTimeout(),
|
||||||
|
|
|
@ -299,6 +299,11 @@ public class HadoopDruidIndexerConfig
|
||||||
return schema.getTuningConfig().getIndexSpec();
|
return schema.getTuningConfig().getIndexSpec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IndexSpec getIndexSpecForIntermediatePersists()
|
||||||
|
{
|
||||||
|
return schema.getTuningConfig().getIndexSpecForIntermediatePersists();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isOverwriteFiles()
|
public boolean isOverwriteFiles()
|
||||||
{
|
{
|
||||||
return schema.getTuningConfig().isOverwriteFiles();
|
return schema.getTuningConfig().isOverwriteFiles();
|
||||||
|
|
|
@ -55,6 +55,7 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
DEFAULT_PARTITIONS_SPEC,
|
DEFAULT_PARTITIONS_SPEC,
|
||||||
DEFAULT_SHARD_SPECS,
|
DEFAULT_SHARD_SPECS,
|
||||||
DEFAULT_INDEX_SPEC,
|
DEFAULT_INDEX_SPEC,
|
||||||
|
DEFAULT_INDEX_SPEC,
|
||||||
DEFAULT_ROW_FLUSH_BOUNDARY,
|
DEFAULT_ROW_FLUSH_BOUNDARY,
|
||||||
0L,
|
0L,
|
||||||
false,
|
false,
|
||||||
|
@ -81,6 +82,7 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
private final PartitionsSpec partitionsSpec;
|
private final PartitionsSpec partitionsSpec;
|
||||||
private final Map<Long, List<HadoopyShardSpec>> shardSpecs;
|
private final Map<Long, List<HadoopyShardSpec>> shardSpecs;
|
||||||
private final IndexSpec indexSpec;
|
private final IndexSpec indexSpec;
|
||||||
|
private final IndexSpec indexSpecForIntermediatePersists;
|
||||||
private final int rowFlushBoundary;
|
private final int rowFlushBoundary;
|
||||||
private final long maxBytesInMemory;
|
private final long maxBytesInMemory;
|
||||||
private final boolean leaveIntermediate;
|
private final boolean leaveIntermediate;
|
||||||
|
@ -105,6 +107,7 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
final @JsonProperty("partitionsSpec") PartitionsSpec partitionsSpec,
|
final @JsonProperty("partitionsSpec") PartitionsSpec partitionsSpec,
|
||||||
final @JsonProperty("shardSpecs") Map<Long, List<HadoopyShardSpec>> shardSpecs,
|
final @JsonProperty("shardSpecs") Map<Long, List<HadoopyShardSpec>> shardSpecs,
|
||||||
final @JsonProperty("indexSpec") IndexSpec indexSpec,
|
final @JsonProperty("indexSpec") IndexSpec indexSpec,
|
||||||
|
final @JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
final @JsonProperty("maxRowsInMemory") Integer maxRowsInMemory,
|
final @JsonProperty("maxRowsInMemory") Integer maxRowsInMemory,
|
||||||
final @JsonProperty("maxBytesInMemory") Long maxBytesInMemory,
|
final @JsonProperty("maxBytesInMemory") Long maxBytesInMemory,
|
||||||
final @JsonProperty("leaveIntermediate") boolean leaveIntermediate,
|
final @JsonProperty("leaveIntermediate") boolean leaveIntermediate,
|
||||||
|
@ -132,6 +135,8 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
this.partitionsSpec = partitionsSpec == null ? DEFAULT_PARTITIONS_SPEC : partitionsSpec;
|
this.partitionsSpec = partitionsSpec == null ? DEFAULT_PARTITIONS_SPEC : partitionsSpec;
|
||||||
this.shardSpecs = shardSpecs == null ? DEFAULT_SHARD_SPECS : shardSpecs;
|
this.shardSpecs = shardSpecs == null ? DEFAULT_SHARD_SPECS : shardSpecs;
|
||||||
this.indexSpec = indexSpec == null ? DEFAULT_INDEX_SPEC : indexSpec;
|
this.indexSpec = indexSpec == null ? DEFAULT_INDEX_SPEC : indexSpec;
|
||||||
|
this.indexSpecForIntermediatePersists = indexSpecForIntermediatePersists == null ?
|
||||||
|
this.indexSpec : indexSpecForIntermediatePersists;
|
||||||
this.rowFlushBoundary = maxRowsInMemory == null ? maxRowsInMemoryCOMPAT == null
|
this.rowFlushBoundary = maxRowsInMemory == null ? maxRowsInMemoryCOMPAT == null
|
||||||
? DEFAULT_ROW_FLUSH_BOUNDARY
|
? DEFAULT_ROW_FLUSH_BOUNDARY
|
||||||
: maxRowsInMemoryCOMPAT : maxRowsInMemory;
|
: maxRowsInMemoryCOMPAT : maxRowsInMemory;
|
||||||
|
@ -199,6 +204,12 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
return indexSpec;
|
return indexSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
public IndexSpec getIndexSpecForIntermediatePersists()
|
||||||
|
{
|
||||||
|
return indexSpecForIntermediatePersists;
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty("maxRowsInMemory")
|
@JsonProperty("maxRowsInMemory")
|
||||||
public int getRowFlushBoundary()
|
public int getRowFlushBoundary()
|
||||||
{
|
{
|
||||||
|
@ -314,6 +325,7 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
partitionsSpec,
|
partitionsSpec,
|
||||||
shardSpecs,
|
shardSpecs,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
rowFlushBoundary,
|
rowFlushBoundary,
|
||||||
maxBytesInMemory,
|
maxBytesInMemory,
|
||||||
leaveIntermediate,
|
leaveIntermediate,
|
||||||
|
@ -343,6 +355,7 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
partitionsSpec,
|
partitionsSpec,
|
||||||
shardSpecs,
|
shardSpecs,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
rowFlushBoundary,
|
rowFlushBoundary,
|
||||||
maxBytesInMemory,
|
maxBytesInMemory,
|
||||||
leaveIntermediate,
|
leaveIntermediate,
|
||||||
|
@ -372,6 +385,7 @@ public class HadoopTuningConfig implements TuningConfig
|
||||||
partitionsSpec,
|
partitionsSpec,
|
||||||
specs,
|
specs,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
rowFlushBoundary,
|
rowFlushBoundary,
|
||||||
maxBytesInMemory,
|
maxBytesInMemory,
|
||||||
leaveIntermediate,
|
leaveIntermediate,
|
||||||
|
|
|
@ -605,7 +605,7 @@ public class IndexGeneratorJob implements Jobby
|
||||||
) throws IOException
|
) throws IOException
|
||||||
{
|
{
|
||||||
return HadoopDruidIndexerConfig.INDEX_MERGER_V9
|
return HadoopDruidIndexerConfig.INDEX_MERGER_V9
|
||||||
.persist(index, interval, file, config.getIndexSpec(), progressIndicator, null);
|
.persist(index, interval, file, config.getIndexSpecForIntermediatePersists(), progressIndicator, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected File mergeQueryableIndex(
|
protected File mergeQueryableIndex(
|
||||||
|
|
|
@ -462,6 +462,7 @@ public class BatchDeltaIngestionTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -199,6 +199,7 @@ public class DetermineHashedPartitionsJobTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -262,6 +262,7 @@ public class DeterminePartitionsJobTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class HadoopDruidIndexerConfigTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
@ -164,6 +165,7 @@ public class HadoopDruidIndexerConfigTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class HadoopTuningConfigTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
100,
|
100,
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
|
@ -70,6 +71,7 @@ public class HadoopTuningConfigTest
|
||||||
Assert.assertNotNull(actual.getPartitionsSpec());
|
Assert.assertNotNull(actual.getPartitionsSpec());
|
||||||
Assert.assertEquals(ImmutableMap.<Long, List<HadoopyShardSpec>>of(), actual.getShardSpecs());
|
Assert.assertEquals(ImmutableMap.<Long, List<HadoopyShardSpec>>of(), actual.getShardSpecs());
|
||||||
Assert.assertEquals(new IndexSpec(), actual.getIndexSpec());
|
Assert.assertEquals(new IndexSpec(), actual.getIndexSpec());
|
||||||
|
Assert.assertEquals(new IndexSpec(), actual.getIndexSpecForIntermediatePersists());
|
||||||
Assert.assertEquals(100, actual.getRowFlushBoundary());
|
Assert.assertEquals(100, actual.getRowFlushBoundary());
|
||||||
Assert.assertEquals(true, actual.isLeaveIntermediate());
|
Assert.assertEquals(true, actual.isLeaveIntermediate());
|
||||||
Assert.assertEquals(true, actual.isCleanupOnFailure());
|
Assert.assertEquals(true, actual.isCleanupOnFailure());
|
||||||
|
|
|
@ -521,6 +521,7 @@ public class IndexGeneratorJobTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
maxRowsInMemory,
|
maxRowsInMemory,
|
||||||
maxBytesInMemory,
|
maxBytesInMemory,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -114,6 +114,7 @@ public class JobHelperTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class GranularityPathSpecTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class RealtimeAppenderatorTuningConfig implements TuningConfig, Appendera
|
||||||
private final int maxPendingPersists;
|
private final int maxPendingPersists;
|
||||||
private final ShardSpec shardSpec;
|
private final ShardSpec shardSpec;
|
||||||
private final IndexSpec indexSpec;
|
private final IndexSpec indexSpec;
|
||||||
|
private final IndexSpec indexSpecForIntermediatePersists;
|
||||||
private final boolean reportParseExceptions;
|
private final boolean reportParseExceptions;
|
||||||
private final long publishAndHandoffTimeout;
|
private final long publishAndHandoffTimeout;
|
||||||
private final long alertTimeout;
|
private final long alertTimeout;
|
||||||
|
@ -84,6 +85,7 @@ public class RealtimeAppenderatorTuningConfig implements TuningConfig, Appendera
|
||||||
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
||||||
@JsonProperty("shardSpec") ShardSpec shardSpec,
|
@JsonProperty("shardSpec") ShardSpec shardSpec,
|
||||||
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
@JsonProperty("reportParseExceptions") Boolean reportParseExceptions,
|
||||||
@JsonProperty("publishAndHandoffTimeout") Long publishAndHandoffTimeout,
|
@JsonProperty("publishAndHandoffTimeout") Long publishAndHandoffTimeout,
|
||||||
@JsonProperty("alertTimeout") Long alertTimeout,
|
@JsonProperty("alertTimeout") Long alertTimeout,
|
||||||
|
@ -106,6 +108,8 @@ public class RealtimeAppenderatorTuningConfig implements TuningConfig, Appendera
|
||||||
this.maxPendingPersists = maxPendingPersists == null ? defaultMaxPendingPersists : maxPendingPersists;
|
this.maxPendingPersists = maxPendingPersists == null ? defaultMaxPendingPersists : maxPendingPersists;
|
||||||
this.shardSpec = shardSpec == null ? defaultShardSpec : shardSpec;
|
this.shardSpec = shardSpec == null ? defaultShardSpec : shardSpec;
|
||||||
this.indexSpec = indexSpec == null ? defaultIndexSpec : indexSpec;
|
this.indexSpec = indexSpec == null ? defaultIndexSpec : indexSpec;
|
||||||
|
this.indexSpecForIntermediatePersists = indexSpecForIntermediatePersists == null ?
|
||||||
|
this.indexSpec : indexSpecForIntermediatePersists;
|
||||||
this.reportParseExceptions = reportParseExceptions == null
|
this.reportParseExceptions = reportParseExceptions == null
|
||||||
? defaultReportParseExceptions
|
? defaultReportParseExceptions
|
||||||
: reportParseExceptions;
|
: reportParseExceptions;
|
||||||
|
@ -196,6 +200,13 @@ public class RealtimeAppenderatorTuningConfig implements TuningConfig, Appendera
|
||||||
return indexSpec;
|
return indexSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@Override
|
||||||
|
public IndexSpec getIndexSpecForIntermediatePersists()
|
||||||
|
{
|
||||||
|
return indexSpecForIntermediatePersists;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
public boolean isReportParseExceptions()
|
public boolean isReportParseExceptions()
|
||||||
|
@ -253,6 +264,7 @@ public class RealtimeAppenderatorTuningConfig implements TuningConfig, Appendera
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
shardSpec,
|
shardSpec,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
publishAndHandoffTimeout,
|
publishAndHandoffTimeout,
|
||||||
alertTimeout,
|
alertTimeout,
|
||||||
|
|
|
@ -236,7 +236,7 @@ public class YeOldePlumberSchool implements PlumberSchool
|
||||||
indexMergerV9.persist(
|
indexMergerV9.persist(
|
||||||
indexToPersist.getIndex(),
|
indexToPersist.getIndex(),
|
||||||
dirToPersist,
|
dirToPersist,
|
||||||
config.getIndexSpec(),
|
config.getIndexSpecForIntermediatePersists(),
|
||||||
config.getSegmentWriteOutMediumFactory()
|
config.getSegmentWriteOutMediumFactory()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1270,6 +1270,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
private final Integer numShards;
|
private final Integer numShards;
|
||||||
private final List<String> partitionDimensions;
|
private final List<String> partitionDimensions;
|
||||||
private final IndexSpec indexSpec;
|
private final IndexSpec indexSpec;
|
||||||
|
private final IndexSpec indexSpecForIntermediatePersists;
|
||||||
private final File basePersistDirectory;
|
private final File basePersistDirectory;
|
||||||
private final int maxPendingPersists;
|
private final int maxPendingPersists;
|
||||||
|
|
||||||
|
@ -1305,6 +1306,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
@JsonProperty("numShards") @Nullable Integer numShards,
|
@JsonProperty("numShards") @Nullable Integer numShards,
|
||||||
@JsonProperty("partitionDimensions") @Nullable List<String> partitionDimensions,
|
@JsonProperty("partitionDimensions") @Nullable List<String> partitionDimensions,
|
||||||
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
||||||
// This parameter is left for compatibility when reading existing JSONs, to be removed in Druid 0.12.
|
// This parameter is left for compatibility when reading existing JSONs, to be removed in Druid 0.12.
|
||||||
@JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
||||||
|
@ -1327,6 +1329,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
numShards,
|
numShards,
|
||||||
partitionDimensions,
|
partitionDimensions,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
forceGuaranteedRollup,
|
forceGuaranteedRollup,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
|
@ -1346,7 +1349,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
|
|
||||||
private IndexTuningConfig()
|
private IndexTuningConfig()
|
||||||
{
|
{
|
||||||
this(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
|
this(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IndexTuningConfig(
|
private IndexTuningConfig(
|
||||||
|
@ -1357,6 +1360,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
@Nullable Integer numShards,
|
@Nullable Integer numShards,
|
||||||
@Nullable List<String> partitionDimensions,
|
@Nullable List<String> partitionDimensions,
|
||||||
@Nullable IndexSpec indexSpec,
|
@Nullable IndexSpec indexSpec,
|
||||||
|
@Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
@Nullable Integer maxPendingPersists,
|
@Nullable Integer maxPendingPersists,
|
||||||
@Nullable Boolean forceGuaranteedRollup,
|
@Nullable Boolean forceGuaranteedRollup,
|
||||||
@Nullable Boolean reportParseExceptions,
|
@Nullable Boolean reportParseExceptions,
|
||||||
|
@ -1384,6 +1388,8 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
this.numShards = numShards == null || numShards.equals(-1) ? null : numShards;
|
this.numShards = numShards == null || numShards.equals(-1) ? null : numShards;
|
||||||
this.partitionDimensions = partitionDimensions == null ? Collections.emptyList() : partitionDimensions;
|
this.partitionDimensions = partitionDimensions == null ? Collections.emptyList() : partitionDimensions;
|
||||||
this.indexSpec = indexSpec == null ? DEFAULT_INDEX_SPEC : indexSpec;
|
this.indexSpec = indexSpec == null ? DEFAULT_INDEX_SPEC : indexSpec;
|
||||||
|
this.indexSpecForIntermediatePersists = indexSpecForIntermediatePersists == null ?
|
||||||
|
this.indexSpec : indexSpecForIntermediatePersists;
|
||||||
this.maxPendingPersists = maxPendingPersists == null ? DEFAULT_MAX_PENDING_PERSISTS : maxPendingPersists;
|
this.maxPendingPersists = maxPendingPersists == null ? DEFAULT_MAX_PENDING_PERSISTS : maxPendingPersists;
|
||||||
this.forceGuaranteedRollup = forceGuaranteedRollup == null ? DEFAULT_GUARANTEE_ROLLUP : forceGuaranteedRollup;
|
this.forceGuaranteedRollup = forceGuaranteedRollup == null ? DEFAULT_GUARANTEE_ROLLUP : forceGuaranteedRollup;
|
||||||
this.reportParseExceptions = reportParseExceptions == null
|
this.reportParseExceptions = reportParseExceptions == null
|
||||||
|
@ -1420,6 +1426,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
numShards,
|
numShards,
|
||||||
partitionDimensions,
|
partitionDimensions,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
forceGuaranteedRollup,
|
forceGuaranteedRollup,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
|
@ -1442,6 +1449,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
numShards,
|
numShards,
|
||||||
partitionDimensions,
|
partitionDimensions,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
forceGuaranteedRollup,
|
forceGuaranteedRollup,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
|
@ -1464,6 +1472,7 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
numShards,
|
numShards,
|
||||||
partitionDimensions,
|
partitionDimensions,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
forceGuaranteedRollup,
|
forceGuaranteedRollup,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
|
@ -1533,6 +1542,13 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
return indexSpec;
|
return indexSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@Override
|
||||||
|
public IndexSpec getIndexSpecForIntermediatePersists()
|
||||||
|
{
|
||||||
|
return indexSpecForIntermediatePersists;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public File getBasePersistDirectory()
|
public File getBasePersistDirectory()
|
||||||
{
|
{
|
||||||
|
@ -1618,19 +1634,22 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
}
|
}
|
||||||
IndexTuningConfig that = (IndexTuningConfig) o;
|
IndexTuningConfig that = (IndexTuningConfig) o;
|
||||||
return maxRowsInMemory == that.maxRowsInMemory &&
|
return maxRowsInMemory == that.maxRowsInMemory &&
|
||||||
Objects.equals(maxTotalRows, that.maxTotalRows) &&
|
maxBytesInMemory == that.maxBytesInMemory &&
|
||||||
maxPendingPersists == that.maxPendingPersists &&
|
maxPendingPersists == that.maxPendingPersists &&
|
||||||
forceGuaranteedRollup == that.forceGuaranteedRollup &&
|
forceGuaranteedRollup == that.forceGuaranteedRollup &&
|
||||||
reportParseExceptions == that.reportParseExceptions &&
|
reportParseExceptions == that.reportParseExceptions &&
|
||||||
pushTimeout == that.pushTimeout &&
|
pushTimeout == that.pushTimeout &&
|
||||||
Objects.equals(maxRowsPerSegment, that.maxRowsPerSegment) &&
|
|
||||||
Objects.equals(numShards, that.numShards) &&
|
|
||||||
Objects.equals(indexSpec, that.indexSpec) &&
|
|
||||||
Objects.equals(basePersistDirectory, that.basePersistDirectory) &&
|
|
||||||
Objects.equals(segmentWriteOutMediumFactory, that.segmentWriteOutMediumFactory) &&
|
|
||||||
logParseExceptions == that.logParseExceptions &&
|
logParseExceptions == that.logParseExceptions &&
|
||||||
maxParseExceptions == that.maxParseExceptions &&
|
maxParseExceptions == that.maxParseExceptions &&
|
||||||
maxSavedParseExceptions == that.maxSavedParseExceptions;
|
maxSavedParseExceptions == that.maxSavedParseExceptions &&
|
||||||
|
Objects.equals(maxRowsPerSegment, that.maxRowsPerSegment) &&
|
||||||
|
Objects.equals(maxTotalRows, that.maxTotalRows) &&
|
||||||
|
Objects.equals(numShards, that.numShards) &&
|
||||||
|
Objects.equals(partitionDimensions, that.partitionDimensions) &&
|
||||||
|
Objects.equals(indexSpec, that.indexSpec) &&
|
||||||
|
Objects.equals(indexSpecForIntermediatePersists, that.indexSpecForIntermediatePersists) &&
|
||||||
|
Objects.equals(basePersistDirectory, that.basePersistDirectory) &&
|
||||||
|
Objects.equals(segmentWriteOutMediumFactory, that.segmentWriteOutMediumFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1639,18 +1658,21 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
maxRowsPerSegment,
|
maxRowsPerSegment,
|
||||||
maxRowsInMemory,
|
maxRowsInMemory,
|
||||||
|
maxBytesInMemory,
|
||||||
maxTotalRows,
|
maxTotalRows,
|
||||||
numShards,
|
numShards,
|
||||||
|
partitionDimensions,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
forceGuaranteedRollup,
|
forceGuaranteedRollup,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
pushTimeout,
|
pushTimeout,
|
||||||
segmentWriteOutMediumFactory,
|
|
||||||
logParseExceptions,
|
logParseExceptions,
|
||||||
maxParseExceptions,
|
maxParseExceptions,
|
||||||
maxSavedParseExceptions
|
maxSavedParseExceptions,
|
||||||
|
segmentWriteOutMediumFactory
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1663,7 +1685,9 @@ public class IndexTask extends AbstractTask implements ChatHandler
|
||||||
", maxBytesInMemory=" + maxBytesInMemory +
|
", maxBytesInMemory=" + maxBytesInMemory +
|
||||||
", maxTotalRows=" + maxTotalRows +
|
", maxTotalRows=" + maxTotalRows +
|
||||||
", numShards=" + numShards +
|
", numShards=" + numShards +
|
||||||
|
", partitionDimensions=" + partitionDimensions +
|
||||||
", indexSpec=" + indexSpec +
|
", indexSpec=" + indexSpec +
|
||||||
|
", indexSpecForIntermediatePersists=" + indexSpecForIntermediatePersists +
|
||||||
", basePersistDirectory=" + basePersistDirectory +
|
", basePersistDirectory=" + basePersistDirectory +
|
||||||
", maxPendingPersists=" + maxPendingPersists +
|
", maxPendingPersists=" + maxPendingPersists +
|
||||||
", forceGuaranteedRollup=" + forceGuaranteedRollup +
|
", forceGuaranteedRollup=" + forceGuaranteedRollup +
|
||||||
|
|
|
@ -333,6 +333,7 @@ public class ParallelIndexSupervisorTask extends AbstractTask implements ChatHan
|
||||||
tuningConfig.getNumShards(),
|
tuningConfig.getNumShards(),
|
||||||
null,
|
null,
|
||||||
tuningConfig.getIndexSpec(),
|
tuningConfig.getIndexSpec(),
|
||||||
|
tuningConfig.getIndexSpecForIntermediatePersists(),
|
||||||
tuningConfig.getMaxPendingPersists(),
|
tuningConfig.getMaxPendingPersists(),
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -71,6 +71,7 @@ public class ParallelIndexTuningConfig extends IndexTuningConfig
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -84,6 +85,7 @@ public class ParallelIndexTuningConfig extends IndexTuningConfig
|
||||||
@JsonProperty("maxTotalRows") @Nullable Long maxTotalRows,
|
@JsonProperty("maxTotalRows") @Nullable Long maxTotalRows,
|
||||||
@JsonProperty("numShards") @Nullable Integer numShards,
|
@JsonProperty("numShards") @Nullable Integer numShards,
|
||||||
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
@JsonProperty("indexSpec") @Nullable IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") @Nullable Integer maxPendingPersists,
|
||||||
@JsonProperty("forceGuaranteedRollup") @Nullable Boolean forceGuaranteedRollup,
|
@JsonProperty("forceGuaranteedRollup") @Nullable Boolean forceGuaranteedRollup,
|
||||||
@JsonProperty("reportParseExceptions") @Nullable Boolean reportParseExceptions,
|
@JsonProperty("reportParseExceptions") @Nullable Boolean reportParseExceptions,
|
||||||
|
@ -109,6 +111,7 @@ public class ParallelIndexTuningConfig extends IndexTuningConfig
|
||||||
numShards,
|
numShards,
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
null,
|
null,
|
||||||
forceGuaranteedRollup,
|
forceGuaranteedRollup,
|
||||||
|
@ -188,7 +191,6 @@ public class ParallelIndexTuningConfig extends IndexTuningConfig
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
|
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
super.hashCode(),
|
super.hashCode(),
|
||||||
maxNumSubTasks,
|
maxNumSubTasks,
|
||||||
|
|
|
@ -47,6 +47,7 @@ public abstract class SeekableStreamIndexTaskTuningConfig implements TuningConfi
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private final int maxPendingPersists;
|
private final int maxPendingPersists;
|
||||||
private final IndexSpec indexSpec;
|
private final IndexSpec indexSpec;
|
||||||
|
private final IndexSpec indexSpecForIntermediatePersists;
|
||||||
private final boolean reportParseExceptions;
|
private final boolean reportParseExceptions;
|
||||||
private final long handoffConditionTimeout;
|
private final long handoffConditionTimeout;
|
||||||
private final boolean resetOffsetAutomatically;
|
private final boolean resetOffsetAutomatically;
|
||||||
|
@ -68,6 +69,7 @@ public abstract class SeekableStreamIndexTaskTuningConfig implements TuningConfi
|
||||||
@Nullable File basePersistDirectory,
|
@Nullable File basePersistDirectory,
|
||||||
@Nullable Integer maxPendingPersists,
|
@Nullable Integer maxPendingPersists,
|
||||||
@Nullable IndexSpec indexSpec,
|
@Nullable IndexSpec indexSpec,
|
||||||
|
@Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
||||||
@Deprecated @JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
@Deprecated @JsonProperty("buildV9Directly") @Nullable Boolean buildV9Directly,
|
||||||
@Deprecated @Nullable Boolean reportParseExceptions,
|
@Deprecated @Nullable Boolean reportParseExceptions,
|
||||||
|
@ -96,6 +98,8 @@ public abstract class SeekableStreamIndexTaskTuningConfig implements TuningConfi
|
||||||
this.basePersistDirectory = defaults.getBasePersistDirectory();
|
this.basePersistDirectory = defaults.getBasePersistDirectory();
|
||||||
this.maxPendingPersists = maxPendingPersists == null ? 0 : maxPendingPersists;
|
this.maxPendingPersists = maxPendingPersists == null ? 0 : maxPendingPersists;
|
||||||
this.indexSpec = indexSpec == null ? defaults.getIndexSpec() : indexSpec;
|
this.indexSpec = indexSpec == null ? defaults.getIndexSpec() : indexSpec;
|
||||||
|
this.indexSpecForIntermediatePersists = indexSpecForIntermediatePersists == null ?
|
||||||
|
this.indexSpec : indexSpecForIntermediatePersists;
|
||||||
this.reportParseExceptions = reportParseExceptions == null
|
this.reportParseExceptions = reportParseExceptions == null
|
||||||
? defaults.isReportParseExceptions()
|
? defaults.isReportParseExceptions()
|
||||||
: reportParseExceptions;
|
: reportParseExceptions;
|
||||||
|
@ -187,6 +191,13 @@ public abstract class SeekableStreamIndexTaskTuningConfig implements TuningConfi
|
||||||
return indexSpec;
|
return indexSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@Override
|
||||||
|
public IndexSpec getIndexSpecForIntermediatePersists()
|
||||||
|
{
|
||||||
|
return indexSpecForIntermediatePersists;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Always returns true, doesn't affect the version being built.
|
* Always returns true, doesn't affect the version being built.
|
||||||
*/
|
*/
|
||||||
|
@ -281,6 +292,7 @@ public abstract class SeekableStreamIndexTaskTuningConfig implements TuningConfi
|
||||||
Objects.equals(intermediatePersistPeriod, that.intermediatePersistPeriod) &&
|
Objects.equals(intermediatePersistPeriod, that.intermediatePersistPeriod) &&
|
||||||
Objects.equals(basePersistDirectory, that.basePersistDirectory) &&
|
Objects.equals(basePersistDirectory, that.basePersistDirectory) &&
|
||||||
Objects.equals(indexSpec, that.indexSpec) &&
|
Objects.equals(indexSpec, that.indexSpec) &&
|
||||||
|
Objects.equals(indexSpecForIntermediatePersists, that.indexSpecForIntermediatePersists) &&
|
||||||
Objects.equals(segmentWriteOutMediumFactory, that.segmentWriteOutMediumFactory) &&
|
Objects.equals(segmentWriteOutMediumFactory, that.segmentWriteOutMediumFactory) &&
|
||||||
Objects.equals(intermediateHandoffPeriod, that.intermediateHandoffPeriod);
|
Objects.equals(intermediateHandoffPeriod, that.intermediateHandoffPeriod);
|
||||||
}
|
}
|
||||||
|
@ -297,6 +309,7 @@ public abstract class SeekableStreamIndexTaskTuningConfig implements TuningConfi
|
||||||
basePersistDirectory,
|
basePersistDirectory,
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffConditionTimeout,
|
handoffConditionTimeout,
|
||||||
resetOffsetAutomatically,
|
resetOffsetAutomatically,
|
||||||
|
|
|
@ -1416,6 +1416,7 @@ public class AppenderatorDriverRealtimeIndexTaskTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
reportParseExceptions,
|
reportParseExceptions,
|
||||||
handoffTimeout,
|
handoffTimeout,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -288,6 +288,7 @@ public class CompactionTaskTest
|
||||||
CompressionStrategy.LZF,
|
CompressionStrategy.LZF,
|
||||||
LongEncodingStrategy.LONGS
|
LongEncodingStrategy.LONGS
|
||||||
),
|
),
|
||||||
|
null,
|
||||||
5000,
|
5000,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
@ -462,6 +463,7 @@ public class CompactionTaskTest
|
||||||
CompressionStrategy.LZF,
|
CompressionStrategy.LZF,
|
||||||
LongEncodingStrategy.LONGS
|
LongEncodingStrategy.LONGS
|
||||||
),
|
),
|
||||||
|
null,
|
||||||
5000,
|
5000,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
@ -522,6 +524,7 @@ public class CompactionTaskTest
|
||||||
CompressionStrategy.LZF,
|
CompressionStrategy.LZF,
|
||||||
LongEncodingStrategy.LONGS
|
LongEncodingStrategy.LONGS
|
||||||
),
|
),
|
||||||
|
null,
|
||||||
5000,
|
5000,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
@ -582,6 +585,7 @@ public class CompactionTaskTest
|
||||||
CompressionStrategy.LZF,
|
CompressionStrategy.LZF,
|
||||||
LongEncodingStrategy.LONGS
|
LongEncodingStrategy.LONGS
|
||||||
),
|
),
|
||||||
|
null,
|
||||||
5000,
|
5000,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
@ -846,6 +850,7 @@ public class CompactionTaskTest
|
||||||
CompressionStrategy.LZF,
|
CompressionStrategy.LZF,
|
||||||
LongEncodingStrategy.LONGS
|
LongEncodingStrategy.LONGS
|
||||||
),
|
),
|
||||||
|
null,
|
||||||
5000,
|
5000,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
@ -1034,6 +1039,7 @@ public class CompactionTaskTest
|
||||||
CompressionStrategy.LZF,
|
CompressionStrategy.LZF,
|
||||||
LongEncodingStrategy.LONGS
|
LongEncodingStrategy.LONGS
|
||||||
),
|
),
|
||||||
|
null,
|
||||||
5000,
|
5000,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -1004,6 +1004,7 @@ public class IndexTaskTest
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -1126,6 +1127,7 @@ public class IndexTaskTest
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
@ -1241,6 +1243,7 @@ public class IndexTaskTest
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -1706,6 +1709,7 @@ public class IndexTaskTest
|
||||||
partitionDimensions,
|
partitionDimensions,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
forceGuaranteedRollup,
|
forceGuaranteedRollup,
|
||||||
reportParseException,
|
reportParseException,
|
||||||
|
|
|
@ -835,6 +835,7 @@ public class RealtimeIndexTaskTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -202,6 +202,7 @@ public class TaskSerdeTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
null,
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -284,6 +285,7 @@ public class TaskSerdeTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
null,
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -393,6 +395,7 @@ public class TaskSerdeTest
|
||||||
NoneShardSpec.instance(),
|
NoneShardSpec.instance(),
|
||||||
indexSpec,
|
indexSpec,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -188,6 +188,7 @@ public class ParallelIndexSupervisorTaskKillTest extends AbstractParallelIndexSu
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
numTotalSubTasks,
|
numTotalSubTasks,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -430,6 +430,7 @@ public class ParallelIndexSupervisorTaskResourceTest extends AbstractParallelInd
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
NUM_SUB_TASKS,
|
NUM_SUB_TASKS,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -138,6 +138,7 @@ public class ParallelIndexSupervisorTaskSerdeTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
2,
|
2,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -250,6 +250,7 @@ public class ParallelIndexSupervisorTaskTest extends AbstractParallelIndexSuperv
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
1,
|
1,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
@ -290,6 +291,7 @@ public class ParallelIndexSupervisorTaskTest extends AbstractParallelIndexSuperv
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
2,
|
2,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -71,6 +71,7 @@ public class ParallelIndexTuningConfigTest
|
||||||
CompressionStrategy.LZF,
|
CompressionStrategy.LZF,
|
||||||
LongEncodingStrategy.LONGS
|
LongEncodingStrategy.LONGS
|
||||||
),
|
),
|
||||||
|
new IndexSpec(),
|
||||||
1,
|
1,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -690,6 +690,7 @@ public class TaskLifecycleTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
null,
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -771,6 +772,7 @@ public class TaskLifecycleTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
null,
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -1160,6 +1162,7 @@ public class TaskLifecycleTest
|
||||||
null,
|
null,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
@ -1290,6 +1293,7 @@ public class TaskLifecycleTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -661,6 +661,7 @@ public class SeekableStreamSupervisorStateTest extends EasyMockSupport
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,6 +82,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
|
||||||
defaultMaxPendingPersists,
|
defaultMaxPendingPersists,
|
||||||
defaultShardSpec,
|
defaultShardSpec,
|
||||||
defaultIndexSpec,
|
defaultIndexSpec,
|
||||||
|
defaultIndexSpec,
|
||||||
true,
|
true,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -103,6 +104,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
|
||||||
private final int maxPendingPersists;
|
private final int maxPendingPersists;
|
||||||
private final ShardSpec shardSpec;
|
private final ShardSpec shardSpec;
|
||||||
private final IndexSpec indexSpec;
|
private final IndexSpec indexSpec;
|
||||||
|
private final IndexSpec indexSpecForIntermediatePersists;
|
||||||
private final int persistThreadPriority;
|
private final int persistThreadPriority;
|
||||||
private final int mergeThreadPriority;
|
private final int mergeThreadPriority;
|
||||||
private final boolean reportParseExceptions;
|
private final boolean reportParseExceptions;
|
||||||
|
@ -125,6 +127,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
|
||||||
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
@JsonProperty("maxPendingPersists") Integer maxPendingPersists,
|
||||||
@JsonProperty("shardSpec") ShardSpec shardSpec,
|
@JsonProperty("shardSpec") ShardSpec shardSpec,
|
||||||
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
@JsonProperty("indexSpec") IndexSpec indexSpec,
|
||||||
|
@JsonProperty("indexSpecForIntermediatePersists") @Nullable IndexSpec indexSpecForIntermediatePersists,
|
||||||
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
// This parameter is left for compatibility when reading existing configs, to be removed in Druid 0.12.
|
||||||
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
@JsonProperty("buildV9Directly") Boolean buildV9Directly,
|
||||||
@JsonProperty("persistThreadPriority") int persistThreadPriority,
|
@JsonProperty("persistThreadPriority") int persistThreadPriority,
|
||||||
|
@ -152,6 +155,8 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
|
||||||
this.maxPendingPersists = maxPendingPersists == null ? defaultMaxPendingPersists : maxPendingPersists;
|
this.maxPendingPersists = maxPendingPersists == null ? defaultMaxPendingPersists : maxPendingPersists;
|
||||||
this.shardSpec = shardSpec == null ? defaultShardSpec : shardSpec;
|
this.shardSpec = shardSpec == null ? defaultShardSpec : shardSpec;
|
||||||
this.indexSpec = indexSpec == null ? defaultIndexSpec : indexSpec;
|
this.indexSpec = indexSpec == null ? defaultIndexSpec : indexSpec;
|
||||||
|
this.indexSpecForIntermediatePersists = indexSpecForIntermediatePersists == null ?
|
||||||
|
this.indexSpec : indexSpecForIntermediatePersists;
|
||||||
this.mergeThreadPriority = mergeThreadPriority;
|
this.mergeThreadPriority = mergeThreadPriority;
|
||||||
this.persistThreadPriority = persistThreadPriority;
|
this.persistThreadPriority = persistThreadPriority;
|
||||||
this.reportParseExceptions = reportParseExceptions == null
|
this.reportParseExceptions = reportParseExceptions == null
|
||||||
|
@ -233,6 +238,13 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
|
||||||
return indexSpec;
|
return indexSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@Override
|
||||||
|
public IndexSpec getIndexSpecForIntermediatePersists()
|
||||||
|
{
|
||||||
|
return indexSpecForIntermediatePersists;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Always returns true, doesn't affect the version being built.
|
* Always returns true, doesn't affect the version being built.
|
||||||
*/
|
*/
|
||||||
|
@ -302,6 +314,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
shardSpec,
|
shardSpec,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
true,
|
true,
|
||||||
persistThreadPriority,
|
persistThreadPriority,
|
||||||
mergeThreadPriority,
|
mergeThreadPriority,
|
||||||
|
@ -326,6 +339,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
|
||||||
maxPendingPersists,
|
maxPendingPersists,
|
||||||
shardSpec,
|
shardSpec,
|
||||||
indexSpec,
|
indexSpec,
|
||||||
|
indexSpecForIntermediatePersists,
|
||||||
true,
|
true,
|
||||||
persistThreadPriority,
|
persistThreadPriority,
|
||||||
mergeThreadPriority,
|
mergeThreadPriority,
|
||||||
|
|
|
@ -67,6 +67,8 @@ public interface AppenderatorConfig
|
||||||
|
|
||||||
IndexSpec getIndexSpec();
|
IndexSpec getIndexSpec();
|
||||||
|
|
||||||
|
IndexSpec getIndexSpecForIntermediatePersists();
|
||||||
|
|
||||||
File getBasePersistDirectory();
|
File getBasePersistDirectory();
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
@ -61,7 +61,6 @@ import org.apache.druid.query.QuerySegmentWalker;
|
||||||
import org.apache.druid.query.SegmentDescriptor;
|
import org.apache.druid.query.SegmentDescriptor;
|
||||||
import org.apache.druid.segment.IndexIO;
|
import org.apache.druid.segment.IndexIO;
|
||||||
import org.apache.druid.segment.IndexMerger;
|
import org.apache.druid.segment.IndexMerger;
|
||||||
import org.apache.druid.segment.IndexSpec;
|
|
||||||
import org.apache.druid.segment.QueryableIndex;
|
import org.apache.druid.segment.QueryableIndex;
|
||||||
import org.apache.druid.segment.QueryableIndexSegment;
|
import org.apache.druid.segment.QueryableIndexSegment;
|
||||||
import org.apache.druid.segment.Segment;
|
import org.apache.druid.segment.Segment;
|
||||||
|
@ -1260,12 +1259,11 @@ public class AppenderatorImpl implements Appenderator
|
||||||
|
|
||||||
final File persistedFile;
|
final File persistedFile;
|
||||||
final File persistDir = createPersistDirIfNeeded(identifier);
|
final File persistDir = createPersistDirIfNeeded(identifier);
|
||||||
final IndexSpec indexSpec = tuningConfig.getIndexSpec();
|
|
||||||
persistedFile = indexMerger.persist(
|
persistedFile = indexMerger.persist(
|
||||||
indexToPersist.getIndex(),
|
indexToPersist.getIndex(),
|
||||||
identifier.getInterval(),
|
identifier.getInterval(),
|
||||||
new File(persistDir, String.valueOf(indexToPersist.getCount())),
|
new File(persistDir, String.valueOf(indexToPersist.getCount())),
|
||||||
indexSpec,
|
tuningConfig.getIndexSpecForIntermediatePersists(),
|
||||||
tuningConfig.getSegmentWriteOutMediumFactory()
|
tuningConfig.getSegmentWriteOutMediumFactory()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ import org.apache.druid.query.QuerySegmentWalker;
|
||||||
import org.apache.druid.query.SegmentDescriptor;
|
import org.apache.druid.query.SegmentDescriptor;
|
||||||
import org.apache.druid.segment.IndexIO;
|
import org.apache.druid.segment.IndexIO;
|
||||||
import org.apache.druid.segment.IndexMerger;
|
import org.apache.druid.segment.IndexMerger;
|
||||||
import org.apache.druid.segment.IndexSpec;
|
|
||||||
import org.apache.druid.segment.Metadata;
|
import org.apache.druid.segment.Metadata;
|
||||||
import org.apache.druid.segment.QueryableIndex;
|
import org.apache.druid.segment.QueryableIndex;
|
||||||
import org.apache.druid.segment.QueryableIndexSegment;
|
import org.apache.druid.segment.QueryableIndexSegment;
|
||||||
|
@ -955,14 +954,12 @@ public class RealtimePlumber implements Plumber
|
||||||
try {
|
try {
|
||||||
int numRows = indexToPersist.getIndex().size();
|
int numRows = indexToPersist.getIndex().size();
|
||||||
|
|
||||||
final IndexSpec indexSpec = config.getIndexSpec();
|
|
||||||
|
|
||||||
indexToPersist.getIndex().getMetadata().putAll(metadataElems);
|
indexToPersist.getIndex().getMetadata().putAll(metadataElems);
|
||||||
final File persistedFile = indexMerger.persist(
|
final File persistedFile = indexMerger.persist(
|
||||||
indexToPersist.getIndex(),
|
indexToPersist.getIndex(),
|
||||||
interval,
|
interval,
|
||||||
new File(computePersistDir(schema, interval), String.valueOf(indexToPersist.getCount())),
|
new File(computePersistDir(schema, interval), String.valueOf(indexToPersist.getCount())),
|
||||||
indexSpec,
|
config.getIndexSpecForIntermediatePersists(),
|
||||||
config.getSegmentWriteOutMediumFactory()
|
config.getSegmentWriteOutMediumFactory()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ package org.apache.druid.segment.indexing;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.apache.druid.segment.IndexSpec;
|
import org.apache.druid.segment.IndexSpec;
|
||||||
import org.apache.druid.segment.TestHelper;
|
import org.apache.druid.segment.TestHelper;
|
||||||
|
import org.apache.druid.segment.data.CompressionStrategy;
|
||||||
import org.apache.druid.timeline.partition.NumberedShardSpec;
|
import org.apache.druid.timeline.partition.NumberedShardSpec;
|
||||||
import org.joda.time.Period;
|
import org.joda.time.Period;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
@ -87,6 +88,7 @@ public class RealtimeTuningConfigTest
|
||||||
Assert.assertEquals(0, config.getHandoffConditionTimeout());
|
Assert.assertEquals(0, config.getHandoffConditionTimeout());
|
||||||
Assert.assertEquals(0, config.getAlertTimeout());
|
Assert.assertEquals(0, config.getAlertTimeout());
|
||||||
Assert.assertEquals(new IndexSpec(), config.getIndexSpec());
|
Assert.assertEquals(new IndexSpec(), config.getIndexSpec());
|
||||||
|
Assert.assertEquals(new IndexSpec(), config.getIndexSpecForIntermediatePersists());
|
||||||
Assert.assertEquals(new Period("PT10M"), config.getIntermediatePersistPeriod());
|
Assert.assertEquals(new Period("PT10M"), config.getIntermediatePersistPeriod());
|
||||||
Assert.assertEquals(new NumberedShardSpec(0, 1), config.getShardSpec());
|
Assert.assertEquals(new NumberedShardSpec(0, 1), config.getShardSpec());
|
||||||
Assert.assertEquals(0, config.getMaxPendingPersists());
|
Assert.assertEquals(0, config.getMaxPendingPersists());
|
||||||
|
@ -111,7 +113,9 @@ public class RealtimeTuningConfigTest
|
||||||
+ " \"mergeThreadPriority\": 100,\n"
|
+ " \"mergeThreadPriority\": 100,\n"
|
||||||
+ " \"reportParseExceptions\": true,\n"
|
+ " \"reportParseExceptions\": true,\n"
|
||||||
+ " \"handoffConditionTimeout\": 100,\n"
|
+ " \"handoffConditionTimeout\": 100,\n"
|
||||||
+ " \"alertTimeout\": 70\n"
|
+ " \"alertTimeout\": 70,\n"
|
||||||
|
+ " \"indexSpec\": { \"metricCompression\" : \"NONE\" },\n"
|
||||||
|
+ " \"indexSpecForIntermediatePersists\": { \"dimensionCompression\" : \"uncompressed\" }\n"
|
||||||
+ "}";
|
+ "}";
|
||||||
|
|
||||||
ObjectMapper mapper = TestHelper.makeJsonMapper();
|
ObjectMapper mapper = TestHelper.makeJsonMapper();
|
||||||
|
@ -128,7 +132,6 @@ public class RealtimeTuningConfigTest
|
||||||
Assert.assertEquals("/tmp/xxx", config.getBasePersistDirectory().toString());
|
Assert.assertEquals("/tmp/xxx", config.getBasePersistDirectory().toString());
|
||||||
Assert.assertEquals(100, config.getHandoffConditionTimeout());
|
Assert.assertEquals(100, config.getHandoffConditionTimeout());
|
||||||
Assert.assertEquals(70, config.getAlertTimeout());
|
Assert.assertEquals(70, config.getAlertTimeout());
|
||||||
Assert.assertEquals(new IndexSpec(), config.getIndexSpec());
|
|
||||||
Assert.assertEquals(new Period("PT1H"), config.getIntermediatePersistPeriod());
|
Assert.assertEquals(new Period("PT1H"), config.getIntermediatePersistPeriod());
|
||||||
Assert.assertEquals(new NumberedShardSpec(0, 1), config.getShardSpec());
|
Assert.assertEquals(new NumberedShardSpec(0, 1), config.getShardSpec());
|
||||||
Assert.assertEquals(100, config.getMaxPendingPersists());
|
Assert.assertEquals(100, config.getMaxPendingPersists());
|
||||||
|
@ -137,5 +140,8 @@ public class RealtimeTuningConfigTest
|
||||||
Assert.assertEquals(100, config.getPersistThreadPriority());
|
Assert.assertEquals(100, config.getPersistThreadPriority());
|
||||||
Assert.assertEquals(new Period("PT1H"), config.getWindowPeriod());
|
Assert.assertEquals(new Period("PT1H"), config.getWindowPeriod());
|
||||||
Assert.assertEquals(true, config.isReportParseExceptions());
|
Assert.assertEquals(true, config.isReportParseExceptions());
|
||||||
|
Assert.assertEquals(new IndexSpec(null, null, CompressionStrategy.NONE, null), config.getIndexSpec());
|
||||||
|
Assert.assertEquals(new IndexSpec(null, CompressionStrategy.UNCOMPRESSED, null, null), config.getIndexSpecForIntermediatePersists());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,7 @@ public class AppenderatorPlumberTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -160,6 +160,7 @@ public class AppenderatorTester implements AutoCloseable
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -144,6 +144,7 @@ public class DefaultOfflineAppenderatorFactoryTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -206,6 +206,7 @@ public class RealtimePlumberSchoolTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
true,
|
true,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -75,6 +75,7 @@ public class SinkTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
|
@ -229,6 +230,7 @@ public class SinkTest
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
null,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
|
|
|
@ -166,6 +166,7 @@ public class DruidJsonValidatorTest
|
||||||
1,
|
1,
|
||||||
NoneShardSpec.instance(),
|
NoneShardSpec.instance(),
|
||||||
new IndexSpec(),
|
new IndexSpec(),
|
||||||
|
new IndexSpec(),
|
||||||
null,
|
null,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Reference in New Issue