MockBatchScanner is broken
--------------------------

                 Key: ACCUMULO-309
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-309
             Project: Accumulo
          Issue Type: Bug
    Affects Versions: 1.4.0
            Reporter: John Vines


In my attempt to test a potential fix for ACCUMULO-175, I discovered the 
following code did not return any results-
{noformat}
public class TestRunningAgainstMock {
  public static void main(String[] args) throws AccumuloException, 
AccumuloSecurityException, TableExistsException, TableNotFoundException,
      InterruptedException
  {
    MockInstance mi = new MockInstance("test");
    Connector conn = mi.getConnector("root", new byte[0]);
    conn.tableOperations().create("testTable", true);
    Mutation m = new Mutation("row");
    m.put("cf", "cq", "val");
    BatchWriter bw = conn.createBatchWriter("testTable", 500, 500, 1);
    bw.addMutation(m);
    bw.flush();
    bw.close();
    Scanner bs = conn.createBatchScanner("testTable", new Authorizations(), 1);
    Iterator<Entry<Key,Value>> iter = bs.iterator();
    if (!iter.hasNext())
      System.out.println("No values");
    while (iter.hasNext())
      System.out.println(iter.next());
  }
}{noformat}

Switching it to a regular scanner did work though.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to