Search in sources :

Example 1 with KafkaLogReader

use of io.cdap.cdap.logging.read.KafkaLogReader in project cdap by caskdata.

the class TestKafkaLogging method testGetNext.

@Test
public void testGetNext() throws Exception {
    // Check with null runId and null instanceId
    LoggingContext loggingContext = new WorkerLoggingContext("TKL_NS_1", "APP_1", "FLOW_1", "RUN1", "INSTANCE1");
    KafkaLogReader logReader = KAFKA_TESTER.getInjector().getInstance(KafkaLogReader.class);
    LoggingTester tester = new LoggingTester();
    tester.testGetNext(logReader, loggingContext);
}
Also used : KafkaLogReader(io.cdap.cdap.logging.read.KafkaLogReader) LoggingTester(io.cdap.cdap.logging.appender.LoggingTester) WorkerLoggingContext(io.cdap.cdap.logging.context.WorkerLoggingContext) LoggingContext(io.cdap.cdap.common.logging.LoggingContext) WorkerLoggingContext(io.cdap.cdap.logging.context.WorkerLoggingContext) Test(org.junit.Test)

Example 2 with KafkaLogReader

use of io.cdap.cdap.logging.read.KafkaLogReader in project cdap by caskdata.

the class TestKafkaLogging method testGetPrev.

@Test
public void testGetPrev() throws Exception {
    LoggingContext loggingContext = new WorkerLoggingContext("TKL_NS_1", "APP_1", "FLOW_1", "RUN1", "INSTANCE1");
    KafkaLogReader logReader = KAFKA_TESTER.getInjector().getInstance(KafkaLogReader.class);
    LoggingTester tester = new LoggingTester();
    tester.testGetPrev(logReader, loggingContext);
}
Also used : KafkaLogReader(io.cdap.cdap.logging.read.KafkaLogReader) LoggingTester(io.cdap.cdap.logging.appender.LoggingTester) WorkerLoggingContext(io.cdap.cdap.logging.context.WorkerLoggingContext) LoggingContext(io.cdap.cdap.common.logging.LoggingContext) WorkerLoggingContext(io.cdap.cdap.logging.context.WorkerLoggingContext) Test(org.junit.Test)

Aggregations

LoggingContext (io.cdap.cdap.common.logging.LoggingContext)2 LoggingTester (io.cdap.cdap.logging.appender.LoggingTester)2 WorkerLoggingContext (io.cdap.cdap.logging.context.WorkerLoggingContext)2 KafkaLogReader (io.cdap.cdap.logging.read.KafkaLogReader)2 Test (org.junit.Test)2