Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Accumulo >> mail # user >> Re: ROW ID Iterator - sanity check


+
Adam Fuchs 2012-05-20, 17:57
+
David Medinets 2012-05-19, 22:09
+
Adam Fuchs 2012-05-19, 23:49
+
David Medinets 2012-05-20, 04:03
+
William Slacum 2012-05-20, 04:18
Copy link to this message
-
Re: ROW ID Iterator - sanity check
Excuse me, I meant a SortedKeyValueIterator implementation :)

On Sun, May 20, 2012 at 12:18 AM, William Slacum <[EMAIL PROTECTED]> wrote:
> A SortedKeyValue implementation would allow you to skip across rows
> server side, potentially saving you lots of reads and network traffic.
>
> On Sun, May 20, 2012 at 12:03 AM, David Medinets
> <[EMAIL PROTECTED]> wrote:
>>> We can also talk about how to make this more efficient with an iterator if you like.
>>
>> I would. How can it be more efficient?
>>
>> On Sat, May 19, 2012 at 7:49 PM, Adam Fuchs <[EMAIL PROTECTED]> wrote:
>>> One issue here is you are mixing Iterator and Iterable in the same object.
>>
>> Good point. I've fixed that. And also looked at MockInstance. I've
>> changed my code to the following which does seem to work. I have some
>> code handle Column Family iterating but I want to hear about
>> efficiency before I post that code.
>>
>> public class IteratorTestDriver {
>>
>>        public static void main(String[] args) throws IOException,
>> AccumuloException, AccumuloSecurityException, TableExistsException,
>> TableNotFoundException {
>>                Instance mock = new MockInstance("development");
>>                Connector connector = mock.getConnector("root", "password".getBytes());
>>                connector.tableOperations().create("TABLEA");
>>
>>                BatchWriter wr = connector.createBatchWriter("TABLEA", 10000000, 10000, 5);
>>                for(int i = 0; i < 1000; ++i) {
>>                        Mutation m = new Mutation("row_"+i);
>>                        m.put("cf_"+i, "cq_"+1, "val_"+1);
>>                        wr.addMutation(m);
>>                }
>>                wr.close();
>>
>>                Scanner scanner = connector.createScanner("TABLEA", new Authorizations());
>>
>>        for (String rowId : new RowIdIterator(scanner)) {
>>                System.out.println("ROW ID: " + rowId);
>>        }
>>
>>        }
>> }
+
David Medinets 2012-05-20, 16:48
+
Billie J Rinaldi 2012-05-20, 17:56