[ 
https://issues.apache.org/jira/browse/LUCENE-6530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14576264#comment-14576264
 ] 

Uwe Schindler edited comment on LUCENE-6530 at 6/7/15 2:37 PM:
---------------------------------------------------------------

I cleaned up the patch.

I removed the inheritIO from the crushing JRE tester (I just cleaned up the 
code a bit for Java 7). I don't think its a good idea to have the crush message 
printed to stderr, so it gets visible. You only want this while debugging.

But I simplified the code for Solr:
- the iptables stuff only produces outbput if its broken. So inheritIO is fine 
(lots of code removed). I also added check for exit code, so user gets error if 
enabling iptables but its not correctly setup (like missing {{chmod u+s}})
- the mapreduce stuff was removed completely, because this was not working at 
all and somehow useless.


was (Author: thetaphi):
I cleaned up the patch.

I removed the inheritIO from the crushing JRE tester (I just cleaned up the 
code a bit for Java 7). I don't think its a good idea to have the crush message 
printed to stderr, so it gets visible. You only want this while debugging.

But I simplified the code for Solr:
- the iptables stuff only produces outbut if its broken. So inheritIO is fine 
(lots of code removed). I also added check for exit code, so user gets error if 
enabling iptables but its not correctly setup (like missing {{chmod u+s}})
- the mapreduce stuff was removed completely, because this was not working at 
all and somehow useless.

> Use Java 7 ProcessBuilder.inheritIO() instead of own ThreadPumper
> -----------------------------------------------------------------
>
>                 Key: LUCENE-6530
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6530
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: Java7
>             Fix For: Trunk, 5.3
>
>         Attachments: LUCENE-6530.patch, LUCENE-6530.patch
>
>
> In some tests wie spawn separate processes (TestIndexWriterOnJRECrash and 
> Solr's IPTables). To capture stdin/stdout/stderr we spawn several threads 
> that pump those to stdout/stderr.
> Since Java 7 there is ProcessBuilder.inheritIO() that does this for us 
> without any additional threads. We should use this instead. Fix is easy, just 
> remove some stuff :-)
> I did the same already for my Codec classloader deadlock test, so this is 
> just a followup for the other tests.
> Patch is attached and can be committed to trunk and 5.x.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to