Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Hadoop.Writable
- class (Collection a ~ c a) => Writable c a where
- type family Collection a
- data Decoder a
- = Variable (B.ByteString -> U.Vector Int -> a)
- | LE16 (B.ByteString -> a)
- | LE32 (B.ByteString -> a)
- | LE64 (B.ByteString -> a)
- | BE16 (B.ByteString -> a)
- | BE32 (B.ByteString -> a)
- | BE64 (B.ByteString -> a)
- split :: G.Vector v a => (B.ByteString -> a) -> B.ByteString -> U.Vector Int -> v a
- vintSize :: Word8 -> Int
- bytesToVector :: forall a. (Storable a, U.Unbox a) => B.ByteString -> U.Vector a
Documentation
class (Collection a ~ c a) => Writable c a where Source
Equivalent to the java interface org.apache.hadoop.io.Writable. All serializable key or value types in the Hadoop Map-Reduce framework implement this interface.
type family Collection a Source
Instances
type Collection Double = U.Vector Double | |
type Collection Float = U.Vector Float | |
type Collection Int16 = U.Vector Int16 | |
type Collection Int32 = U.Vector Int32 | |
type Collection Int64 = U.Vector Int64 | |
type Collection () = U.Vector () | |
type Collection B.ByteString = V.Vector B.ByteString | |
type Collection T.Text = V.Vector T.Text |
A specialized decoder for different types of writable.
Constructors
Variable (B.ByteString -> U.Vector Int -> a) | The slowest. Variable length data. |
LE16 (B.ByteString -> a) | All values are 16-bit little endian. |
LE32 (B.ByteString -> a) | All values are 32-bit little endian. |
LE64 (B.ByteString -> a) | All values are 64-bit little endian. |
BE16 (B.ByteString -> a) | All values are 16-bit big endian. |
BE32 (B.ByteString -> a) | All values are 32-bit big endian. |
BE64 (B.ByteString -> a) | All values are 64-bit big endian. |
split :: G.Vector v a => (B.ByteString -> a) -> B.ByteString -> U.Vector Int -> v a Source
bytesToVector :: forall a. (Storable a, U.Unbox a) => B.ByteString -> U.Vector a Source