Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Here is the program I used with siddhi-m1

      try {
      SiddhiManager siddhiManager = new SiddhiManager();
      siddhiManager.defineStream("define stream cseEventStream ( symbol string, price float, volume int )");
      siddhiManager.defineStream("define stream twiterStream ( symbol string, count int )");
      siddhiManager.addQuery("from e1 = cseEventStream [ price >= 50 and volume > 100 ] , e2 = twiterStream [count > 10 ] " +
      "insert into StockQuote e1.price as price, e1.symbol as symbol, e2.count as count ;");
      siddhiManager.addCallback("StockQuote", new Callback() {
      public void receive(long timeStamp, Object[] newEventData, Object[] removeEventData,
      Object[] faultEventData)

      { System.out.println(toString(timeStamp, newEventData, removeEventData, faultEventData)); }

      });
      InputHandler cseStreamHandler = siddhiManager.getInputHandler("cseEventStream");
      InputHandler twitterStreamHandler = siddhiManager.getInputHandler("twiterStream");

      cseStreamHandler.send(new Object[]

      {"IBM", 75.6f, 105}

      );
      cseStreamHandler.send(new Object[]

      {"GOOG", 51f, 101}

      );
      cseStreamHandler.send(new Object[]

      {"IBM", 76.6f, 111}

      );

      Thread.sleep(500);
      twitterStreamHandler.send(new Object[]

      {"IBM", 20}

      );
      cseStreamHandler.send(new Object[]

      {"WSO2", 45.6f, 100}

      );

      Thread.sleep(1000);

      twitterStreamHandler.send(new Object[]

      {"GOOG", 20}

      );

      Thread.sleep(500);

      } catch (SiddhiPraserException e)

      { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (InterruptedException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. }

      here is the stack trace
      java.util.ConcurrentModificationException
      at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
      at java.util.LinkedList$ListItr.next(LinkedList.java:696)
      Events

      { @timeStamp=1342006951513, newEventData=[76.6, IBM, 20], removeEventData=null, faultEventData=null}

      at org.wso2.siddhi.core.stream.recevier.sequence.SequenceSingleStreamReceiver.sendForProcess(SequenceSingleStreamReceiver.java:79)
      at org.wso2.siddhi.core.stream.recevier.sequence.SequenceSingleStreamReceiver.receive(SequenceSingleStreamReceiver.java:69)
      at org.wso2.siddhi.core.stream.recevier.sequence.SequenceStreamReceiver.run(SequenceStreamReceiver.java:82)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

        Attachments

          Activity

            People

            • Assignee:
              suho@wso2.com Sriskandarajah Suhothayan
              Reporter:
              amila@wso2.com Amila Suriarachchi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: