Skip to content

Commit

Permalink
re apache#3724: tablet transaction log
Browse files Browse the repository at this point in the history
Cleaner output of Optional members
  • Loading branch information
ivakegg committed Sep 19, 2023
1 parent 5706219 commit d1a89c5
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ public void apply(Set<StoredTabletFile> files) {
@Override
public String toString() {
return String.format("%s: Compacted %s into %s", super.toString(), compactedFiles,
destination);
destination.isPresent() ? destination.orElseThrow().toString() : "<empty>");
}

@Override
public String toString(SimpleDateFormat format) {
return String.format("%s: Compacted %s into %s", super.toString(format), compactedFiles,
destination);
destination.isPresent() ? destination.orElseThrow().toString() : "<empty>");
}

@Override
Expand Down Expand Up @@ -128,12 +128,14 @@ public void apply(Set<StoredTabletFile> files) {

@Override
public String toString() {
return String.format("%s: Flushed into %s", super.toString(), flushFile);
return String.format("%s: Flushed into %s", super.toString(),
flushFile.isPresent() ? flushFile.orElseThrow().toString() : "<empty>");
}

@Override
public String toString(SimpleDateFormat format) {
return String.format("%s: Flushed into %s", super.toString(format), flushFile);
return String.format("%s: Flushed into %s", super.toString(format),
flushFile.isPresent() ? flushFile.orElseThrow().toString() : "<empty>");
}

@Override
Expand Down

0 comments on commit d1a89c5

Please sign in to comment.