private int select(HBaseProtos.RotateFileData[] datas) {
    if (datas[0] == null) {
      return 1;
    }
    if (datas[1] == null) {
      return 0;
    }
    return datas[0].getTimestamp() >= datas[1].getTimestamp() ? 0 : 1;
  }
Constructs a new RotateFile object with the given parameters.
@param fs          the file system to use.
@param dir         the directory where the files will be created.
@param name        the base name for the files.
@param maxFileSize the maximum size of each file.
hbase-client/src/main/java/org/apache/hadoop/hbase/util/RotateFile.java