deltacat 1.1.6__tar.gz → 1.1.8__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.
- deltacat-1.1.8/LICENSE +201 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/PKG-INFO +2 -3
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/__init__.py +1 -1
- deltacat-1.1.8/deltacat/aws/constants.py +27 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/aws/s3u.py +48 -21
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/round_completion_info.py +4 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/compaction_session.py +51 -25
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/constants.py +12 -0
- deltacat-1.1.8/deltacat/compute/compactor_v2/model/compaction_session.py +21 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/steps/hash_bucket.py +6 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/steps/merge.py +6 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/task_options.py +4 -1
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/interface.py +10 -3
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/aws/test_s3u.py +84 -3
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/catalog/test_default_catalog_impl.py +2 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compact_partition_test_cases.py +61 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor_v2/test_compaction_session.py +2 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/test_compact_partition_incremental.py +89 -32
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/test_compact_partition_rebase_then_incremental.py +21 -26
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/test_util_create_table_deltas_repo.py +45 -2
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/local_deltacat_storage/__init__.py +38 -19
- deltacat-1.1.8/deltacat/tests/utils/ray_utils/test_concurrency.py +50 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/test_resources.py +28 -0
- deltacat-1.1.8/deltacat/utils/ray_utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/resources.py +45 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat.egg-info/PKG-INFO +2 -3
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat.egg-info/SOURCES.txt +4 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat.egg-info/requires.txt +3 -3
- {deltacat-1.1.6 → deltacat-1.1.8}/setup.py +4 -5
- deltacat-1.1.6/deltacat/aws/constants.py +0 -10
- {deltacat-1.1.6 → deltacat-1.1.8}/MANIFEST.in +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/README.md +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/aws/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/aws/clients.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/aws/redshift/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/aws/redshift/model/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/aws/redshift/model/manifest.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/benchmarking/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/benchmarking/benchmark_parquet_reads.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/benchmarking/conftest.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/catalog/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/catalog/default_catalog_impl/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/catalog/delegate.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/catalog/interface.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/catalog/model/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/catalog/model/catalog.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/catalog/model/table_definition.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/compaction_session.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/compact_partition_params.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/compaction_session_audit_info.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/compactor_version.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/dedupe_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/delta_annotated.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/delta_file_envelope.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/delta_file_locator.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/hash_bucket_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/materialize_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/primary_key_index.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/pyarrow_write_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/repartition_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/model/table_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/repartition_session.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/steps/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/steps/dedupe.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/steps/hash_bucket.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/steps/materialize.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/steps/repartition.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/utils/io.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/utils/primary_key_index.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/utils/round_completion_file.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/utils/sort_key.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor/utils/system_columns.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/deletes/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/deletes/delete_file_envelope.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/deletes/delete_strategy.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/deletes/delete_strategy_equality_delete.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/deletes/model.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/deletes/utils.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/model/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/model/hash_bucket_input.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/model/hash_bucket_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/model/merge_file_group.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/model/merge_input.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/model/merge_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/steps/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/content_type_params.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/dedupe.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/delta.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/io.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/merge.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/compactor_v2/utils/primary_key_index.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/merge_on_read/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/merge_on_read/daft.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/merge_on_read/model/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/merge_on_read/model/merge_on_read_params.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/merge_on_read/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/merge_on_read/utils/delta.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/config/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/meta_stats.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/model/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/model/partition_stats_dict.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/model/stats_cluster_size_estimator.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/stats.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/utils/constants.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/utils/io.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/utils/pyarrow_memory_estimation_function.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/metastats/utils/ray_utils.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/basic.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/models/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/models/delta_column_stats.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/models/delta_stats.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/models/delta_stats_cache_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/models/manifest_entry_stats.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/models/stats_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/types.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/utils/intervals.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/utils/io.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/compute/stats/utils/manifest_stats_file.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/constants.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/exceptions.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/aws/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/aws/redshift/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/aws/redshift/redshift_datasource.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/dataset.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/file_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/memcached_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/ray_plasma_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/read_api.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/redis_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/io/s3_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/logs.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/delete_parameters.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/delta.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/list_result.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/locator.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/namespace.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/partition.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/sort_key.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/stream.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/table.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/table_version.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/storage/model/types.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/aws/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/aws/test_clients.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/catalog/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compact_partition_rebase_then_incremental_test_cases.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor/steps/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor/steps/test_repartition.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor/utils/test_io.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor_v2/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor_v2/test_hashlib.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor_v2/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/compactor_v2/utils/test_task_options.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/test_compact_partition_params.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/test_util_common.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/compute/test_util_constant.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/io/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/io/test_cloudpickle_bug_fix.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/io/test_file_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/io/test_memcached_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/io/test_ray_plasma_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/io/test_redis_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/io/test_s3_object_store.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/stats/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/stats/test_intervals.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/test_logs.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/test_utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/test_utils/constants.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/test_utils/pyarrow.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/test_utils/storage.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/test_utils/utils.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/data/__init__.py +0 -0
- {deltacat-1.1.6/deltacat/types → deltacat-1.1.8/deltacat/tests/utils/ray_utils}/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/test_cloudpickle.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/test_daft.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/test_metrics.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/test_placement.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/test_pyarrow.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/tests/utils/test_record_batch_tables.py +0 -0
- {deltacat-1.1.6/deltacat/utils → deltacat-1.1.8/deltacat/types}/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/types/media.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/types/partial_download.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/types/tables.py +0 -0
- {deltacat-1.1.6/deltacat/utils/ray_utils → deltacat-1.1.8/deltacat/utils}/__init__.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/arguments.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/cloudpickle.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/common.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/daft.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/metrics.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/numpy.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/pandas.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/performance.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/placement.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/pyarrow.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/ray_utils/collections.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/ray_utils/concurrency.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/ray_utils/dataset.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/ray_utils/performance.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/ray_utils/runtime.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/s3fs.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat/utils/schema.py +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat.egg-info/dependency_links.txt +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/deltacat.egg-info/top_level.txt +0 -0
- {deltacat-1.1.6 → deltacat-1.1.8}/setup.cfg +0 -0
deltacat-1.1.8/LICENSE
ADDED
@@ -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.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: deltacat
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.8
|
4
4
|
Summary: A scalable, fast, ACID-compliant Data Catalog powered by Ray.
|
5
5
|
Home-page: https://github.com/ray-project/deltacat
|
6
6
|
Author: Ray Team
|
@@ -40,9 +40,8 @@ Platform: UNKNOWN
|
|
40
40
|
Classifier: Development Status :: 4 - Beta
|
41
41
|
Classifier: Intended Audience :: Developers
|
42
42
|
Classifier: Programming Language :: Python :: 3 :: Only
|
43
|
-
Classifier: Programming Language :: Python :: 3.7
|
44
43
|
Classifier: Programming Language :: Python :: 3.8
|
45
44
|
Classifier: Programming Language :: Python :: 3.9
|
46
45
|
Classifier: Operating System :: OS Independent
|
47
|
-
Requires-Python: >=3.
|
46
|
+
Requires-Python: >=3.8
|
48
47
|
Description-Content-Type: text/markdown
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import botocore
|
2
|
+
from typing import Set
|
3
|
+
|
4
|
+
from deltacat.utils.common import env_integer, env_string
|
5
|
+
|
6
|
+
DAFT_MAX_S3_CONNECTIONS_PER_FILE = env_integer("DAFT_MAX_S3_CONNECTIONS_PER_FILE", 8)
|
7
|
+
BOTO_MAX_RETRIES = env_integer("BOTO_MAX_RETRIES", 5)
|
8
|
+
BOTO_TIMEOUT_ERROR_CODES: Set[str] = {"ReadTimeoutError", "ConnectTimeoutError"}
|
9
|
+
BOTO_THROTTLING_ERROR_CODES: Set[str] = {"Throttling", "SlowDown"}
|
10
|
+
RETRYABLE_TRANSIENT_ERRORS = (
|
11
|
+
OSError,
|
12
|
+
botocore.exceptions.ConnectionError,
|
13
|
+
botocore.exceptions.HTTPClientError,
|
14
|
+
botocore.exceptions.NoCredentialsError,
|
15
|
+
botocore.exceptions.ConnectTimeoutError,
|
16
|
+
botocore.exceptions.ReadTimeoutError,
|
17
|
+
)
|
18
|
+
AWS_REGION = env_string("AWS_REGION", "us-east-1")
|
19
|
+
UPLOAD_DOWNLOAD_RETRY_STOP_AFTER_DELAY = env_integer(
|
20
|
+
"UPLOAD_DOWNLOAD_RETRY_STOP_AFTER_DELAY", 10 * 60
|
21
|
+
)
|
22
|
+
UPLOAD_SLICED_TABLE_RETRY_STOP_AFTER_DELAY = env_integer(
|
23
|
+
"UPLOAD_SLICED_TABLE_RETRY_STOP_AFTER_DELAY", 30 * 60
|
24
|
+
)
|
25
|
+
DOWNLOAD_MANIFEST_ENTRY_RETRY_STOP_AFTER_DELAY = env_integer(
|
26
|
+
"DOWNLOAD_MANIFEST_ENTRY_RETRY_STOP_AFTER_DELAY", 30 * 60
|
27
|
+
)
|
@@ -6,8 +6,12 @@ from uuid import uuid4
|
|
6
6
|
from botocore.config import Config
|
7
7
|
from deltacat.aws.constants import (
|
8
8
|
BOTO_MAX_RETRIES,
|
9
|
-
|
10
|
-
|
9
|
+
UPLOAD_DOWNLOAD_RETRY_STOP_AFTER_DELAY,
|
10
|
+
BOTO_THROTTLING_ERROR_CODES,
|
11
|
+
RETRYABLE_TRANSIENT_ERRORS,
|
12
|
+
BOTO_TIMEOUT_ERROR_CODES,
|
13
|
+
UPLOAD_SLICED_TABLE_RETRY_STOP_AFTER_DELAY,
|
14
|
+
DOWNLOAD_MANIFEST_ENTRY_RETRY_STOP_AFTER_DELAY,
|
11
15
|
)
|
12
16
|
|
13
17
|
import pyarrow as pa
|
@@ -15,7 +19,7 @@ import ray
|
|
15
19
|
import s3fs
|
16
20
|
from boto3.resources.base import ServiceResource
|
17
21
|
from botocore.client import BaseClient
|
18
|
-
from botocore.exceptions import ClientError
|
22
|
+
from botocore.exceptions import ClientError
|
19
23
|
from ray.data.block import Block, BlockAccessor, BlockMetadata
|
20
24
|
from ray.data.datasource import BlockWritePathProvider
|
21
25
|
from ray.types import ObjectRef
|
@@ -29,9 +33,6 @@ from tenacity import (
|
|
29
33
|
from deltacat.utils.ray_utils.concurrency import invoke_parallel
|
30
34
|
import deltacat.aws.clients as aws_utils
|
31
35
|
from deltacat import logs
|
32
|
-
from deltacat.aws.constants import (
|
33
|
-
TIMEOUT_ERROR_CODES,
|
34
|
-
)
|
35
36
|
from deltacat.exceptions import NonRetryableError, RetryableError
|
36
37
|
from deltacat.storage import (
|
37
38
|
DistributedDataset,
|
@@ -257,10 +258,21 @@ def read_file(
|
|
257
258
|
)
|
258
259
|
return table
|
259
260
|
except ClientError as e:
|
260
|
-
if
|
261
|
+
if (
|
262
|
+
e.response["Error"]["Code"]
|
263
|
+
in BOTO_TIMEOUT_ERROR_CODES | BOTO_THROTTLING_ERROR_CODES
|
264
|
+
):
|
261
265
|
# Timeout error not caught by botocore
|
262
|
-
raise RetryableError(
|
263
|
-
|
266
|
+
raise RetryableError(
|
267
|
+
f"Retry table download from: {s3_url} after receiving {type(e).__name__}"
|
268
|
+
) from e
|
269
|
+
raise NonRetryableError(
|
270
|
+
f"Failed table download from: {s3_url} after receiving {type(e).__name__}"
|
271
|
+
) from e
|
272
|
+
except RETRYABLE_TRANSIENT_ERRORS as e:
|
273
|
+
raise RetryableError(
|
274
|
+
f"Retry upload for: {s3_url} after receiving {type(e).__name__}"
|
275
|
+
) from e
|
264
276
|
except BaseException as e:
|
265
277
|
logger.warn(
|
266
278
|
f"Read has failed for {s3_url} and content_type={content_type} "
|
@@ -285,7 +297,7 @@ def upload_sliced_table(
|
|
285
297
|
# @retry decorator can't be pickled by Ray, so wrap upload in Retrying
|
286
298
|
retrying = Retrying(
|
287
299
|
wait=wait_random_exponential(multiplier=1, max=60),
|
288
|
-
stop=stop_after_delay(
|
300
|
+
stop=stop_after_delay(UPLOAD_SLICED_TABLE_RETRY_STOP_AFTER_DELAY),
|
289
301
|
retry=retry_if_exception_type(RetryableError),
|
290
302
|
)
|
291
303
|
|
@@ -366,8 +378,23 @@ def upload_table(
|
|
366
378
|
except ClientError as e:
|
367
379
|
if e.response["Error"]["Code"] == "NoSuchKey":
|
368
380
|
# s3fs may swallow S3 errors - we were probably throttled
|
369
|
-
raise RetryableError(
|
370
|
-
|
381
|
+
raise RetryableError(
|
382
|
+
f"Retry table download from: {s3_url} after receiving {type(e).__name__}"
|
383
|
+
) from e
|
384
|
+
if (
|
385
|
+
e.response["Error"]["Code"]
|
386
|
+
in BOTO_TIMEOUT_ERROR_CODES | BOTO_THROTTLING_ERROR_CODES
|
387
|
+
):
|
388
|
+
raise RetryableError(
|
389
|
+
f"Retry table download from: {s3_url} after receiving {type(e).__name__}"
|
390
|
+
) from e
|
391
|
+
raise NonRetryableError(
|
392
|
+
f"Failed table upload to: {s3_url} after receiving {type(e).__name__}"
|
393
|
+
) from e
|
394
|
+
except RETRYABLE_TRANSIENT_ERRORS as e:
|
395
|
+
raise RetryableError(
|
396
|
+
f"Retry upload for: {s3_url} after receiving {type(e).__name__}"
|
397
|
+
) from e
|
371
398
|
except BaseException as e:
|
372
399
|
logger.warn(
|
373
400
|
f"Upload has failed for {s3_url} and content_type={content_type}. Error: {e}",
|
@@ -415,7 +442,7 @@ def download_manifest_entry(
|
|
415
442
|
# @retry decorator can't be pickled by Ray, so wrap download in Retrying
|
416
443
|
retrying = Retrying(
|
417
444
|
wait=wait_random_exponential(multiplier=1, max=60),
|
418
|
-
stop=stop_after_delay(
|
445
|
+
stop=stop_after_delay(DOWNLOAD_MANIFEST_ENTRY_RETRY_STOP_AFTER_DELAY),
|
419
446
|
retry=retry_if_not_exception_type(NonRetryableError),
|
420
447
|
)
|
421
448
|
table = retrying(
|
@@ -511,7 +538,7 @@ def upload(s3_url: str, body, **s3_client_kwargs) -> Dict[str, Any]:
|
|
511
538
|
s3 = s3_client_cache(None, **s3_client_kwargs)
|
512
539
|
retrying = Retrying(
|
513
540
|
wait=wait_random_exponential(multiplier=1, max=15),
|
514
|
-
stop=stop_after_delay(
|
541
|
+
stop=stop_after_delay(UPLOAD_DOWNLOAD_RETRY_STOP_AFTER_DELAY),
|
515
542
|
retry=retry_if_exception_type(RetryableError),
|
516
543
|
)
|
517
544
|
return retrying(
|
@@ -531,18 +558,18 @@ def _put_object(
|
|
531
558
|
Body=body, Bucket=bucket, Key=key, **s3_put_object_kwargs
|
532
559
|
)
|
533
560
|
except ClientError as e:
|
534
|
-
if e.response["Error"]["Code"] in
|
561
|
+
if e.response["Error"]["Code"] in BOTO_THROTTLING_ERROR_CODES:
|
535
562
|
raise RetryableError(
|
536
563
|
f"Retry upload for: {bucket}/{key} after receiving {e.response['Error']['Code']}"
|
537
564
|
) from e
|
538
565
|
raise NonRetryableError(f"Failed table upload to: {bucket}/{key}") from e
|
539
|
-
except
|
566
|
+
except RETRYABLE_TRANSIENT_ERRORS as e:
|
540
567
|
raise RetryableError(
|
541
|
-
f"
|
568
|
+
f"Retry upload for: {bucket}/{key} after receiving {type(e).__name__}"
|
542
569
|
) from e
|
543
570
|
except BaseException as e:
|
544
571
|
logger.error(
|
545
|
-
f"Upload has failed for {bucket}/{key}. Error: {e}",
|
572
|
+
f"Upload has failed for {bucket}/{key}. Error: {type(e).__name__}",
|
546
573
|
exc_info=True,
|
547
574
|
)
|
548
575
|
raise NonRetryableError(f"Failed table upload to: {bucket}/{key}") from e
|
@@ -556,7 +583,7 @@ def download(
|
|
556
583
|
s3 = s3_client_cache(None, **s3_client_kwargs)
|
557
584
|
retrying = Retrying(
|
558
585
|
wait=wait_random_exponential(multiplier=1, max=15),
|
559
|
-
stop=stop_after_delay(
|
586
|
+
stop=stop_after_delay(UPLOAD_DOWNLOAD_RETRY_STOP_AFTER_DELAY),
|
560
587
|
retry=retry_if_exception_type(RetryableError),
|
561
588
|
)
|
562
589
|
return retrying(
|
@@ -581,9 +608,9 @@ def _get_object(s3_client, bucket: str, key: str, fail_if_not_found: bool = True
|
|
581
608
|
f"Failed get object from: {bucket}/{key}"
|
582
609
|
) from e
|
583
610
|
logger.info(f"file not found: {bucket}/{key}")
|
584
|
-
except
|
611
|
+
except RETRYABLE_TRANSIENT_ERRORS as e:
|
585
612
|
raise RetryableError(
|
586
|
-
f"
|
613
|
+
f"Retry get object: {bucket}/{key} after receiving {type(e).__name__}"
|
587
614
|
) from e
|
588
615
|
|
589
616
|
return None
|
@@ -128,3 +128,7 @@ class RoundCompletionInfo(dict):
|
|
128
128
|
@property
|
129
129
|
def input_average_record_size_bytes(self) -> Optional[float]:
|
130
130
|
return self.get("inputAverageRecordSizeBytes")
|
131
|
+
|
132
|
+
@staticmethod
|
133
|
+
def get_audit_bucket_name_and_key(compaction_audit_url: str) -> Tuple[str, str]:
|
134
|
+
return compaction_audit_url.replace("s3://", "").split("/", 1)
|
@@ -24,6 +24,9 @@ from deltacat.compute.compactor import (
|
|
24
24
|
)
|
25
25
|
from deltacat.compute.compactor_v2.model.merge_result import MergeResult
|
26
26
|
from deltacat.compute.compactor_v2.model.hash_bucket_result import HashBucketResult
|
27
|
+
from deltacat.compute.compactor_v2.model.compaction_session import (
|
28
|
+
ExecutionCompactionResult,
|
29
|
+
)
|
27
30
|
from deltacat.compute.compactor.model.materialize_result import MaterializeResult
|
28
31
|
from deltacat.compute.compactor_v2.utils.merge import (
|
29
32
|
generate_local_merge_input,
|
@@ -41,8 +44,11 @@ from deltacat.compute.compactor_v2.deletes.utils import prepare_deletes
|
|
41
44
|
from deltacat.storage import (
|
42
45
|
Delta,
|
43
46
|
DeltaLocator,
|
47
|
+
DeltaType,
|
44
48
|
Manifest,
|
45
49
|
Partition,
|
50
|
+
Stream,
|
51
|
+
StreamLocator,
|
46
52
|
)
|
47
53
|
from deltacat.compute.compactor.model.compact_partition_params import (
|
48
54
|
CompactPartitionParams,
|
@@ -57,7 +63,7 @@ from deltacat.compute.compactor_v2.utils import io
|
|
57
63
|
from deltacat.compute.compactor.utils import round_completion_file as rcf
|
58
64
|
from deltacat.utils.metrics import metrics
|
59
65
|
|
60
|
-
from typing import List, Optional
|
66
|
+
from typing import List, Optional
|
61
67
|
from collections import defaultdict
|
62
68
|
from deltacat.compute.compactor.model.compaction_session_audit_info import (
|
63
69
|
CompactionSessionAuditInfo,
|
@@ -81,35 +87,52 @@ logger = logs.configure_deltacat_logger(logging.getLogger(__name__))
|
|
81
87
|
|
82
88
|
@metrics
|
83
89
|
def compact_partition(params: CompactPartitionParams, **kwargs) -> Optional[str]:
|
84
|
-
|
85
90
|
assert (
|
86
91
|
params.hash_bucket_count is not None and params.hash_bucket_count >= 1
|
87
92
|
), "hash_bucket_count is a required arg for compactor v2"
|
88
93
|
|
89
94
|
with memray.Tracker(
|
90
|
-
|
95
|
+
"compaction_partition.bin"
|
91
96
|
) if params.enable_profiler else nullcontext():
|
92
|
-
|
97
|
+
execute_compaction_result: ExecutionCompactionResult = _execute_compaction(
|
93
98
|
params,
|
94
99
|
**kwargs,
|
95
100
|
)
|
96
|
-
|
101
|
+
compaction_session_type: str = (
|
102
|
+
"INPLACE"
|
103
|
+
if execute_compaction_result.is_inplace_compacted
|
104
|
+
else "NON-INPLACE"
|
105
|
+
)
|
97
106
|
logger.info(
|
98
107
|
f"Partition-{params.source_partition_locator} -> "
|
99
|
-
f"Compaction session data processing completed"
|
108
|
+
f"{compaction_session_type} Compaction session data processing completed"
|
100
109
|
)
|
101
|
-
round_completion_file_s3_url = None
|
102
|
-
if
|
103
|
-
|
104
|
-
|
105
|
-
|
110
|
+
round_completion_file_s3_url: Optional[str] = None
|
111
|
+
if execute_compaction_result.new_compacted_partition:
|
112
|
+
previous_partition: Optional[Partition] = None
|
113
|
+
if execute_compaction_result.is_inplace_compacted:
|
114
|
+
previous_partition: Optional[
|
115
|
+
Partition
|
116
|
+
] = params.deltacat_storage.get_partition(
|
117
|
+
params.source_partition_locator.stream_locator,
|
118
|
+
params.source_partition_locator.partition_values,
|
119
|
+
**params.deltacat_storage_kwargs,
|
120
|
+
)
|
121
|
+
# NOTE: Retrieving the previous partition again as the partition_id may have changed by the time commit_partition is called.
|
122
|
+
logger.info(
|
123
|
+
f"Committing compacted partition to: {execute_compaction_result.new_compacted_partition.locator} "
|
124
|
+
f"using previous partition: {previous_partition.locator if previous_partition else None}"
|
106
125
|
)
|
107
|
-
|
108
|
-
|
126
|
+
commited_partition: Partition = params.deltacat_storage.commit_partition(
|
127
|
+
execute_compaction_result.new_compacted_partition,
|
128
|
+
previous_partition,
|
129
|
+
**params.deltacat_storage_kwargs,
|
130
|
+
)
|
131
|
+
logger.info(f"Committed compacted partition: {commited_partition}")
|
109
132
|
round_completion_file_s3_url = rcf.write_round_completion_file(
|
110
133
|
params.compaction_artifact_s3_bucket,
|
111
|
-
|
112
|
-
|
134
|
+
execute_compaction_result.new_round_completion_file_partition_locator,
|
135
|
+
execute_compaction_result.new_round_completion_info,
|
113
136
|
**params.s3_client_kwargs,
|
114
137
|
)
|
115
138
|
else:
|
@@ -123,7 +146,7 @@ def compact_partition(params: CompactPartitionParams, **kwargs) -> Optional[str]
|
|
123
146
|
|
124
147
|
def _execute_compaction(
|
125
148
|
params: CompactPartitionParams, **kwargs
|
126
|
-
) ->
|
149
|
+
) -> ExecutionCompactionResult:
|
127
150
|
|
128
151
|
rcf_source_partition_locator = (
|
129
152
|
params.rebase_source_partition_locator or params.source_partition_locator
|
@@ -142,7 +165,7 @@ def _execute_compaction(
|
|
142
165
|
|
143
166
|
compaction_start = time.monotonic()
|
144
167
|
|
145
|
-
task_max_parallelism = params.task_max_parallelism
|
168
|
+
task_max_parallelism: int = params.task_max_parallelism
|
146
169
|
|
147
170
|
if params.pg_config:
|
148
171
|
logger.info(
|
@@ -205,7 +228,7 @@ def _execute_compaction(
|
|
205
228
|
)
|
206
229
|
if not input_deltas:
|
207
230
|
logger.info("No input deltas found to compact.")
|
208
|
-
return None, None, None
|
231
|
+
return ExecutionCompactionResult(None, None, None, False)
|
209
232
|
|
210
233
|
delete_strategy: Optional[DeleteStrategy] = None
|
211
234
|
delete_file_envelopes: Optional[List[DeleteFileEnvelope]] = None
|
@@ -217,7 +240,7 @@ def _execute_compaction(
|
|
217
240
|
for delete_file_envelope in delete_file_envelopes:
|
218
241
|
delete_file_size_bytes += delete_file_envelope.table_size_bytes
|
219
242
|
logger.info(
|
220
|
-
f" Input deltas contain DELETE-type deltas. Total delete file size={delete_file_size_bytes}."
|
243
|
+
f" Input deltas contain {DeltaType.DELETE}-type deltas. Total delete file size={delete_file_size_bytes}."
|
221
244
|
f" Total length of delete file envelopes={len(delete_file_envelopes)}"
|
222
245
|
)
|
223
246
|
uniform_deltas: List[DeltaAnnotated] = io.create_uniform_input_deltas(
|
@@ -247,14 +270,16 @@ def _execute_compaction(
|
|
247
270
|
)
|
248
271
|
|
249
272
|
# create a new stream for this round
|
250
|
-
compacted_stream_locator
|
251
|
-
|
273
|
+
compacted_stream_locator: Optional[
|
274
|
+
StreamLocator
|
275
|
+
] = params.destination_partition_locator.stream_locator
|
276
|
+
compacted_stream: Stream = params.deltacat_storage.get_stream(
|
252
277
|
compacted_stream_locator.namespace,
|
253
278
|
compacted_stream_locator.table_name,
|
254
279
|
compacted_stream_locator.table_version,
|
255
280
|
**params.deltacat_storage_kwargs,
|
256
281
|
)
|
257
|
-
compacted_partition = params.deltacat_storage.stage_partition(
|
282
|
+
compacted_partition: Partition = params.deltacat_storage.stage_partition(
|
258
283
|
compacted_stream,
|
259
284
|
params.destination_partition_locator.partition_values,
|
260
285
|
**params.deltacat_storage_kwargs,
|
@@ -532,7 +557,7 @@ def _execute_compaction(
|
|
532
557
|
|
533
558
|
# Note: An appropriate last stream position must be set
|
534
559
|
# to avoid correctness issue.
|
535
|
-
merged_delta = Delta.merge_deltas(
|
560
|
+
merged_delta: Delta = Delta.merge_deltas(
|
536
561
|
deltas,
|
537
562
|
stream_position=params.last_stream_position_to_compact,
|
538
563
|
)
|
@@ -545,7 +570,7 @@ def _execute_compaction(
|
|
545
570
|
)
|
546
571
|
logger.info(record_info_msg)
|
547
572
|
|
548
|
-
compacted_delta = params.deltacat_storage.commit_delta(
|
573
|
+
compacted_delta: Delta = params.deltacat_storage.commit_delta(
|
549
574
|
merged_delta,
|
550
575
|
properties=kwargs.get("properties", {}),
|
551
576
|
**params.deltacat_storage_kwargs,
|
@@ -653,8 +678,9 @@ def _execute_compaction(
|
|
653
678
|
f"and rcf source partition_id of {rcf_source_partition_locator.partition_id}."
|
654
679
|
)
|
655
680
|
rcf_source_partition_locator = compacted_partition.locator
|
656
|
-
return (
|
681
|
+
return ExecutionCompactionResult(
|
657
682
|
compacted_partition,
|
658
683
|
new_round_completion_info,
|
659
684
|
rcf_source_partition_locator,
|
685
|
+
is_inplace_compacted,
|
660
686
|
)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
from deltacat.utils.common import env_integer
|
2
|
+
|
1
3
|
TOTAL_BYTES_IN_SHA1_HASH = 20
|
2
4
|
|
3
5
|
PK_DELIMITER = "L6kl7u5f"
|
@@ -41,6 +43,16 @@ DROP_DUPLICATES = True
|
|
41
43
|
# size in metadata to pyarrow table size.
|
42
44
|
PARQUET_TO_PYARROW_INFLATION = 4
|
43
45
|
|
46
|
+
# A merge task will fail after this timeout
|
47
|
+
# The default is currently double the observed maximum.
|
48
|
+
# This timeout depends on total data processed per task.
|
49
|
+
MERGE_TASK_TIMEOUT_IN_SECONDS = env_integer("MERGE_TASK_TIMEOUT_IN_SECONDS", 25 * 60)
|
50
|
+
|
51
|
+
# A hash bucket task will fail after this timeout
|
52
|
+
HASH_BUCKET_TASK_TIMEOUT_IN_SECONDS = env_integer(
|
53
|
+
"HASH_BUCKET_TASK_TIMEOUT_IN_SECONDS", 25 * 60
|
54
|
+
)
|
55
|
+
|
44
56
|
# Metric Names
|
45
57
|
# Time taken for a hash bucket task
|
46
58
|
HASH_BUCKET_TIME_IN_SECONDS = "hash_bucket_time"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
from dataclasses import dataclass, fields
|
2
|
+
|
3
|
+
from deltacat.storage import (
|
4
|
+
Partition,
|
5
|
+
PartitionLocator,
|
6
|
+
)
|
7
|
+
from deltacat.compute.compactor import (
|
8
|
+
RoundCompletionInfo,
|
9
|
+
)
|
10
|
+
from typing import Optional
|
11
|
+
|
12
|
+
|
13
|
+
@dataclass(frozen=True)
|
14
|
+
class ExecutionCompactionResult:
|
15
|
+
new_compacted_partition: Optional[Partition]
|
16
|
+
new_round_completion_info: Optional[RoundCompletionInfo]
|
17
|
+
new_round_completion_file_partition_locator: Optional[PartitionLocator]
|
18
|
+
is_inplace_compacted: bool
|
19
|
+
|
20
|
+
def __iter__(self):
|
21
|
+
return (getattr(self, field.name) for field in fields(self))
|