smengcl commented on code in PR #11685:
URL: https://github.com/apache/ozone/pull/11685#discussion_r4560360628


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -96,6 +98,9 @@ public class OMDBInsightEndpoint {
   private final ReconOMMetadataManager omMetadataManager;
   private static final Logger LOG =
       LoggerFactory.getLogger(OMDBInsightEndpoint.class);
+  /** Excludes multipart open keys, which are reported by {@code 
/keys/open/mpu/summary} instead. */
+  private static final Predicate<OmKeyInfo> NOT_MULTIPART_OPEN_KEY =

Review Comment:
   A question, not blocking: with this filter, Recon no longer lists individual 
incomplete MPUs anywhere. Before this change, `/keys/open` at least showed each 
upload's key name and creation time (with 0 bytes), while 
`/keys/open/mpu/summary` only gives totals. If an operator sees a large MPU 
total, how would they find which uploads are holding the space? If a per-upload 
listing is planned as a follow-up, could we file a JIRA for it and link it here?



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/OpenKeysExcludeMultipartUploadsUpgradeAction.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.hadoop.ozone.recon.upgrade;
+
+import com.google.inject.Injector;
+import javax.sql.DataSource;
+import org.apache.hadoop.ozone.recon.ReconGuiceServletContextListener;
+import org.apache.hadoop.ozone.recon.tasks.ReconTaskController;
+import org.apache.hadoop.ozone.recon.tasks.ReconTaskReInitializationEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Upgrade action for the OPEN_KEYS_EXCLUDE_MULTIPART_UPLOADS version.
+ * The open key counts and sizes stored by earlier versions include multipart 
open keys, so this action queues a
+ * reinitialization of the Recon tasks to recompute them.
+ */
+@ReconUpgradeActionForVersion(version = 
ReconVersion.OPEN_KEYS_EXCLUDE_MULTIPART_UPLOADS)
+public class OpenKeysExcludeMultipartUploadsUpgradeAction implements 
ReconUpgradeAction {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(OpenKeysExcludeMultipartUploadsUpgradeAction.class);
+
+  @Override
+  public void execute(DataSource dataSource) throws Exception {

Review Comment:
   nit: this is almost the same as 
`ReconUpgradeAction.queueNSSummaryRebuildIfNeeded`. Could we move the common 
part into a small static helper in `ReconUpgradeAction` and call it from both, 
so the two upgrade paths don't drift apart?



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