Search in sources :

Example 1 with DecodeType

use of com.huawei.boostkit.omnidata.decode.type.DecodeType in project boostkit-bigdata by kunpengcompute.

the class DataIoAdapter method initSparkDeserializer.

private SparkDeserializer initSparkDeserializer() {
    DecodeType[] columnTypes = columnTypesList.toArray(new DecodeType[0]);
    int[] columnOrders = columnOrdersList.stream().mapToInt(Integer::intValue).toArray();
    DecodeType[] filterTypes = filterTypesList.toArray(new DecodeType[0]);
    int[] filterOrders = filterOrdersList.stream().mapToInt(Integer::intValue).toArray();
    SparkDeserializer deserializer;
    if (columnTypes.length == 0) {
        deserializer = new SparkDeserializer(filterTypes, filterOrders);
    } else {
        deserializer = new SparkDeserializer(columnTypes, columnOrders);
    }
    return deserializer;
}
Also used : SparkDeserializer(com.huawei.boostkit.omnidata.decode.impl.SparkDeserializer) RowDecodeType(com.huawei.boostkit.omnidata.decode.type.RowDecodeType) DecodeType(com.huawei.boostkit.omnidata.decode.type.DecodeType) LongDecodeType(com.huawei.boostkit.omnidata.decode.type.LongDecodeType)

Aggregations

SparkDeserializer (com.huawei.boostkit.omnidata.decode.impl.SparkDeserializer)1 DecodeType (com.huawei.boostkit.omnidata.decode.type.DecodeType)1 LongDecodeType (com.huawei.boostkit.omnidata.decode.type.LongDecodeType)1 RowDecodeType (com.huawei.boostkit.omnidata.decode.type.RowDecodeType)1