[
https://issues.apache.org/jira/browse/GORA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16831480#comment-16831480
]
Kevin Ratnasekera commented on GORA-500:
----------------------------------------
{code}
@SuppressWarnings("rawtypes")
private SpecificDatumReader getDatumReader(Schema fieldSchema) {
SpecificDatumReader<?> reader = readerMap.get(fieldSchema);
if (reader == null) {
reader = new SpecificDatumReader(fieldSchema);// ignore dirty bits
SpecificDatumReader localReader = null;
if ((localReader = readerMap.putIfAbsent(fieldSchema, reader)) != null) {
reader = localReader;
}
}
return reader;
}
@SuppressWarnings("rawtypes")
private SpecificDatumWriter getDatumWriter(Schema fieldSchema) {
SpecificDatumWriter writer = writerMap.get(fieldSchema);
if (writer == null) {
writer = new SpecificDatumWriter(fieldSchema);// ignore dirty bits
writerMap.put(fieldSchema, writer);
}
return writer;
}
{code}
Current code base no longer use schemaId to cache schema instances. Hence I am
closing the issue.
> bug in org.apache.gora.solr.store.SolrStore#getDatumWriter & #getDatumReader
> ----------------------------------------------------------------------------
>
> Key: GORA-500
> URL: https://issues.apache.org/jira/browse/GORA-500
> Project: Apache Gora
> Issue Type: Bug
> Components: gora-solr
> Reporter: aakash
> Priority: Major
> Fix For: 1.0
>
>
> The above referenced methods use schemaId to cache DatumReader and
> DatumWriter instances. This restricts you to using a schema type of "map"
> with only a single value set. the caching method should use a more specific
> identifier like what is returned from fieldSchema.toString() instead of
> schemaId, so that the caching mechanism doesn't return a reader/writer that
> doesn't match your data set.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)