Unable to read HBase data from solr

2014-08-13 Thread Vivekanand Ittigi
I'm trying to read specific HBase data and index into solr using groovy
script in /update handler of solrconfig file but I'm getting the error
mentioned below

I'm placing the same HBase jar on which i'm running in solr lib. Many
article said

WorkAround:
1. First i thought that class path has two default xmls and its throwing
the error because one of the two is from some older version of hbase jar.
But the class path has no hbase jar.
2. Setting hbase.default.for.version.skip to true in hbase-site.xml and
adding that to class path

But still im getting the same error. I think solr internally reads
hbase-site.xml file but do not know from where..?

Please help me.. If further info is needed i'm ready to provide


SEVERE: org.apache.solr.common.SolrException: Unable to invoke function
processAdd in script: update-script.groovy: java.lang.RuntimeException:
hbase-default.xml file seems to be for and old version of HBase (null),
this version is 0.94.10
at
org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.invokeFunction(StatelessScriptUpdateProcessorFactory.java:433)
at
org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.processAdd(StatelessScriptUpdateProcessorFactory.java:374)
at
org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:246)
at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173)
at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)


Re: Unable to read HBase data from solr

2014-08-13 Thread Erick Erickson
Solr doesn't know a _thing_ about HBase. You say you've
put the HBase jar somewhere and are accessing it in your
script update processor. You need to find out where the
HBase code is looking for the hbase-default.xml file and
I'm afraid I have very little knowledge here.

You _might_ have some joy by having your script print out
where the CWD is, and insuring that the hbase code knows
where to look for the hbase config files relative to there, but
that's a wild shot in the dark.

Best,
Erick


On Wed, Aug 13, 2014 at 4:46 AM, Vivekanand Ittigi vi...@biginfolabs.com
wrote:

 I'm trying to read specific HBase data and index into solr using groovy
 script in /update handler of solrconfig file but I'm getting the error
 mentioned below

 I'm placing the same HBase jar on which i'm running in solr lib. Many
 article said

 WorkAround:
 1. First i thought that class path has two default xmls and its throwing
 the error because one of the two is from some older version of hbase jar.
 But the class path has no hbase jar.
 2. Setting hbase.default.for.version.skip to true in hbase-site.xml and
 adding that to class path

 But still im getting the same error. I think solr internally reads
 hbase-site.xml file but do not know from where..?

 Please help me.. If further info is needed i'm ready to provide


 SEVERE: org.apache.solr.common.SolrException: Unable to invoke function
 processAdd in script: update-script.groovy: java.lang.RuntimeException:
 hbase-default.xml file seems to be for and old version of HBase (null),
 this version is 0.94.10
 at

 org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.invokeFunction(StatelessScriptUpdateProcessorFactory.java:433)
 at

 org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.processAdd(StatelessScriptUpdateProcessorFactory.java:374)
 at
 org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:246)
 at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173)
 at

 org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
 at

 org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
 at

 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797)
 at

 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)