diff --git a/README.md b/README.md index de7257f2a35756..0eefbd9f5b599b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Apache Flink + # Apache Flink Apache Flink is an open source stream processing framework with powerful stream- and batch-processing capabilities. diff --git a/flink-python/README.md b/flink-python/README.md index f8daeefd212c28..43083bc00bdb9f 100644 --- a/flink-python/README.md +++ b/flink-python/README.md @@ -1,4 +1,4 @@ -# Apache Flink + # Apache Flink 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. diff --git a/flink-python/dev/dev-requirements.txt b/flink-python/dev/dev-requirements.txt index 0e7d3fadb0ce96..9e1e05224a3ebd 100755 --- a/flink-python/dev/dev-requirements.txt +++ b/flink-python/dev/dev-requirements.txt @@ -20,7 +20,7 @@ cython>=0.29.24 py4j==0.10.9.7 python-dateutil>=2.8.0,<3 cloudpickle~=2.2.0 -avro-python3>=1.8.1,!=1.9.2 +avro>=1.12.0 pandas>=1.3.0 pyarrow>=5.0.0 pytz>=2018.3 diff --git a/flink-python/pyflink/fn_execution/formats/avro.py b/flink-python/pyflink/fn_execution/formats/avro.py index db8a9da3e7bd80..b034d263b7202d 100644 --- a/flink-python/pyflink/fn_execution/formats/avro.py +++ b/flink-python/pyflink/fn_execution/formats/avro.py @@ -17,14 +17,13 @@ ################################################################################ import struct +from avro.errors import AvroTypeException, SchemaResolutionException from avro.io import ( - AvroTypeException, BinaryDecoder, BinaryEncoder, DatumReader, DatumWriter, - SchemaResolutionException, - Validate, + validate, ) STRUCT_FLOAT = struct.Struct('>f') # big-endian float @@ -224,7 +223,7 @@ def write_union(self, writer_schema, datum, encoder): # resolve union index_of_schema = -1 for i, candidate_schema in enumerate(writer_schema.schemas): - if Validate(candidate_schema, datum): + if validate(candidate_schema, datum): index_of_schema = i if index_of_schema < 0: raise AvroTypeException(writer_schema, datum) diff --git a/flink-python/setup.py b/flink-python/setup.py index 3b03f41c7c779e..516e8216018d47 100644 --- a/flink-python/setup.py +++ b/flink-python/setup.py @@ -318,7 +318,7 @@ def extracted_output_files(base_dir, file_path, output_directory): install_requires = ['py4j==0.10.9.7', 'python-dateutil>=2.8.0,<3', 'apache-beam>=2.43.0,<2.49.0', - 'cloudpickle>=2.2.0', 'avro-python3>=1.8.1,!=1.9.2', + 'cloudpickle>=2.2.0', 'avro>=1.12.0', 'pytz>=2018.3', 'fastavro>=1.1.0,!=1.8.0', 'requests>=2.26.0', 'protobuf>=3.19.0', 'numpy>=1.22.4',