scottlingran / mate-tools

Automatically exported from code.google.com/p/mate-tools
0 stars 0 forks source link

Exception when trying to run several instances of the mate parser (is2.parser) in the same JVM #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run two instances of the mate parser in the same JVM

What do you see instead?

Running two instances of the mate parser in the same JVM leads to following 
exception

java.lang.ArrayIndexOutOfBoundsException: 45
2013-11-14 14:37:49 STDIO [ERROR] at 
is2.parser.ParallelDecoder.call(ParallelDecoder.java:74)
2013-11-14 14:37:49 STDIO [ERROR] at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
2013-11-14 14:37:49 STDIO [ERROR] at 
java.util.concurrent.FutureTask.run(FutureTask.java:138)
2013-11-14 14:37:49 STDIO [ERROR] at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
86)
2013-11-14 14:37:49 STDIO [ERROR] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
2013-11-14 14:37:49 STDIO [ERROR] at java.lang.Thread.run(Thread.java:662)

What version of the product are you using? On what operating system?

mate-tools 3.5 checked out from http://mate-tools.googlecode.com/svn/trunk/

Please provide any additional information below.

I noticed this problem while trying to run the mate-tools within a storm 
topology (see http://storm-project.net/). In Storm, you can parallelize an 
operation unit called bolt; in my case the mate parser was the bolt that I 
wanted to parallelize . The storm manager then deployed two instances of the 
parser on the same JVM and this lead to the exception described above.

Regards,
Abou Drame

Original issue reported on code.google.com by abdoulay...@neofonie.de on 14 Nov 2013 at 2:40

GoogleCodeExporter commented 8 years ago
Just a complement to the issue described above, the exception seems to be 
caused by the static sets in "ParallelDecoder.java", that is to say when 
different instances of the decoder use the same sets.

public static ArrayList<DSet> sets = new ArrayList<DSet>();

Regards,

Abou

Original comment by abdoulay...@neofonie.de on 18 Nov 2013 at 7:57

GoogleCodeExporter commented 8 years ago
Using srl-4.3 with anna-3.3 i have the same issue, with slightly different 
errors:
java.lang.ArrayIndexOutOfBoundsException: 17
    at is2.parser.Extractor.basic(Extractor.java:120)
    at is2.parser.ParallelExtract.call(ParallelExtract.java:79)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
java.lang.NullPointerException
    at is2.parser.ParallelDecoder.call(ParallelDecoder.java:93)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

Original comment by piero.mo...@gmail.com on 21 Nov 2013 at 2:33