diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search')
3 files changed, 8 insertions, 8 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/logging/LoggerEntry.java b/container-search/src/main/java/com/yahoo/search/logging/LoggerEntry.java index 80ff967f779..d8e656d1b2b 100644 --- a/container-search/src/main/java/com/yahoo/search/logging/LoggerEntry.java +++ b/container-search/src/main/java/com/yahoo/search/logging/LoggerEntry.java @@ -135,7 +135,7 @@ public class LoggerEntry { return logger.send(new LoggerEntry(this)); } - LoggerEntry build() { + public LoggerEntry build() { return new LoggerEntry(this); } diff --git a/container-search/src/main/java/com/yahoo/search/logging/Spooler.java b/container-search/src/main/java/com/yahoo/search/logging/Spooler.java index 921b8f444f1..cf750fd9d8a 100644 --- a/container-search/src/main/java/com/yahoo/search/logging/Spooler.java +++ b/container-search/src/main/java/com/yahoo/search/logging/Spooler.java @@ -85,10 +85,10 @@ public class Spooler { public void processFiles(Function<LoggerEntry, Boolean> transport) throws IOException { List<Path> files = listFilesInPath(readyPath); if (files.size() == 0) { - log.log(Level.FINEST, "No files in ready path " + readyPath.toFile().getAbsolutePath()); + log.log(Level.FINEST, () -> "No files in ready path " + readyPath.toFile().getAbsolutePath()); return; } - log.log(Level.FINE, "Files in ready path: " + files.size()); + log.log(Level.FINE, () -> "Files in ready path: " + files.size()); List<File> fileList = getFiles(files); if ( ! fileList.isEmpty()) { @@ -116,7 +116,7 @@ public class Spooler { List<String> lines = Files.readAllLines(f.toPath()); for (String line : lines) { LoggerEntry entry = LoggerEntry.deserialize(line); - log.log(Level.FINE, "Read entry " + entry + " from " + f); + log.log(Level.FINE, () -> "Read entry " + entry + " from " + f); success = transport.apply(entry); if (! success) { throw new RuntimeException("Unable to process file " + f + ": unsuccessful call to transport() for " + entry); @@ -190,7 +190,7 @@ public class Spooler { String fileName = currentFileName(); Path file = spoolPath.resolve(processingPath).resolve(fileName); try { - log.log(Level.FINE, "Writing entry " + entryCounter.get() + " (" + entry.serialize() + ") to file " + fileName); + log.log(Level.FINE, () -> "Writing entry " + entryCounter.get() + " (" + entry.serialize() + ") to file " + fileName); Files.writeString(file, entry.serialize() + "\n", StandardOpenOption.WRITE, StandardOpenOption.APPEND, StandardOpenOption.CREATE); firstWriteTimestamp.compareAndExchange(Instant.EPOCH, clock.instant()); entryCounter.incrementAndGet(); @@ -242,7 +242,7 @@ public class Spooler { if (file.exists() && file.canRead() && file.canWrite()) { log.log(Level.INFO, "Directory " + path + " already exists"); } else if (file.mkdirs()) { - log.log(Level.FINE, "Created " + path); + log.log(Level.FINE, () -> "Created " + path); } else { log.log(Level.WARNING, "Could not create " + path + ", please check permissions"); } diff --git a/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java b/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java index 3edad64f9f2..3dfa278662d 100644 --- a/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java +++ b/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java @@ -135,14 +135,14 @@ public class NGramSearcher extends Searcher { * Creates the root of the query subtree which will contain the grams to match, * called by {@link #splitToGrams}. This hook is provided to make it easy to create a subclass which * matches grams using a different composite item, e.g an OrItem. - * <p> + * * This default implementation returns createGramRoot(query). * * @param term the term item this gram root is replacing in the query tree, * typically used to access the index name of the term when that is required by the new gram root * (such as in PhraseItem) * @param query the input query, to make it possible to return a different composite item type - * depending on the query content + * depending on the query content * @return the composite item to add the gram items to in {@link #splitToGrams} */ protected CompositeItem createGramRoot(HasIndexItem term, Query query) { |