use of io.cdap.plugin.batch.SolrSearchSink in project hydrator-plugins by cdapio.
the class SolrSearchSinkTest method testWrongKeyFieldName.
@Test(expected = IllegalArgumentException.class)
public void testWrongKeyFieldName() {
SolrSearchSink.BatchSolrSearchConfig config = new SolrSearchSink.BatchSolrSearchConfig("SolrSink", SolrSearchSinkConfig.SINGLE_NODE_MODE, "localhost:8983", "collection1", "wrong_id", "office address:address", "1000");
SolrSearchSink sinkObject = new SolrSearchSink(config);
MockPipelineConfigurer configurer = new MockPipelineConfigurer(inputSchema);
sinkObject.configurePipeline(configurer);
}
use of io.cdap.plugin.batch.SolrSearchSink in project hydrator-plugins by cdapio.
the class SolrSearchSinkTest method testInvalidInputDataType.
@Test(expected = IllegalArgumentException.class)
public void testInvalidInputDataType() {
Schema inputSchema = Schema.recordOf("input-record", Schema.Field.of("id", Schema.of(Schema.Type.STRING)), Schema.Field.of("firstname", Schema.of(Schema.Type.STRING)), Schema.Field.of("lastname", Schema.of(Schema.Type.STRING)), Schema.Field.of("office address", Schema.of(Schema.Type.STRING)), Schema.Field.of("pincode", Schema.nullableOf(Schema.of(Schema.Type.BYTES))));
SolrSearchSink.BatchSolrSearchConfig config = new SolrSearchSink.BatchSolrSearchConfig("SolrSink", SolrSearchSinkConfig.SINGLE_NODE_MODE, "localhost:8983", "collection1", "id", "office address:address", "1000");
SolrSearchSink sinkObject = new SolrSearchSink(config);
MockPipelineConfigurer configurer = new MockPipelineConfigurer(inputSchema);
sinkObject.configurePipeline(configurer);
}
use of io.cdap.plugin.batch.SolrSearchSink in project hydrator-plugins by cdapio.
the class SolrSearchSinkTest method testInvalidSingleNodeSolrUrl.
@Test(expected = IllegalArgumentException.class)
public void testInvalidSingleNodeSolrUrl() {
SolrSearchSink.BatchSolrSearchConfig config = new SolrSearchSink.BatchSolrSearchConfig("SolrSink", SolrSearchSinkConfig.SINGLE_NODE_MODE, "localhost:8983,localhost:8984", "collection1", "id", "office address:address", "1000");
SolrSearchSink sinkObject = new SolrSearchSink(config);
MockPipelineConfigurer configurer = new MockPipelineConfigurer(inputSchema);
sinkObject.configurePipeline(configurer);
}
Aggregations