SOLR-6907: URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1649383 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erick Erickson 2015-01-04 19:00:46 +00:00
parent 73837c049e
commit 75e1cafacf
2 changed files with 6 additions and 1 deletions

View File

@ -399,6 +399,9 @@ Bug Fixes
* SOLR-6735: Make CloneFieldUpdateProcessorFactory null safe (Steve Davids via ehatcher) * SOLR-6735: Make CloneFieldUpdateProcessorFactory null safe (Steve Davids via ehatcher)
* SOLR-6907: URLEncode documents directory in MorphlineMapperTest to handle spaces etc.
in file name. (Ramkumar Aiyengar via Erick Erickson)
Optimizations Optimizations
---------------------- ----------------------

View File

@ -16,6 +16,7 @@
*/ */
package org.apache.solr.hadoop; package org.apache.solr.hadoop;
import java.net.URLEncoder;
import java.util.List; import java.util.List;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
@ -46,7 +47,8 @@ public class MorphlineMapperTest extends MRUnitBase {
Configuration config = mapDriver.getConfiguration(); Configuration config = mapDriver.getConfiguration();
setupHadoopConfig(config); setupHadoopConfig(config);
mapDriver.withInput(new LongWritable(0L), new Text("hdfs://localhost/" + DOCUMENTS_DIR + "/sample-statuses-20120906-141433.avro")); mapDriver.withInput(new LongWritable(0L), new Text("hdfs://localhost/" +
URLEncoder.encode(DOCUMENTS_DIR, "UTF-8") + "/sample-statuses-20120906-141433.avro"));
SolrInputDocument sid = new SolrInputDocument(); SolrInputDocument sid = new SolrInputDocument();
sid.addField("id", "uniqueid1"); sid.addField("id", "uniqueid1");