guluo2016 commented on code in PR #8403:
URL: https://github.com/apache/hbase/pull/8403#discussion_r3461282599
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java:
##########
@@ -391,11 +397,17 @@ public int doWork() throws IOException,
InterruptedException {
// List Available Snapshots
if (listSnapshots) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
- System.out.printf("%-20s | %-20s | %-20s | %s%n", "SNAPSHOT", "CREATION
TIME", "TTL IN SEC",
- "TABLE NAME");
- for (SnapshotDescription desc : getSnapshotList(conf)) {
- System.out.printf("%-20s | %20s | %20s | %s%n", desc.getName(),
- df.format(new Date(desc.getCreationTime())), desc.getTtl(),
desc.getTableNameAsString());
+ List<SnapshotDescription> snapshotDescriptions = getSnapshotList(conf);
Review Comment:
I update the code here, moved this code before `System.out.printf(...);`
The reason is that `getSnapshotList(conf)` would print logs, breaking the
display continuity of the snapshot list.
--
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]