org.springframework.data.hadoop.hive
Interface HiveClientCallback<T>


public interface HiveClientCallback<T>

Callback interface for Hive code. To be used with HiveTemplate execute method, assumably often as anonymous classes within a method implementation.

Author:
Costin Leau

Method Summary
 T doInHive(HiveClient hiveClient)
          Gets called by HiveTemplate.execute(HiveClientCallback) with an active HiveClient.
 

Method Detail

doInHive

T doInHive(HiveClient hiveClient)
           throws Exception
Gets called by 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.

Parameters:
hiveClient - active hive client
Returns:
action result
Throws:
Exception - if thrown by HiveClient