Bug_Delete Repository Entry

ikarusumaikarusuma Member Posts: 5 Contributor I
edited December 2018 in Help

Hi!

I have a process that join or append a list of ioo in only one, using loop repository and retrieve operators .

Ex: lista_1+ lista_2+ etc... Result: lista.

Then I want to delete all ioo (excepte the result) using loop repository and Delete Repository Entry operators. It runs well but only deletes one ioo every time with a bug.

This is the bug, but I dont know what it means

Spoiler
  • Exception: java.util.ConcurrentModificationException
  • Message: null
  • Stack trace:
  • java.util.ArrayList$Itr.checkForComodification(Unknown Source)
  • java.util.ArrayList$Itr.next(Unknown Source)
  • java.util.Collections$UnmodifiableCollection$1.next(Unknown Source)
  • com.rapidminer.operator.meta.RepositoryIterator.iterate(RepositoryIterator.java:75)
  • com.rapidminer.operator.meta.AbstractRepositoryIterator.doWork(AbstractRepositoryIterator.java:135)
  • com.rapidminer.operator.meta.RepositoryIterator.doWork(RepositoryIterator.java:131)
  • com.rapidminer.operator.Operator.execute(Operator.java:866)
  • com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
  • com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:711)
  • com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:375)
  • com.rapidminer.operator.Operator.execute(Operator.java:866)
  • com.rapidminer.Process.run(Process.java:949)
  • com.rapidminer.Process.run(Process.java:873)
  • com.rapidminer.Process.run(Process.java:832)
  • com.rapidminer.Process.run(Process.java:827)
  • com.rapidminer.Process.run(Process.java:817)
  • com.rapidminer.gui.ProcessThread.run(ProcessThread.java:63)

