Skip to content

Commit

Permalink
resolve PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelScofield committed Jul 23, 2024
1 parent ab6ae35 commit 8edd62a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
8 changes: 0 additions & 8 deletions src/mito2/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,4 @@ lazy_static! {
"mito manifest operation elapsed",
&["op"]
).unwrap();

// Parquet related metrics:

/// Elapsed time of loading parquet metadata.
pub static ref PARQUET_METADATA_LOAD_ELAPSED: Histogram = register_histogram!(
"greptime_parquet_metadata_load_elapsed",
"parquet metadata load elapsed",
).unwrap();
}
3 changes: 0 additions & 3 deletions src/mito2/src/sst/parquet/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use parquet::file::FOOTER_SIZE;
use snafu::ResultExt;

use crate::error::{self, Result};
use crate::metrics::PARQUET_METADATA_LOAD_ELAPSED;

/// The estimated size of the footer and metadata need to read from the end of parquet file.
const DEFAULT_PREFETCH_SIZE: u64 = 64 * 1024;
Expand Down Expand Up @@ -68,8 +67,6 @@ impl<'a> MetadataLoader<'a> {
///
/// Refer to https://github.com/apache/arrow-rs/blob/093a10e46203be1a0e94ae117854701bf58d4c79/parquet/src/arrow/async_reader/metadata.rs#L55-L106
pub async fn load(&self) -> Result<ParquetMetaData> {
let _t = PARQUET_METADATA_LOAD_ELAPSED.start_timer();

let object_store = &self.object_store;
let path = self.file_path;
let file_size = self.get_file_size().await?;
Expand Down
4 changes: 4 additions & 0 deletions src/mito2/src/sst/parquet/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ impl ParquetReaderBuilder {
file_path: &str,
file_size: u64,
) -> Result<Arc<ParquetMetaData>> {
let _t = READ_STAGE_ELAPSED
.with_label_values(&["read_parquet_metadata"])
.start_timer();

let region_id = self.file_handle.region_id();
let file_id = self.file_handle.file_id();
// Tries to get from global cache.
Expand Down

0 comments on commit 8edd62a

Please sign in to comment.