public class MultiLangDaemon
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Integer>
# The script that abides by the multi-language protocol. This script will # be executed by the MultiLangDaemon, which will communicate with this script # over STDIN and STDOUT according to the multi-language protocol. executableName = sampleapp.py # The name of an Amazon Kinesis stream to process. streamName = words # Used by the KCL as the name of this application. Will be used as the name # of a Amazon DynamoDB table which will store the lease and checkpoint # information for workers with this application name. applicationName = PythonKCLSample # Users can change the credentials provider the KCL will use to retrieve credentials. # The DefaultAWSCredentialsProviderChain checks several other providers, which is # described here: # http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html AWSCredentialsProvider = DefaultAWSCredentialsProviderChain
| Constructor and Description |
|---|
MultiLangDaemon(KinesisClientLibConfiguration configuration,
MultiLangRecordProcessorFactory recordProcessorFactory,
java.util.concurrent.ExecutorService workerThreadPool)
Constructor.
|
MultiLangDaemon(Worker worker) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
call() |
static void |
main(java.lang.String[] args) |
static void |
printUsage(java.io.PrintStream stream,
java.lang.String messageToPrepend)
Utility for describing how to run this app.
|
public MultiLangDaemon(KinesisClientLibConfiguration configuration, MultiLangRecordProcessorFactory recordProcessorFactory, java.util.concurrent.ExecutorService workerThreadPool)
configuration - The KCL config to use.recordProcessorFactory - A record processor factory to create record processors that abide by the multi-lang
protocol.workerThreadPool - The executor service to run the daemon in.public MultiLangDaemon(Worker worker)
worker - A worker to use instead of the default worker.public static void printUsage(java.io.PrintStream stream,
java.lang.String messageToPrepend)
stream - Where to output the usage info.messageToPrepend - An optional error message to describe why the usage is being printed.public java.lang.Integer call()
throws java.lang.Exception
call in interface java.util.concurrent.Callable<java.lang.Integer>java.lang.Exceptionpublic static void main(java.lang.String[] args)
args - Accepts a single argument, that argument is a properties file which provides KCL configuration as
well as the name of an executable.