use of org.apache.storm.utils.JCQueue in project storm by apache.
the class JCQueuePerfTest method producerFwdConsumer.
private static void producerFwdConsumer(int prodBatchSz) {
WaitStrategyPark ws = new WaitStrategyPark(100);
StormMetricRegistry registry = new StormMetricRegistry();
JCQueue q1 = new JCQueue("q1", "q1", 1024, 0, prodBatchSz, ws, "test", "test", Collections.singletonList(1000), 1000, registry);
JCQueue q2 = new JCQueue("q2", "q2", 1024, 0, prodBatchSz, ws, "test", "test", Collections.singletonList(1000), 1000, registry);
final Producer prod = new Producer(q1);
final Forwarder fwd = new Forwarder(q1, q2);
final Consumer cons = new Consumer(q2);
runAllThds(prod, fwd, cons);
}
use of org.apache.storm.utils.JCQueue in project storm by apache.
the class JCQueuePerfTest method oneProducer1Consumer.
private static void oneProducer1Consumer(int prodBatchSz) {
JCQueue q1 = new JCQueue("q1", "q1", 50_000, 0, prodBatchSz, new WaitStrategyPark(100), "test", "test", Collections.singletonList(1000), 1000, new StormMetricRegistry());
final Producer prod1 = new Producer(q1);
final Consumer cons1 = new Consumer(q1);
runAllThds(prod1, cons1);
}
use of org.apache.storm.utils.JCQueue in project storm by apache.
the class JCQueuePerfTest method twoProducer1Consumer.
private static void twoProducer1Consumer(int prodBatchSz) {
JCQueue q1 = new JCQueue("q1", "q1", 50_000, 0, prodBatchSz, new WaitStrategyPark(100), "test", "test", Collections.singletonList(1000), 1000, new StormMetricRegistry());
final Producer prod1 = new Producer(q1);
final Producer prod2 = new Producer(q1);
final Consumer cons1 = new Consumer(q1);
runAllThds(prod1, prod2, cons1);
}
use of org.apache.storm.utils.JCQueue in project storm by apache.
the class JCQueuePerfTest method ackingProducerSimulation.
private static void ackingProducerSimulation() {
WaitStrategyPark ws = new WaitStrategyPark(100);
StormMetricRegistry registry = new StormMetricRegistry();
JCQueue spoutQ = new JCQueue("spoutQ", "spoutQ", 1024, 0, 100, ws, "test", "test", Collections.singletonList(1000), 1000, registry);
JCQueue ackQ = new JCQueue("ackQ", "ackQ", 1024, 0, 100, ws, "test", "test", Collections.singletonList(1000), 1000, registry);
final AckingProducer ackingProducer = new AckingProducer(spoutQ, ackQ);
final Acker acker = new Acker(ackQ, spoutQ);
runAllThds(ackingProducer, acker);
}
use of org.apache.storm.utils.JCQueue in project storm by apache.
the class JCQueuePerfTest method threeProducer1Consumer.
private static void threeProducer1Consumer(int prodBatchSz) {
JCQueue q1 = new JCQueue("q1", "q1", 50_000, 0, prodBatchSz, new WaitStrategyPark(100), "test", "test", Collections.singletonList(1000), 1000, new StormMetricRegistry());
final Producer prod1 = new Producer(q1);
final Producer prod2 = new Producer(q1);
final Producer prod3 = new Producer(q1);
final Consumer cons1 = new Consumer(q1);
runAllThds(prod1, prod2, prod3, cons1);
}
Aggregations