You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2018/10/03 16:37:25 UTC

[accumulo] branch master updated (caf75c1 -> 2aeca7a)

This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git.


    from caf75c1  Fixes #421 Organize Fate Operations (#663)
     add 987ae65  Use optimized writeV methods in Mutations (#669)
     new 2aeca7a  Merge branch '1.9'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/accumulo/core/data/Mutation.java    |  13 +--
 .../accumulo/core/util/UnsynchronizedBuffer.java   | 101 +++++++++++++++------
 .../core/util/UnsynchronizedBufferTest.java        |  72 +++++++++++++++
 .../accumulo/server/data/ServerMutation.java       |   4 +-
 4 files changed, 157 insertions(+), 33 deletions(-)


[accumulo] 01/01: Merge branch '1.9'

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 2aeca7ae1edf2c02d0998c51476bcb174861c77e
Merge: caf75c1 987ae65
Author: Mike Miller <mm...@apache.org>
AuthorDate: Wed Oct 3 12:26:55 2018 -0400

    Merge branch '1.9'
    
     Conflicts:
    	core/src/main/java/org/apache/accumulo/core/data/Mutation.java

 .../org/apache/accumulo/core/data/Mutation.java    |  13 +--
 .../accumulo/core/util/UnsynchronizedBuffer.java   | 101 +++++++++++++++------
 .../core/util/UnsynchronizedBufferTest.java        |  72 +++++++++++++++
 .../accumulo/server/data/ServerMutation.java       |   4 +-
 4 files changed, 157 insertions(+), 33 deletions(-)

diff --cc core/src/main/java/org/apache/accumulo/core/data/Mutation.java
index 42094a2,338444d..97dc926
--- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
@@@ -1613,17 -1125,18 +1614,17 @@@ public class Mutation implements Writab
      }
      out.write((byte) (0x80 | hasValues));
  
-     WritableUtils.writeVInt(out, row.length);
+     UnsynchronizedBuffer.writeVInt(out, integerBuffer, row.length);
      out.write(row);
  
-     WritableUtils.writeVInt(out, data.length);
+     UnsynchronizedBuffer.writeVInt(out, integerBuffer, data.length);
      out.write(data);
-     WritableUtils.writeVInt(out, entries);
+     UnsynchronizedBuffer.writeVInt(out, integerBuffer, entries);
  
      if (0x01 == (0x01 & hasValues)) {
-       WritableUtils.writeVInt(out, values.size());
+       UnsynchronizedBuffer.writeVInt(out, integerBuffer, values.size());
 -      for (int i = 0; i < values.size(); i++) {
 -        byte val[] = values.get(i);
 +      for (byte[] val : values) {
-         WritableUtils.writeVInt(out, val.length);
+         UnsynchronizedBuffer.writeVInt(out, integerBuffer, val.length);
          out.write(val);
        }
      }
diff --cc core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
index 59f45fa,2993f8b..f477231
--- a/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
@@@ -136,37 -138,8 +138,12 @@@ public class UnsynchronizedBuffer 
       */
      public void writeVLong(long i) {
        reserve(9);
-       if (i >= -112 && i <= 127) {
-         data[offset++] = (byte) i;
-         return;
-       }
- 
-       int len = -112;
-       if (i < 0) {
-         i ^= -1L; // take one's complement'
-         len = -120;
-       }
- 
-       long tmp = i;
-       while (tmp != 0) {
-         tmp = tmp >> 8;
-         len--;
-       }
- 
-       data[offset++] = (byte) len;
- 
-       len = (len < -120) ? -(len + 120) : -(len + 112);
- 
-       for (int idx = len; idx != 0; idx--) {
-         int shiftbits = (idx - 1) * 8;
-         long mask = 0xFFL << shiftbits;
-         data[offset++] = (byte) ((i & mask) >> shiftbits);
-       }
+       offset = UnsynchronizedBuffer.writeVLong(data, offset, i);
      }
 +
 +    public int size() {
 +      return offset;
 +    }
    }
  
    /**