xiangfu0 commented on code in PR #18411:
URL: https://github.com/apache/pinot/pull/18411#discussion_r3185145610


##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/DeprecatedConfig.java:
##########
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.spi.config;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Marks a config getter as a deprecated JSON property in {@code TableConfig} 
(or any nested config bean).
+ *
+ * <p>Discovered at runtime by {@code DeprecatedTableConfigValidationUtils} to 
gate creation and update of table
+ * configs. Severity is determined by comparing {@link #since()} against the 
running Pinot version: properties
+ * deprecated in the current major.minor release are reported as 
<em>warnings</em>, while properties deprecated in
+ * any earlier release are reported as <em>errors</em>.
+ *
+ * <p>Place this annotation on the Jackson-visible getter (the one that drives 
JSON property naming) so the
+ * discovery walk picks up the correct serialized name.</p>
+ */
+@Target({ElementType.METHOD, ElementType.FIELD})

Review Comment:
   Fixed in 19423f1e20. Restricted `@Target` to `ElementType.METHOD` only — 
matches the discovery walk which only inspects getters. Prevents the 
misleading-field-annotation footgun.



##########
pinot-tools/src/main/resources/examples/stream/fineFoodReviews/fineFoodReviews_realtime_table_config.json:
##########
@@ -2,14 +2,18 @@
   "tableName": "fineFoodReviews",
   "tableType": "REALTIME",
   "segmentsConfig": {
-    "segmentPushType": "APPEND",
     "timeColumnName": "ts",
     "retentionTimeUnit": "DAYS",
     "retentionTimeValue": "5",
     "replication": "1"
   },
   "tenants": {
   },
+  "segmentAssignmentConfigMap": {
+    "REALTIME": {
+      "segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy"
+    }
+  },

Review Comment:
   Fixed in 19423f1e20 — changed the key from `REALTIME` to `COMPLETED` to 
match the assignment-type convention (`SegmentAssignmentStrategyFactory` looks 
it up via `assignmentType.toUpperCase()`).



##########
pinot-tools/src/main/resources/examples/stream/fineFoodReviews_part_0/fineFoodReviews_part_0_realtime_table_config.json:
##########
@@ -2,14 +2,18 @@
   "tableName": "fineFoodReviews_part_0",
   "tableType": "REALTIME",
   "segmentsConfig": {
-    "segmentPushType": "APPEND",
     "timeColumnName": "ts",
     "retentionTimeUnit": "DAYS",
     "retentionTimeValue": "5",
     "replication": "1"
   },
   "tenants": {
   },
+  "segmentAssignmentConfigMap": {
+    "REALTIME": {
+      "segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy"
+    }
+  },

Review Comment:
   Fixed in 19423f1e20 — changed the key from `REALTIME` to `COMPLETED` to 
match the assignment-type convention (`SegmentAssignmentStrategyFactory` looks 
it up via `assignmentType.toUpperCase()`).



-- 
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]

Reply via email to