0

Hi I am using an Restful web service to query data from Apache hive and I am using glassfish 4.0 server. It runs fine but suddenly it throws

java.lang.IllegalStateException: Queue full

Can any one tell me what may be the reason for this and how to clear this?

EDIT

This is my java code

JavaSparkContext ctx = new JavaSparkContext(new SparkConf().setAppName("AppName").setMaster("MasterUrl"));
HiveContext sqlContext = new HiveContext(ctx.sc());
Row result = sqlContext.sql("Select * from Tablename");
for (int i = 0; i < result.length; i++) {
            output += "{\"" + "Column1" + "\":\"" + result[i].getString(0) + "\",\"" + "Column2" + "\":\"" + result[i].getString(1) + "\",\"" + "Column3" + "\":\"" + result[i].getString(2) + "\",\"" + "Column4" + "\":\"" + result[i].getString(3) + "\",\"" + "Column5" + "\":\"" + result[i].getInt(4) + "\",\"" + "Column6" + "\":\"" + result[i].getString(5) + "\",\"" + "Column7" + "\":\"" + result[i].getString(6) + "\"}" + "\n";
        }
David Degea
  • 19
  • 2
  • 7
  • Can you provide some more information? What's running where etc... – David De Sloovere Aug 11 '15 at 11:54
  • I don't see any restful web service calls in your code ... are you using a SynchronousQueue by any chance? http://stackoverflow.com/questions/9151871/queue-full-on-depth-of-the-blocking-queue-clarification-needed – Kieran Aug 11 '15 at 12:25
  • It's impossible to say without more info. The most important piece obviously being: where is the exception being thrown from? It's worth noting that your string concatenation in a loop is a horrendous construct (see [this](https://www.joelonsoftware.com/2001/12/11/back-to-basics/) famous article). Using a `StringBuilder` instead should cut down on both time and RAM expended by massive amounts. And possibly remove whatever issue you're running into. – The111 Jul 26 '17 at 05:41

0 Answers0