bigtop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Vyas <jayunit...@gmail.com>
Subject ITest Shell.groovy hangs
Date Thu, 29 Aug 2013 01:30:57 GMT
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))
      writer.println(script)
      writer.close()
    }
    ByteArrayOutputStream baosErr = new ByteArrayOutputStream(4096);
    proc.consumeProcessErrorStream(baosErr);
    println(key+" PROCESS :::::: READ LINES")
    out = proc.in.readLines()

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


-- 
Jay Vyas
http://jayunit100.blogspot.com

Mime
View raw message