xiangfu0 commented on code in PR #14662:
URL: https://github.com/apache/pinot/pull/14662#discussion_r1926078085
##########
pinot-core/src/main/java/org/apache/pinot/core/data/table/IndexedTable.java:
##########
@@ -19,24 +19,32 @@
package org.apache.pinot.core.data.table;
import com.google.common.base.Preconditions;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.apache.pinot.common.request.context.ExpressionContext;
import org.apache.pinot.common.utils.DataSchema;
import org.apache.pinot.common.utils.DataSchema.ColumnDataType;
import org.apache.pinot.core.query.aggregation.function.AggregationFunction;
import org.apache.pinot.core.query.request.context.QueryContext;
+import org.apache.pinot.core.util.trace.TraceCallable;
/**
* Base implementation of Map-based Table for indexed lookup
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public abstract class IndexedTable extends BaseTable {
+ private static final int THREAD_POOL_SIZE =
Math.max(Runtime.getRuntime().availableProcessors(), 1);
Review Comment:
True, reusing QueryMultiThreadingUtils.MAX_NUM_THREADS_PER_QUERY
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java:
##########
@@ -421,20 +421,43 @@ public static class QueryOptionKey {
public static final String USE_SCAN_REORDER_OPTIMIZATION =
"useScanReorderOpt";
public static final String MAX_EXECUTION_THREADS =
"maxExecutionThreads";
- /** Number of groups AggregateOperator should limit result to after
sorting.
- * Trimming happens only when (sub)query contains order by and limit
clause. */
+ /**
+ * Number of groups AggregateOperator should limit result to after
sorting.
+ * Trimming happens only when (sub)query contains order by and limit
clause.
+ */
public static final String GROUP_TRIM_SIZE = "groupTrimSize";
- /** Number of groups GroupByOperator should limit result to after
sorting.
- * Trimming happens only when (sub)query contains order by clause. */
+ /**
+ * Number of groups GroupByOperator should limit result to after
sorting.
+ * Trimming happens only when (sub)query contains order by clause.
+ */
public static final String MIN_SEGMENT_GROUP_TRIM_SIZE =
"minSegmentGroupTrimSize";
- /** Max number of groups GroupByCombineOperator (running at server)
should return .*/
+ /**
+ * Max number of groups GroupByCombineOperator (running at server)
should return .
+ */
public static final String MIN_SERVER_GROUP_TRIM_SIZE =
"minServerGroupTrimSize";
- /** Max number of groups GroupByDataTableReducer (running at broker)
should return. */
+ /**
+ * Max number of groups GroupByDataTableReducer (running at broker)
should return.
+ */
public static final String MIN_BROKER_GROUP_TRIM_SIZE =
"minBrokerGroupTrimSize";
+ /**
+ * Number of threads used in the server level final reduce, this is
used for expensive aggregation functions,
+ * and we want to push down reduce to server level instead of
streaming all the data back to broker for
+ * global reduce.
+ *
+ * E.g. Funnel queries are considered as expensive aggregation
functions.
+ */
+ public static final String NUM_THREADS_FOR_SERVER_FINAL_REDUCE =
"numThreadsForServerFinalReduce";
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]