Hi Users !

   What is the recommended way to package custom java code(which has
boilerplate source setup code, custom sql format code)  and make it
available in python classpath for local pipeline tests ?

For staging and production,  I have the java libraries in the
FLINK_HOME/lib directory and in my python code have the following, which
works.

gateway = get_gateway()
java_import(gateway.jvm, "java_package_base_path.*")

However, for local testing, I am unsure how to replicate the same.


Approaches

-------------

1. [Hack]  Install my custom java library into pyflink/lib
<https://github.com/apache/flink/blob/master/flink-python/apache-flink-libraries/setup.py#L199>
by following a similar pattern of

apache_flink_libraries

2. Extend PyFlinkStreamingTestCase and configure the FLINK_HOME
<https://github.com/apache/flink/blob/master/flink-python/pyflink/find_flink_home.py#L58>
environment

variable to include my java_code packaged as a python library in the

classpath. Next, perform the similar java_import.


Wanted to hear what's the best practice in all such cases ?


Thanks

Arya

Reply via email to