Skip to content

Commit 1d98ff5

Browse files
authored
feat: helpful Azure things (#2895)
1 parent f627ea8 commit 1d98ff5

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

java/vortex-spark/src/main/java/dev/vortex/spark/read/VortexArrowColumnVector.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,51 +234,51 @@ final void close() {
234234
}
235235

236236
boolean getBoolean(int rowId) {
237-
throw new UnsupportedOperationException();
237+
throw new UnsupportedOperationException(getClass().getName());
238238
}
239239

240240
byte getByte(int rowId) {
241-
throw new UnsupportedOperationException();
241+
throw new UnsupportedOperationException(getClass().getName());
242242
}
243243

244244
short getShort(int rowId) {
245-
throw new UnsupportedOperationException();
245+
throw new UnsupportedOperationException(getClass().getName());
246246
}
247247

248248
int getInt(int rowId) {
249-
throw new UnsupportedOperationException();
249+
throw new UnsupportedOperationException(getClass().getName());
250250
}
251251

252252
long getLong(int rowId) {
253-
throw new UnsupportedOperationException();
253+
throw new UnsupportedOperationException(getClass().getName());
254254
}
255255

256256
float getFloat(int rowId) {
257-
throw new UnsupportedOperationException();
257+
throw new UnsupportedOperationException(getClass().getName());
258258
}
259259

260260
double getDouble(int rowId) {
261-
throw new UnsupportedOperationException();
261+
throw new UnsupportedOperationException(getClass().getName());
262262
}
263263

264264
Decimal getDecimal(int rowId, int precision, int scale) {
265-
throw new UnsupportedOperationException();
265+
throw new UnsupportedOperationException(getClass().getName());
266266
}
267267

268268
UTF8String getUTF8String(int rowId) {
269-
throw new UnsupportedOperationException();
269+
throw new UnsupportedOperationException(getClass().getName());
270270
}
271271

272272
byte[] getBinary(int rowId) {
273-
throw new UnsupportedOperationException();
273+
throw new UnsupportedOperationException(getClass().getName());
274274
}
275275

276276
ColumnarArray getArray(int rowId) {
277-
throw new UnsupportedOperationException();
277+
throw new UnsupportedOperationException(getClass().getName());
278278
}
279279

280280
ColumnarMap getMap(int rowId) {
281-
throw new UnsupportedOperationException();
281+
throw new UnsupportedOperationException(getClass().getName());
282282
}
283283
}
284284

vortex-jni/src/file.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::str::FromStr;
22
use std::sync::{Arc, LazyLock, Mutex};
3+
use std::time::Duration;
34

45
use jni::JNIEnv;
56
use jni::objects::{JByteArray, JClass, JObject, JString};
@@ -8,7 +9,7 @@ use object_store::aws::{AmazonS3Builder, AmazonS3ConfigKey};
89
use object_store::azure::{AzureConfigKey, MicrosoftAzureBuilder};
910
use object_store::gcp::{GoogleCloudStorageBuilder, GoogleConfigKey};
1011
use object_store::local::LocalFileSystem;
11-
use object_store::{ObjectStore, ObjectStoreScheme};
12+
use object_store::{ClientOptions, ObjectStore, ObjectStoreScheme};
1213
use prost::Message;
1314
use url::Url;
1415
use vortex::aliases::hash_map::HashMap;
@@ -199,9 +200,15 @@ fn make_object_store(
199200
ObjectStoreScheme::MicrosoftAzure => {
200201
log::trace!("using MicrosoftAzure object store");
201202

202-
let mut builder = MicrosoftAzureBuilder::new().with_url(url.to_string());
203+
// NOTE(aduffy): anecdotally Azure often times out after 30 seconds, this bumps us up
204+
// to avoid that.
205+
let client_opts = ClientOptions::new().with_timeout(Duration::from_secs(120));
206+
let mut builder = MicrosoftAzureBuilder::new()
207+
.with_url(url.to_string())
208+
.with_client_options(client_opts);
203209
for (key, val) in properties {
204210
if let Ok(config_key) = AzureConfigKey::from_str(key.as_str()) {
211+
log::warn!("setting azure config {key:?} = {val}");
205212
builder = builder.with_config(config_key, val);
206213
} else {
207214
log::warn!("Skipping unknown Azure config key: {}", key);

0 commit comments

Comments
 (0)