Processamento de Dados Massivos/Projeto e implementação de aplicações Big Data/Processamento de streams de tweets: diferenças entre revisões

[edição não verificada][edição não verificada]
 
====Bolt Interface====
<syntaxhighlight lang="java">void prepare()</syntaxhighlight>This funcion is called before any tuple is transmited to a certain bolt.
prepare()
This funcion is called before any tuple is transmited to a certain bolt.
 
<syntaxhighlight lang="java">int execute(Tuple tuple, BasicOutputCollector collector)</syntaxhighlight>
This funcion is called when a new tuple gets to the bolt. It should call other funcions important to processing. And it is done call collector.emit(Values) to send another tuple to the next bolt
 
<syntaxhighlight lang="java">void fail(Object id);
ack();
void ack(Object id);</syntaxhighlight>
Bolts may also add ack to be sure that a tuple was delivered to the next bolt.
 
<syntaxhighlight lang="java">void declareOutputFields(OutputFieldsDeclarer declarer)</syntaxhighlight>
Declare the Output Filed on the outgoing tuple.
 
<syntaxhighlight lang="java">Map<String, Object> getComponentConfiguration()</syntaxhighlight>
Get the fieldsconfiguration inof the Ingoingbolt tupleset by the conf class.
 
====CommunicationSpout Interface====
<syntaxhighlight lang="java">void open()</syntaxhighlight>
Communication process is completely abstracted from the developer. We only need to minimize the comsuption of this resourse since, as I said previously, Storm does not manage it well.
Execute before the first tuple is sent. It can be used, for instance, to establish connections to Twitter's sample API
 
<syntaxhighlight lang="java">void nextTuple() </syntaxhighlight>
Iterates over each tuple generated. Emiting it using emit function.
 
<syntaxhighlight lang="java">void close() </syntaxhighlight>
It is called when nextTuple() returns. Used for finishing connections
 
<syntaxhighlight lang="java">Map<String, Object> getComponentConfiguration()</syntaxhighlight>
Get the configuration of the spout set by the conf class.
 
<syntaxhighlight lang="java">void fail(Object id)
void ack(Object id)</syntaxhighlight>
Dealing with communication fails.
 
<syntaxhighlight lang="java">void declareOutputFields(OutputFieldsDeclarer declarer) </syntaxhighlight>
Declare the Output Filed on the outgoing tuple.
 
====Communication====
Communication process is completely abstracted from the developer. We only need to minimize the comsuptionconsuption of thisnetwork resoursebandwith since, as I said previously, Storm does not manage it well.
 
====Python Bolts====
 
 
==Avaliation==
===Load on Bolts===
For simple Twitter jobs, Storm managed to distribute jobs quite good
 
===Nimbus Logs===
 
==Conclusion==
14

edições