Jackie-Jiang commented on code in PR #15350:
URL: https://github.com/apache/pinot/pull/15350#discussion_r2098966570


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java:
##########
@@ -559,7 +559,9 @@ public ServerReloadControllerJobStatusResponse 
getReloadJobStatus(
               + 
controllerJobZKMetadata.get(CommonConstants.ControllerJob.SUBMISSION_TIME_MS);
       if (segmentNames != null) {
         List<String> targetSegments = serverToSegments.get(server);
-        reloadTaskStatusEndpoint = reloadTaskStatusEndpoint + "&segmentName=" 
+ StringUtils.join(targetSegments,
+        List<String> encodedTargetSegments =

Review Comment:
   Good catch! Can you file a separate bugfix PR for this with some test? Let's 
try to not mix bugfix with new feature.



##########
pinot-common/src/main/java/org/apache/pinot/common/config/provider/TableConfigAndSchemaCache.java:
##########
@@ -0,0 +1,127 @@
+/**
+ * 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.common.config.provider;
+
+import com.google.common.base.Preconditions;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.helix.store.zk.ZkHelixPropertyStore;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.pinot.common.metadata.ZKMetadataProvider;
+import org.apache.pinot.spi.config.table.TableConfig;
+import org.apache.pinot.spi.data.Schema;
+import org.apache.pinot.spi.utils.builder.TableNameBuilder;
+
+/**
+ * This class caches the table config and schema for all tables in the server 
instance.
+ * It fetches the latest table config and schema from ZK if not available in 
the cache.
+ */
+public class TableConfigAndSchemaCache {
+
+    private static TableConfigAndSchemaCache _instance;

Review Comment:
   (format) The indentation is wrong. Please apply [Pinot 
Style](https://docs.pinot.apache.org/developers/developers-and-contributors/code-setup#intellij)
 and reformat all the changes



##########
pinot-common/src/main/java/org/apache/pinot/common/config/provider/TableConfigAndSchemaCache.java:
##########
@@ -0,0 +1,127 @@
+/**
+ * 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.common.config.provider;
+
+import com.google.common.base.Preconditions;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.helix.store.zk.ZkHelixPropertyStore;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.pinot.common.metadata.ZKMetadataProvider;
+import org.apache.pinot.spi.config.table.TableConfig;
+import org.apache.pinot.spi.data.Schema;
+import org.apache.pinot.spi.utils.builder.TableNameBuilder;
+
+/**
+ * This class caches the table config and schema for all tables in the server 
instance.
+ * It fetches the latest table config and schema from ZK if not available in 
the cache.
+ */
+public class TableConfigAndSchemaCache {

Review Comment:
   You shouldn't need this cache. Table config and schema are already cached, 
and can be read with `TableDataManager.getCachedTableConfigAndSchema()`



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to