xanderbailey commented on code in PR #2908:
URL: https://github.com/apache/iceberg-rust/pull/2908#discussion_r3721881772


##########
crates/storage/opendal/src/azblob.rs:
##########
@@ -0,0 +1,140 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Azure Blob Storage properties.
+
+use std::collections::HashMap;
+
+use iceberg::io::{AZBLOB_ACCOUNT_KEY, AZBLOB_ACCOUNT_NAME, AZBLOB_ENDPOINT, 
AZBLOB_SAS_TOKEN};
+use iceberg::{Error, ErrorKind, Result};
+use opendal::Operator;
+use opendal::services::AzblobConfig;
+use url::Url;
+
+use crate::utils::from_opendal_error;
+
+/// Parse azblob.* prefixed configuration properties.
+pub(crate) fn azblob_config_parse(mut properties: HashMap<String, String>) -> 
Result<AzblobConfig> {

Review Comment:
   Other backends include their own config struct something like:
   
   ```rust
     pub struct AzblobConfig {
         /// Endpoint URL.
         #[builder(default, setter(strip_option, into))]
         pub endpoint: Option<String>,
         /// Account name.
         #[builder(default, setter(strip_option, into))]
         pub account_name: Option<String>,
         /// Account key.
         #[builder(default, setter(strip_option, into))]
         pub account_key: Option<String>,
         /// SAS token.
         #[builder(default, setter(strip_option, into))]
         pub sas_token: Option<String>,
     }
   ```
   Do you think we could follow the same pattern here?



##########
crates/iceberg/src/io/storage/config/azblob.rs:
##########
@@ -0,0 +1,27 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Azure Blob Storage configuration.
+
+/// Azure Blob Storage endpoint URL.
+pub const AZBLOB_ENDPOINT: &str = "azblob.endpoint";
+/// Azure Blob Storage account name.
+pub const AZBLOB_ACCOUNT_NAME: &str = "azblob.account-name";

Review Comment:
   Can't find a java implementation for azblob so that isn't incorrect but I 
did notice something that doesn't quite seem correct about the `azdls` config 
(pre-existing not this PR). It seems that we're using `adls.account-name` 
compared to java's `adls.auth.shared-key.account.name` which I think causes 
issues when we get the config back from the catalog for vended credentials. 
   
   Maybe we need to bottom this out before we commit to this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to