[
https://issues.apache.org/jira/browse/SOLR-469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617472#action_12617472
]
jonjlee edited comment on SOLR-469 at 7/28/08 10:00 AM:
-------------------------------------------------------------
When using CachedSqlEntityProcessor, an NPE is thrown
(EntityProcessorBase.java:367) if a key value doesn't exist in the cached row
set. This change to EntityProcessorBase.java should fix that, or let me know
if I've missed something here!
{noformat}
---
contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
2008-07-28 12:49:21.000000000 -0400
+++
contrib.new/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
2008-07-28 12:40:17.000000000 -0400
@@ -348,7 +348 @@
- if (rowIdVsRows != null) {
- rows = rowIdVsRows.get(key);
- if (rows == null)
- return null;
- dataSourceRowCache = new ArrayList<Map<String, Object>>(rows);
- return getFromRowCacheTransformed();
- } else {
+ if (rowIdVsRows == null) {
@@ -367,6 +360,0 @@
- dataSourceRowCache = new ArrayList<Map<String,
Object>>(rowIdVsRows.get(key));
- if (dataSourceRowCache.isEmpty()) {
- dataSourceRowCache = null;
- return null;
- }
- return getFromRowCacheTransformed();
@@ -374,0 +363,5 @@
+ rows = rowIdVsRows.get(key);
+ if (rows == null)
+ return null;
+ dataSourceRowCache = new ArrayList<Map<String, Object>>(rows);
+ return getFromRowCacheTransformed();
{noformat}
was (Author: jonjlee):
When using CachedSqlEntityProcessor, an NPE is thrown
(EntityProcessorBase.java:367) if a key value doesn't exist in the cached row
set. This change to EntityProcessorBase.java should fix that, or let me know
if I've missed something here!
{quote}
---
contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
2008-07-28 12:49:21.000000000 -0400
+++
contrib.new/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
2008-07-28 12:40:17.000000000 -0400
@@ -348,7 +348 @@
- if (rowIdVsRows != null) {
- rows = rowIdVsRows.get(key);
- if (rows == null)
- return null;
- dataSourceRowCache = new ArrayList<Map<String, Object>>(rows);
- return getFromRowCacheTransformed();
- } else {
+ if (rowIdVsRows == null) {
@@ -367,6 +360,0 @@
- dataSourceRowCache = new ArrayList<Map<String,
Object>>(rowIdVsRows.get(key));
- if (dataSourceRowCache.isEmpty()) {
- dataSourceRowCache = null;
- return null;
- }
- return getFromRowCacheTransformed();
@@ -374,0 +363,5 @@
+ rows = rowIdVsRows.get(key);
+ if (rows == null)
+ return null;
+ dataSourceRowCache = new ArrayList<Map<String, Object>>(rows);
+ return getFromRowCacheTransformed();
{quote}
> Data Import RequestHandler
> --------------------------
>
> Key: SOLR-469
> URL: https://issues.apache.org/jira/browse/SOLR-469
> Project: Solr
> Issue Type: New Feature
> Components: update
> Affects Versions: 1.3
> Reporter: Noble Paul
> Assignee: Grant Ingersoll
> Fix For: 1.3
>
> Attachments: SOLR-469-contrib.patch, SOLR-469-contrib.patch,
> SOLR-469-contrib.patch, SOLR-469-contrib.patch, SOLR-469-contrib.patch,
> SOLR-469-contrib.patch, SOLR-469-contrib.patch, SOLR-469-contrib.patch,
> SOLR-469-contrib.patch, SOLR-469-contrib.patch, SOLR-469-contrib.patch,
> SOLR-469.patch, SOLR-469.patch, SOLR-469.patch, SOLR-469.patch,
> SOLR-469.patch, SOLR-469.patch, SOLR-469.patch, SOLR-469.patch, SOLR-469.patch
>
>
> We need a RequestHandler Which can import data from a DB or other dataSources
> into the Solr index .Think of it as an advanced form of SqlUpload Plugin
> (SOLR-103).
> The way it works is as follows.
> * Provide a configuration file (xml) to the Handler which takes in the
> necessary SQL queries and mappings to a solr schema
> - It also takes in a properties file for the data source
> configuraution
> * Given the configuration it can also generate the solr schema.xml
> * It is registered as a RequestHandler which can take two commands
> do-full-import, do-delta-import
> - do-full-import - dumps all the data from the Database into the
> index (based on the SQL query in configuration)
> - do-delta-import - dumps all the data that has changed since last
> import. (We assume a modified-timestamp column in tables)
> * It provides a admin page
> - where we can schedule it to be run automatically at regular
> intervals
> - It shows the status of the Handler (idle, full-import,
> delta-import)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.