Deployment

Prepare to get module archive

Module archive is in the directory:inlong-sort-standalone/sort-standalone-dist/target/, the archive file is apache-inlong-sort-standalone-${project.version}-bin.tar.gz.

Start inlong-sort-standalone application

  • Decompress the archive file;
  • Prepare conf/common.properties (and other config files if choosing local file config mode);
  • Start SortStandalone ./bin/sort-start.sh
  • You can check the log file “sort.log”.

Configuration file:conf/common.properties

ParameterRequiredDefaultValueRemark
clusterIdYNAinlong-sort-standalone cluster id
sortSource.typeNorg.apache.inlong.sort.standalone.source.readapi.SortSdkSourceSource class name
sortChannel.typeNorg.apache.inlong.sort.standalone.channel.BufferQueueChannelChannel class name
sortSink.typeNorg.apache.inlong.sort.standalone.sink.hive.HiveSinkSink class name
sortClusterConfig.typeYmanagerClusterConfig configuration type. File config mode please choose: file
sortSourceConfig.QueryConsumeConfigTypeYmanagerSourceConfig configuration type. File config mode please choose: file
sortClusterConfig.fileNSortClusterConfig.confSort cluster config file name. Required in file config type.
managerUrlLoaderTypeNorg.apache.inlong.sort.standalone.config.loader.CommonPropertiesManagerUrlLoaderThe type of manager url loader. Required in manager config type.
sortClusterConfig.managerUrlNhttp://${manager_ip}:{manager_port}/inlong/manager/openapi/sort/getClusterConfigThe manager config interface to cluster config. Required in manager config type.
sortSourceConfig.managerUrlNhttp://${manager_ip}:{manager_port}/inlong/manager/openapi/sort/getSortSourceThe manager config interface to sort source config. Required in manager config mode.
eventFormatHandlerNorg.apache.inlong.sort.standalone.sink.hive.DefaultEventFormatHandlerFormatter class name
maxThreadsN10sink thread number
reloadIntervalN60000interval updating Configuration data(millisecond)
processIntervalN100interval processing data(millisecond)
metricDomainsNSortdomain name of metric
metricDomains.Sort.domainListenersNorg.apache.inlong.sort.standalone.metrics.prometheus.PrometheusMetricListenerclass name list of metric listener, separated by space
prometheusHttpPortN8080HTTP server port of prometheus simple client
metricDomains.Sort.snapshotIntervalN60000interval snapshoting metric data(millisecond)

SortClusterConfig

The SortClusterConfig can be acquired from local file or manager, depending on the sortClusterConfig.type configured in common.properties.

ParameterRequiredDefaultValueRemark
clusterNameYNAinlong-sort-standalone cluster id
sortTasksYNASort task list

SortTask

Sort Task includes idParams and sinkParams which represent the config of stream and dataNode respectively

The idParams and sinkParams are totally different among each type of sort tasks. There are two examples of hive task and pulsar task

ParameterRequiredDefaultValueRemark
nameYNAsort task name
typeYNAsort task type, for example:HIVE(“hive”), TUBE(“tube”), KAFKA(“kafka”), PULSAR(“pulsar”), ElasticSearch(“ElasticSearch”), UNKNOWN(“n”)
idParamsYNAList of Inlong DataStream configuration
sinkParamsYNASort task parameters

idParams content of Hive sort task

ParameterRequiredDefaultValueRemark
inlongGroupIdYNAinlongGroupId
inlongStreamIdYNAinlongStreamId
separatorYNAseparator
partitionIntervalMsN3600000partition interval(millisecond)
idRootPathYNAHDFS root path of Inlong DataStream
partitionSubPathYNApartition sub path of Inlong DataStream
hiveTableNameYNAHive table name of Inlong DataStream
partitionFieldNameNdtpartition field name of Inlong DataStream
partitionFieldPatternYNADate format of partition field value, the type have {yyyyMMdd},{yyyyMMddHH},{yyyyMMddHHmm}
msgTimeFieldPatternYNADate format of message generation time, it support Java date format
maxPartitionOpenDelayHourN8Max delay hour of partition(hour)

sinkParams content of Hive sort task

ParameterRequiredDefaultValueRemark
hdfsPathYNANameNode URL of HDFS
maxFileOpenDelayMinuteN5Max writing delay minute of simple HDFS file(minute)
tokenOvertimeMinuteN60token overtime of Inlong Data Stream(minute)
maxOutputFileSizeGbN2Max file size of simple HDFS file(GB)
hiveJdbcUrlYNAJDBC URL of Hive
hiveDatabaseYNAHive database
hiveUsernameYNAHive username
hivePasswordYNAHive password

idParams content of Pulsar sort task

ParameterRequiredDefaultValueRemark
inlongGroupIdYNAinlongGroupId
inlongStreamIdYNAinlongStreamId
topicYNATopic of MQ

sinkParams content of Pulsar sort task

ParameterRequiredDefaultValueRemark
serviceUrlYNAPulsar service URL
authenticationYNAPulsar authentication
enableBatchingNtrueenableBatching
batchingMaxBytesN5242880batchingMaxBytes
batchingMaxMessagesN3000batchingMaxMessages
batchingMaxPublishDelayN1batchingMaxPublishDelay
maxPendingMessagesN1000maxPendingMessages
maxPendingMessagesAcrossPartitionsN50000maxPendingMessagesAcrossPartitions
sendTimeoutN0sendTimeout
compressionTypeNNONEcompressionType
blockIfQueueFullNtrueblockIfQueueFull
roundRobinRouterBatchingPartitionSwitchFrequencyN10roundRobinRouterBatchingPartitionSwitchFrequency