@@ -139,6 +139,8 @@ SystemConfig::SystemConfig() {
139
139
BOOL_PROP (kHttpServerBindToNodeInternalAddressOnlyEnabled , false ),
140
140
NONE_PROP (kDiscoveryUri ),
141
141
NUM_PROP (kMaxDriversPerTask , 16 ),
142
+ NONE_PROP (kTaskWriterCount ),
143
+ NONE_PROP (kTaskPartitionedWriterCount ),
142
144
NUM_PROP (kConcurrentLifespansPerTask , 1 ),
143
145
STR_PROP (kTaskMaxPartialAggregationMemory , " 16MB" ),
144
146
NUM_PROP (kHttpServerNumIoThreadsHwMultiplier , 1.0 ),
@@ -341,6 +343,14 @@ int32_t SystemConfig::maxDriversPerTask() const {
341
343
return optionalProperty<int32_t >(kMaxDriversPerTask ).value ();
342
344
}
343
345
346
+ folly::Optional<int32_t > SystemConfig::taskWriterCount () const {
347
+ return optionalProperty<int32_t >(kTaskWriterCount );
348
+ }
349
+
350
+ folly::Optional<int32_t > SystemConfig::taskPartitionedWriterCount () const {
351
+ return optionalProperty<int32_t >(kTaskPartitionedWriterCount );
352
+ }
353
+
344
354
int32_t SystemConfig::concurrentLifespansPerTask () const {
345
355
return optionalProperty<int32_t >(kConcurrentLifespansPerTask ).value ();
346
356
}
@@ -876,7 +886,7 @@ void BaseVeloxQueryConfig::updateLoadedValues(
876
886
auto systemConfig = SystemConfig::instance ();
877
887
878
888
using namespace velox ::core;
879
- const std::unordered_map<std::string, std::string> updatedValues{
889
+ std::unordered_map<std::string, std::string> updatedValues{
880
890
{QueryConfig::kPrestoArrayAggIgnoreNulls ,
881
891
bool2String (systemConfig->useLegacyArrayAgg ())},
882
892
{QueryConfig::kMaxOutputBufferSize ,
@@ -890,6 +900,17 @@ void BaseVeloxQueryConfig::updateLoadedValues(
890
900
SystemConfig::kTaskMaxPartialAggregationMemory )},
891
901
};
892
902
903
+ auto taskWriterCount = systemConfig->taskWriterCount ();
904
+ if (taskWriterCount.has_value ()) {
905
+ updatedValues[QueryConfig::kTaskWriterCount ] =
906
+ std::to_string (taskWriterCount.value ());
907
+ }
908
+ auto taskPartitionedWriterCount = systemConfig->taskPartitionedWriterCount ();
909
+ if (taskPartitionedWriterCount.has_value ()) {
910
+ updatedValues[QueryConfig::kTaskPartitionedWriterCount ] =
911
+ std::to_string (taskPartitionedWriterCount.value ());
912
+ }
913
+
893
914
std::stringstream updated;
894
915
for (const auto & pair : updatedValues) {
895
916
updated << " " << pair.first << " =" << pair.second << " \n " ;
0 commit comments