This is my process:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.015">
<context>
<input/>
<output/>
<macros>
<macro>
<key>repo</key>
<value>//Ikarus/Curso</value>
</macro>
<macro>
<key>coleccion</key>
<value>ListaReglas_true</value>
</macro>
<macro>
<key>tipo</key>
<value>1</value>
</macro>
</macros>
</context>
<operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="loop_repository" compatibility="5.3.015" expanded="true" height="76" name="Loop Repository" width="90" x="45" y="30">
<parameter key="repository_folder" value="%{repo}"/>
<parameter key="entry_type" value="IOObject"/>
<parameter key="filter" value="%{coleccion}_.*"/>
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="5.3.015" expanded="true" height="60" name="Retrieve (2)" width="90" x="45" y="30">
<parameter key="repository_entry" value="%{repository_path}"/>
</operator>
<connect from_op="Retrieve (2)" from_port="output" to_port="out 1"/>
<portSpacing port="source_repository object" spacing="0"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="select_subprocess" compatibility="5.3.015" expanded="true" height="76" name="Select Subprocess" width="90" x="179" y="30">
<parameter key="select_which" value="%{tipo}"/>
<process expanded="true">
<operator activated="true" class="append" compatibility="5.3.015" expanded="true" height="76" name="Append" width="90" x="45" y="120"/>
<connect from_port="input 1" to_op="Append" to_port="example set 1"/>
<connect from_op="Append" from_port="merged set" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="loop_collection" compatibility="5.3.015" expanded="true" height="60" name="Loop Collection" width="90" x="45" y="75">
<process expanded="true">
<operator activated="true" class="branch" compatibility="5.3.015" expanded="true" height="76" name="Branch" width="90" x="45" y="30">
<parameter key="condition_type" value="macro_defined"/>
<parameter key="condition_value" value="conectado"/>
<process expanded="true">
<operator activated="true" class="recall" compatibility="5.3.015" expanded="true" height="60" name="Recall" width="90" x="45" y="120">
<parameter key="name" value="conjunto"/>
<parameter key="io_object" value="ExampleSet"/>
<parameter key="remove_from_store" value="false"/>
</operator>
<operator activated="true" class="join" compatibility="5.3.015" expanded="true" height="76" name="Join" width="90" x="179" y="75">
<list key="key_attributes"/>
</operator>
<operator activated="true" class="remember" compatibility="5.3.015" expanded="true" height="60" name="Remember (2)" width="90" x="179" y="210">
<parameter key="name" value="conjunto"/>
<parameter key="io_object" value="ExampleSet"/>
</operator>
<connect from_port="condition" to_op="Join" to_port="left"/>
<connect from_op="Recall" from_port="result" to_op="Join" to_port="right"/>
<connect from_op="Join" from_port="join" to_op="Remember (2)" to_port="store"/>
<portSpacing port="source_condition" spacing="0"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_input 1" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="remember" compatibility="5.3.015" expanded="true" height="60" name="Remember" width="90" x="45" y="120">
<parameter key="name" value="conjunto"/>
<parameter key="io_object" value="ExampleSet"/>
</operator>
<operator activated="true" class="set_macro" compatibility="5.3.015" expanded="true" height="60" name="Set Macro" width="90" x="45" y="30">
<parameter key="macro" value="conectado"/>
<parameter key="value" value="1"/>
</operator>
<connect from_port="condition" to_op="Remember" to_port="store"/>
<portSpacing port="source_condition" spacing="0"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_input 1" spacing="0"/>
</process>
</operator>
<connect from_port="single" to_op="Branch" to_port="condition"/>
<portSpacing port="source_single" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
</process>
</operator>
<operator activated="true" class="recall" compatibility="5.3.015" expanded="true" height="60" name="Recall (2)" width="90" x="45" y="165">
<parameter key="name" value="conjunto"/>
<parameter key="io_object" value="ExampleSet"/>
</operator>
<connect from_port="input 1" to_op="Loop Collection" to_port="collection"/>
<connect from_op="Recall (2)" from_port="result" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="store" compatibility="5.3.015" expanded="true" height="60" name="Store" width="90" x="313" y="30">
<parameter key="repository_entry" value="%{repo}/%{coleccion}"/>
</operator>
<operator activated="true" class="materialize_data" compatibility="5.3.015" expanded="true" height="76" name="Materialize Data" width="90" x="45" y="165"/>
<operator activated="true" class="loop_repository" compatibility="5.3.015" expanded="true" height="76" name="Loop Repository (2)" width="90" x="179" y="165">
<parameter key="repository_folder" value="%{repo}"/>
<parameter key="entry_type" value="IOObject"/>
<parameter key="filter" value="%{coleccion}_.*"/>
<process expanded="true">
<operator activated="true" class="delete_repository_entry" compatibility="5.3.015" expanded="true" height="76" name="Delete Repository Entry (2)" width="90" x="112" y="30">
<parameter key="entry_to_delete" value="%{repository_path}"/>
</operator>
<connect from_port="repository object" to_op="Delete Repository Entry (2)" to_port="through 1"/>
<connect from_port="in 1" to_port="out 1"/>
<portSpacing port="source_repository object" spacing="0"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="source_in 2" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
</operator>
<connect from_op="Loop Repository" from_port="out 1" to_op="Select Subprocess" to_port="input 1"/>
<connect from_op="Select Subprocess" from_port="output 1" to_op="Store" to_port="input"/>
<connect from_op="Store" from_port="through" to_op="Materialize Data" to_port="example set input"/>
<connect from_op="Materialize Data" from_port="example set output" to_op="Loop Repository (2)" to_port="in 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
</process>
</operator>
</process>
Tagged:

