public static int getNumRolledLogFiles(WAL wal) {
    return ((AbstractFSWAL<?>) wal).getNumRolledLogFiles();
  }
returns the number of rolled WAL files.
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java