use of com.datastax.oss.dsbulk.codecs.api.ConversionContext in project dsbulk by datastax.
the class JsonNodeToBigIntegerCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec = (JsonNodeToBigIntegerCodec) codecFactory.<JsonNode, BigInteger>createConvertingCodec(DataTypes.VARINT, JSON_NODE_TYPE, true);
}
use of com.datastax.oss.dsbulk.codecs.api.ConversionContext in project dsbulk by datastax.
the class JsonNodeToLongCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec = (JsonNodeToLongCodec) codecFactory.<JsonNode, Long>createConvertingCodec(DataTypes.BIGINT, JSON_NODE_TYPE, true);
}
use of com.datastax.oss.dsbulk.codecs.api.ConversionContext in project dsbulk by datastax.
the class StringToIntegerCodecTest method setUpCodec2.
@BeforeEach
void setUpCodec2() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL", "NADA").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec2 = (StringToIntegerCodec) codecFactory.<String, Integer>createConvertingCodec(DataTypes.INT, GenericType.STRING, true);
}
use of com.datastax.oss.dsbulk.codecs.api.ConversionContext in project dsbulk by datastax.
the class StringToListCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL");
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec1 = (StringToListCodec<Double>) codecFactory.<String, List<Double>>createConvertingCodec(DataTypes.listOf(DataTypes.DOUBLE), GenericType.STRING, true);
codec2 = (StringToListCodec<Instant>) codecFactory.<String, List<Instant>>createConvertingCodec(DataTypes.listOf(DataTypes.TIMESTAMP), GenericType.STRING, true);
codec3 = (StringToListCodec<String>) codecFactory.<String, List<String>>createConvertingCodec(DataTypes.listOf(DataTypes.TEXT), GenericType.STRING, true);
}
use of com.datastax.oss.dsbulk.codecs.api.ConversionContext in project dsbulk by datastax.
the class StringToLongCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec = (StringToLongCodec) codecFactory.<String, Long>createConvertingCodec(DataTypes.BIGINT, GenericType.STRING, true);
}
Aggregations