Hive 示例
准备修改配置文件
- conf/SortClusterConfig.conf,所有Sort任务的sink配置。, sink configuration of all sort tasks.
- conf/sid_hive_inlong6th_v3.conf,一个Sort任务的数据源配置,文件名和配置文件SortClusterConfig.conf中的Sort任务名一致,如果SortClusterConfig.conf中配置了多个Sort任务,那么会有多个Sort任务的数据源配置。
conf/SortClusterConfig.conf配置样例
conf/sid_hive_inlong6th_v3.conf配置样例
SortClusterConfig.conf配置参数
- 可以从ClassPath的SortClusterConfig.conf源文件读取,但不支持实时更新
- 可以从Inlong Manager的HTTP接口获取配置,支持实时更新
参数名 | 是否必须 | 类型 | 默认值 | 描述 |
---|---|---|---|---|
clusterName | Y | String | NA | 用来唯一标识一个inlong-sort-standalone集群 |
sortTasks | Y | JsonArray<SortTaskConfig> | NA | Sort任务列表 |
Sort-Hive任务的idParams配置参数
参数名 | 是否必须 | 默认值 | 描述 |
---|---|---|---|
inlongGroupId | Y | NA | inlongGroupId |
inlongStreamId | Y | NA | inlongStreamId |
separator | Y | NA | 分隔符 |
partitionIntervalMs | N | 3600000 | 分区间隔时间,单位毫秒 |
idRootPath | Y | NA | Inlong数据流的Hdfs根目录 |
partitionSubPath | Y | NA | Inlong数据流的分区子目录 |
hiveTableName | Y | NA | Inlong数据流的Hive表名 |
partitionFieldName | N | dt | Inlong数据流的分区字段名 |
partitionFieldPattern | Y | NA | Inlong数据流的分区字段值格式,如{yyyyMMdd}、{yyyyMMddHH}、{yyyyMMddHHmm} |
msgTimeFieldPattern | Y | NA | 消息生成时间的字段值格式,Java时间格式 |
maxPartitionOpenDelayHour | N | 8 | 分区最大打开延迟时间,单位小时 |
Sort-Hive任务的sinkParams配置参数
- 文件名格式:Sort任务名+”.conf”。
- 可以从ClassPath的SortClusterConfig.conf源文件读取,但不支持实时更新。
- 可以从Inlong Manager的HTTP接口获取配置,支持实时更新。
参数名 | 是否必须 | 类型 | 默认值 | 描述 |
---|---|---|---|---|
sortClusterName | Y | String | NA | 用来唯一标识一个inlong-sort-standalone集群 |
sortTaskId | Y | String | NA | Sort任务名 |
cacheZones | Y | JsonObject<String, JsonObject> | NA | 缓存层集群列表,格式:Map<cacheClusterName, CacheCluster> |
CacheCluster配置参数
Topic配置参数
参数名 | 是否必须 | 类型 | 默认值 | 描述 |
---|---|---|---|---|
topic | Y | String | NA | Topic完整名,Pulsar:tenant/namespace/topic |
partitionCnt | Y | Integer | NA | Topic分区数 |
topicProperties | N | Map<String,String> | NA | 缓存层Topic的Consumer参数 |