From 77df3e23330164b330635f29994d14071b555e66 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Mon, 9 Feb 2015 18:39:36 +0000 Subject: [PATCH] SOLR-6920, SOLR-6640: Make constant and fix logging. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1658519 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/solr/handler/SnapPuller.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/handler/SnapPuller.java b/solr/core/src/java/org/apache/solr/handler/SnapPuller.java index 932d9073729..cb0325f90f3 100644 --- a/solr/core/src/java/org/apache/solr/handler/SnapPuller.java +++ b/solr/core/src/java/org/apache/solr/handler/SnapPuller.java @@ -122,6 +122,8 @@ import org.slf4j.LoggerFactory; * @since solr 1.4 */ public class SnapPuller { + private static final int _100K = 100000; + public static final String INDEX_PROPERTIES = "index.properties"; private static final Logger LOG = LoggerFactory.getLogger(SnapPuller.class.getName()); @@ -821,9 +823,9 @@ public class SnapPuller { private boolean filesToAlwaysDownloadIfNoChecksums(String filename, long size, CompareResult compareResult) { // without checksums to compare, we always download .si, .liv, segments_N, - // and any file under 100kb + // and any very small files return !compareResult.checkSummed && (filename.endsWith(".si") || filename.endsWith(".liv") - || filename.startsWith("segments_") || size < 100000); + || filename.startsWith("segments_") || size < _100K); } static class CompareResult { @@ -855,9 +857,7 @@ public class SnapPuller { return compareResult; } else { LOG.warn( - "File {} did not match. " + "expected length is {} and actual length is {}", - filename, backupIndexFileChecksum, indexFileChecksum, - backupIndexFileLen, indexFileLen); + "File {} did not match. expected length is {} and actual length is {}", filename, backupIndexFileLen, indexFileLen); compareResult.equal = false; return compareResult; }