use of com.yahoo.config.docproc.SchemamappingConfig in project vespa by vespa-engine.
the class SchemaMappingAndAccessesTest method testSchemaMapConfig.
public void testSchemaMapConfig() {
SchemaMap map = new SchemaMap(null);
SchemamappingConfig.Builder scb = new SchemamappingConfig.Builder();
scb.fieldmapping(new SchemamappingConfig.Fieldmapping.Builder().chain("mychain").docproc("mydocproc").doctype("mydoctype").indocument("myindoc").inprocessor("myinprocessor"));
map.configure(new SchemamappingConfig(scb));
assertEquals(map.chainMap("mychain", "mydocproc").get(new Pair<>("mydoctype", "myinprocessor")), "myindoc");
}
use of com.yahoo.config.docproc.SchemamappingConfig in project vespa by vespa-engine.
the class DocprocBuilderTest method setupCluster.
@Before
public void setupCluster() {
ContainerModel model = new ContainerModelBuilder(false, Networking.disable).build(DeployState.createTestState(), null, root, servicesXml());
cluster = model.getCluster();
cluster.getDocproc().getChains().addServersAndClientsForChains();
root.freezeModelTopology();
containerMbusConfig = root.getConfig(ContainerMbusConfig.class, cluster.getContainers().get(0).getConfigId());
componentsConfig = root.getConfig(ComponentsConfig.class, cluster.getConfigId());
chainsConfig = root.getConfig(ChainsConfig.class, cluster.getConfigId() + "/component/com.yahoo.docproc.jdisc.DocumentProcessingHandler");
documentmanagerConfig = root.getConfig(DocumentmanagerConfig.class, cluster.getConfigId());
bundlesConfig = root.getConfig(BundlesConfig.class, cluster.getConfigId());
schemamappingConfig = root.getConfig(SchemamappingConfig.class, cluster.getContainers().get(0).getConfigId());
qrStartConfig = root.getConfig(QrStartConfig.class, cluster.getConfigId());
docprocConfig = root.getConfig(DocprocConfig.class, cluster.getConfigId());
}
Aggregations