mirror of https://github.com/apache/lucene.git
SOLR-1145: handle parentless infoStream file, move example to mainIndex, uncomment and set to false by default.
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@823281 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
11c0f72446
commit
d87d335af8
|
@ -87,10 +87,6 @@
|
||||||
-->
|
-->
|
||||||
<!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-->
|
<!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-->
|
||||||
|
|
||||||
<!-- To aid in advanced debugging, you may turn on IndexWriter debug logging.
|
|
||||||
Uncommenting this and setting to true will set the file that the underlying
|
|
||||||
Lucene IndexWriter will write its debug infostream to. -->
|
|
||||||
<!-- <infoStream file="/path/file">false</infoStream> -->
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This option specifies which Lucene LockFactory implementation to use.
|
This option specifies which Lucene LockFactory implementation to use.
|
||||||
|
@ -165,6 +161,11 @@
|
||||||
-->
|
-->
|
||||||
</deletionPolicy>
|
</deletionPolicy>
|
||||||
|
|
||||||
|
<!-- To aid in advanced debugging, you may turn on IndexWriter debug logging.
|
||||||
|
Setting to true will set the file that the underlying Lucene IndexWriter
|
||||||
|
will write its debug infostream to. -->
|
||||||
|
<infoStream file="INFOSTREAM.txt">false</infoStream>
|
||||||
|
|
||||||
</mainIndex>
|
</mainIndex>
|
||||||
|
|
||||||
<!-- Enables JMX if and only if an existing MBeanServer is found, use this
|
<!-- Enables JMX if and only if an existing MBeanServer is found, use this
|
||||||
|
|
|
@ -99,7 +99,8 @@ public class SolrIndexWriter extends IndexWriter {
|
||||||
String infoStreamFile = config.infoStreamFile;
|
String infoStreamFile = config.infoStreamFile;
|
||||||
if (infoStreamFile != null) {
|
if (infoStreamFile != null) {
|
||||||
File f = new File(infoStreamFile);
|
File f = new File(infoStreamFile);
|
||||||
f.getParentFile().mkdirs();
|
File parent = f.getParentFile();
|
||||||
|
if (parent != null) parent.mkdirs();
|
||||||
FileOutputStream fos = new FileOutputStream(f, true);
|
FileOutputStream fos = new FileOutputStream(f, true);
|
||||||
infoStream = new TimeLoggingPrintStream(fos, true);
|
infoStream = new TimeLoggingPrintStream(fos, true);
|
||||||
setInfoStream(infoStream);
|
setInfoStream(infoStream);
|
||||||
|
|
Loading…
Reference in New Issue