Skip to content
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
3 changes: 1 addition & 2 deletions crates/iceberg/src/io/file_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ use std::sync::Arc;
use bytes::Bytes;
use url::Url;

use super::opendal::OpenDalStorage;
use super::storage::Storage;
use super::storage::{OpenDalStorage, Storage};
use crate::{Error, ErrorKind, Result};

/// FileIO implementation, used to manipulate files in underlying storage.
Expand Down
10 changes: 1 addition & 9 deletions crates/iceberg/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,11 @@
//! - `new_input`: Create input file for reading.
//! - `new_output`: Create output file for writing.

mod config;
mod file_io;
mod local_fs;
mod memory;
mod opendal;
mod storage;

pub use config::*;
pub use file_io::*;
#[cfg(feature = "storage-s3")]
pub use opendal::CustomAwsCredentialLoader;
pub use opendal::{OpenDalStorage, OpenDalStorageFactory};
pub use storage::{Storage, StorageConfig, StorageFactory};
pub use storage::*;

pub(crate) mod object_cache;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use async_trait::async_trait;
use bytes::Bytes;
use serde::{Deserialize, Serialize};

use super::{
use crate::io::{
FileMetadata, FileRead, FileWrite, InputFile, OutputFile, Storage, StorageConfig,
StorageFactory,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use async_trait::async_trait;
use bytes::Bytes;
use serde::{Deserialize, Serialize};

use super::{
use crate::io::{
FileMetadata, FileRead, FileWrite, InputFile, OutputFile, Storage, StorageConfig,
StorageFactory,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,25 @@

//! Storage interfaces for Iceberg.

mod config;
mod local_fs;
mod memory;
mod opendal;

use std::fmt::Debug;
use std::sync::Arc;

use async_trait::async_trait;
use bytes::Bytes;
pub use config::*;
pub use local_fs::{LocalFsStorage, LocalFsStorageFactory};
pub use memory::{MemoryStorage, MemoryStorageFactory};
#[cfg(feature = "storage-s3")]
pub use opendal::CustomAwsCredentialLoader;
pub use opendal::{OpenDalStorage, OpenDalStorageFactory};

use super::{FileMetadata, FileRead, FileWrite, InputFile, OutputFile};
use crate::Result;
pub use crate::io::config::StorageConfig;

/// Trait for storage operations in Iceberg.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use opendal::services::AzdlsConfig;
use serde::{Deserialize, Serialize};
use url::Url;

use crate::io::config::{
use crate::io::{
ADLS_ACCOUNT_KEY, ADLS_ACCOUNT_NAME, ADLS_AUTHORITY_HOST, ADLS_CLIENT_ID, ADLS_CLIENT_SECRET,
ADLS_CONNECTION_STRING, ADLS_SAS_TOKEN, ADLS_TENANT_ID,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ use opendal::Operator;
use opendal::services::GcsConfig;
use url::Url;

use crate::io::config::{
use crate::io::{
GCS_ALLOW_ANONYMOUS, GCS_CREDENTIALS_JSON, GCS_DISABLE_CONFIG_LOAD, GCS_DISABLE_VM_METADATA,
GCS_NO_AUTH, GCS_SERVICE_PATH, GCS_TOKEN,
GCS_NO_AUTH, GCS_SERVICE_PATH, GCS_TOKEN, is_truthy,
};
use crate::io::is_truthy;
use crate::{Error, ErrorKind, Result};

/// Parse iceberg properties to [`GcsConfig`].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use opendal::{Operator, Scheme};
pub use s3::CustomAwsCredentialLoader;
use serde::{Deserialize, Serialize};

use super::{
use crate::io::{
FileIOBuilder, FileMetadata, FileRead, FileWrite, InputFile, OutputFile, Storage,
StorageConfig, StorageFactory,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use opendal::services::OssConfig;
use opendal::{Configurator, Operator};
use url::Url;

use crate::io::config::{OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRET, OSS_ENDPOINT};
use crate::io::{OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRET, OSS_ENDPOINT};
use crate::{Error, ErrorKind, Result};

/// Parse iceberg props to oss config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ pub use reqsign::{AwsCredential, AwsCredentialLoad};
use reqwest::Client;
use url::Url;

use crate::io::config::{
use crate::io::{
CLIENT_REGION, S3_ACCESS_KEY_ID, S3_ALLOW_ANONYMOUS, S3_ASSUME_ROLE_ARN,
S3_ASSUME_ROLE_EXTERNAL_ID, S3_ASSUME_ROLE_SESSION_NAME, S3_DISABLE_CONFIG_LOAD,
S3_DISABLE_EC2_METADATA, S3_ENDPOINT, S3_PATH_STYLE_ACCESS, S3_REGION, S3_SECRET_ACCESS_KEY,
S3_SESSION_TOKEN, S3_SSE_KEY, S3_SSE_MD5, S3_SSE_TYPE,
S3_SESSION_TOKEN, S3_SSE_KEY, S3_SSE_MD5, S3_SSE_TYPE, is_truthy,
};
use crate::io::is_truthy;
use crate::{Error, ErrorKind, Result};

/// Parse iceberg props to s3 config.
Expand Down
Loading