|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.flume.api.RpcClientFactory
public class RpcClientFactory
Factory class to construct Flume RPCClient
implementations.
Nested Class Summary | |
---|---|
static class |
RpcClientFactory.ClientType
|
Constructor Summary | |
---|---|
RpcClientFactory()
|
Method Summary | |
---|---|
static RpcClient |
getDefaultInstance(String hostname,
Integer port)
Returns an instance of RpcClient connected to the specified
hostname and port . |
static RpcClient |
getDefaultInstance(String hostname,
Integer port,
Integer batchSize)
Returns an instance of RpcClient connected to the specified
hostname and port with the specified batchSize . |
static RpcClient |
getInstance(File propertiesFile)
Delegates to getInstance(Properties props) , given a File path
to a Properties file. |
static RpcClient |
getInstance(Properties properties)
Returns an instance of RpcClient , optionally with failover. |
static RpcClient |
getInstance(String hostname,
Integer port)
Deprecated. |
static RpcClient |
getInstance(String hostname,
Integer port,
Integer batchSize)
Deprecated. |
static RpcClient |
getThriftInstance(Properties props)
Return an RpcClient that uses Thrift for communicating with the next hop. |
static RpcClient |
getThriftInstance(String hostname,
Integer port)
Return an RpcClient that uses Thrift for communicating with the next hop. |
static RpcClient |
getThriftInstance(String hostname,
Integer port,
Integer batchSize)
Return an RpcClient that uses Thrift for communicating with the next hop. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RpcClientFactory()
Method Detail |
---|
public static RpcClient getInstance(Properties properties) throws FlumeException
RpcClient
, optionally with failover.
To create a failover client, the properties object should have a
property client.type which has the value "failover". The client
connects to hosts specified by hosts property in given properties.
properties
- The properties to instantiate the client with.
FlumeException
If no client.type is specified, a default client that connects to
single host at a given port is created.(type can also simply be
DEFAULT for the default client).
,
org.apache.flume.api.NettyAvroClient
public static RpcClient getInstance(File propertiesFile) throws FileNotFoundException, IOException
getInstance(Properties props)
, given a File path
to a Properties
file.
propertiesFile
- Valid properties file
FileNotFoundException
- If the file cannot be found
IOException
- If there is an IO error@Deprecated public static RpcClient getInstance(String hostname, Integer port) throws FlumeException
getDefaultInstance(String, Integer)
instead.
FlumeException
public static RpcClient getDefaultInstance(String hostname, Integer port) throws FlumeException
RpcClient
connected to the specified
hostname
and port
.
FlumeException
@Deprecated public static RpcClient getInstance(String hostname, Integer port, Integer batchSize) throws FlumeException
getDefaultInstance(String, Integer, Integer)
instead.
FlumeException
public static RpcClient getDefaultInstance(String hostname, Integer port, Integer batchSize) throws FlumeException
RpcClient
connected to the specified
hostname
and port
with the specified batchSize
.
FlumeException
public static RpcClient getThriftInstance(String hostname, Integer port, Integer batchSize)
hostname
- - The hostname of the next hop.port
- - The port on which the ThriftSource is listeningbatchSize
- - batch size of each transaction.
public static RpcClient getThriftInstance(String hostname, Integer port)
hostname
- - The hostname of the next hop.port
- - The port on which the ThriftSource is listening
public static RpcClient getThriftInstance(Properties props)
props
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |