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

WIP: azure #30817

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 7 additions & 1 deletion misc/python/materialize/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
else f"{Arch.host()}-apple-darwin"
)
DEFAULT_POSTGRES = "postgres://root@localhost:26257/materialize"
DEFAULT_BLOB = "file://mzdata/persist/blob"

# sets entitlements on the built binary, e.g. environmentd, so you can inspect it with Instruments
MACOS_ENTITLEMENTS_DATA = """
Expand Down Expand Up @@ -88,6 +89,11 @@ def main() -> int:
help="Postgres/CockroachDB connection string",
default=os.getenv("MZDEV_POSTGRES", DEFAULT_POSTGRES),
)
parser.add_argument(
"--blob",
help="Blob storage connection string",
default=os.getenv("MZDEV_BLOB", DEFAULT_BLOB),
)
parser.add_argument(
"--release",
help="Build artifacts in release mode, with optimizations",
Expand Down Expand Up @@ -276,7 +282,7 @@ def main() -> int:
f"--orchestrator-process-scratch-directory={scratch}",
"--secrets-controller=local-file",
f"--persist-consensus-url={args.postgres}?options=--search_path=consensus",
f"--persist-blob-url=file://{mzdata}/persist/blob",
f"--persist-blob-url={args.blob}",
f"--timestamp-oracle-url={args.postgres}?options=--search_path=tsoracle",
f"--environment-id={environment_id}",
"--bootstrap-role=materialize",
Expand Down
2 changes: 1 addition & 1 deletion src/mz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mz-ore = { path = "../ore", features = ["async", "cli", "test"] }
open = "3.2.0"
openssl-probe = "0.1.2"
hyper = "1.4.1"
reqwest = { version = "0.11", features = ["blocking", "json"] }
reqwest = { version = "0.12", features = ["blocking", "json", "default-tls", "charset", "http2"], default-features = false }
rpassword = "7.2.0"
semver = "1.0.16"
serde = { version = "1.0.152", features = ["derive"] }
Expand Down
3 changes: 3 additions & 0 deletions src/ore/src/lgbytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ impl Buf for LgBytes {
pub struct LgBytesMetrics {
/// Metrics for the "persist_s3" usage of [LgBytes].
pub persist_s3: LgBytesOpMetrics,
/// Metrics for the "persist_abs" usage of [LgBytes].
pub persist_abs: LgBytesOpMetrics,
/// Metrics for the "persist_arrow" usage of [LgBytes].
pub persist_arrow: LgBytesOpMetrics,
}
Expand Down Expand Up @@ -272,6 +274,7 @@ impl LgBytesMetrics {
};
LgBytesMetrics {
persist_s3: op("persist_s3"),
persist_abs: op("persist_abs"),
persist_arrow: op("persist_arrow"),
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/persist-client/src/internal/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use mz_ore::stats::histogram_seconds_buckets;
use mz_persist::location::{
Blob, BlobMetadata, CaSResult, Consensus, ExternalError, ResultStream, SeqNo, VersionedData,
};
use mz_persist::metrics::{ColumnarMetrics, S3BlobMetrics};
use mz_persist::metrics::{ABSBlobMetrics, ColumnarMetrics, S3BlobMetrics};
use mz_persist::retry::RetryStream;
use mz_persist_types::Codec64;
use mz_postgres_client::metrics::PostgresClientMetrics;
Expand Down Expand Up @@ -110,6 +110,8 @@ pub struct Metrics {

/// Metrics for S3-backed blob implementation
pub s3_blob: S3BlobMetrics,
/// Metrics for Azure-backed blob implementation
// pub azure_blob: ABSBlobMetrics,
/// Metrics for Postgres-backed consensus implementation
pub postgres_consensus: PostgresClientMetrics,

Expand Down Expand Up @@ -140,6 +142,7 @@ impl Metrics {
move || start.elapsed().as_secs_f64(),
);
let s3_blob = S3BlobMetrics::new(registry);
// let azure_blob = ABSBlobMetrics::new(registry);
let columnar = ColumnarMetrics::new(
registry,
&s3_blob.lgbytes,
Expand Down
4 changes: 4 additions & 0 deletions src/persist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ aws-config = { version = "1.2.0", default-features = false }
aws-credential-types = { version = "1.1.1", features = ["hardcoded-credentials"] }
aws-sdk-s3 = { version = "1.23.0", default-features = false, features = ["rt-tokio"] }
aws-types = "1.1.1"
azure_identity = { version = "0.21.0" }
azure_storage = { version = "0.21.0" }
azure_storage_blobs = { version = "0.21.0" }
azure_core = "0.21.0"
base64 = "0.13.1"
bytes = "1.3.0"
deadpool-postgres = "0.10.3"
Expand Down
Loading
Loading