@Internal public class IndexGeneratorFactory extends Object
IndexGenerator
.
Flink supports both static index and dynamic index.
If you want to have a static index, this option value should be a plain string, e.g. 'myusers', all the records will be consistently written into "myusers" index.
If you want to have a dynamic index, you can use '{field_name}' to reference a field value in
the record to dynamically generate a target index. You can also use
'{field_name|date_format_string}' to convert a field value of TIMESTAMP/DATE/TIME type into the
format specified by date_format_string. The date_format_string is compatible with SimpleDateFormat
. For example, if the option value is 'myusers_{log_ts|yyyy-MM-dd}',
then a record with log_ts field value 2020-03-27 12:25:55 will be written into
"myusers-2020-03-27" index.
Modifier and Type | Method and Description |
---|---|
static IndexGenerator |
createIndexGenerator(String index,
TableSchema schema) |
public static IndexGenerator createIndexGenerator(String index, TableSchema schema)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.