zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #450: ZOOKEEPER-2967: Add check to validate dataDir a...
Date Mon, 22 Jan 2018 14:38:45 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/450#discussion_r162945589
  
    --- Diff: src/java/main/org/apache/zookeeper/server/persistence/Util.java ---
    @@ -294,5 +297,25 @@ public int compare(File o1, File o2) {
             Collections.sort(filelist, new DataDirFileComparator(prefix, ascending));
             return filelist;
         }
    +
    +    /**
    +     * Returns true if file is a log file.
    +     *
    +     * @param file
    +     * @return
    +     */
    +    public static boolean isLogFile(File file) {
    +        return file.getName().startsWith(LOG_FILE_PREFIX);
    +    }
    +
    +    /**
    +     * Returns true if file is a snapshot file.
    +     *
    +     * @param file
    +     * @return
    +     */
    +    public static boolean isSnapshotFile(File file) {
    +        return file.getName().startsWith(SNAP_FILE_PREFIX);
    --- End diff --
    
    Same here with the dot.


---

Mime
View raw message