tuteng commented on issue #5912: "UNAVAILABLE: io exception" pulsar functions URL: https://github.com/apache/pulsar/issues/5912#issuecomment-569571012 I am so sorry for the late reply. I tested in cluster mode and did not reproduce your problem. My test environment, 3 brokers, 2 function_worker, uses Ubuntu 16.04.6 LTS and pulsar version 2.4.2. The command is as follows: Install the pulsar client on each function_worker: ``` pip install pulsar-client ``` Create and start function ``` ./bin/pulsar-admin functions create --py /root/test-function/word_function.py --classname word_function.WordCountFunction --tenant public --namespace default --name excfunc --inputs test1 --output test2 ``` The content of word_function.py, ``` from pulsar import Function # The classic ExclamationFunction that appends an exclamation at the end # of the input class WordCountFunction(Function): def __init__(self): pass def process(self, input, context): words = input.split() for word in words: context.incr_counter(word, 1) context.get_logger().info("The value is " + str(context.get_counter(word))) return input + "!" ``` If you have any questions, please ping me. @thlautenschlaeger
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
