public class MultiLangDaemon extends Object implements Callable<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,
ExecutorService workerThreadPool)
Constructor.
|
MultiLangDaemon(Worker worker) |
| Modifier and Type | Method and Description |
|---|---|
Integer |
call() |
static void |
main(String[] args) |
static void |
printUsage(PrintStream stream,
String messageToPrepend)
Utility for describing how to run this app.
|
public MultiLangDaemon(KinesisClientLibConfiguration configuration, MultiLangRecordProcessorFactory recordProcessorFactory, 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(PrintStream stream, String messageToPrepend)
stream - Where to output the usage info.messageToPrepend - An optional error message to describe why the usage is being printed.public static void main(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.Copyright © 2023. All rights reserved.