Re: Q: UDFs & Threading

2015-09-17 Thread Sergey Shelukhin
default. From: Chris Losinger mailto:chris.losin...@sas.com>> Reply-To: "user@hive.apache.org<mailto:user@hive.apache.org>" mailto:user@hive.apache.org>> Date: Thursday, September 17, 2015 at 09:16 To: "user@hive.apache.org<mailto:user@hive.apache.org>" ma

Q: UDFs & Threading

2015-09-17 Thread Chris Losinger
Hi, I'm writing some Hive UDFs, using JNI to talk to a native C library. The C library requires some expensive initialization, and maintains its internal state via a handle. To avoid re-initializing this library at every row, I initialize the library on the first row, then store the handle as a