You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2013/10/31 04:25:21 UTC
[09/10] git commit: ACCUMULO-1783 Remove the InternalMap usage to
make the schema declaration in the value of the AS command in a LOAD
ACCUMULO-1783 Remove the InternalMap usage to make the schema
declaration in the value of the AS command in a LOAD
Project: http://git-wip-us.apache.org/repos/asf/accumulo-pig/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo-pig/commit/9279c77b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo-pig/tree/9279c77b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo-pig/diff/9279c77b
Branch: refs/heads/ACCUMULO-1783
Commit: 9279c77bba29470894ed6bb08fa626a67be6952c
Parents: e0d3ade
Author: Josh Elser <el...@apache.org>
Authored: Wed Oct 30 22:25:39 2013 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Wed Oct 30 22:25:39 2013 -0400
----------------------------------------------------------------------
src/main/java/org/apache/accumulo/pig/AccumuloStorage.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo-pig/blob/9279c77b/src/main/java/org/apache/accumulo/pig/AccumuloStorage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/accumulo/pig/AccumuloStorage.java b/src/main/java/org/apache/accumulo/pig/AccumuloStorage.java
index cccba64..1788997 100644
--- a/src/main/java/org/apache/accumulo/pig/AccumuloStorage.java
+++ b/src/main/java/org/apache/accumulo/pig/AccumuloStorage.java
@@ -3,6 +3,7 @@ package org.apache.accumulo.pig;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -95,7 +96,7 @@ public class AccumuloStorage extends AbstractAccumuloStorage {
currentEntry = nextEntry;
// Flush and start again
- InternalMap map = aggregate(aggregate);
+ Map<String,Object> map = aggregate(aggregate);
tupleEntries.add(map);
aggregate = Lists.newLinkedList();
@@ -110,7 +111,7 @@ public class AccumuloStorage extends AbstractAccumuloStorage {
// and wrap it in a tuple
Tuple tuple = TupleFactory.getInstance().newTuple(tupleEntries.size() + 1);
- tuple.set(0, new DataByteArray(key.getRow().getBytes()));
+ tuple.set(0, key.getRow().toString());
int i = 1;
for (Object obj : tupleEntries) {
tuple.set(i, obj);
@@ -120,8 +121,8 @@ public class AccumuloStorage extends AbstractAccumuloStorage {
return tuple;
}
- private InternalMap aggregate(List<Entry<Key,Value>> columns) {
- InternalMap map = new InternalMap();
+ private Map<String,Object> aggregate(List<Entry<Key,Value>> columns) {
+ Map<String,Object> map = new HashMap<String,Object>();
for (Entry<Key,Value> column : columns) {
map.put(column.getKey().getColumnFamily().toString() + COLON + column.getKey().getColumnQualifier().toString(),
new DataByteArray(column.getValue().get()));