MCPcopy Create free account
hub / github.com/apache/solr / getLogList

Method getLogList

solr/core/src/java/org/apache/solr/update/UpdateLog.java:776–787  ·  view source on GitHub ↗
(Path directory)

Source from the content-addressed store, hash-verified

774 private boolean updateFromOldTlogs(UpdateCommand cmd) {
775 return (cmd.getFlags() & UpdateCommand.REPLAY) != 0 && state == State.REPLAYING;
776 }
777
778 public String[] getLogList(Path directory) {
779 final String prefix = TLOG_NAME + '.';
780 try (Stream<Path> files = Files.list(directory)) {
781 return files
782 .map((file) -> file.getFileName().toString())
783 .filter((name) -> name.startsWith(prefix))
784 .sorted()
785 .toArray(String[]::new);
786 } catch (IOException e) {
787 throw new RuntimeException(e);
788 }
789 }
790

Callers 8

testRemoveOldLogsMethod · 0.95
testTruncatedLogMethod · 0.95
testCorruptLogMethod · 0.95
deleteLogsMethod · 0.95
initTlogDirMethod · 0.95
ensureLogMethod · 0.95
scanLastLogIdMethod · 0.80

Calls 7

toArrayMethod · 0.80
getFileNameMethod · 0.80
listMethod · 0.65
mapMethod · 0.65
toStringMethod · 0.65
sortedMethod · 0.45
filterMethod · 0.45

Tested by 6

testRemoveOldLogsMethod · 0.76
testTruncatedLogMethod · 0.76
testCorruptLogMethod · 0.76
deleteLogsMethod · 0.76
scanLastLogIdMethod · 0.64