Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # user >> MockInstance usage not working...?


Copy link to this message
-
Re: MockInstance usage not working...?
Setting ACCUMULO_HOME in the run configuration for eclipse seemed to
help.  I still get the stack track, but the program ran.

Any other ideas?

Ingesting data ...
Reading data ...
Exception in thread
"org.apache.accumulo.start.classloader.AccumuloFilesystemAlterationMonitor"
java.lang.NullPointerException
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$MonitorFileImpl.listFiles(FilesystemAlterationObserverImpl.java:64)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.compareChilds(FilesystemAlterationObserverImpl.java:119)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.needsToBeDeleted(FilesystemAlterationObserverImpl.java:203)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.compareChilds(FilesystemAlterationObserverImpl.java:137)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.needsToBeDeleted(FilesystemAlterationObserverImpl.java:203)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl.checkEntries(FilesystemAlterationObserverImpl.java:317)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl.checkAndNotify(FilesystemAlterationObserverImpl.java:331)
at org.apache.accumulo.start.classloader.AccumuloFilesystemAlterationMonitor.run(AccumuloFilesystemAlterationMonitor.java:121)
at java.lang.Thread.run(Thread.java:722)
row_0 cf_0:cq_1 [] 1330555426405 false val_1
row_1 cf_1:cq_1 [] 1330555426408 false val_1
row_10 cf_10:cq_1 [] 1330555426408 false val_1
row_100 cf_100:cq_1 [] 1330555426413 false val_1
row_101 cf_101:cq_1 [] 1330555426413 false val_1
row_102 cf_102:cq_1 [] 1330555426413 false val_1
row_103 cf_103:cq_1 [] 1330555426413 false val_1
row_104 cf_104:cq_1 [] 1330555426413 false val_1
row_105 cf_105:cq_1 [] 1330555426413 false val_1
row_106 cf_106:cq_1 [] 1330555426413 false val_1
row_107 cf_107:cq_1 [] 1330555426413 false val_1
row_108 cf_108:cq_1 [] 1330555426413 false val_1
row_109 cf_109:cq_1 [] 1330555426413 false val_1
...

On Wed, Feb 29, 2012 at 4:30 PM, Keith Turner <[EMAIL PROTECTED]> wrote:
> When you try to scan it calls IteratorUtil.loadIterators() which calls
> AccumuloClassLoader.loadClass().  The AccumuloClassLoader expects
> ACCUMULO_HOME env var to be set, if it is not it does some vodo to try
> to figure things out.  This could be failing.  Are you setting
> ACCUMULO_HOME ?
>
> On Mon, Feb 27, 2012 at 5:19 PM, Jason Trost <[EMAIL PROTECTED]> wrote:
>> Any idea why this doesn't work (see code and stack trace below)?  I am
>> using accumulo trunk.  This problem only occurs when I use a Scanner
>> or BatchScanner.  If I comment out the scanning section there are no
>> errors.
>>
>> Thanks,
>>
>> --Jason
>>
>> Java code (https://gist.github.com/1927202)
>>
>> package accumulo;
>>
>> import java.util.Map.Entry;
>>
>> import org.apache.accumulo.core.client.BatchWriter;
>> import org.apache.accumulo.core.client.Connector;
>> import org.apache.accumulo.core.client.Instance;
>> import org.apache.accumulo.core.client.Scanner;
>> import org.apache.accumulo.core.client.mock.MockInstance;
>> import org.apache.accumulo.core.data.Key;
>> import org.apache.accumulo.core.data.Mutation;
>> import org.apache.accumulo.core.data.Value;
>> import org.apache.accumulo.core.security.Authorizations;
>>
>> public class Mock {
>>
>>        public static void main(String[] args) throws Exception {
>>                String table = "data";
>>                String user = "root";
>>                Instance inst = new MockInstance("inst");
>>                Connector conn = inst.getConnector(user, "secret");
>>                conn.securityOperations().changeUserAuthorizations(user, new
>> Authorizations("auth"));
>>                Authorizations auths = conn.securityOperations().getUserAuthorizations(user);
>>                conn.tableOperations().create(table);
>>
>>                System.out.println("Ingesting data ...");
>>                BatchWriter wr = conn.createBatchWriter(table, 10000000, 10000, 5);
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB