Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-4312

addrate raises NoSuchElementException when using numusers

    Details

    • Type: Bug
    • Status: Dev backlog
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.0
    • Fix Version/s: None
    • Component/s: tools
    • Labels:

      Description

      Description

      When using numusers parameter in template file, addrate generates a javaexception

      Version

      $ addrate --version
      4.1.0.SNAPSHOT (revision 6c404574dcc0d080ed3d61eaa7127dab8fdc3a17)

      To reproduce :

      • addrate_template template file :
      define suffix=dc=com
      define maildomain=example.com
      define numusers=100000000
      
      branch: [suffix]
      objectClass: top
      objectClass: domain
      
      branch: ou=People,[suffix]
      objectClass: organizationalUnit
      subordinateTemplate: person:[numusers]
      
      template: person
      rdnAttr: uid
      objectClass: top
      objectClass: person
      objectClass: organizationalPerson
      objectClass: inetOrgPerson
      givenName: <first>
      sn: <last>
      employeeNumber: <sequential:0>
      cn: {givenName} {sn} {employeeNumber}
      uid: add_del.{employeeNumber}
      mail: {uid}@[maildomain]
      telephoneNumber: <random:telephone>
      userpassword: password 
      • command to run
      $ addrate -h localhost -p 1389 -D "cn=Directory Manager" -w password -S -C fifo -c 5 -t 6 -i 30 -F -s 10000 addrate.template
      Time (seconds),Recent throughput (ops/second),Average throughput (ops/second),Recent response time (milliseconds),Average response time (milliseconds),99.9% response time (milliseconds),99.99% response time (milliseconds),99.999% response time (milliseconds),Errors/second,Add%
      Exception in thread "Worker Thread" Exception in thread "Worker Thread" Exception in thread "Worker Thread" java.util.NoSuchElementException
          at org.forgerock.opendj.ldif.EntryGenerator.readEntry(EntryGenerator.java:273)
          at com.forgerock.opendj.ldap.tools.AddRate$AddPerformanceRunner$AddDeleteWorkerThread.doAdd(AddRate.java:216)
          at com.forgerock.opendj.ldap.tools.AddRate$AddPerformanceRunner$AddDeleteWorkerThread.performOperation(AddRate.java:164)
          at com.forgerock.opendj.ldap.tools.PerformanceRunner$WorkerThread.run(PerformanceRunner.java:150) 

      Workaround

      Do not use numusers in template file

      define suffix=dc=com
      define maildomain=example.com
      
      branch: [suffix]
      
      branch: ou=People,[suffix]
      subordinateTemplate: person
      
      template: person
      rdnAttr: uid
      objectClass: top
      objectClass: person
      objectClass: organizationalPerson
      objectClass: inetOrgPerson
      givenName: <first>
      sn: <last>
      employeeNumber: <sequential:0>
      cn: {givenName} {sn} {employeeNumber}
      uid: add_del.{employeeNumber}
      mail: {uid}@[maildomain]
      telephoneNumber: <random:telephone>
      userpassword: password

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              guillaume.andru Guillaume Andru
              QA Assignee:
              Guillaume Andru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: