devmadhuu commented on code in PR #8699:
URL: https://github.com/apache/ozone/pull/8699#discussion_r2199823485


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/ReconBasicOmKeyInfo.java:
##########
@@ -0,0 +1,279 @@
+/*
+ * 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.api.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Objects;
+import org.apache.hadoop.hdds.client.ReplicationConfig;
+import org.apache.hadoop.hdds.utils.db.Codec;
+import org.apache.hadoop.hdds.utils.db.DelegatedCodec;
+import org.apache.hadoop.hdds.utils.db.Proto2Codec;
+import org.apache.hadoop.ozone.om.helpers.QuotaUtil;
+import org.apache.hadoop.ozone.om.helpers.WithParentObjectId;
+import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
+
+/**
+ * Lightweight OmKeyInfo class.
+ */
+@JsonIgnoreProperties({
+    "metadata", "objectID", "updateID", "parentObjectID", "objectInfo"
+})
+public final class ReconBasicOmKeyInfo extends WithParentObjectId {
+
+  private final String volumeName;
+  private final String bucketName;
+  private final String keyName;
+  private final long dataSize;
+  private final long creationTime;
+  private final long modificationTime;
+
+  /** This is key table key of rocksDB and will help UI to implement pagination
+   * where UI will use the last record key to send in API as preKeyPrefix. */
+  @JsonProperty("key")
+  private String key;
+
+  /** Path of a key/file. */
+  @JsonProperty("path")
+  private String path;
+
+  @JsonProperty("replicatedSize")
+  private final long replicatedSize;
+
+  @JsonProperty("replicationInfo")
+  private final ReplicationConfig replicationConfig;
+
+  private final boolean isFile;
+  private long parentId;
+
+  public static Codec<ReconBasicOmKeyInfo> getCodec() {
+    return new DelegatedCodec<>(
+        
Proto2Codec.get(OzoneManagerProtocolProtos.KeyInfoProtoLight.getDefaultInstance()),
+        ReconBasicOmKeyInfo::getFromProtobuf,
+        ReconBasicOmKeyInfo::toProtobuf,

Review Comment:
   Ok



-- 
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: issues-unsubscr...@ozone.apache.org

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


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

Reply via email to