[
https://issues.apache.org/jira/browse/ACCUMULO-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003315#comment-14003315
]
ASF GitHub Bot commented on ACCUMULO-2825:
------------------------------------------
Github user ryaneleary commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/7#discussion_r12844676
--- Diff:
core/src/main/java/org/apache/accumulo/core/iterators/user/RowEncodingIterator.java
---
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.core.iterators.user;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedMap;
+
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.PartialKey;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.iterators.IteratorEnvironment;
+import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
+import org.apache.hadoop.io.Text;
+
+/**
+ *
+ * The WholeRowIterator is designed to provide row-isolation so that
queries see mutations as atomic. It does so by encapsulating an entire row of
key/value
--- End diff --
Done.
> WholeRowIterator should be extendable
> -------------------------------------
>
> Key: ACCUMULO-2825
> URL: https://issues.apache.org/jira/browse/ACCUMULO-2825
> Project: Accumulo
> Issue Type: Improvement
> Components: client
> Affects Versions: 1.5.1, 1.6.0
> Reporter: Ryan Leary
> Assignee: Ryan Leary
> Priority: Minor
> Fix For: 1.6.1, 1.7.0
>
> Attachments: add_encode_row_iterator.patch
>
>
> It would be useful to be able to choose encodings other than what is
> implemented already in WholeRowIterator's encodeRow and decodeRow public
> static final methods.
> As an example, I wrote an iterator that reads in CQ/val pairs and
> automatically populates a protocol buffer. To do this, however, I essentially
> copy/pasted all of the WholeRowIterator source and changed the encode/decode
> methods.
> In the interest of not changing the WholeRowIterator API in any meaningful
> way (hopefully meaning this improvement could be added to 1.6.1), I have
> created a new abstract iterator: RowEncodingIterator, which WholeRowIterator
> now extends, implementing rowEncoder and rowDecoder.
--
This message was sent by Atlassian JIRA
(v6.2#6252)