Skip to content

Commit

Permalink
[fix] Development
Browse files Browse the repository at this point in the history
  • Loading branch information
ppodolsky committed Jan 19, 2024
1 parent ad70ead commit a4c60bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sinks.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::config::S3Config;
use crate::error::Error;
use crate::utils::FRAGMENT;
use crate::utils::{bytes_to_key, FRAGMENT};
use aws_credential_types::Credentials;
use aws_sdk_s3::config::{BehaviorVersion, Region};
use aws_sdk_s3::primitives::ByteStream;
Expand Down Expand Up @@ -59,7 +59,7 @@ impl Sink for S3Sink {
async fn send(&self, key: &[u8], value: Vec<u8>) -> Result<(), Error> {
// ToDo: Remove allocating and return stream
// https://github.com/awslabs/aws-sdk-rust/discussions/361
let encoded_key = utf8_percent_encode(std::str::from_utf8(key).unwrap(), FRAGMENT)
let encoded_key = utf8_percent_encode(std::str::from_utf8(bytes_to_key(key)).unwrap(), FRAGMENT)
.collect::<String>()
.to_lowercase();

Expand Down
7 changes: 5 additions & 2 deletions trident-py/trident/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ async def tables_create(self, table: str, storage: str | None = None) -> bytes:
response = await self.post(url, params={'storage': storage})
return await response.read()

async def tables_import(self, table: str, ticket: str, storage: str | None = None) -> bytes:
async def tables_import(self, table: str, ticket: str, storage: str | None = None, mirroring: dict | None = None) -> bytes:
url = f"/tables/{table}/import/"
response = await self.post(url, params={'ticket': ticket, 'storage': storage})
response = await self.post(
url,
params={'ticket': ticket, 'storage': storage, 'mirroring': mirroring},
)
return await response.read()

async def tables_drop(self, table: str) -> bytes:
Expand Down

0 comments on commit a4c60bd

Please sign in to comment.