From a997f7e6e94d773252bca4778ea651107e116a63 Mon Sep 17 00:00:00 2001 From: Bill Havanki <bhavanki@cloudera.com> Date: Wed, 27 Nov 2013 18:11:20 -0500 Subject: [PATCH] Fix Accumulo retrieval of values for scan and read --- .../src/main/java/com/yahoo/ycsb/db/AccumuloClient.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java b/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java index 46e60b30..20a6ce93 100644 --- a/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java +++ b/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java @@ -92,6 +92,7 @@ public class AccumuloClient extends DB { } + @Override public void cleanup() throws DBException { try { @@ -104,7 +105,7 @@ public class AccumuloClient extends DB { } } catch (MutationsRejectedException e) { throw new DBException(e); - } + } } /** @@ -180,8 +181,7 @@ public class AccumuloClient extends DB { // Pick out the results we care about. for (Entry<Key, Value> entry : getRow(new Text(key), null)) { Value v = entry.getValue(); - byte[] buf = new byte[v.getSize()]; - v.copy(buf); + byte[] buf = v.get(); result.put(entry.getKey().getColumnQualifier().toString(), new ByteArrayByteIterator(buf)); } @@ -249,7 +249,7 @@ public class AccumuloClient extends DB { } // Now add the key to the hashmap. Value v = entry.getValue(); - byte[] buf = new byte[v.getSize()]; + byte[] buf = v.get(); currentHM.put(entry.getKey().getColumnQualifier().toString(), new ByteArrayByteIterator(buf)); } -- GitLab