MCPcopy Create free account
hub / github.com/apache/paimon-rust / write_manifest_file

Method write_manifest_file

crates/paimon/src/table/table_commit.rs:471–502  ·  view source on GitHub ↗

Write a manifest file and return its metadata.

(
        &self,
        file_io: &FileIO,
        path: &str,
        file_name: &str,
        entries: &[ManifestEntry],
    )

Source from the content-addressed store, hash-verified

469
470 /// Write a manifest file and return its metadata.
471 async fn write_manifest_file(
472 &self,
473 file_io: &FileIO,
474 path: &str,
475 file_name: &str,
476 entries: &[ManifestEntry],
477 ) -> Result<ManifestFileMeta> {
478 Manifest::write(file_io, path, entries).await?;
479
480 let mut added_file_count: i64 = 0;
481 let mut deleted_file_count: i64 = 0;
482 for entry in entries {
483 match entry.kind() {
484 FileKind::Add => added_file_count += 1,
485 FileKind::Delete => deleted_file_count += 1,
486 }
487 }
488
489 // Get file size
490 let status = file_io.get_status(path).await?;
491
492 let partition_stats = self.compute_partition_stats(entries)?;
493
494 Ok(ManifestFileMeta::new(
495 file_name.to_string(),
496 status.size as i64,
497 added_file_count,
498 deleted_file_count,
499 partition_stats,
500 self.table.schema().id(),
501 ))
502 }
503
504 /// Check if this commit was already completed (idempotency).
505 async fn is_duplicate_commit(

Callers 1

try_commit_onceMethod · 0.80

Calls 5

kindMethod · 0.80
get_statusMethod · 0.80
idMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected