hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r443467 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/io/SequenceFile.java
Date Thu, 14 Sep 2006 20:54:39 GMT
Author: cutting
Date: Thu Sep 14 13:54:38 2006
New Revision: 443467

URL: http://svn.apache.org/viewvc?view=rev&rev=443467
Log:
HADOOP-530.  Improve error messages in SequenceFile when keys or values are of the wrong type.
 Contributed by Hairong.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SequenceFile.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=443467&r1=443466&r2=443467
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Sep 14 13:54:38 2006
@@ -11,6 +11,9 @@
    file format used to store pathnames has some limitations.
    (Wendy Chien via cutting)
 
+3. HADOOP-530.  Improve error messages in SequenceFile when keys or
+   values are of the wrong type.  (Hairong Kuang via cutting)
+
 
 Release 0.6.1 - 2006-08-13
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SequenceFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SequenceFile.java?view=diff&rev=443467&r1=443466&r2=443467
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SequenceFile.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SequenceFile.java Thu Sep 14 13:54:38
2006
@@ -528,9 +528,11 @@
     public synchronized void append(Writable key, Writable val)
       throws IOException {
       if (key.getClass() != keyClass)
-        throw new IOException("wrong key class: "+key+" is not "+keyClass);
+        throw new IOException("wrong key class: "+key.getClass().getName()
+            +" is not "+keyClass);
       if (val.getClass() != valClass)
-        throw new IOException("wrong value class: "+val+" is not "+valClass);
+        throw new IOException("wrong value class: "+val.getClass().getName()
+            +" is not "+valClass);
 
       buffer.reset();
 
@@ -643,9 +645,11 @@
     public synchronized void append(Writable key, Writable val)
       throws IOException {
       if (key.getClass() != keyClass)
-        throw new IOException("wrong key class: "+key+" is not "+keyClass);
+        throw new IOException("wrong key class: "+key.getClass().getName()
+            +" is not "+keyClass);
       if (val.getClass() != valClass)
-        throw new IOException("wrong value class: "+val+" is not "+valClass);
+        throw new IOException("wrong value class: "+val.getClass().getName()
+            +" is not "+valClass);
 
       buffer.reset();
 
@@ -1183,7 +1187,8 @@
      * value.  True if another entry exists, and false at end of file. */
     public synchronized boolean next(Writable key) throws IOException {
       if (key.getClass() != keyClass)
-        throw new IOException("wrong key class: "+key+" is not "+keyClass);
+        throw new IOException("wrong key class: "+key.getClass().getName()
+            +" is not "+keyClass);
 
       if (version < BLOCK_COMPRESS_VERSION || blockCompressed == false) {
         outBuf.reset();



Mime
View raw message