commit | 107ab37470380ab905d9819472134c0b4d5060bb | [log] [tgz] |
---|---|---|
author | yuzelin <33053040+yuzelin@users.noreply.github.com> | Fri Aug 16 11:55:28 2024 +0800 |
committer | GitHub <noreply@github.com> | Fri Aug 16 11:55:28 2024 +0800 |
tree | 087912938bea03035ca660486d0404462bfb7c9e | |
parent | 8e079857424ce9e652ac2e6e021211d3fd0111f3 [diff] |
Add base implementation framework (#3)
This repo is for Apache Paimon Python SDK.
Flake8 is used to enforce some coding guidelines.
pip install flake8
./usr/bin/python
.-m flake8 --config=tox.ini
.$ProjectFileDir$
.You can verify the setup by right-clicking on any file or folder in the flink-python project and running “External Tools” → “flake8”.
We can use py4j
to leverage Java code to read Paimon data. This section describes how to use this implementation.
cd java_based_implementation/paimon-python-java-bridge/ mvn clean install -DskipTests
The built target is java-based-implementation/paimon-python-java-bridge/target/paimon-python-java-bridge-.jar
py4j
need to access a JVM, so we should set JVM arguments (optional) and Java classpath. A convenient way is using os
packages to set environment variables which only affect current process.
import os os.environ['PYPAIMON_JAVA_CLASSPATH'] = '/path/to/paimon-python-java-bridge-<version>.jar' os.environ['_PYPAIMON_JVM_ARGS'] = 'jvm_arg1 jvm_arg2 ...'
TODO