Package com.ngdata.hbaseindexer.parse

Examples of com.ngdata.hbaseindexer.parse.ResultToSolrMapper


        final HTableInterface multitableB = mock(HTableInterface.class);
        when(tablePool.getTable(multiTableAName.getBytes(Charsets.UTF_8))).thenReturn(multitableA);
        when(tablePool.getTable(multiTableBName.getBytes(Charsets.UTF_8))).thenReturn(multitableB);

        final IndexerConf indexerConf = new IndexerConfBuilder().table(tablePrefix + ".*").build();
        ResultToSolrMapper mapper = createHbaseToSolrMapper(true);
        Indexer indexer = Indexer.createIndexer("index name", indexerConf, tablePrefix+ ".*", mapper, tablePool, null, solrDocumentWriter);
        IndexingEventListener indexingEventListener = new IndexingEventListener(indexer, tablePrefix+ ".*", true);
        List<KeyValue> kvs = Lists.newArrayList(
                new KeyValue(Bytes.toBytes("row1"), Bytes.toBytes("messages"), Bytes.toBytes("msg1"),
                        Bytes.toBytes("the message")), new KeyValue(Bytes.toBytes("row1"), Bytes.toBytes("messages"),
View Full Code Here


            // Create and register the indexer
            IndexerComponentFactory factory = IndexerComponentFactoryUtil.getComponentFactory(indexerDef.getIndexerComponentFactory(), new ByteArrayInputStream(indexerDef.getConfiguration()), indexerDef.getConnectionParams());
            IndexerConf indexerConf = factory.createIndexerConf();

            ResultToSolrMapper mapper = factory.createMapper(indexerDef.getName());

            Sharder sharder = null;
            SolrInputDocumentWriter solrWriter;
            PoolingClientConnectionManager connectionManager = null;
View Full Code Here

     * @param indexerConf configuration containing the index definition
     * @return configured ResultToSolrMapper
     */
    public static ResultToSolrMapper createResultToSolrMapper(String indexName, IndexerConf indexerConf) {

        ResultToSolrMapper mapper = null;
        try {
            if (indexerConf.getMapperClass().equals(DefaultResultToSolrMapper.class)) {
                // FIXME: this is cheating. Knowledge about mapper implementations should be handled by IndexerComponentFactory
                mapper = new DefaultResultToSolrMapper(indexName, indexerConf.getFieldDefinitions(),
                        indexerConf.getDocumentExtractDefinitions());
View Full Code Here

TOP

Related Classes of com.ngdata.hbaseindexer.parse.ResultToSolrMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.