[BAEL-3600] small fixes
This commit is contained in:
parent
fc3fb53bae
commit
795bcbe2b7
|
@ -1,7 +1,6 @@
|
||||||
package com.baeldung.netflix.mantis;
|
package com.baeldung.netflix.mantis;
|
||||||
|
|
||||||
import com.baeldung.netflix.mantis.job.LogAggregationJob;
|
import com.baeldung.netflix.mantis.job.LogAggregationJob;
|
||||||
import com.baeldung.netflix.mantis.job.LogCollectingJob;
|
|
||||||
import io.mantisrx.runtime.executor.LocalJobExecutorNetworked;
|
import io.mantisrx.runtime.executor.LocalJobExecutorNetworked;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.boot.CommandLineRunner;
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
|
|
@ -9,7 +9,6 @@ import io.mantisrx.runtime.MantisJob;
|
||||||
import io.mantisrx.runtime.MantisJobProvider;
|
import io.mantisrx.runtime.MantisJobProvider;
|
||||||
import io.mantisrx.runtime.Metadata;
|
import io.mantisrx.runtime.Metadata;
|
||||||
import io.mantisrx.runtime.ScalarToScalar;
|
import io.mantisrx.runtime.ScalarToScalar;
|
||||||
import io.mantisrx.runtime.sink.Sinks;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@ -21,7 +20,6 @@ public class LogCollectingJob extends MantisJobProvider<LogEvent> {
|
||||||
return MantisJob
|
return MantisJob
|
||||||
.source(new RandomLogSource())
|
.source(new RandomLogSource())
|
||||||
.stage(new TransformLogStage(), new ScalarToScalar.Config<>())
|
.stage(new TransformLogStage(), new ScalarToScalar.Config<>())
|
||||||
// .sink(Sinks.eagerSubscribe(Sinks.sse(LogEvent::toJsonString)))
|
|
||||||
.sink(new LogSink())
|
.sink(new LogSink())
|
||||||
.metadata(new Metadata.Builder().build())
|
.metadata(new Metadata.Builder().build())
|
||||||
.create();
|
.create();
|
||||||
|
|
|
@ -19,7 +19,6 @@ public class LogAggregate implements JsonType {
|
||||||
try {
|
try {
|
||||||
return mapper.writeValueAsString(this);
|
return mapper.writeValueAsString(this);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
e.printStackTrace();
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ public class LogEvent implements JsonType {
|
||||||
try {
|
try {
|
||||||
return mapper.writeValueAsString(this);
|
return mapper.writeValueAsString(this);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
e.printStackTrace();
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue