@Internal public class RowPartitionComputer extends Object implements PartitionComputer<org.apache.flink.types.Row>
PartitionComputer for Row.| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
defaultPartValue |
protected String[] |
partitionColumns |
protected int[] |
partitionIndexes |
| 构造器和说明 |
|---|
RowPartitionComputer(String defaultPartValue,
String[] columnNames,
String[] partitionColumns) |
| 限定符和类型 | 方法和说明 |
|---|---|
LinkedHashMap<String,String> |
generatePartValues(org.apache.flink.types.Row in)
Compute partition values from record.
|
org.apache.flink.types.Row |
projectColumnsToWrite(org.apache.flink.types.Row in)
Project non-partition columns for output writer.
|
static Object |
restorePartValueFromType(String valStr,
org.apache.flink.table.types.DataType type)
Restore partition value from string and type.
|
protected final String defaultPartValue
protected final String[] partitionColumns
protected final int[] partitionIndexes
public LinkedHashMap<String,String> generatePartValues(org.apache.flink.types.Row in) throws Exception
PartitionComputergeneratePartValues 在接口中 PartitionComputer<org.apache.flink.types.Row>in - input record.Exceptionpublic org.apache.flink.types.Row projectColumnsToWrite(org.apache.flink.types.Row in)
PartitionComputerprojectColumnsToWrite 在接口中 PartitionComputer<org.apache.flink.types.Row>in - input record.public static Object restorePartValueFromType(String valStr, org.apache.flink.table.types.DataType type)
generatePartValues(org.apache.flink.types.Row).valStr - string partition value.type - type of partition field.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.