public class HiveServerFactoryBean extends Object implements FactoryBean<HiveServer2>, InitializingBean, DisposableBean, SmartLifecycle
HiveServer2 but not tied to the command line.
This class is intended for using as part of integration testing. For production use
a Hiveserver2 running on the Hadoop cluster is preferred.| Constructor and Description |
|---|
HiveServerFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
HiveServer2 |
getObject() |
Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
boolean |
isSingleton() |
void |
setAutoStartup(boolean autoStartup)
Indicates whether the Hive server should start automatically (default) or not.
|
void |
setConfiguration(Configuration configuration)
Sets the Hadoop configuration to use.
|
void |
setHost(String host)
Sets the server host to bind to.
|
void |
setMaxThreads(int maxThreads)
Sets the maximum number of threads serving this server.
|
void |
setMinThreads(int minThreads)
Sets the minimum number of threads serving this server.
|
void |
setPort(int port)
Sets the server port.
|
void |
setProperties(Properties properties)
Sets the configuration properties.
|
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
public void destroy()
destroy in interface DisposableBeanpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic HiveServer2 getObject()
getObject in interface FactoryBean<HiveServer2>public Class<?> getObjectType()
getObjectType in interface FactoryBean<HiveServer2>public boolean isSingleton()
isSingleton in interface FactoryBean<HiveServer2>public boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
autoStartup - whether to automatically start or notpublic void setHost(String host)
host - The host to use.public void setPort(int port)
port - The port to set.public void setMinThreads(int minThreads)
minThreads - The minThreads to set.public void setMaxThreads(int maxThreads)
maxThreads - The maxThreads to set.public void setConfiguration(Configuration configuration)
configuration - The configuration to set.public void setProperties(Properties properties)
properties - The properties to set.