Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data DDS a = Loggable a => DDS (Cloud (PartRef a))
- data PartRef a = Ref Node Path Save
- data Partition a = Part Node Path Save a
- type Save = Bool
- keyp :: [Char] -> Bool -> String
- eval :: DDS a -> Cloud (PartRef a)
- type Path = String
- class (Foldable c, Typeable c, Typeable a, Monoid (c a), Loggable (c a)) => Distributable c a where
- mapKeyB :: (Loggable a, Loggable b, Loggable k, Ord k) => (a -> (k, b)) -> DDS (Vector a) -> DDS (Map k (Vector b))
- mapKeyU :: (Loggable a, Unbox a, Loggable b, Unbox b, Loggable k, Ord k) => (a -> (k, b)) -> DDS (Vector a) -> DDS (Map k (Vector b))
- mapKey :: (Distributable vector a, Distributable vector b, Loggable k, Ord k) => (a -> (k, b)) -> DDS (vector a) -> DDS (Map k (vector b))
- data ReduceChunk a
- reduce :: (Hashable k, Ord k, Distributable vector a, Loggable k, Loggable a) => (a -> a -> a) -> DDS (Map k (vector a)) -> Cloud (Map k a)
- parallelize :: Alternative f => (a1 -> f a) -> [a1] -> f a
- getPartitionData :: Loggable a => PartRef a -> TransIO a
- getPartitionData1 :: Loggable a => PartRef a -> TransIO a
- getPartitionData2 :: Loggable a => PartRef a -> IO a
- runAtP :: Loggable a => Node -> (Path -> IO a) -> Path -> Cloud a
- search :: [Char] -> a
- asyncDuplicate :: Node -> FilePath -> Cloud ()
- sendAnyError :: SomeException -> IO (StreamData a)
- distribute :: (Loggable a, Distributable vector a) => vector a -> DDS (vector a)
- distribute' :: (Distributable vector a, Show a, Read a) => vector a -> Cloud (PartRef (vector a))
- distribute'' :: (Loggable a, Distributable vector a) => [vector a] -> [Node] -> Cloud (PartRef (vector a))
- getText :: (Loggable a, Distributable vector a) => (String -> [a]) -> String -> DDS (vector a)
- textUrl :: String -> DDS (Vector Text)
- getUrl :: (Loggable a, Distributable vector a) => (String -> [a]) -> String -> DDS (vector a)
- textFile :: String -> DDS (Vector Text)
- getFile :: (Loggable a, Distributable vector a) => (String -> [a]) -> String -> DDS (vector a)
- generateRef :: Loggable a => a -> TransIO (PartRef a)
- getRef :: Partition t -> PartRef a
- getTempName :: IO String
- streamDDS :: (Loggable a, Distributable vector a) => Integer -> IO (StreamData a) -> DDS (vector a)
Documentation
class (Foldable c, Typeable c, Typeable a, Monoid (c a), Loggable (c a)) => Distributable c a where Source #
mapKeyB :: (Loggable a, Loggable b, Loggable k, Ord k) => (a -> (k, b)) -> DDS (Vector a) -> DDS (Map k (Vector b)) Source #
perform a map and partition the result with different keys using boxed vectors The final result will be used by reduce.
mapKeyU :: (Loggable a, Unbox a, Loggable b, Unbox b, Loggable k, Ord k) => (a -> (k, b)) -> DDS (Vector a) -> DDS (Map k (Vector b)) Source #
perform a map and partition the result with different keys using unboxed vectors The final result will be used by reduce.
mapKey :: (Distributable vector a, Distributable vector b, Loggable k, Ord k) => (a -> (k, b)) -> DDS (vector a) -> DDS (Map k (vector b)) Source #
perform a map and partition the result with different keys. The final result will be used by reduce.
data ReduceChunk a Source #
Read a => Read (ReduceChunk a) Source # | |
Show a => Show (ReduceChunk a) Source # | |
reduce :: (Hashable k, Ord k, Distributable vector a, Loggable k, Loggable a) => (a -> a -> a) -> DDS (Map k (vector a)) -> Cloud (Map k a) Source #
parallelize :: Alternative f => (a1 -> f a) -> [a1] -> f a Source #
sendAnyError :: SomeException -> IO (StreamData a) Source #
distribute :: (Loggable a, Distributable vector a) => vector a -> DDS (vector a) Source #
distribute a vector of values among many nodes. If the vector is static and sharable, better use the get* primitives since each node will load the data independently.
distribute' :: (Distributable vector a, Show a, Read a) => vector a -> Cloud (PartRef (vector a)) Source #
distribute'' :: (Loggable a, Distributable vector a) => [vector a] -> [Node] -> Cloud (PartRef (vector a)) Source #
getText :: (Loggable a, Distributable vector a) => (String -> [a]) -> String -> DDS (vector a) Source #
input data from a text that must be static and shared by all the nodes. The function parameter partition the text in words
getUrl :: (Loggable a, Distributable vector a) => (String -> [a]) -> String -> DDS (vector a) Source #
generate a DDS from the content of a URL. The first parameter is a function that divide the text in words
getFile :: (Loggable a, Distributable vector a) => (String -> [a]) -> String -> DDS (vector a) Source #
generate a DDS from a file. All the nodes must access the file with the same path the first parameter is the parser that generates elements from the content
getTempName :: IO String Source #
streamDDS :: (Loggable a, Distributable vector a) => Integer -> IO (StreamData a) -> DDS (vector a) Source #
produce a stream of DDS's that can be map-reduced. Similar to spark streams. each interval of time,a new DDS is produced.(to be tested)