Documentation ¶
Index ¶
Constants ¶
View Source
const ( DistributeByShuffle = "shuffle" DistributeByField = "field" DistributeToAll = "all" DistributeDirect = "direct" DistributeAny = "none" //none means no choice, don't care DistributeLocalOrShuffle = "localorshuffle" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bolt ¶
type Bolt struct {
// contains filtered or unexported fields
}
Bolt - Applies a transformation on an input tuple Input Types (2 different): * Tuple (BoltInput) * TaskIds (from a previous emit)
Output: (BoltOutput) * Tupel (now changed in some way) * Command - ack, fail, log, emit
func NewBolt ¶
func NewBolt(s *Storm, p BoltProcessor) *Bolt
NewBold - Creates a new Bolt for transformations
type BoltConfiguration ¶
type BoltConfiguration struct {
// contains filtered or unexported fields
}
func (*BoltConfiguration) Input ¶
func (bc *BoltConfiguration) Input(source EmiterName, distributeHow DistributeHow, fields []string)
func (*BoltConfiguration) Name ¶
func (bc *BoltConfiguration) Name() string
Emiter interface implementation
type BoltInput ¶
type BoltInput struct { //TupleMessage - the tuple and it's metadata TupleMessage //Component - The id of the creating component Component string `json:"comp"` }
BoltInput - Inbound Tuple
type BoltOutput ¶
type BoltOutput struct { //TupleMessage - the tuple and it's metadata TupleMessage //Anchors - The ids of the tuples these output tuples should be anchored to Anchors []string `json:"anchors"` //Command - ack, fail, emit, log Command string `json:"command"` //Message - for log only Message string `json:"message",omitempty` }
BoltInput - Outbound Tuple
type BoltProcessor ¶
type BoltProcessor interface { Process(tuple *TupleMessage) (*TupleMessage, error) TrackIndirectEmit(taskIds []int) }
Transformer - Enables an implementation of a Bolt Transform
type ComponentDef ¶
type ConnectInfo ¶
type ConnectInfo struct { Conf *json.RawMessage `json:"conf"` Context *json.RawMessage `json:"context"` PidDir string `json:"pidDir"` }
type DistributeHow ¶
type DistributeHow string
type EmiterName ¶
type EmiterName interface {
Name() string
}
type Spout ¶
type Spout struct {
// contains filtered or unexported fields
}
Spout - Emits data Input: (Message)
type SpoutMessage ¶
type SpoutMessage struct { //TupleMessage - the tuple and it's metadata TupleMessage // Command - next, ack, fail, emit, log, sync Command string `json:"command"` //Message - for log only Message string `json:"message",omitempty` }
Spout Input & Output
type Spouter ¶
type Spouter interface { Emit() *TupleMessage Ack(id string) Fail(id string) AssociateTasks(id string, taskIds []int) }
type Storm ¶
type Storm struct { Input chan []byte Output chan interface{} ExtIn io.Reader ExtOut io.Writer // contains filtered or unexported fields }
Storm - The storm Processor for running a Spout or a Bolt
type Topology ¶
type Topology struct {
// contains filtered or unexported fields
}
func NewTopology ¶
func (*Topology) AddBolt ¶
func (t *Topology) AddBolt(name string, bolt *ComponentDef) *BoltConfiguration
func (*Topology) AddSpout ¶
func (t *Topology) AddSpout(name string, spout *ComponentDef) EmiterName
type TupleMessage ¶
type TupleMessage struct { //Id - To identifiy this tuple, for messaging guarantees Id string `json:"id",omitempty` //Stream - Id of the stream this tuple is emmited to. Blank==default stream Stream string `json:"stream",omitempty` //Task - For direct emit Task *int32 `json:"task",omitempty` //Tuple - A 'row' of data Tuple []interface{} `json:"tuple"` }
TupleMessage - A tuple an it's processing metadata
Source Files ¶
Click to show internal directories.
Click to hide internal directories.