Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow s3_client_kwargs to be passed into repartition #158

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deltacat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

deltacat.logs.configure_deltacat_logger(logging.getLogger(__name__))

__version__ = "0.1.18b9"
__version__ = "0.1.18b10"


__all__ = [
Expand Down
5 changes: 4 additions & 1 deletion deltacat/compute/compactor/compaction_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def compact_partition(
read_kwargs_provider: Optional[ReadKwargsProvider] = None,
s3_table_writer_kwargs: Optional[Dict[str, Any]] = None,
object_store: Optional[IObjectStore] = RayPlasmaObjectStore(),
s3_client_kwargs: Optional[Dict[str, Any]] = {},
s3_client_kwargs: Optional[Dict[str, Any]] = None,
deltacat_storage=unimplemented_deltacat_storage,
**kwargs,
) -> Optional[str]:
Expand Down Expand Up @@ -284,6 +284,9 @@ def _execute_compaction_round(
max_parallelism = int(cluster_cpus)
logger.info(f"Max parallelism: {max_parallelism}")

if s3_client_kwargs is None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defaulting must be done in compact_partition method itself.

s3_client_kwargs = {}

# read the results from any previously completed compaction round
round_completion_info = None
if not rebase_source_partition_locator:
Expand Down
5 changes: 5 additions & 0 deletions deltacat/compute/compactor/repartition_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def repartition(
pg_config: Optional[PlacementGroupConfig] = None,
list_deltas_kwargs: Optional[Dict[str, Any]] = None,
read_kwargs_provider: Optional[ReadKwargsProvider] = None,
s3_client_kwargs: Optional[Dict[str, Any]] = None,
rkenmi marked this conversation as resolved.
Show resolved Hide resolved
deltacat_storage=unimplemented_deltacat_storage,
**kwargs,
) -> Optional[str]:
Expand Down Expand Up @@ -166,9 +167,13 @@ def repartition(
bit_width_of_sort_keys,
None,
)
if s3_client_kwargs is None:
s3_client_kwargs = {}

raghumdani marked this conversation as resolved.
Show resolved Hide resolved
return rcf.write_round_completion_file(
None,
None,
repartition_completion_info,
repartition_completion_file_s3_url,
**s3_client_kwargs,
)