我正在执行MapReduceIndexerTool
以准备脱机Solr索引。
以下是执行环境:
执行工具jar时,我收到以下错误:
hduser@localhost:/usr/local/solr-5.5.0$ hadoop --config /etc/hadoop/conf jar /usr/local/solr-5.5.0/dist/solr-map-reduce-*.jar -D 'mapred.child.java.opts=-Xmx500m' --morphline-file /home/hduser/simpl-morphline.conf --zk-host localhost:2181 --output-dir hdfs://localhost:54310/usr/data/output --collection myCollection --log4j ./log4j.properties --verbose "hdfs://localhost:54310/usr/data/input/simple.tsv"
`2487 [pool-6-thread-1] INFO org.apache.solr.core.SolrXmlConfig - Loading container configuration from /usr/local/solr-5.5.0/file:/tmp/hadoop-hduser/mapred/local/1509433903085/9e6783da-03f6-41ba-9d4d-dcf8f267f6c6.solr.zip/solr.xml
12498 [Thread-64] INFO org.apache.solr.hadoop.HeartBeater - HeartBeat thread running
12499 [Thread-64] INFO org.apache.solr.hadoop.HeartBeater - heartbeat skipped count 0
12520 [Thread-22] WARN org.apache.hadoop.mapred.LocalJobRunner - job_local1445675116_0001
java.lang.Exception: java.lang.IllegalStateException: Failed to initialize record writer for org.apache.solr.hadoop.MapReduceIndexerTool/MorphlineMapper, attempt_local1445675116_0001_r_000000_0
at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:529)
Caused by: java.lang.IllegalStateException: Failed to initialize record writer for org.apache.solr.hadoop.MapReduceIndexerTool/MorphlineMapper, attempt_local1445675116_0001_r_000000_0
at org.apache.solr.hadoop.SolrRecordWriter.<init>(SolrRecordWriter.java:128)
at org.apache.solr.hadoop.SolrOutputFormat.getRecordWriter(SolrOutputFormat.java:164)
at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.<init>(ReduceTask.java:540)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:614)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
at org.apache.hadoop.mapred.LocalJobRunner$Job$ReduceTaskRunnable.run(LocalJobRunner.java:319)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: solr.xml does not exist in /usr/local/solr-5.5.0/file:/tmp/hadoop-hduser/mapred/local/1509433903085/9e6783da-03f6-41ba-9d4d-dcf8f267f6c6.solr.zip cannot start Solr
at org.apache.solr.core.SolrXmlConfig.fromFile(SolrXmlConfig.java:106)
at org.apache.solr.core.SolrXmlConfig.fromSolrHome(SolrXmlConfig.java:139)
at org.apache.solr.core.CoreContainer.<init>(CoreContainer.java:183)
at org.apache.solr.hadoop.SolrRecordWriter.createEmbeddedSolrServer(SolrRecordWriter.java:161)
at org.apache.solr.hadoop.SolrRecordWriter.<init>(SolrRecordWriter.java:121)
... 10 more
13339 [main] ERROR org.apache.solr.hadoop.MapReduceIndexerTool - Job failed! jobName: org.apache.solr.hadoop.MapReduceIndexerTool/MorphlineMapper, jobId: job_local1445675116_0001`
它抱怨solr.xml,即使solr.xml在zookeeper配置中可用。