Best Answer

  • Edin_KlapicEdin_Klapic Posts: 266  RM Data Scientist
    Solution Accepted

    Hi Ikarus,

     

    In the meantime please find attached a workaround which deletes the files.

     

    Best,

    Edin

     

    <?xml version="1.0" encoding="UTF-8"?><process version="7.5.001">
    <context>
    <input/>
    <output/>
    <macros>
    <macro>
    <key>repo</key>
    <value>//Ikarus/Curso</value>
    </macro>
    <macro>
    <key>coleccion</key>
    <value>ListaReglas_true</value>
    </macro>
    <macro>
    <key>tipo</key>
    <value>1</value>
    </macro>
    </macros>
    </context>
    <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="false" class="set_macros" compatibility="7.5.001" expanded="true" height="68" name="Set Macros" width="90" x="45" y="34">
    <list key="macros">
    <parameter key="repo" value="ioo to delete"/>
    <parameter key="tipo" value="1"/>
    <parameter key="coleccion" value="ES"/>
    </list>
    </operator>
    <operator activated="true" class="loop_repository" compatibility="7.5.001" expanded="true" height="82" name="Loop Repository" width="90" x="246" y="34">
    <parameter key="repository_folder" value="%{repo}"/>
    <parameter key="entry_type" value="IOObject"/>
    <parameter key="filter" value="%{coleccion}_.*"/>
    <process expanded="true">
    <operator activated="true" class="retrieve" compatibility="7.5.001" expanded="true" height="68" name="Retrieve (2)" width="90" x="45" y="34">
    <parameter key="repository_entry" value="%{repository_path}"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="7.5.001" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="179" y="85">
    <list key="attribute_values">
    <parameter key="IOObjects" value="%{repository_path}"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="branch" compatibility="7.5.001" expanded="true" height="82" name="Branch (2)" width="90" x="313" y="85">
    <parameter key="condition_type" value="macro_defined"/>
    <parameter key="condition_value" value="firstObject"/>
    <process expanded="true">
    <operator activated="true" class="recall" compatibility="7.5.001" expanded="true" height="68" name="Recall (3)" width="90" x="45" y="34">
    <parameter key="name" value="IOObjectList"/>
    </operator>
    <operator activated="true" class="append" compatibility="7.5.001" expanded="true" height="103" name="Append (2)" width="90" x="179" y="85"/>
    <operator activated="true" class="remember" compatibility="7.5.001" expanded="true" height="68" name="Remember (4)" width="90" x="179" y="238">
    <parameter key="name" value="IOObjectList"/>
    </operator>
    <connect from_port="condition" to_op="Append (2)" to_port="example set 2"/>
    <connect from_op="Recall (3)" from_port="result" to_op="Append (2)" to_port="example set 1"/>
    <connect from_op="Append (2)" from_port="merged set" to_op="Remember (4)" to_port="store"/>
    <portSpacing port="source_condition" spacing="0"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_input 1" spacing="0"/>
    </process>
    <process expanded="true">
    <operator activated="true" class="set_macro" compatibility="7.5.001" expanded="true" height="68" name="Set Macro (2)" width="90" x="179" y="85">
    <parameter key="macro" value="firstObject"/>
    <parameter key="value" value="false"/>
    </operator>
    <operator activated="true" class="remember" compatibility="7.5.001" expanded="true" height="68" name="Remember (3)" width="90" x="45" y="85">
    <parameter key="name" value="IOObjectList"/>
    </operator>
    <connect from_port="condition" to_op="Remember (3)" to_port="store"/>
    <portSpacing port="source_condition" spacing="84"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_input 1" spacing="0"/>
    </process>
    </operator>
    <connect from_op="Retrieve (2)" from_port="output" to_port="out 1"/>
    <connect from_op="Generate Data by User Specification" from_port="output" to_op="Branch (2)" to_port="condition"/>
    <portSpacing port="source_repository object" spacing="0"/>
    <portSpacing port="source_in 1" spacing="0"/>
    <portSpacing port="source_in 2" spacing="0"/>
    <portSpacing port="sink_out 1" spacing="0"/>
    <portSpacing port="sink_out 2" spacing="0"/>
    </process>
    </operator>
    <operator activated="true" class="select_subprocess" compatibility="7.5.001" expanded="true" height="82" name="Select Subprocess" width="90" x="380" y="34">
    <parameter key="select_which" value="%{tipo}"/>
    <process expanded="true">
    <operator activated="true" class="append" compatibility="7.5.001" expanded="true" height="82" name="Append" width="90" x="45" y="136"/>
    <connect from_port="input 1" to_op="Append" to_port="example set 1"/>
    <connect from_op="Append" from_port="merged set" to_port="output 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="source_input 2" spacing="0"/>
    <portSpacing port="sink_output 1" spacing="0"/>
    <portSpacing port="sink_output 2" spacing="0"/>
    </process>
    <process expanded="true">
    <operator activated="true" class="loop_collection" compatibility="7.5.001" expanded="true" height="68" name="Loop Collection" width="90" x="45" y="75">
    <process expanded="true">
    <operator activated="true" class="branch" compatibility="6.4.000" expanded="true" height="82" name="Branch" width="90" x="45" y="30">
    <parameter key="condition_type" value="macro_defined"/>
    <parameter key="condition_value" value="conectado"/>
    <process expanded="true">
    <operator activated="true" class="recall" compatibility="7.5.001" expanded="true" height="68" name="Recall" width="90" x="45" y="120">
    <parameter key="name" value="conjunto"/>
    <parameter key="remove_from_store" value="false"/>
    </operator>
    <operator activated="true" class="join" compatibility="7.5.001" expanded="true" height="82" name="Join" width="90" x="179" y="75">
    <list key="key_attributes"/>
    </operator>
    <operator activated="true" class="remember" compatibility="7.5.001" expanded="true" height="68" name="Remember (2)" width="90" x="179" y="210">
    <parameter key="name" value="conjunto"/>
    </operator>
    <connect from_port="condition" to_op="Join" to_port="left"/>
    <connect from_op="Recall" from_port="result" to_op="Join" to_port="right"/>
    <connect from_op="Join" from_port="join" to_op="Remember (2)" to_port="store"/>
    <portSpacing port="source_condition" spacing="0"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_input 1" spacing="0"/>
    </process>
    <process expanded="true">
    <operator activated="true" class="remember" compatibility="7.5.001" expanded="true" height="68" name="Remember" width="90" x="45" y="120">
    <parameter key="name" value="conjunto"/>
    </operator>
    <operator activated="true" class="set_macro" compatibility="7.5.001" expanded="true" height="68" name="Set Macro" width="90" x="45" y="30">
    <parameter key="macro" value="conectado"/>
    <parameter key="value" value="1"/>
    </operator>
    <connect from_port="condition" to_op="Remember" to_port="store"/>
    <portSpacing port="source_condition" spacing="0"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_input 1" spacing="0"/>
    </process>
    </operator>
    <connect from_port="single" to_op="Branch" to_port="condition"/>
    <portSpacing port="source_single" spacing="0"/>
    <portSpacing port="sink_output 1" spacing="0"/>
    </process>
    </operator>
    <operator activated="true" class="recall" compatibility="7.5.001" expanded="true" height="68" name="Recall (2)" width="90" x="45" y="165">
    <parameter key="name" value="conjunto"/>
    </operator>
    <connect from_port="input 1" to_op="Loop Collection" to_port="collection"/>
    <connect from_op="Recall (2)" from_port="result" to_port="output 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="source_input 2" spacing="0"/>
    <portSpacing port="sink_output 1" spacing="0"/>
    <portSpacing port="sink_output 2" spacing="0"/>
    </process>
    </operator>
    <operator activated="true" class="store" compatibility="7.5.001" expanded="true" height="68" name="Store" width="90" x="514" y="34">
    <parameter key="repository_entry" value="%{repo}/%{coleccion}"/>
    </operator>
    <operator activated="true" class="materialize_data" compatibility="7.5.001" expanded="true" height="82" name="Materialize Data" width="90" x="246" y="187"/>
    <operator activated="true" class="recall" compatibility="7.5.001" expanded="true" height="68" name="Recall (4)" width="90" x="380" y="187">
    <parameter key="name" value="IOObjectList"/>
    </operator>
    <operator activated="true" class="loop_examples" compatibility="7.5.001" expanded="true" height="82" name="Loop Examples" width="90" x="514" y="187">
    <process expanded="true">
    <operator activated="true" class="extract_macro" compatibility="7.5.001" expanded="true" height="68" name="Extract Macro" width="90" x="45" y="34">
    <parameter key="macro" value="IOObjectToDelete"/>
    <parameter key="macro_type" value="data_value"/>
    <parameter key="attribute_name" value="IOObjects"/>
    <parameter key="example_index" value="%{example}"/>
    <list key="additional_macros"/>
    </operator>
    <operator activated="true" class="delete_repository_entry" compatibility="7.5.001" expanded="true" height="82" name="Delete Repository Entry" width="90" x="179" y="34">
    <parameter key="entry_to_delete" value="%{IOObjectToDelete}"/>
    </operator>
    <connect from_port="example set" to_op="Extract Macro" to_port="example set"/>
    <connect from_op="Extract Macro" from_port="example set" to_op="Delete Repository Entry" to_port="through 1"/>
    <portSpacing port="source_example set" spacing="0"/>
    <portSpacing port="sink_example set" spacing="0"/>
    <portSpacing port="sink_output 1" spacing="0"/>
    </process>
    </operator>
    <connect from_op="Loop Repository" from_port="out 1" to_op="Select Subprocess" to_port="input 1"/>
    <connect from_op="Select Subprocess" from_port="output 1" to_op="Store" to_port="input"/>
    <connect from_op="Store" from_port="through" to_op="Materialize Data" to_port="example set input"/>
    <connect from_op="Recall (4)" from_port="result" to_op="Loop Examples" to_port="example set"/>
    <connect from_op="Loop Examples" from_port="example set" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761   Unicorn

    Have you tested this with the current verion of RM? I see that your process is an older v5.3 one. 

  • ikarusumaikarusuma Member Posts: 5 Contributor I

    Hi Thomas,

    yes, I usually use RM vs 5.3.15. But I have just  tested the process with RM 7.5 and it returns me the same bug.

    Spoiler
    • Exception: java.util.ConcurrentModificationException
    • Message: null
    • Stack trace:
    • java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
    • java.util.ArrayList$Itr.next(ArrayList.java:851)
    • java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
    • com.rapidminer.operator.meta.RepositoryIterator.iterate(RepositoryIterator.java:109)
    • com.rapidminer.operator.meta.RepositoryIterator.iterate(RepositoryIterator.java:76)
    • com.rapidminer.operator.meta.AbstractRepositoryIterator.doWork(AbstractRepositoryIterator.java:131)
    • com.rapidminer.operator.meta.RepositoryIterator.doWork(RepositoryIterator.java:160)
    • com.rapidminer.operator.Operator.execute(Operator.java:1004)
    • com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77)
    • com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:812)
    • com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:807)
    • java.security.AccessController.doPrivileged(Native Method)
    • com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807)
    • com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:428)
    • com.rapidminer.operator.Operator.execute(Operator.java:1004)
    • com.rapidminer.Process.run(Process.java:1315)
    • com.rapidminer.Process.run(Process.java:1179)
    • com.rapidminer.Process.run(Process.java:1132)
    • com.rapidminer.Process.run(Process.java:1127)
    • com.rapidminer.Process.run(Process.java:1117)
    • com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)

    The process has two Loop Repository operators. Into the first, there is a Retrieve with a macro (%{repository_path}), and it runs well.   Into the second there is a Delete Repository Entry with the same macro (%{repository_path}), and it deletes only one repository and it send me this bug, that I don´t know what it means.

    Thanks,

    Ikarus

     

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761   Unicorn

    Huh, that's wierd. Let me share this with the Developers.

  • ikarusumaikarusuma Member Posts: 5 Contributor I

    OK!

    Thanks Thomas

Sign In or Register to comment.