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

Explain the impact of non-default makeldif random seed

    Details

    • Type: Improvement
    • Status: Done
    • Priority: Minor
    • Resolution: Not a defect
    • Affects Version/s: 7.0.0
    • Fix Version/s: Not applicable
    • Component/s: documentation
    • Labels:
      None

      Description

      The makeldif --randomSeed argument is underdocumented, in that neither the online help nor the product docs make it clear that what you get when you use the same non-default random seed is the same LDIF output every time.

      # Unpack the distribution:
      $ cd /path/to
      $ unzip -q ~/.m2/repository/org/forgerock/opendj/opendj-server/7.0.0-SNAPSHOT/opendj-server-7.0.0-SNAPSHOT.zip
      $ cd opendj/bin
      
      # Only generate 100 users:
      $ vi ../template/config/MakeLDIF/example.template
      
      # When the default random seed is used, the LDIF is different:
      $ makeldif --outputLdif generated.ldif ../template/config/MakeLDIF/example.template
      LDIF processing complete. 102 entries written
      $ makeldif --outputLdif generated1.ldif ../template/config/MakeLDIF/example.template
      LDIF processing complete. 102 entries written
      $ diff generated.ldif generated1.ldif | wc -l
      2384
      $ rm generated*.ldif
      
      # When the same (non-zero) seed is used each time, the LDIF is the same:
      $ makeldif --randomSeed 42 --outputLdif generated.ldif ../template/config/MakeLDIF/example.template
      LDIF processing complete. 102 entries written
      $ makeldif --randomSeed 42 --outputLdif generated1.ldif ../template/config/MakeLDIF/example.template
      LDIF processing complete. 102 entries written
      $ diff generated.ldif generated1.ldif | wc -l
      0
      

      The argument is particularly useful when you are trying to generate the same test data across multiple replicas.

        Attachments

          Activity

            People

            • Assignee:
              Mark Mark Craig
              Reporter:
              David.Goldsmith David Goldsmith
              Dev Assignee:
              Mark Craig
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: