public class HiveServerFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.FactoryBean<org.apache.hive.service.server.HiveServer2>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.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() |
org.apache.hive.service.server.HiveServer2 |
getObject() |
java.lang.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(org.apache.hadoop.conf.Configuration configuration)
Sets the Hadoop configuration to use.
|
void |
setHost(java.lang.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(java.util.Properties properties)
Sets the configuration properties.
|
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public org.apache.hive.service.server.HiveServer2 getObject()
getObject
in interface org.springframework.beans.factory.FactoryBean<org.apache.hive.service.server.HiveServer2>
public java.lang.Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<org.apache.hive.service.server.HiveServer2>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<org.apache.hive.service.server.HiveServer2>
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(java.lang.Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public void setAutoStartup(boolean autoStartup)
autoStartup
- whether to automatically start or notpublic void setHost(java.lang.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(org.apache.hadoop.conf.Configuration configuration)
configuration
- The configuration to set.public void setProperties(java.util.Properties properties)
properties
- The properties to set.