hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r773978 - in /hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase: io/ImmutableBytesWritable.java mapred/IndexTableReduce.java
Date Tue, 12 May 2009 16:59:01 GMT
Author: stack
Date: Tue May 12 16:59:01 2009
New Revision: 773978

URL: http://svn.apache.org/viewvc?rev=773978&view=rev
Log:
 HBASE-1407  Changing internal structure of ImmutableBytesWritable -- fix broken build

Modified:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapred/IndexTableReduce.java

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java?rev=773978&r1=773977&r2=773978&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java Tue
May 12 16:59:01 2009
@@ -97,7 +97,18 @@
    * @param b Use passed bytes as backing array for this instance.
    */
   public void set(final byte [] b) {
+    set(b, 0, b.length);
+  }
+
+  /**
+   * @param b Use passed bytes as backing array for this instance.
+   * @param offset
+   * @param length
+   */
+  public void set(final byte [] b, final int offset, final int length) {
     this.bytes = b;
+    this.offset = offset;
+    this.length = length;
   }
   
   /**
@@ -110,6 +121,10 @@
     }
     return this.length;
   }
+ 
+  public int getLength() {
+    return getSize();
+  }
 
   public int getOffset(){
     return this.offset;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapred/IndexTableReduce.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapred/IndexTableReduce.java?rev=773978&r1=773977&r2=773978&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapred/IndexTableReduce.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapred/IndexTableReduce.java Tue May
12 16:59:01 2009
@@ -76,7 +76,7 @@
 
     // index and store row key, row key already UTF-8 encoded
     Field keyField = new Field(indexConf.getRowkeyName(),
-      Bytes.toString(key.get()),
+      Bytes.toString(key.get(), key.getOffset(), key.getLength()),
       Field.Store.YES, Field.Index.UN_TOKENIZED);
     keyField.setOmitNorms(true);
     doc.add(keyField);



Mime
View raw message