Quantcast
Viewing all articles
Browse latest Browse all 387

k.gruskin on "Cassandra Solr Marshall Exception copyField"

First off this functionality works fine in the Datastax 2.0 version but no longer appears to work in 3.0. Basically when I add a copyFIeld value to the SOLR schema from a string it throws the exception listed below. If I remove the copyField the error goes away, and if I use the cli to insert a value in and view it everything works as expected. When using Hector, SolrJ or the SOLR admin UI I get an exception. I've included and example schema as well as the exception. I can add values fine thorugh the cli but when trying to view them through the UI or when adding them through the hector API I get the exception listed below.

I also verified when I switch back to version 2.x everything works fine with the same schema, column family definitions, etc.... It would be nice if attachments were also supported the uploading of config files etc... would be easier than copy and pasting them.

schema.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<schema name="CVPROTO-Patient" version="1.1">
<types>
<fieldType name="string" class="solr.StrField"/>
<fieldType name="uuid" class="solr.UUIDField"/>
<fieldType name="long" class="solr.LongField"/>
<fieldType name="tlong" class="solr.TrieLongField"/>
<fieldType name="tdouble" class="solr.TrieDoubleField"/>
</types>
<fields>

<field name="row_key" type="string" indexed="true" stored="true"/>

<field name="age_dl" type="tlong" indexed="true" stored="true" default="0"/>
<copyField source="age_d" dest="age_dl" indexed="true" stored="true" default="0"/>

<dynamicField name="*_d" type="string" indexed="true" stored="true"/>
</fields>

<defaultSearchField>row_key</defaultSearchField>
<uniqueKey>row_key</uniqueKey>
</schema>

Column Family:
CREATE COLUMN FAMILY Person
with column_type = 'Standard'
and comparator = 'AsciiType'
AND key_validation_class=UTF8Type
AND default_validation_class = UTF8Type
and column_metadata = [
{column_name : 'personId',
validation_class : UTF8Type,
index_type : KEYS}];

Exception:

<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="error">
<str name="msg">A long is exactly 8 bytes: 2</str>
<str name="trace">org.apache.cassandra.db.marshal.MarshalException: A long is exactly 8 bytes: 2
at org.apache.cassandra.db.marshal.LongType.getString(LongType.java:69)
at com.datastax.bdp.cassandra.index.solr.CassandraDocumentReader.field(CassandraDocumentReader.java:424)
at com.datastax.bdp.cassandra.index.solr.CassandraDocumentReader.loadDocument(CassandraDocumentReader.java:306)
at com.datastax.bdp.cassandra.index.solr.CassandraDocumentReader.document(CassandraDocumentReader.java:104)
at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:159)
at org.apache.lucene.index.BaseCompositeReader.document(BaseCompositeReader.java:110)
at org.apache.lucene.index.IndexReader.document(IndexReader.java:436)
at org.apache.solr.search.SolrIndexSearcher.doc(SolrIndexSearcher.java:573)
at org.apache.solr.response.TextResponseWriter.writeDocuments(TextResponseWriter.java:270)
at org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:172)
at org.apache.solr.response.XMLWriter.writeResponse(XMLWriter.java:111)
at org.apache.solr.response.XMLResponseWriter.write(XMLResponseWriter.java:39)
at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:651)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:372)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
at com.datastax.bdp.cassandra.index.solr.CassandraDispatchFilter.doFilter(CassandraDispatchFilter.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.datastax.bdp.cassandra.audit.SolrHttpAuditLogFilter.doFilter(SolrHttpAuditLogFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.datastax.bdp.cassandra.index.solr.auth.CassandraAuthorizationFilter.doFilter(CassandraAuthorizationFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.datastax.bdp.cassandra.index.solr.auth.DseAuthenticationFilter.doFilter(DseAuthenticationFilter.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:722)
</str>
<int name="code">500</int>
</lst>
</response>


Viewing all articles
Browse latest Browse all 387

Trending Articles