public static LogRecord makeCommit(long updateTime) { return new LogRecord(Type.COMMIT, updateTime); }
public static LogRecord makeCommit(long updateTime) { return new LogRecord(Type.COMMIT, updateTime); }
public static LogRecord makeCommit(long updateTime) { return new LogRecord(Type.COMMIT, updateTime); }
public static LogRecord makeCommit(long updateTime) { return new LogRecord(Type.COMMIT, updateTime); }
public static LogRecord makeAbort(long updateTime) { return new LogRecord(Type.ABORT, updateTime); }
public static LogRecord makeAbort(long updateTime) { return new LogRecord(Type.ABORT, updateTime); }
public static LogRecord makeAbort(long updateTime) { return new LogRecord(Type.ABORT, updateTime); }
public static LogRecord makeAbort(long updateTime) { return new LogRecord(Type.ABORT, updateTime); }
LogRecord asType(Type type) { return new LogRecord(type, absolutePath.orElse(null), updateTime, numFiles); } }
LogRecord asType(Type type) { return new LogRecord(type, absolutePath.orElse(null), updateTime, numFiles); } }
public static LogRecord make(Type type, List<File> files, int minFiles, String absolutePath) { // CASSANDRA-11889: File.lastModified() returns a positive value only if the file exists, therefore // we filter by positive values to only consider the files that still exists right now, in case things // changed on disk since getExistingFiles() was called List<Long> positiveModifiedTimes = files.stream().map(File::lastModified).filter(lm -> lm > 0).collect(Collectors.toList()); long lastModified = positiveModifiedTimes.stream().reduce(0L, Long::max); return new LogRecord(type, absolutePath, lastModified, Math.max(minFiles, positiveModifiedTimes.size())); }
public static LogRecord make(Type type, List<File> files, int minFiles, String absolutePath) { // CASSANDRA-11889: File.lastModified() returns a positive value only if the file exists, therefore // we filter by positive values to only consider the files that still exists right now, in case things // changed on disk since getExistingFiles() was called List<Long> positiveModifiedTimes = files.stream().map(File::lastModified).filter(lm -> lm > 0).collect(Collectors.toList()); long lastModified = positiveModifiedTimes.stream().reduce(0L, Long::max); return new LogRecord(type, absolutePath, lastModified, Math.max(minFiles, positiveModifiedTimes.size())); }
public static LogRecord make(Type type, List<File> files, int minFiles, String absolutePath) { // CASSANDRA-11889: File.lastModified() returns a positive value only if the file exists, therefore // we filter by positive values to only consider the files that still exists right now, in case things // changed on disk since getExistingFiles() was called List<Long> positiveModifiedTimes = files.stream().map(File::lastModified).filter(lm -> lm > 0).collect(Collectors.toList()); long lastModified = positiveModifiedTimes.stream().reduce(0L, Long::max); return new LogRecord(type, absolutePath, lastModified, Math.max(minFiles, positiveModifiedTimes.size())); }
public static LogRecord make(Type type, List<File> files, int minFiles, String absolutePath) { // CASSANDRA-11889: File.lastModified() returns a positive value only if the file exists, therefore // we filter by positive values to only consider the files that still exists right now, in case things // changed on disk since getExistingFiles() was called List<Long> positiveModifiedTimes = files.stream().map(File::lastModified).filter(lm -> lm > 0).collect(Collectors.toList()); long lastModified = positiveModifiedTimes.stream().reduce(0L, Long::max); return new LogRecord(type, absolutePath, lastModified, Math.max(minFiles, positiveModifiedTimes.size())); }
public static LogRecord make(String line) { try { Matcher matcher = REGEX.matcher(line); if (!matcher.matches()) return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse [%s]", line)); Type type = Type.fromPrefix(matcher.group(1)); return new LogRecord(type, matcher.group(2) + Component.separator, // see comment on CASSANDRA-13294 below Long.parseLong(matcher.group(3)), Integer.parseInt(matcher.group(4)), Long.parseLong(matcher.group(5)), line); } catch (IllegalArgumentException e) { return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse line: %s", e.getMessage())); } }
public static LogRecord make(String line) { try { Matcher matcher = REGEX.matcher(line); if (!matcher.matches()) return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse [%s]", line)); Type type = Type.fromPrefix(matcher.group(1)); return new LogRecord(type, matcher.group(2), Long.parseLong(matcher.group(3)), Integer.parseInt(matcher.group(4)), Long.parseLong(matcher.group(5)), line); } catch (IllegalArgumentException e) { return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse line: %s", e.getMessage())); } }
public static LogRecord make(String line) { try { Matcher matcher = REGEX.matcher(line); if (!matcher.matches()) return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse [%s]", line)); Type type = Type.fromPrefix(matcher.group(1)); return new LogRecord(type, matcher.group(2) + Component.separator, // see comment on CASSANDRA-13294 below Long.parseLong(matcher.group(3)), Integer.parseInt(matcher.group(4)), Long.parseLong(matcher.group(5)), line); } catch (IllegalArgumentException e) { return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse line: %s", e.getMessage())); } }
public static LogRecord make(String line) { try { Matcher matcher = REGEX.matcher(line); if (!matcher.matches()) return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse [%s]", line)); Type type = Type.fromPrefix(matcher.group(1)); return new LogRecord(type, matcher.group(2) + Component.separator, // see comment on CASSANDRA-13294 below Long.parseLong(matcher.group(3)), Integer.parseInt(matcher.group(4)), Long.parseLong(matcher.group(5)), line); } catch (IllegalArgumentException e) { return new LogRecord(Type.UNKNOWN, null, 0, 0, 0, line) .setError(String.format("Failed to parse line: %s", e.getMessage())); } }