|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HiveOperations
Interface specifying a basic set of Hive operations. Implemented by HiveTemplate
.
Not often used directly, but a useful option to enhance testability, as it can easily be mocked or stubbed.
Method Summary | ||
---|---|---|
|
execute(HiveClientCallback<T> action)
Executes the action specified by the given callback object within an active HiveClient . |
|
java.util.List<java.lang.String> |
executeScript(HiveScript script)
Executes a Hive script. |
|
java.util.List<java.lang.String> |
executeScript(java.lang.Iterable<HiveScript> scripts)
Executes multiple Hive scripts. |
|
java.util.List<java.lang.String> |
query(java.lang.String query)
Executes the given HiveQL that results in a list of objects. |
|
java.util.List<java.lang.String> |
query(java.lang.String query,
java.util.Map<?,?> arguments)
Executes the given HiveQL using the list of arguments, expecting a list of objects. |
|
java.lang.Integer |
queryForInt(java.lang.String query)
Executes the given HiveQL that results in a single int value. |
|
java.lang.Integer |
queryForInt(java.lang.String query,
java.util.Map<?,?> arguments)
Executes the given HiveQL using the list of arguments, that results in a single int value. |
|
java.lang.Long |
queryForLong(java.lang.String query)
Executes the given HiveQL that results in a single long value. |
|
java.lang.Long |
queryForLong(java.lang.String query,
java.util.Map<?,?> arguments)
Executes the given HiveQL using the list of arguments, that results in a single long value. |
|
java.lang.String |
queryForString(java.lang.String query)
Executes the given HiveQL that results in a single object. |
|
java.lang.String |
queryForString(java.lang.String query,
java.util.Map<?,?> arguments)
Executes the given HiveQL using the list of arguments, that results in a single object. |
Method Detail |
---|
<T> T execute(HiveClientCallback<T> action) throws org.springframework.dao.DataAccessException
HiveClient
.
action
- callback object taht specifies the Hive action
org.springframework.dao.DataAccessException
java.util.List<java.lang.String> query(java.lang.String query) throws org.springframework.dao.DataAccessException
query
- HiveQL
org.springframework.dao.DataAccessException
java.util.List<java.lang.String> query(java.lang.String query, java.util.Map<?,?> arguments) throws org.springframework.dao.DataAccessException
query
- HiveQLarguments
- query arguments
org.springframework.dao.DataAccessException
java.lang.String queryForString(java.lang.String query) throws org.springframework.dao.DataAccessException
query
- HiveQL
org.springframework.dao.DataAccessException
java.lang.String queryForString(java.lang.String query, java.util.Map<?,?> arguments) throws org.springframework.dao.DataAccessException
query
- HiveQLarguments
- query arguments
org.springframework.dao.DataAccessException
java.lang.Integer queryForInt(java.lang.String query) throws org.springframework.dao.DataAccessException
query
- HiveQL
org.springframework.dao.DataAccessException
java.lang.Integer queryForInt(java.lang.String query, java.util.Map<?,?> arguments) throws org.springframework.dao.DataAccessException
query
- HiveQLarguments
- query arguments
org.springframework.dao.DataAccessException
java.lang.Long queryForLong(java.lang.String query) throws org.springframework.dao.DataAccessException
query
- HiveQL
org.springframework.dao.DataAccessException
java.lang.Long queryForLong(java.lang.String query, java.util.Map<?,?> arguments) throws org.springframework.dao.DataAccessException
query
- HiveQLarguments
- query arguments
org.springframework.dao.DataAccessException
java.util.List<java.lang.String> executeScript(HiveScript script) throws org.springframework.dao.DataAccessException
script
- script resource and arguments
org.springframework.dao.DataAccessException
java.util.List<java.lang.String> executeScript(java.lang.Iterable<HiveScript> scripts) throws org.springframework.dao.DataAccessException
scripts
- script resources and arguments
org.springframework.dao.DataAccessException
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |