You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gc...@apache.org on 2015/11/30 23:59:33 UTC

svn commit: r1717345 - in /lucene/dev/branches/branch_5x/solr: CHANGES.txt core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java

Author: gchanan
Date: Mon Nov 30 22:59:33 2015
New Revision: 1717345

URL: http://svn.apache.org/viewvc?rev=1717345&view=rev
Log:
SOLR-8351: Improve HdfsDirectory toString representation

Modified:
    lucene/dev/branches/branch_5x/solr/CHANGES.txt
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1717345&r1=1717344&r2=1717345&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Mon Nov 30 22:59:33 2015
@@ -26,6 +26,9 @@ Other Changes
 * SOLR-8336: CoreDescriptor now takes a Path for its instance directory, rather
   than 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 release

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java?rev=1717345&r1=1717344&r2=1717345&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java Mon Nov 30 22:59:33 2015
@@ -262,4 +262,9 @@ public class HdfsDirectory extends BaseD
     }
     return this.hdfsDirPath.equals(((HdfsDirectory) obj).hdfsDirPath);
   }
+
+  @Override
+  public String toString() {
+    return this.getClass().getSimpleName() + "@" + hdfsDirPath + " lockFactory=" + lockFactory;
+  }
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java?rev=1717345&r1=1717344&r2=1717345&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java Mon Nov 30 22:59:33 2015
@@ -120,5 +120,10 @@ public class HdfsLockFactory extends Loc
     public void ensureValid() throws IOException {
       // no idea how to implement this on HDFS
     }
+
+    @Override
+    public String toString() {
+      return "HdfsLock(lockFile=" + lockFile + ")";
+    }
   }
 }