Not able to run pulsar function locally #18552
raunakagrawal47
started this conversation in
General
Replies: 1 comment
-
@Jason918 @michaeljmarshall can you please help with this? Basically I am trying to run pulsar function with python source code along with some of its external dependencies. I tried to build wheel file and use pulsar-admin create command to upload the function to the pulsar container, but it fails with some module not found error. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have tried everything to package and run my python function locally.
I tried to run the pulsar standalone on my laptop (v. 2.9.1) as well as tried to run pulsar in docker (latest image).
Here is the repo: https://github.com/raunakagrawal47/pulsar-test
I am trying to run a basic python function with some dependencies attached to it.
Steps I followed to run pulsar locally:
Generate whl file for all required dependencies:
pip3 download --only-binary :all: -r requirements.txt -d deps
Zip the contents of folder:
zip -r format-phone-number.zip . -x test/**\* -x venv/**\* -x .idea/**\*
Run the pulsar function:
bin/pulsar-admin functions localrun --tenant public --namespace default --py format-phone-number.zip --classname TestEtl.TestEtl --inputs persistent://public/default/in --output persistent://public/default/out
I tried to run pulsar function locally on laptop by running pulsar standalone as well as tried to run by copying the zip file to a pulsar docker image using:
When running, I am getting below error:
I tried looking at logs inside: pulsar/logs/functions/public/default/TestEtl:
Here is the output:
Please help me out with this. cc: @Jason918
Beta Was this translation helpful? Give feedback.
All reactions