Jackie-Jiang commented on code in PR #9186:
URL: https://github.com/apache/pinot/pull/9186#discussion_r942714023
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/TableUpsertMetadataManager.java:
##########
@@ -18,45 +18,22 @@
*/
package org.apache.pinot.segment.local.upsert;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
import org.apache.pinot.common.metrics.ServerMetrics;
-import org.apache.pinot.spi.config.table.HashFunction;
+import org.apache.pinot.spi.config.table.TableConfig;
+import org.apache.pinot.spi.config.table.UpsertConfig;
+import org.apache.pinot.spi.data.Schema;
/**
* The manager of the upsert metadata of a table.
*/
@ThreadSafe
-public class TableUpsertMetadataManager {
- private final Map<Integer, PartitionUpsertMetadataManager>
_partitionMetadataManagerMap = new ConcurrentHashMap<>();
- private final String _tableNameWithType;
- private final List<String> _primaryKeyColumns;
- private final String _comparisonColumn;
- private final HashFunction _hashFunction;
- private final PartialUpsertHandler _partialUpsertHandler;
- private final ServerMetrics _serverMetrics;
+public interface TableUpsertMetadataManager {
- public TableUpsertMetadataManager(String tableNameWithType, List<String>
primaryKeyColumns, String comparisonColumn,
- HashFunction hashFunction, @Nullable PartialUpsertHandler
partialUpsertHandler, ServerMetrics serverMetrics) {
- _tableNameWithType = tableNameWithType;
- _primaryKeyColumns = primaryKeyColumns;
- _comparisonColumn = comparisonColumn;
- _hashFunction = hashFunction;
- _partialUpsertHandler = partialUpsertHandler;
- _serverMetrics = serverMetrics;
- }
+ void init(TableConfig tableConfig, Schema schema, ServerMetrics
serverMetrics);
Review Comment:
Passed in `TableDataManager` so that the instance specific table info can be
read
--
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]