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

Switch to Plain View
Pig, mail # user - EvalFunc finish() closing connections prematurely


Copy link to this message
-
EvalFunc finish() closing connections prematurely
Mike Sukmanowsky 2013-03-14, 21:05
Hi there,

I have an EvalFunc which uses an internal class that opens up connections
to a Redis and MongoDB server.  This class has a close() method which
closes connections to both Redis and MongoDB.

In my EvalFunc implementation, I placed the close() method

    @Override
  public void finish() {
  meta.close();
  }

But this is leading to a

java.lang.IllegalStateException: this Mongo has been closed

indicating that Pig attempted to read from Mongo after a call to finish().
 Is this an error specific to running a Pig script locally?

Mike

--
Mike Sukmanowsky

Product Lead, http://parse.ly
989 Avenue of the Americas, 3rd Floor
New York, NY  10018
p: +1 (416) 953-4248
e: [EMAIL PROTECTED]
+
Jonathan Coveney 2013-03-14, 21:24
+
Mike Sukmanowsky 2013-03-18, 20:53
+
Mike Sukmanowsky 2013-03-22, 15:28
+
Dmitriy Ryaboy 2013-03-26, 00:03
+
Jonathan Coveney 2013-03-26, 14:48