Class AbstractFSWALProvider.WALStartTimeComparator

java.lang.Object
org.apache.hadoop.hbase.wal.AbstractFSWALProvider.WALStartTimeComparator
All Implemented Interfaces:
Comparator<org.apache.hadoop.fs.Path>
Enclosing class:
AbstractFSWALProvider<T extends AbstractFSWAL<?>>

public static class AbstractFSWALProvider.WALStartTimeComparator extends Object implements Comparator<org.apache.hadoop.fs.Path>
Comparator used to compare WAL files together based on their start time. Just compares start times and nothing else.
  • Constructor Details

  • Method Details

    • compare

      public int compare(org.apache.hadoop.fs.Path o1, org.apache.hadoop.fs.Path o2)
      Specified by:
      compare in interface Comparator<org.apache.hadoop.fs.Path>
    • getTS

      public static long getTS(org.apache.hadoop.fs.Path p)
      Split a path to get the start time For example: 10.20.20.171%3A60020.1277499063250 Could also be a meta WAL which adds a '.meta' suffix or a synchronous replication WAL which adds a '.syncrep' suffix. Check.
      Parameters:
      p - path to split
      Returns:
      start time