Coder Social home page Coder Social logo

storm-php's People

Contributors

conflagrator avatar jimrubenstein avatar lazyshot avatar nyoung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

storm-php's Issues

License

Could you consider adding a license to this project?

Problem with __acking

Hi,
I'm running into an issue with my PHP bolts. I can successfully process an incoming stream, but the bolts usually fail because of a lack of acking.

I'm linking two php bolts sequentially, and they both look like the following:

values[0]; $this->emit(array($values*5)); $this->ack($tuple); } } $splitsentence = new ActivateGiftCardBolt(); $splitsentence->run(); ?>

and the Java code for the Bolts:

   public class PhpActivateGiftCardBolt extends ShellBolt implements IRichBolt {

public PhpActivateGiftCardBolt() {
    super("php", "order_processing/activate_giftcard.php");
}

@Override
public void declareOutputFields(OutputFieldsDeclarer declarer) {
    declarer.declare(new Fields("order_id"));
}

@Override
public Map<String, Object> getComponentConfiguration() {
    return null;
}
    }

and how I;'m connecting them

    builder.setBolt("activate_gc", new ActivateGiftCardBolt(), 4)
            .shuffleGrouping("order_id");
    builder.setBolt("send_gc_email", new SendGiftCardEmailBolt(), 4)
            .shuffleGrouping("activate_gc");

When I remove the ack, the topology fails because of the lack of acked tuples, but when I call the ack method, the topology fails because it is failing acked/non-existant tuples.

Any idea why this happens?

Spouts acting like line queues

While running a Topology, it seems as if php bolts are not propagating the message to the next bolt until they receive something from the previous bolt (or spout). As opposed to sending emitting/receiving a tuple once the previous bolt emits.

Any ideas?

PHP process die

I would to test your great Storm addon.

I used storm-starter with somme modification to use the following PHP file for replacement of splitsentence.py.

require_once 'storm-php/lib/storm.php';

class SplitSentenceBolt extends BasicBolt {
    public function process(Tuple $tuple)  {
        $words = explode(' ', $tuple->values[0]);

        foreach($words as $word)
            $this->emit(array($word));
    }
}

$splitsentence = new SplitSentenceBolt();
$splitsentence->run();

I run the WordCountTopology example. It seems to be ok ...

2914 [Thread-22] INFO  backtype.storm.daemon.executor  - Processing received message source: spout:8, stream: default, id: {}, [four score and seven years ago]
2923 [Thread-25] INFO  backtype.storm.daemon.task  - Emitting: split default ["four"]
2924 [Thread-25] INFO  backtype.storm.daemon.task  - Emitting: split default ["score"]
2929 [Thread-18] INFO  backtype.storm.daemon.executor  - Processing received message source: split:5, stream: default, id: {}, ["four"]
2929 [Thread-25] INFO  backtype.storm.daemon.task  - Emitting: split default ["and"]
2930 [Thread-18] INFO  backtype.storm.daemon.task  - Emitting: count default [four, 1]

but very few seconds after, i think the PHP process died :

3091 [Thread-22] ERROR backtype.storm.util  - Async loop died!
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: Pipe to subprocess seems to be broken! No output read.
Shell Process Exception:


    at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:87)
    at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:58)
    at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:62)
    at backtype.storm.daemon.executor$fn__4043$fn__4052$fn__4099.invoke(executor.clj:658)
    at backtype.storm.util$async_loop$fn__465.invoke(util.clj:377)
    at clojure.lang.AFn.run(AFn.java:24)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Pipe to subprocess seems to be broken! No output read.
Shell Process Exception:


    at backtype.storm.task.ShellBolt.execute(ShellBolt.java:139)
    at backtype.storm.daemon.executor$fn__4043$tuple_action_fn__4045.invoke(executor.clj:566)
    at backtype.storm.daemon.executor$mk_task_receiver$fn__3969.invoke(executor.clj:345)
    at backtype.storm.disruptor$clojure_handler$reify__1599.onEvent(disruptor.clj:43)
    at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:84)
    ... 6 more
Caused by: java.lang.RuntimeException: Pipe to subprocess seems to be broken! No output read.
Shell Process Exception:


    at backtype.storm.utils.ShellProcess.readString(ShellProcess.java:100)
    at backtype.storm.utils.ShellProcess.readMessage(ShellProcess.java:62)
    at backtype.storm.task.ShellBolt$1.run(ShellBolt.java:90)
    ... 1 more
3103 [Thread-22] ERROR backtype.storm.daemon.executor  -

Did you already encounter this problem ?

Thanks

Bolts passively receiving tuples

Php Bolts seem to passively accept tuples. The previous worker can emit a tuple, but a bolt will not process the first tuple until the worker emits a second tuple. (Hence the last tuple never gets processed)

High CPU load

While I can use storm-php for my bolts I have very high CPU load.
This is probably because of while(true) $line = trim($this->readLine()); ?

If this is the case should we implement usleep or something to ease off when no data is coming ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.