Add Keyed/Local modes
Max-Meldrum opened this issue · 1 comments
Max-Meldrum commented
As of now everything just defaults to a keyed mode.
Set up partitioning info at the manager level and also let Nodes
be aware if they are Keyed or Local.
// node level
pub enum NodeKind {
Keyed(KeyRange),
Local,
}
impl NodeKind {
pub fn get_key(&self, elem: ArconElement<impl ArconType>) {
match self {
NodeKind::Keyed(_) => elem.data.get_key(),
NodeKind::Local => 0, // pre-defined key....
}
}
}
// manager level
#[derive(Debug)]
pub struct Region {
/// A Region may internally further split up the key ranges
/// Example: ((0, KeyRange(0, 31), (1, KeyRange(32, 64), ....)
ranges: Vec<(NodeID, KeyRange)>,
}
Max-Meldrum commented
Closing in favour of #284