cda-group/arcon

Add Keyed/Local modes

Max-Meldrum opened this issue · 1 comments

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)>,
}

Closing in favour of #284