Revision: 16639
http://sourceforge.net/p/gate/code/16639
Author: valyt
Date: 2013-04-11 11:34:52 +0000 (Thu, 11 Apr 2013)
Log Message:
-----------
Bugfix: if you don't keep track of the query ID, how exactly do you expect to
use when talking to the remote server?
Enhancement: also trap and report exceptions that are not IO exception, rather
than allowing them to silently kill the background thread.
Modified Paths:
--------------
mimir/trunk/mimir-client/src/gate/mimir/search/RemoteQueryRunner.java
Modified: mimir/trunk/mimir-client/src/gate/mimir/search/RemoteQueryRunner.java
===================================================================
--- mimir/trunk/mimir-client/src/gate/mimir/search/RemoteQueryRunner.java
2013-04-11 11:27:40 UTC (rev 16638)
+++ mimir/trunk/mimir-client/src/gate/mimir/search/RemoteQueryRunner.java
2013-04-11 11:34:52 UTC (rev 16639)
@@ -106,7 +106,10 @@
// ...and we're done!
documentsCount = newDocumentsCount;
}
- } catch(IOException e) {
+ } catch(InterruptedException e) {
+ Thread.currentThread().interrupt();
+ logger.warn("Interrupted while waiting", e);
+ } catch (Exception e) {
if(failuresAllowed > 0) {
failuresAllowed --;
logger.error("Exception while obtaining remote document data (will
retry)", e);
@@ -119,10 +122,7 @@
logger.error("Exception while obtaining remote document data.", e);
exceptionInBackgroundThread = e;
return;
- }
- } catch(InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.warn("Interrupted while waiting", e);
+ }
}
}
}
@@ -279,6 +279,7 @@
}
protected void init(String queryId, Executor threadSource) {
+ this.queryId = queryId;
// init the caches
this.documentIds = new LongBigArrayBigList();
this.documentScores = new DoubleBigArrayBigList();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs