diff --git a/rust/processor/src/processors/mod.rs b/rust/processor/src/processors/mod.rs index afa46ebd2..ebcaf0c86 100644 --- a/rust/processor/src/processors/mod.rs +++ b/rust/processor/src/processors/mod.rs @@ -218,8 +218,7 @@ impl ProcessorConfig { | ProcessorConfig::ParquetFungibleAssetProcessor(_) | ProcessorConfig::ParquetTransactionMetadataProcessor(_) | ProcessorConfig::ParquetAnsProcessor(_) - | ProcessorConfig::ParquetEventsProcessor(_) - + | ProcessorConfig::ParquetEventsProcessor(_) ) } } diff --git a/rust/processor/src/processors/parquet_processors/parquet_ans_processor.rs b/rust/processor/src/processors/parquet_processors/parquet_ans_processor.rs index 66d48ce94..2564c8fa7 100644 --- a/rust/processor/src/processors/parquet_processors/parquet_ans_processor.rs +++ b/rust/processor/src/processors/parquet_processors/parquet_ans_processor.rs @@ -1,7 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use super::{UploadIntervalConfig, GOOGLE_APPLICATION_CREDENTIALS}; +use super::ParquetProcessorTrait; use crate::{ bq_analytics::{ create_parquet_handler_loop, generic_parquet_processor::ParquetDataGeneric, @@ -40,7 +40,7 @@ pub struct ParquetAnsProcessorConfig { pub parquet_upload_interval: u64, } -impl UploadIntervalConfig for ParquetAnsProcessorConfig { +impl ParquetProcessorTrait for ParquetAnsProcessorConfig { fn parquet_upload_interval_in_secs(&self) -> Duration { Duration::from_secs(self.parquet_upload_interval) } @@ -58,9 +58,7 @@ impl ParquetAnsProcessor { config: ParquetAnsProcessorConfig, new_gap_detector_sender: AsyncSender, ) -> Self { - if let Some(credentials) = config.google_application_credentials.clone() { - std::env::set_var(GOOGLE_APPLICATION_CREDENTIALS, credentials); - } + config.set_google_credentials(config.google_application_credentials.clone()); let ans_primary_name_v2_sender = create_parquet_handler_loop::( new_gap_detector_sender.clone(),