cp-pyflink 2.0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cp_pyflink-2.0.0.1/LICENSE +201 -0
- cp_pyflink-2.0.0.1/MANIFEST.in +29 -0
- cp_pyflink-2.0.0.1/PKG-INFO +116 -0
- cp_pyflink-2.0.0.1/README.md +72 -0
- cp_pyflink-2.0.0.1/cp_pyflink.egg-info/PKG-INFO +116 -0
- cp_pyflink-2.0.0.1/cp_pyflink.egg-info/SOURCES.txt +268 -0
- cp_pyflink-2.0.0.1/cp_pyflink.egg-info/dependency_links.txt +1 -0
- cp_pyflink-2.0.0.1/cp_pyflink.egg-info/not-zip-safe +1 -0
- cp_pyflink-2.0.0.1/cp_pyflink.egg-info/requires.txt +18 -0
- cp_pyflink-2.0.0.1/cp_pyflink.egg-info/top_level.txt +1 -0
- cp_pyflink-2.0.0.1/deps/bin/bash-java-utils.sh +220 -0
- cp_pyflink-2.0.0.1/deps/bin/config-parser-utils.sh +42 -0
- cp_pyflink-2.0.0.1/deps/bin/config.sh +514 -0
- cp_pyflink-2.0.0.1/deps/bin/find-flink-home.sh +28 -0
- cp_pyflink-2.0.0.1/deps/bin/flink +55 -0
- cp_pyflink-2.0.0.1/deps/bin/flink-console.sh +128 -0
- cp_pyflink-2.0.0.1/deps/bin/flink-daemon.sh +199 -0
- cp_pyflink-2.0.0.1/deps/bin/historyserver.sh +39 -0
- cp_pyflink-2.0.0.1/deps/bin/jobmanager.sh +76 -0
- cp_pyflink-2.0.0.1/deps/bin/kubernetes-jobmanager.sh +42 -0
- cp_pyflink-2.0.0.1/deps/bin/kubernetes-session.sh +42 -0
- cp_pyflink-2.0.0.1/deps/bin/kubernetes-taskmanager.sh +45 -0
- cp_pyflink-2.0.0.1/deps/bin/migrate-config-file.sh +49 -0
- cp_pyflink-2.0.0.1/deps/bin/pyflink-shell.sh +84 -0
- cp_pyflink-2.0.0.1/deps/bin/pyflink-udf-runner.bat +54 -0
- cp_pyflink-2.0.0.1/deps/bin/pyflink-udf-runner.sh +43 -0
- cp_pyflink-2.0.0.1/deps/bin/sql-client.sh +98 -0
- cp_pyflink-2.0.0.1/deps/bin/sql-gateway.sh +98 -0
- cp_pyflink-2.0.0.1/deps/bin/standalone-job.sh +55 -0
- cp_pyflink-2.0.0.1/deps/bin/start-cluster.sh +53 -0
- cp_pyflink-2.0.0.1/deps/bin/start-zookeeper-quorum.sh +46 -0
- cp_pyflink-2.0.0.1/deps/bin/stop-cluster.sh +47 -0
- cp_pyflink-2.0.0.1/deps/bin/stop-zookeeper-quorum.sh +46 -0
- cp_pyflink-2.0.0.1/deps/bin/taskmanager.sh +80 -0
- cp_pyflink-2.0.0.1/deps/bin/yarn-session.sh +41 -0
- cp_pyflink-2.0.0.1/deps/bin/zookeeper.sh +68 -0
- cp_pyflink-2.0.0.1/deps/conf/config.yaml +302 -0
- cp_pyflink-2.0.0.1/deps/conf/log4j-cli.properties +67 -0
- cp_pyflink-2.0.0.1/deps/conf/log4j-console.properties +70 -0
- cp_pyflink-2.0.0.1/deps/conf/log4j-session.properties +42 -0
- cp_pyflink-2.0.0.1/deps/conf/log4j.properties +61 -0
- cp_pyflink-2.0.0.1/deps/conf/logback-console.xml +67 -0
- cp_pyflink-2.0.0.1/deps/conf/logback-session.xml +39 -0
- cp_pyflink-2.0.0.1/deps/conf/logback.xml +58 -0
- cp_pyflink-2.0.0.1/deps/conf/masters +1 -0
- cp_pyflink-2.0.0.1/deps/conf/workers +1 -0
- cp_pyflink-2.0.0.1/deps/conf/zoo.cfg +36 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/basic_operations.py +76 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/connectors/elasticsearch.py +140 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/connectors/kafka_avro_format.py +92 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/connectors/kafka_csv_format.py +72 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/connectors/kafka_json_format.py +74 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/connectors/pulsar.py +68 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/event_time_timer.py +95 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/process_json_data.py +57 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/state_access.py +79 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/streaming_word_count.py +100 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/windowing/session_with_dynamic_gap_window.py +100 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/windowing/session_with_gap_window.py +100 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/windowing/sliding_time_window.py +94 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/windowing/tumbling_count_window.py +82 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/windowing/tumbling_time_window.py +94 -0
- cp_pyflink-2.0.0.1/deps/examples/datastream/word_count.py +134 -0
- cp_pyflink-2.0.0.1/deps/examples/table/basic_operations.py +486 -0
- cp_pyflink-2.0.0.1/deps/examples/table/mixing_use_of_datastream_and_table.py +81 -0
- cp_pyflink-2.0.0.1/deps/examples/table/multi_sink.py +75 -0
- cp_pyflink-2.0.0.1/deps/examples/table/pandas/conversion_from_dataframe.py +44 -0
- cp_pyflink-2.0.0.1/deps/examples/table/pandas/pandas_udaf.py +92 -0
- cp_pyflink-2.0.0.1/deps/examples/table/process_json_data.py +62 -0
- cp_pyflink-2.0.0.1/deps/examples/table/process_json_data_with_udf.py +71 -0
- cp_pyflink-2.0.0.1/deps/examples/table/streaming_word_count.py +104 -0
- cp_pyflink-2.0.0.1/deps/examples/table/windowing/over_window.py +89 -0
- cp_pyflink-2.0.0.1/deps/examples/table/windowing/session_window.py +85 -0
- cp_pyflink-2.0.0.1/deps/examples/table/windowing/sliding_window.py +87 -0
- cp_pyflink-2.0.0.1/deps/examples/table/windowing/tumble_window.py +87 -0
- cp_pyflink-2.0.0.1/deps/examples/table/word_count.py +146 -0
- cp_pyflink-2.0.0.1/deps/log/empty.txt +1 -0
- cp_pyflink-2.0.0.1/pyflink/README.txt +32 -0
- cp_pyflink-2.0.0.1/pyflink/__init__.py +52 -0
- cp_pyflink-2.0.0.1/pyflink/common/__init__.py +126 -0
- cp_pyflink-2.0.0.1/pyflink/common/completable_future.py +95 -0
- cp_pyflink-2.0.0.1/pyflink/common/config_options.py +124 -0
- cp_pyflink-2.0.0.1/pyflink/common/configuration.py +259 -0
- cp_pyflink-2.0.0.1/pyflink/common/constants.py +31 -0
- cp_pyflink-2.0.0.1/pyflink/common/execution_config.py +497 -0
- cp_pyflink-2.0.0.1/pyflink/common/input_dependency_constraint.py +50 -0
- cp_pyflink-2.0.0.1/pyflink/common/io.py +32 -0
- cp_pyflink-2.0.0.1/pyflink/common/job_client.py +121 -0
- cp_pyflink-2.0.0.1/pyflink/common/job_execution_result.py +92 -0
- cp_pyflink-2.0.0.1/pyflink/common/job_id.py +37 -0
- cp_pyflink-2.0.0.1/pyflink/common/job_status.py +121 -0
- cp_pyflink-2.0.0.1/pyflink/common/restart_strategy.py +241 -0
- cp_pyflink-2.0.0.1/pyflink/common/serialization.py +128 -0
- cp_pyflink-2.0.0.1/pyflink/common/serializer.py +92 -0
- cp_pyflink-2.0.0.1/pyflink/common/time.py +124 -0
- cp_pyflink-2.0.0.1/pyflink/common/typeinfo.py +1126 -0
- cp_pyflink-2.0.0.1/pyflink/common/types.py +286 -0
- cp_pyflink-2.0.0.1/pyflink/common/utils.py +25 -0
- cp_pyflink-2.0.0.1/pyflink/common/watermark_strategy.py +188 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/__init__.py +342 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/checkpoint_config.py +397 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/checkpoint_storage.py +363 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/checkpointing_mode.py +89 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/__init__.py +77 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/base.py +99 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/cassandra.py +369 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/elasticsearch.py +298 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/file_system.py +840 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/hybrid_source.py +71 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/jdbc.py +172 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/kafka.py +1163 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/kinesis.py +548 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/number_seq.py +48 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/pulsar.py +820 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/connectors/rabbitmq.py +203 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/data_stream.py +2934 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/execution_mode.py +62 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/externalized_checkpoint_retention.py +70 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/formats/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/formats/avro.py +243 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/formats/csv.py +475 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/formats/json.py +150 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/formats/orc.py +100 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/formats/parquet.py +214 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/functions.py +1624 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/output_tag.py +75 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/slot_sharing_group.py +293 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/state.py +1027 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/state_backend.py +461 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/stream_execution_environment.py +907 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/time_domain.py +31 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/timerservice.py +88 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/utils.py +121 -0
- cp_pyflink-2.0.0.1/pyflink/datastream/window.py +1721 -0
- cp_pyflink-2.0.0.1/pyflink/find_flink_home.py +88 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/ResettableIO.py +72 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/__init__.py +48 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_boot.py +123 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_coder_impl_fast.c +18063 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_coder_impl_fast.pxd +41 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_coder_impl_fast.pyx +105 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_coder_impl_slow.py +80 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_coders.py +93 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_operations.py +226 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_operations_fast.c +40847 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_operations_fast.pxd +67 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_operations_fast.pyx +273 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_operations_slow.py +225 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_sdk_worker_main.py +105 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_stream_fast.c +17141 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_stream_fast.pxd +45 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_stream_fast.pyx +124 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_stream_slow.py +67 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/beam/beam_worker_pool_service.py +183 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/coder_impl_fast.c +95302 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/coder_impl_fast.pxd +203 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/coder_impl_fast.pyx +1042 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/coder_impl_slow.py +941 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/coders.py +825 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/embedded/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/embedded/operations.py +322 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/embedded/process_function.py +234 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/embedded/runtime_context.py +107 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/embedded/side_output_context.py +47 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/embedded/state_impl.py +298 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/embedded/timerservice_impl.py +70 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/operations.py +44 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/process/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/process/input_handler.py +132 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/process/operations.py +469 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/process/process_function.py +222 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/process/runtime_context.py +169 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/process/timerservice_impl.py +230 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/timerservice.py +112 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/window/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/window/merging_window_set.py +115 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/datastream/window/window_operator.py +564 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/embedded/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/embedded/converters.py +284 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/embedded/java_utils.py +204 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/embedded/operation_utils.py +159 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/embedded/operations.py +140 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/embedded/state_impl.py +87 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/flink_fn_execution_pb2.py +153 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/flink_fn_execution_pb2.pyi +566 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/formats/__init__.py +23 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/formats/avro.py +233 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/internal_state.py +133 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/embedded/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/embedded/counter_impl.py +41 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/embedded/distribution_impl.py +29 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/embedded/meter_impl.py +36 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/embedded/metric_impl.py +61 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/process/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/process/counter_impl.py +49 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/process/distribution_impl.py +31 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/process/meter_impl.py +42 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/metrics/process/metric_impl.py +103 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/pickle.py +29 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/profiler.py +33 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/state_impl.py +1339 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/stream_fast.c +15181 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/stream_fast.pxd +58 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/stream_fast.pyx +181 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/stream_slow.py +145 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/aggregate_fast.c +33188 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/aggregate_fast.pxd +96 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/aggregate_fast.pyx +660 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/aggregate_slow.py +608 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/operations.py +576 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/state_data_view.py +300 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_aggregate_fast.c +31674 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_aggregate_fast.pxd +81 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_aggregate_fast.pyx +528 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_aggregate_slow.py +475 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_assigner.py +314 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_context.py +250 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_process_function.py +379 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/table/window_trigger.py +212 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/utils/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/fn_execution/utils/operation_utils.py +319 -0
- cp_pyflink-2.0.0.1/pyflink/gen_protos.py +196 -0
- cp_pyflink-2.0.0.1/pyflink/java_gateway.py +200 -0
- cp_pyflink-2.0.0.1/pyflink/metrics/__init__.py +21 -0
- cp_pyflink-2.0.0.1/pyflink/metrics/metricbase.py +170 -0
- cp_pyflink-2.0.0.1/pyflink/pyflink_callback_server.py +32 -0
- cp_pyflink-2.0.0.1/pyflink/pyflink_gateway_server.py +300 -0
- cp_pyflink-2.0.0.1/pyflink/serializers.py +171 -0
- cp_pyflink-2.0.0.1/pyflink/shell.py +117 -0
- cp_pyflink-2.0.0.1/pyflink/table/__init__.py +171 -0
- cp_pyflink-2.0.0.1/pyflink/table/catalog.py +1393 -0
- cp_pyflink-2.0.0.1/pyflink/table/changelog_mode.py +47 -0
- cp_pyflink-2.0.0.1/pyflink/table/data_view.py +197 -0
- cp_pyflink-2.0.0.1/pyflink/table/descriptors.py +285 -0
- cp_pyflink-2.0.0.1/pyflink/table/environment_settings.py +214 -0
- cp_pyflink-2.0.0.1/pyflink/table/explain_detail.py +42 -0
- cp_pyflink-2.0.0.1/pyflink/table/expression.py +2180 -0
- cp_pyflink-2.0.0.1/pyflink/table/expressions.py +982 -0
- cp_pyflink-2.0.0.1/pyflink/table/functions.py +796 -0
- cp_pyflink-2.0.0.1/pyflink/table/module.py +85 -0
- cp_pyflink-2.0.0.1/pyflink/table/result_kind.py +51 -0
- cp_pyflink-2.0.0.1/pyflink/table/schema.py +266 -0
- cp_pyflink-2.0.0.1/pyflink/table/serializers.py +79 -0
- cp_pyflink-2.0.0.1/pyflink/table/sql_dialect.py +69 -0
- cp_pyflink-2.0.0.1/pyflink/table/statement_set.py +158 -0
- cp_pyflink-2.0.0.1/pyflink/table/table.py +1451 -0
- cp_pyflink-2.0.0.1/pyflink/table/table_config.py +288 -0
- cp_pyflink-2.0.0.1/pyflink/table/table_descriptor.py +257 -0
- cp_pyflink-2.0.0.1/pyflink/table/table_environment.py +1928 -0
- cp_pyflink-2.0.0.1/pyflink/table/table_result.py +269 -0
- cp_pyflink-2.0.0.1/pyflink/table/table_schema.py +160 -0
- cp_pyflink-2.0.0.1/pyflink/table/types.py +2814 -0
- cp_pyflink-2.0.0.1/pyflink/table/udf.py +852 -0
- cp_pyflink-2.0.0.1/pyflink/table/utils.py +146 -0
- cp_pyflink-2.0.0.1/pyflink/table/window.py +454 -0
- cp_pyflink-2.0.0.1/pyflink/testing/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/testing/source_sink_utils.py +49 -0
- cp_pyflink-2.0.0.1/pyflink/testing/test_case_utils.py +396 -0
- cp_pyflink-2.0.0.1/pyflink/util/__init__.py +17 -0
- cp_pyflink-2.0.0.1/pyflink/util/exceptions.py +217 -0
- cp_pyflink-2.0.0.1/pyflink/util/java_utils.py +202 -0
- cp_pyflink-2.0.0.1/pyflink/version.py +23 -0
- cp_pyflink-2.0.0.1/pyproject.toml +37 -0
- cp_pyflink-2.0.0.1/setup.cfg +10 -0
- cp_pyflink-2.0.0.1/setup.py +356 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
################################################################################
|
|
2
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
# or more contributor license agreements. See the NOTICE file
|
|
4
|
+
# distributed with this work for additional information
|
|
5
|
+
# regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
# to you under the Apache License, Version 2.0 (the
|
|
7
|
+
# "License"); you may not use this file except in compliance
|
|
8
|
+
# with the License. You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
################################################################################
|
|
18
|
+
|
|
19
|
+
global-exclude *.py[cod] __pycache__ .DS_Store
|
|
20
|
+
graft deps/bin
|
|
21
|
+
graft deps/conf
|
|
22
|
+
graft deps/log
|
|
23
|
+
recursive-include deps/examples *.py
|
|
24
|
+
include README.md
|
|
25
|
+
include LICENSE
|
|
26
|
+
include NOTICE
|
|
27
|
+
include pyflink/README.txt
|
|
28
|
+
recursive-include pyflink/fn_execution *.pxd
|
|
29
|
+
recursive-include pyflink/fn_execution *.pyx
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cp-pyflink
|
|
3
|
+
Version: 2.0.0.1
|
|
4
|
+
Summary: Apache Flink Python API
|
|
5
|
+
Home-page: https://flink.apache.org
|
|
6
|
+
Author: Apache Software Foundation
|
|
7
|
+
Author-email: dev@flink.apache.org
|
|
8
|
+
License: https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: py4j==0.10.9.7
|
|
18
|
+
Requires-Dist: python-dateutil<3,>=2.8.0
|
|
19
|
+
Requires-Dist: apache-beam<=2.61.0,>=2.54.0
|
|
20
|
+
Requires-Dist: cloudpickle>=2.2.0
|
|
21
|
+
Requires-Dist: avro>=1.12.0
|
|
22
|
+
Requires-Dist: pytz>=2018.3
|
|
23
|
+
Requires-Dist: fastavro!=1.8.0,>=1.1.0
|
|
24
|
+
Requires-Dist: requests>=2.26.0
|
|
25
|
+
Requires-Dist: protobuf>=3.19.0
|
|
26
|
+
Requires-Dist: numpy>=1.22.4
|
|
27
|
+
Requires-Dist: pandas>=1.3.0
|
|
28
|
+
Requires-Dist: pyarrow>=5.0.0
|
|
29
|
+
Requires-Dist: pemja==0.4.1; platform_system != "Windows"
|
|
30
|
+
Requires-Dist: httplib2>=0.19.0
|
|
31
|
+
Requires-Dist: ruamel.yaml>=0.18.4
|
|
32
|
+
Requires-Dist: cp-pyflink-libraries==2.0.0.1
|
|
33
|
+
Dynamic: author
|
|
34
|
+
Dynamic: author-email
|
|
35
|
+
Dynamic: classifier
|
|
36
|
+
Dynamic: description
|
|
37
|
+
Dynamic: description-content-type
|
|
38
|
+
Dynamic: home-page
|
|
39
|
+
Dynamic: license
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
Dynamic: requires-dist
|
|
42
|
+
Dynamic: requires-python
|
|
43
|
+
Dynamic: summary
|
|
44
|
+
|
|
45
|
+
# Apache Flink
|
|
46
|
+
|
|
47
|
+
Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.
|
|
48
|
+
|
|
49
|
+
Learn more about Flink at [https://flink.apache.org/](https://flink.apache.org/)
|
|
50
|
+
|
|
51
|
+
## Python Packaging
|
|
52
|
+
|
|
53
|
+
PyFlink is a Python API for Apache Flink that allows you to build scalable batch and streaming workloads,
|
|
54
|
+
such as real-time data processing pipelines, large-scale exploratory data analysis, Machine Learning (ML)
|
|
55
|
+
pipelines and ETL processes. If you’re already familiar with Python and libraries such as Pandas,
|
|
56
|
+
then PyFlink makes it simpler to leverage the full capabilities of the Flink ecosystem.
|
|
57
|
+
Depending on the level of abstraction you need, there are two different APIs that can be used in PyFlink: PyFlink Table API and PyFlink DataStream API.
|
|
58
|
+
|
|
59
|
+
The PyFlink Table API allows you to write powerful relational queries in a way that is similar to
|
|
60
|
+
using SQL or working with tabular data in Python. You can find more information about it via the tutorial
|
|
61
|
+
[https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/table_api_tutorial/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/table_api_tutorial/)
|
|
62
|
+
|
|
63
|
+
The PyFlink DataStream API gives you lower-level control over the core building blocks of Flink,
|
|
64
|
+
state and time, to build more complex stream processing use cases.
|
|
65
|
+
Tutorial can be found at [https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/datastream_tutorial/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/datastream_tutorial/)
|
|
66
|
+
|
|
67
|
+
You can find more information via the documentation at [https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/overview/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/overview/)
|
|
68
|
+
|
|
69
|
+
The auto-generated Python docs can be found at [https://nightlies.apache.org/flink/flink-docs-stable/api/python/](https://nightlies.apache.org/flink/flink-docs-stable/api/python/)
|
|
70
|
+
|
|
71
|
+
## Python Requirements
|
|
72
|
+
|
|
73
|
+
Apache Flink Python API depends on Py4J (currently version 0.10.9.7), CloudPickle (currently version 2.2.0), python-dateutil (currently version >=2.8.0,<3), Apache Beam (currently version >= 2.54.0, <= 2.61.0).
|
|
74
|
+
|
|
75
|
+
## Development Notices
|
|
76
|
+
|
|
77
|
+
### Protobuf Code Generation
|
|
78
|
+
|
|
79
|
+
Protocol buffer is used in file `flink_fn_execution_pb2.py` and `flink_fn_execution_pb2.pyi`, the file is generated from `flink-fn-execution.proto`. Whenever `flink-fn-execution.proto` is updated, please re-generate `flink_fn_execution_pb2.py` and `flink_fn_execution_pb2.pyi` by executing:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
python pyflink/gen_protos.py
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
PyFlink depends on the following libraries to execute the above script:
|
|
86
|
+
1. grpcio-tools (>=1.29.0,<=1.50.0)
|
|
87
|
+
2. setuptools (>=37.0.0)
|
|
88
|
+
3. pip (>=20.3)
|
|
89
|
+
|
|
90
|
+
### Running Test Cases
|
|
91
|
+
|
|
92
|
+
Currently, we use tox and to verify the compatibility of the Flink Python API for multiple versions of Python and will integrate some useful plugins with tox, such as flake8.
|
|
93
|
+
We can enter the directory where this README.md file is located and run test cases by executing
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
./dev/lint-python.sh
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
To use your system uv environment, you can set `FLINK_UV_HOME` variable:
|
|
100
|
+
|
|
101
|
+
```shell
|
|
102
|
+
export FLINK_UV_HOME=$(dirname $(dirname $(which uv)))
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Create a virtual environment:
|
|
106
|
+
```shell
|
|
107
|
+
uv venv pyflink_38 --python=3.8
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Then you can activate your environment and run tests, for example:
|
|
111
|
+
|
|
112
|
+
```shell
|
|
113
|
+
source pyflink_38/bin/activate
|
|
114
|
+
uv pip install -r ./dev/dev-requirements.txt
|
|
115
|
+
./dev/lint-python.sh
|
|
116
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Apache Flink
|
|
2
|
+
|
|
3
|
+
Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.
|
|
4
|
+
|
|
5
|
+
Learn more about Flink at [https://flink.apache.org/](https://flink.apache.org/)
|
|
6
|
+
|
|
7
|
+
## Python Packaging
|
|
8
|
+
|
|
9
|
+
PyFlink is a Python API for Apache Flink that allows you to build scalable batch and streaming workloads,
|
|
10
|
+
such as real-time data processing pipelines, large-scale exploratory data analysis, Machine Learning (ML)
|
|
11
|
+
pipelines and ETL processes. If you’re already familiar with Python and libraries such as Pandas,
|
|
12
|
+
then PyFlink makes it simpler to leverage the full capabilities of the Flink ecosystem.
|
|
13
|
+
Depending on the level of abstraction you need, there are two different APIs that can be used in PyFlink: PyFlink Table API and PyFlink DataStream API.
|
|
14
|
+
|
|
15
|
+
The PyFlink Table API allows you to write powerful relational queries in a way that is similar to
|
|
16
|
+
using SQL or working with tabular data in Python. You can find more information about it via the tutorial
|
|
17
|
+
[https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/table_api_tutorial/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/table_api_tutorial/)
|
|
18
|
+
|
|
19
|
+
The PyFlink DataStream API gives you lower-level control over the core building blocks of Flink,
|
|
20
|
+
state and time, to build more complex stream processing use cases.
|
|
21
|
+
Tutorial can be found at [https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/datastream_tutorial/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/datastream_tutorial/)
|
|
22
|
+
|
|
23
|
+
You can find more information via the documentation at [https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/overview/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/overview/)
|
|
24
|
+
|
|
25
|
+
The auto-generated Python docs can be found at [https://nightlies.apache.org/flink/flink-docs-stable/api/python/](https://nightlies.apache.org/flink/flink-docs-stable/api/python/)
|
|
26
|
+
|
|
27
|
+
## Python Requirements
|
|
28
|
+
|
|
29
|
+
Apache Flink Python API depends on Py4J (currently version 0.10.9.7), CloudPickle (currently version 2.2.0), python-dateutil (currently version >=2.8.0,<3), Apache Beam (currently version >= 2.54.0, <= 2.61.0).
|
|
30
|
+
|
|
31
|
+
## Development Notices
|
|
32
|
+
|
|
33
|
+
### Protobuf Code Generation
|
|
34
|
+
|
|
35
|
+
Protocol buffer is used in file `flink_fn_execution_pb2.py` and `flink_fn_execution_pb2.pyi`, the file is generated from `flink-fn-execution.proto`. Whenever `flink-fn-execution.proto` is updated, please re-generate `flink_fn_execution_pb2.py` and `flink_fn_execution_pb2.pyi` by executing:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
python pyflink/gen_protos.py
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
PyFlink depends on the following libraries to execute the above script:
|
|
42
|
+
1. grpcio-tools (>=1.29.0,<=1.50.0)
|
|
43
|
+
2. setuptools (>=37.0.0)
|
|
44
|
+
3. pip (>=20.3)
|
|
45
|
+
|
|
46
|
+
### Running Test Cases
|
|
47
|
+
|
|
48
|
+
Currently, we use tox and to verify the compatibility of the Flink Python API for multiple versions of Python and will integrate some useful plugins with tox, such as flake8.
|
|
49
|
+
We can enter the directory where this README.md file is located and run test cases by executing
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
./dev/lint-python.sh
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
To use your system uv environment, you can set `FLINK_UV_HOME` variable:
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
export FLINK_UV_HOME=$(dirname $(dirname $(which uv)))
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Create a virtual environment:
|
|
62
|
+
```shell
|
|
63
|
+
uv venv pyflink_38 --python=3.8
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Then you can activate your environment and run tests, for example:
|
|
67
|
+
|
|
68
|
+
```shell
|
|
69
|
+
source pyflink_38/bin/activate
|
|
70
|
+
uv pip install -r ./dev/dev-requirements.txt
|
|
71
|
+
./dev/lint-python.sh
|
|
72
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cp-pyflink
|
|
3
|
+
Version: 2.0.0.1
|
|
4
|
+
Summary: Apache Flink Python API
|
|
5
|
+
Home-page: https://flink.apache.org
|
|
6
|
+
Author: Apache Software Foundation
|
|
7
|
+
Author-email: dev@flink.apache.org
|
|
8
|
+
License: https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: py4j==0.10.9.7
|
|
18
|
+
Requires-Dist: python-dateutil<3,>=2.8.0
|
|
19
|
+
Requires-Dist: apache-beam<=2.61.0,>=2.54.0
|
|
20
|
+
Requires-Dist: cloudpickle>=2.2.0
|
|
21
|
+
Requires-Dist: avro>=1.12.0
|
|
22
|
+
Requires-Dist: pytz>=2018.3
|
|
23
|
+
Requires-Dist: fastavro!=1.8.0,>=1.1.0
|
|
24
|
+
Requires-Dist: requests>=2.26.0
|
|
25
|
+
Requires-Dist: protobuf>=3.19.0
|
|
26
|
+
Requires-Dist: numpy>=1.22.4
|
|
27
|
+
Requires-Dist: pandas>=1.3.0
|
|
28
|
+
Requires-Dist: pyarrow>=5.0.0
|
|
29
|
+
Requires-Dist: pemja==0.4.1; platform_system != "Windows"
|
|
30
|
+
Requires-Dist: httplib2>=0.19.0
|
|
31
|
+
Requires-Dist: ruamel.yaml>=0.18.4
|
|
32
|
+
Requires-Dist: cp-pyflink-libraries==2.0.0.1
|
|
33
|
+
Dynamic: author
|
|
34
|
+
Dynamic: author-email
|
|
35
|
+
Dynamic: classifier
|
|
36
|
+
Dynamic: description
|
|
37
|
+
Dynamic: description-content-type
|
|
38
|
+
Dynamic: home-page
|
|
39
|
+
Dynamic: license
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
Dynamic: requires-dist
|
|
42
|
+
Dynamic: requires-python
|
|
43
|
+
Dynamic: summary
|
|
44
|
+
|
|
45
|
+
# Apache Flink
|
|
46
|
+
|
|
47
|
+
Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.
|
|
48
|
+
|
|
49
|
+
Learn more about Flink at [https://flink.apache.org/](https://flink.apache.org/)
|
|
50
|
+
|
|
51
|
+
## Python Packaging
|
|
52
|
+
|
|
53
|
+
PyFlink is a Python API for Apache Flink that allows you to build scalable batch and streaming workloads,
|
|
54
|
+
such as real-time data processing pipelines, large-scale exploratory data analysis, Machine Learning (ML)
|
|
55
|
+
pipelines and ETL processes. If you’re already familiar with Python and libraries such as Pandas,
|
|
56
|
+
then PyFlink makes it simpler to leverage the full capabilities of the Flink ecosystem.
|
|
57
|
+
Depending on the level of abstraction you need, there are two different APIs that can be used in PyFlink: PyFlink Table API and PyFlink DataStream API.
|
|
58
|
+
|
|
59
|
+
The PyFlink Table API allows you to write powerful relational queries in a way that is similar to
|
|
60
|
+
using SQL or working with tabular data in Python. You can find more information about it via the tutorial
|
|
61
|
+
[https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/table_api_tutorial/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/table_api_tutorial/)
|
|
62
|
+
|
|
63
|
+
The PyFlink DataStream API gives you lower-level control over the core building blocks of Flink,
|
|
64
|
+
state and time, to build more complex stream processing use cases.
|
|
65
|
+
Tutorial can be found at [https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/datastream_tutorial/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/datastream_tutorial/)
|
|
66
|
+
|
|
67
|
+
You can find more information via the documentation at [https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/overview/](https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/python/overview/)
|
|
68
|
+
|
|
69
|
+
The auto-generated Python docs can be found at [https://nightlies.apache.org/flink/flink-docs-stable/api/python/](https://nightlies.apache.org/flink/flink-docs-stable/api/python/)
|
|
70
|
+
|
|
71
|
+
## Python Requirements
|
|
72
|
+
|
|
73
|
+
Apache Flink Python API depends on Py4J (currently version 0.10.9.7), CloudPickle (currently version 2.2.0), python-dateutil (currently version >=2.8.0,<3), Apache Beam (currently version >= 2.54.0, <= 2.61.0).
|
|
74
|
+
|
|
75
|
+
## Development Notices
|
|
76
|
+
|
|
77
|
+
### Protobuf Code Generation
|
|
78
|
+
|
|
79
|
+
Protocol buffer is used in file `flink_fn_execution_pb2.py` and `flink_fn_execution_pb2.pyi`, the file is generated from `flink-fn-execution.proto`. Whenever `flink-fn-execution.proto` is updated, please re-generate `flink_fn_execution_pb2.py` and `flink_fn_execution_pb2.pyi` by executing:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
python pyflink/gen_protos.py
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
PyFlink depends on the following libraries to execute the above script:
|
|
86
|
+
1. grpcio-tools (>=1.29.0,<=1.50.0)
|
|
87
|
+
2. setuptools (>=37.0.0)
|
|
88
|
+
3. pip (>=20.3)
|
|
89
|
+
|
|
90
|
+
### Running Test Cases
|
|
91
|
+
|
|
92
|
+
Currently, we use tox and to verify the compatibility of the Flink Python API for multiple versions of Python and will integrate some useful plugins with tox, such as flake8.
|
|
93
|
+
We can enter the directory where this README.md file is located and run test cases by executing
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
./dev/lint-python.sh
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
To use your system uv environment, you can set `FLINK_UV_HOME` variable:
|
|
100
|
+
|
|
101
|
+
```shell
|
|
102
|
+
export FLINK_UV_HOME=$(dirname $(dirname $(which uv)))
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Create a virtual environment:
|
|
106
|
+
```shell
|
|
107
|
+
uv venv pyflink_38 --python=3.8
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Then you can activate your environment and run tests, for example:
|
|
111
|
+
|
|
112
|
+
```shell
|
|
113
|
+
source pyflink_38/bin/activate
|
|
114
|
+
uv pip install -r ./dev/dev-requirements.txt
|
|
115
|
+
./dev/lint-python.sh
|
|
116
|
+
```
|