Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Bigtop >> mail # user >> ITest Shell.groovy hangs

Copy link to this message
ITest Shell.groovy hangs
Hi bigtop ! Im finding that a complex shell script, run via Shell.groovy,
hangs when i call it.

Ive foud that the script fails after "PROCES :::::::: READ LINES" below, in
the debugging statement.

This is a shell script which starts a flume sink up using nohup, and then
cat's to a file that the sink is listening on.   The script completes
normally when run from anywhere in the terminal.

Any thoughts on why the ITest Shell would hang ?

    Thread.start {
      def writer = new PrintWriter(new BufferedOutputStream(proc.out))
    ByteArrayOutputStream baosErr = new ByteArrayOutputStream(4096);
    println(key+" PROCESS :::::: READ LINES")
    out = proc.in.readLines()

    // Possibly a bug in String.split as it generates a 1-element array on
    // empty String
    if (baosErr.size() != 0) {
      err = baosErr.toString().split('\n');
    else {
      err = new ArrayList<String>();
    println(key+" PROCESS::::::: wait for ")
Jay Vyas