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 # dev >> Re: [jira] [Updated] (ACCUMULO-175) Mock Accumulo yields classpath errors


Copy link to this message
-
Re: [jira] [Updated] (ACCUMULO-175) Mock Accumulo yields classpath errors
John,

I can't reproduce my original error.  The following works fine with jruby
1.6.3 against Accumulo rc8

---------------------------------------------------------------
require 'java'

# setup classpath the jruby way
Dir.glob("#{ENV['ACCUMULO_HOME']}/lib/*.jar") { |jar| $CLASSPATH << jar }
Dir.glob("#{ENV['HADOOP_HOME']}/lib/*.jar") { |jar| $CLASSPATH << jar }
Dir.glob("#{ENV['HADOOP_HOME']}/*.jar") { |jar| $CLASSPATH << jar }
Dir.glob("#{ENV['ZOOKEEPER_HOME']}/*.jar") { |jar| $CLASSPATH << jar }

puts "Testing mock instance"
instance = Java::OrgApacheAccumuloCoreClientMock::MockInstance.new()
connector = instance.getConnector("root", "password")
auths = Java::OrgApacheAccumuloCoreSecurity::Authorizations.new
scanner = connector.createScanner("!METADATA", auths)

begin
  scanner.iterator
  puts "Success"
rescue => e
  puts "Failure"
  puts e.message
  puts e.backtrace
end
-----------------------------------------------------------------

With version 1.3.4, I get a ClassNotFoundException for the
VersioningIterator at line 90 in the MockScanner.  Looks like my issue was
already fixed.  Sorry I wasn't able to reproduce.

Let me know if you want me to NOT test anything else. :)

Mike

---------- Forwarded message ----------
From: John Vines (Updated) (JIRA) <[EMAIL PROTECTED]>
Date: Wed, Nov 23, 2011 at 9:11 AM
Subject: [jira] [Updated] (ACCUMULO-175) Mock Accumulo yields classpath
errors
To: [EMAIL PROTECTED]

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

John Vines updated ACCUMULO-175:
--------------------------------

    Comment: was deleted

(was: This is my prospective patch. It works in the tomcat case, but I want
to make sure it's also applicable for Groovy, JRuby, and/or Scala use
cases.)

> 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
>             Fix For: 1.3.6
>
>         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
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