Elasticsearch 示例

    准备修改配置文件

    • conf/SortClusterConfig.conf,所有Sort任务的sink配置。, sink configuration of all sort tasks.
    • conf/sid_es_v3.conf,一个Sort任务的数据源配置,文件名和配置文件SortClusterConfig.conf中的Sort任务名一致,如果SortClusterConfig.conf中配置了多个Sort任务,那么会有多个Sort任务的数据源配置。

    conf/SortClusterConfig.conf配置样例

    conf/sid_es_v3.conf配置样例

    SortClusterConfig.conf配置参数

    • 可以从ClassPath的SortClusterConfig.conf源文件读取,但不支持实时更新
    • 可以从Inlong Manager的HTTP接口获取配置,支持实时更新
    参数名是否必须类型默认值描述
    clusterNameYStringNA用来唯一标识一个inlong-sort-standalone集群
    sortTasksYJsonArray<SortTaskConfig>NASort任务列表

    Sort-Elasticsearch任务的idParams配置参数

    参数名是否必须默认值描述
    inlongGroupIdYNAinlongGroupId
    inlongStreamIdYNAinlongStreamId
    separatorYNA分隔符
    fieldNamesYNAElasticsearch的Index字段列表,用空格分隔
    indexNamePatternYNAIndex的名字模板,支持三种日期时间格式变量:{yyyyMMdd},{yyyyMMddHH},{yyyyMMddHHmm}
    contentOffsetYNA源数据的有效字段开始偏移,从0开始
    fieldOffsetYNAElasticsearch的Index字段列表的开始偏移

    Sort-Elasticsearch任务的sinkParams配置参数

    • 文件名格式:Sort任务名+”.conf”。
    • 可以从ClassPath的SortClusterConfig.conf源文件读取,但不支持实时更新。
    • 可以从Inlong Manager的HTTP接口获取配置,支持实时更新。
    参数名是否必须类型默认值描述
    sortClusterNameYStringNA用来唯一标识一个inlong-sort-standalone集群
    sortTaskIdYStringNASort任务名
    cacheZonesYJsonObject<String, JsonObject>NA缓存层集群列表,格式:Map<cacheClusterName, CacheCluster>

    CacheCluster配置参数

    Topic配置参数

    参数名是否必须类型默认值描述
    topicYStringNATopic完整名,Pulsar:tenant/namespace/topic
    partitionCntYIntegerNATopic分区数
    topicPropertiesNMap<String,String>NA缓存层Topic的Consumer参数

    启动inlong-sort-standalone应用