You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/04/23 17:29:47 UTC

[GitHub] [iceberg] karuppayya commented on a change in pull request #2503: Add Spark UI description to Iceberg jobs

karuppayya commented on a change in pull request #2503:
URL: https://github.com/apache/iceberg/pull/2503#discussion_r619387227



##########
File path: spark/src/main/java/org/apache/iceberg/spark/actions/BaseExpireSnapshotsSparkAction.java
##########
@@ -181,10 +184,25 @@ public BaseExpireSnapshotsSparkAction deleteWith(Consumer<String> newDeleteFunc)
 
   @Override
   public ExpireSnapshots.Result execute() {
-    JobGroupInfo info = newJobGroupInfo("EXPIRE-SNAPSHOTS", "EXPIRE-SNAPSHOTS");
+    JobGroupInfo info = newJobGroupInfo("EXPIRE-SNAPSHOTS", getDescription());
     return withJobGroupInfo(info, this::doExecute);
   }
 
+  private String getDescription() {
+    List<String> msgs = new ArrayList<>();
+    if (expireOlderThanValue != null) {
+      msgs.add("older_than=" + expireOlderThanValue);
+    }
+    if (retainLastValue != null) {
+      msgs.add("retain_last=" + retainLastValue);
+    }
+    if (expiredSnapshotIds != null) {
+      msgs.add("Snapshot_ids =" + StringUtils.join(expiredSnapshotIds, ","));
+    }
+    return String.format("Expiring snapshots(%s) in %s", StringUtils.join(msgs, ","), table.name());

Review comment:
       The Spark UI description seems to be a fixed width box, it shows what it can and shows the entire msg as tooltip
   ![Screen Shot 2021-04-22 at 8 04 26 PM](https://user-images.githubusercontent.com/5082742/115908205-b81fd480-a41e-11eb-9c04-26b1100c02bc.png)
   Would mentioning the snapshot id of the first and last convey that only two snapshots are deleted?
   Or can we mention the first snapot and mention that there are "n" more snapshots
   ![Screen Shot 2021-04-22 at 8 17 55 PM](https://user-images.githubusercontent.com/5082742/115907913-58c1c480-a41e-11eb-84c6-8529cb3c46fb.png)
   
   




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org