Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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))
      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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB