Apache Lucene open-source search software
SOLR-8351: Improve HdfsDirectory toString representation
Gregory Chanan5a9e07d57a0f
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 92ceab5f9c1..4215eebe84f 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -194,6 +194,9 @@ Other Changes* SOLR-8336: CoreDescriptor now takes a Path for its instance directory, ratherthan a String (Alan Woodward)+* SOLR-8351: Improve HdfsDirectory toString representation+ (Mike Drob via Gregory Chanan)+================== 5.4.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this releasediff --git a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java b/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.javaindex 82f843b09cd..522529e13ab 100644--- a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java+++ b/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java@@ -267,4 +267,9 @@ public class HdfsDirectory extends BaseDirectory {}return this.hdfsDirPath.equals(((HdfsDirectory) obj).hdfsDirPath);}++ @Override+ public String toString() {+ return this.getClass().getSimpleName() + "@" + hdfsDirPath + " lockFactory=" + lockFactory;+ }}diff --git a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java b/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.javaindex 940c78cd116..95cc059c95b 100644--- a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java+++ b/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java@@ -120,5 +120,10 @@ public class HdfsLockFactory extends LockFactory {public void ensureValid() throws IOException {// no idea how to implement this on HDFS}++ @Override+ public String toString() {+ return "HdfsLock(lockFile=" + lockFile + ")";+ }}}