public interface HiveClientCallback<T>
HiveTemplate
execute method, often as anonymous
classes within a method implementation.Modifier and Type | Method and Description |
---|---|
T |
doInHive(HiveClient hiveClient)
Gets called by
HiveTemplate.execute(HiveClientCallback) with an active HiveClient . |
T doInHive(HiveClient hiveClient) throws java.lang.Exception
HiveTemplate.execute(HiveClientCallback)
with an active HiveClient
. Does not need to
care about activating or closing the HiveClient
, or handling exceptions.
Due to the big number of exceptions thrown by HiveClient
(in particular
ThriftHiveMetastore.Client
) which do not share any common base class,
the callback signature uses a generic declaration.
For user specific error, consider runtime exceptions which are not translated.hiveClient
- active hive connectionjava.lang.Exception
- if thrown by HiveClient