[ 
https://issues.apache.org/jira/browse/ACCUMULO-175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Vines resolved ACCUMULO-175.
---------------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 1.3.6)

Using the following code-
{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);
    IteratorSetting is = new IteratorSetting(9000, TestCombiner.class);
    Combiner.setCombineAllColumns(is, true);
    conn.tableOperations().attachIterator("testTable", is);
    Mutation m = new Mutation("row");
    m.put("cf", "cq", "val");
    BatchWriter bw = conn.createBatchWriter("testTable", 500, 500, 1);
    bw.addMutation(m);
    bw.close();
    Scanner bs = conn.createScanner("testTable", new Authorizations());
    Iterator<Entry<Key,Value>> iter = bs.iterator();
    if (!iter.hasNext())
      System.out.println("No values");
    while (iter.hasNext())
      System.out.println(iter.next());
  }
{noformat}

and setting up the classpath to include 
accumulo-core-1.4.0-incubating-SNAPSHOT.jar:TestLoadingIterators.jar
hadoop-core-0.20.205.0.jar
commons-logging-1.1.1.jar
log4j-1.2.15.jar
commons-collections-3.2.1.jar
commons-lang-2.4.jar
libthrift-0.6.1.jar
accumulo-start-1.4.0-incubating-SNAPSHOT.jar
commons-jci-fam-1.0.jar
test/system/auto/TestCombinerY.jar

It runs. I cannot recreate, so it has either somehow been resolved with the 
other Mock changes or the original problem stemmed from classpath issues. I'm 
closing this issue, but if someone can provide a repeatable, but correctly 
configured, case where this ticket is valid, I would greatly appreciate it.
                
> Mock Accumulo yields classpath errors
> -------------------------------------
>
>                 Key: ACCUMULO-175
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-175
>             Project: Accumulo
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 1.3.5
>            Reporter: John Vines
>            Assignee: John Vines
>              Labels: classloader
>         Attachments: MockClassLoaderPatch.patch
>
>
> Mock Accumulo is used for our junit tests. There are users out there who 
> would like to use it for testing applications built on top of Accumulo. This 
> causes errors due to the way we set up classloading, etc. since we don't do 
> any of the fancy behind-the-scenes magic for classpaths when mocking. We 
> should tweak either the way the classloader works, or the way iteratorutils 
> works, or how MockAccumulo is stood up to ensure whatever classloader is used 
> is working transparently to the user.

--
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