Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Closure Generator with Cycles

  1. #1

    Default Closure Generator with Cycles

    I'm trying to use the Pentaho Closure Generator to model a supervisor-subordinate relationship (see http://wiki.pentaho.com/display/EAI/Closure+Generator). When I use the step, I get the following error:

    Code:
     java.lang.RuntimeException: infinite loop detected
    I know that my supervisor-subordinate relationships have cycles (i.e. - Bob's supervisor is Alice and Alice's supervisor is Joe and Joe's supervisor is Bob). Is there an option to make the Closure Generator stop following a path when it has seen the node at least once (instead of stopping with an error)?

    I also looked at the source code for this step which was posted in a thread from 2007 (see http://forums.pentaho.com/showthread...closure-tables). In the code from that thread, they have the following section:

    Code:
    if (distance > 20) throw new RuntimeException("infinite loop detected:" + key);
    It seems somewhat arbitrary that a distance of 20 would declare an infinite loop. For a large organization, it would be possible for the supervisor depth to exceed 20.

    Is there any way to customize the behavior for the infinite loop detection? I don't want it to create an infinite loop, but just to stop when it detects a cycle.

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    IMO your example isn't a very convincing use case for cyclic relationships.
    Successful closure generation with Kettle requires your data to represent a directed acyclic graph, however.
    You sure can incorporate code to remove cycles - Kettle is Open Source Software, after all.
    So long, and thanks for all the fish.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.