mayankshriv commented on a change in pull request #6977:
URL: https://github.com/apache/incubator-pinot/pull/6977#discussion_r640791864



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java
##########
@@ -228,4 +240,20 @@ public String getTableName() {
   public File getTableDataDir() {
     return _indexDir;
   }
+
+  @Override
+  public void addSegmentError(String segmentName, SegmentErrorInfo 
segmentErrorInfo) {
+    _errorCache.put(new Pair<>(_tableNameWithType, segmentName), 
segmentErrorInfo);
+  }
+
+  @Override
+  public Map<String, SegmentErrorInfo> getSegmentErrors() {
+    if (_errorCache == null) {
+      return Collections.emptyMap();
+    } else {
+      // Filter out entries that match the table name.
+      return _errorCache.asMap().entrySet().stream().filter(map -> 
map.getKey().getFirst().equals(_tableNameWithType))

Review comment:
       In general I do, I took the liberty here because it is not in critical 
path of any performance tasks.




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

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