Examples of SepEvent


Examples of com.ngdata.sep.SepEvent

        Indexer indexer = Indexer.createIndexer("index name", conf, "record", mapper, tablePool, null, solrDocumentWriter);
        IndexingEventListener indexingEventListener = new IndexingEventListener(indexer, TABLE_A, false);

        List<KeyValue> kvs = Lists.newArrayList(new KeyValue(Bytes.toBytes("row1"), Bytes.toBytes("cf"),
                Bytes.toBytes("qual"), Bytes.toBytes("value")));
        SepEvent event = new SepEvent(Bytes.toBytes(TABLE_A), Bytes.toBytes("row1"), kvs, null);
        indexingEventListener.processEvents(Collections.singletonList(event));

        ArgumentCaptor<Map> arg = ArgumentCaptor.forClass(Map.class);
        verify(solrDocumentWriter).add(eq(-1), arg.capture());
        Map<String,SolrInputDocument> addedDocuments = arg.getValue();
View Full Code Here

Examples of com.ngdata.sep.SepEvent

        Indexer indexer = Indexer.createIndexer("index name", conf, "record", mapper, tablePool, null, solrDocumentWriter);
        IndexingEventListener indexingEventListener = new IndexingEventListener(indexer, TABLE_A, false);

        List<KeyValue> kvs = Lists.newArrayList(new KeyValue(Bytes.toBytes("row1"), Bytes.toBytes("cf"),
                Bytes.toBytes("qual"), Bytes.toBytes("value")));
        SepEvent event = new SepEvent(Bytes.toBytes(TABLE_A), Bytes.toBytes("row1"), kvs, null);
        indexingEventListener.processEvents(Collections.singletonList(event));

        ArgumentCaptor<Map> arg = ArgumentCaptor.forClass(Map.class);
        verify(solrDocumentWriter).add(eq(-1), arg.capture());
        Map<String,SolrInputDocument> addedDocuments = arg.getValue();
View Full Code Here

Examples of com.ngdata.sep.SepEvent

        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"),
                        Bytes.toBytes("msg2"), Bytes.toBytes("another message")));

        SepEvent event = new SepEvent(Bytes.toBytes(TABLE_A), Bytes.toBytes("row1"), kvs, null);
        indexingEventListener.processEvents(Collections.singletonList(event));

        ArgumentCaptor<Map> arg = ArgumentCaptor.forClass(Map.class);
        verify(solrDocumentWriter).add(eq(-1), arg.capture());
        Map<String,SolrInputDocument> docs = arg.getValue();
View Full Code Here

Examples of com.ngdata.sep.SepEvent

        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"),
                Bytes.toBytes("msg2"), Bytes.toBytes("another message")));

        SepEvent event = new SepEvent(Bytes.toBytes(TABLE_B), null, null, null);
        indexingEventListener.processEvents(Collections.singletonList(event));
        verifyZeroInteractions(multitableA, multitableB, tableB, solrDocumentWriter);

        event = new SepEvent(Bytes.toBytes(multiTableBName), "row1".getBytes(Charsets.UTF_8), kvs, null);
        indexingEventListener.processEvents(Collections.singletonList(event));
        verify(solrDocumentWriter, atLeastOnce()).add(eq(-1), anyMap());

        event = new SepEvent(Bytes.toBytes(multiTableAName), "row1".getBytes(Charsets.UTF_8), kvs, null);
        indexingEventListener.processEvents(Collections.singletonList(event));
        verify(solrDocumentWriter, atLeastOnce()).add(eq(-1), anyMap());
    }
View Full Code Here

Examples of com.ngdata.sep.SepEvent

            executor.shutdownNow();
        }
    }

    private SepEvent createSepEvent(int row) {
        SepEvent sepEvent = mock(SepEvent.class);
        when(sepEvent.getRow()).thenReturn(Bytes.toBytes(String.valueOf(row)));
        return sepEvent;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.