roryqi commented on code in PR #11266:
URL: https://github.com/apache/gravitino/pull/11266#discussion_r3317643562


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/purge/IcebergPurgeJob.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * 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.gravitino.iceberg.service.purge;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import lombok.Getter;
+import lombok.experimental.Accessors;
+
+/**
+ * Immutable description of a table to purge. Carries exactly the fields the 
request path supplies
+ * at enqueue and the worker reads back to delete files. Mutable progress 
(state, attempts,
+ * heartbeat) lives only in the {@code iceberg_cleanup_job} row, managed by 
{@link
+ * IcebergPurgeJobStore}; the {@link State} enum here names those row states.
+ */
+@Getter
+@Accessors(fluent = true)
+public class IcebergPurgeJob {
+
+  /** Lifecycle states of an {@code iceberg_cleanup_job} row. */
+  public enum State {
+    /** Awaiting a worker; also the state a transiently-failed job returns to. 
*/
+    PENDING,
+
+    /** Claimed by a worker that is actively deleting files. */
+    RUNNING,
+
+    /** Every reachable file was deleted or already gone. */
+    SUCCEEDED,
+
+    /** Retries exhausted or a terminal failure; files may be leaked. */

Review Comment:
   Yes, files are not deleted.



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

Reply via email to