Class LoggingWindowFunction

  • All Implemented Interfaces:
    org.apache.pulsar.functions.api.WindowFunction<java.lang.String,​java.lang.Void>

    public class LoggingWindowFunction
    extends java.lang.Object
    implements org.apache.pulsar.functions.api.WindowFunction<java.lang.String,​java.lang.Void>
    A function that demonstrates how to redirect logging to a topic. In this particular example, for every input string, the function does some logging. If --logTopic topic is specified, these log statements end up in that specified pulsar topic.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Void process​(java.util.Collection<org.apache.pulsar.functions.api.Record<java.lang.String>> inputs, org.apache.pulsar.functions.api.WindowContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoggingWindowFunction

        public LoggingWindowFunction()
    • Method Detail

      • process

        public java.lang.Void process​(java.util.Collection<org.apache.pulsar.functions.api.Record<java.lang.String>> inputs,
                                      org.apache.pulsar.functions.api.WindowContext context)
                               throws java.lang.Exception
        Specified by:
        process in interface org.apache.pulsar.functions.api.WindowFunction<java.lang.String,​java.lang.Void>
        Throws:
        java.lang.Exception