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

Make MemoryManager and MemoryStream public #1664

Merged
merged 2 commits into from
Jan 24, 2022
Merged
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
1 change: 0 additions & 1 deletion ballista/rust/core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use std::{
};

use crate::error::{ballista_error, BallistaError, Result};
use crate::memory_stream::MemoryStream;
use crate::serde::protobuf::{self};
use crate::serde::scheduler::{
Action, ExecutePartition, ExecutePartitionResult, PartitionId, PartitionStats,
Expand Down
1 change: 0 additions & 1 deletion ballista/rust/core/src/execution_plans/shuffle_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use std::sync::Arc;
use std::{any::Any, pin::Pin};

use crate::client::BallistaClient;
use crate::memory_stream::MemoryStream;
use crate::serde::scheduler::{PartitionLocation, PartitionStats};

use crate::utils::WrappedStream;
Expand Down
2 changes: 1 addition & 1 deletion ballista/rust/core/src/execution_plans/shuffle_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use std::time::Instant;
use std::{any::Any, pin::Pin};

use crate::error::BallistaError;
use crate::memory_stream::MemoryStream;
use crate::utils;

use crate::serde::protobuf::ShuffleWritePartition;
Expand All @@ -47,6 +46,7 @@ use datafusion::error::{DataFusionError, Result};
use datafusion::execution::runtime_env::RuntimeEnv;
use datafusion::physical_plan::common::IPCWriter;
use datafusion::physical_plan::hash_utils::create_hashes;
use datafusion::physical_plan::memory::MemoryStream;
use datafusion::physical_plan::metrics::{
self, ExecutionPlanMetricsSet, MetricBuilder, MetricsSet,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use std::sync::Arc;
use std::{any::Any, pin::Pin};

use crate::memory_stream::MemoryStream;
use crate::serde::scheduler::PartitionLocation;

use async_trait::async_trait;
Expand Down
1 change: 0 additions & 1 deletion ballista/rust/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub mod client;
pub mod config;
pub mod error;
pub mod execution_plans;
pub mod memory_stream;
pub mod utils;

#[macro_use]
Expand Down
92 changes: 0 additions & 92 deletions ballista/rust/core/src/memory_stream.rs

This file was deleted.

1 change: 0 additions & 1 deletion ballista/rust/core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use crate::error::{BallistaError, Result};
use crate::execution_plans::{
DistributedQueryExec, ShuffleWriterExec, UnresolvedShuffleExec,
};
use crate::memory_stream::MemoryStream;
use crate::serde::scheduler::PartitionStats;

use crate::config::BallistaConfig;
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/execution/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
pub mod context;
pub mod dataframe_impl;
pub(crate) mod disk_manager;
pub(crate) mod memory_manager;
pub mod memory_manager;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also had to make MemoryManager public in #1668 -- I went with just the MemoryManager structure, but maybe making the whole module would be better 🤔

pub mod options;
pub mod runtime_env;
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl MemoryExec {
}

/// Iterator over batches
pub(crate) struct MemoryStream {
pub struct MemoryStream {
/// Vector of record batches
data: Vec<RecordBatch>,
/// Schema representing the data
Expand Down