guluo2016 commented on PR #8403:
URL: https://github.com/apache/hbase/pull/8403#issuecomment-4790352681

   > I guess we cannot add a unit test for this change as this class writes to 
stdout. It would require refactor to allow testing. 🤔
   
   Yes, you're right. The` SnapshotInfo`  directly writes to stdout. I've 
verified the patch manually, and the output is as expected: 
   ```bash
   [root@localhost hbase-4.0.0-alpha-1-SNAPSHOT]# ./bin/hbase snapshot info 
--list-snapshots
   2026-06-25T06:23:55,233 WARN  [main] util.NativeCodeLoader: Unable to load 
native-hadoop library for your platform... using builtin-java classes where 
applicable
   2026-06-25T06:23:55,520 INFO  [main] hbase.TableName: Meta table name: 
hbase:meta
   SNAPSHOT             | CREATION TIME        | TTL(Sec)             | EXPIRED 
             | TABLE NAME
   t01_snap01           |  2026-06-25T06:22:10 |              FOREVER |         
          No | t01
   t01_snap02           |  2026-06-25T06:22:34 |               100000 |         
          No | t01
   t01_snap03           |  2026-06-25T06:22:44 |                   10 |         
         Yes | t01
   [root@localhost hbase-4.0.0-alpha-1-SNAPSHOT]#
   [root@localhost hbase-4.0.0-alpha-1-SNAPSHOT]# ./bin/hbase snapshot info 
--snapshot t01_snap03
   2026-06-25T06:24:16,442 WARN  [main] util.NativeCodeLoader: Unable to load 
native-hadoop library for your platform... using builtin-java classes where 
applicable
   2026-06-25T06:24:16,736 INFO  [main] hbase.TableName: Meta table name: 
hbase:meta
   Snapshot Info
   -----------------------------------------
       Name: t01_snap03
       Type: FLUSH
      Table: t01
     Format: 2
    Created: 2026-06-25T06:22:44
   Ttl(Sec): 10
    Expired: Yes
      Owner:
   
   
   [root@localhost hbase-4.0.0-alpha-1-SNAPSHOT]# ./bin/hbase snapshot info 
--snapshot t01_snap02
   2026-06-25T06:24:23,404 WARN  [main] util.NativeCodeLoader: Unable to load 
native-hadoop library for your platform... using builtin-java classes where 
applicable
   2026-06-25T06:24:23,691 INFO  [main] hbase.TableName: Meta table name: 
hbase:meta
   Snapshot Info
   -----------------------------------------
       Name: t01_snap02
       Type: FLUSH
      Table: t01
     Format: 2
    Created: 2026-06-25T06:22:34
   Ttl(Sec): 100000
    Expired: No
      Owner:
   
   ```


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