Examples of injectValueEvent()


Examples of org.apache.s4.ft.EventGenerator.injectValueEvent()

        }
        CountDownLatch signalSentence1Processed = new CountDownLatch(1);
        TestUtils.watchAndSignalCreation("/classifierIteration_"
                + WordCountTest.SENTENCE_1_TOTAL_WORDS,
                signalSentence1Processed, zk);
        gen.injectValueEvent(
                new KeyValue("sentence", WordCountTest.SENTENCE_1),
                "Sentences", 0);
        signalSentence1Processed.await(10, TimeUnit.SECONDS);
        Thread.sleep(1000);
       
View Full Code Here

Examples of org.apache.s4.ft.EventGenerator.injectValueEvent()

                .watchAndSignalCreation(
                        "/classifierIteration_"
                                + (WordCountTest.SENTENCE_1_TOTAL_WORDS + WordCountTest.SENTENCE_2_TOTAL_WORDS),
                        sentence2Processed, zk);

        gen.injectValueEvent(
                new KeyValue("sentence", WordCountTest.SENTENCE_2),
                "Sentences", 0);

        sentence2Processed.await(10, TimeUnit.SECONDS);
        Thread.sleep(1000);
View Full Code Here

Examples of org.apache.s4.ft.EventGenerator.injectValueEvent()

        for (int i = WordCountTest.SENTENCE_1_TOTAL_WORDS
                + WordCountTest.SENTENCE_2_TOTAL_WORDS + 1; i <= WordCountTest.TOTAL_WORDS; i++) {
            zk.create("/continue_" + i, new byte[0], Ids.OPEN_ACL_UNSAFE,
                    CreateMode.EPHEMERAL);
        }
        gen.injectValueEvent(
                new KeyValue("sentence", WordCountTest.SENTENCE_3),
                "Sentences", 0);
        signalTextProcessed.await(10, TimeUnit.SECONDS);
        File results = new File(S4TestCase.DEFAULT_TEST_OUTPUT_DIR
                + File.separator + "wordcount");
View Full Code Here

Examples of org.apache.s4.ft.EventGenerator.injectValueEvent()

        for (int i = 1; i <= SENTENCE_1_TOTAL_WORDS + SENTENCE_2_TOTAL_WORDS
                + 1; i++) {
            zk.create("/continue_" + i, new byte[0], Ids.OPEN_ACL_UNSAFE,
                    CreateMode.EPHEMERAL);
        }
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_1),
                    "Sentences", 0);
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_2), "Sentences",
                0);
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_3), "Sentences",
                0);
View Full Code Here

Examples of org.apache.s4.ft.EventGenerator.injectValueEvent()

            zk.create("/continue_" + i, new byte[0], Ids.OPEN_ACL_UNSAFE,
                    CreateMode.EPHEMERAL);
        }
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_1),
                    "Sentences", 0);
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_2), "Sentences",
                0);
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_3), "Sentences",
                0);
        signalTextProcessed.await();
        File results = new File(S4TestCase.DEFAULT_TEST_OUTPUT_DIR
View Full Code Here

Examples of org.apache.s4.ft.EventGenerator.injectValueEvent()

        }
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_1),
                    "Sentences", 0);
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_2), "Sentences",
                0);
        gen.injectValueEvent(new KeyValue("sentence", SENTENCE_3), "Sentences",
                0);
        signalTextProcessed.await();
        File results = new File(S4TestCase.DEFAULT_TEST_OUTPUT_DIR
                + File.separator + "wordcount");
        String s = TestUtils.readFile(results);
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.