Class CorruptionUtils

java.lang.Object
org.elasticsearch.test.CorruptionUtils

public final class CorruptionUtils
extends java.lang.Object
  • Method Summary

    Modifier and Type Method Description
    static void corruptFile​(java.util.Random random, java.nio.file.Path... files)
    Corrupts a random file at a random position
    static void corruptIndex​(java.util.Random random, java.nio.file.Path indexPath, boolean corruptSegments)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • corruptIndex

      public static void corruptIndex​(java.util.Random random, java.nio.file.Path indexPath, boolean corruptSegments) throws java.io.IOException
      Throws:
      java.io.IOException
    • corruptFile

      public static void corruptFile​(java.util.Random random, java.nio.file.Path... files) throws java.io.IOException
      Corrupts a random file at a random position
      Throws:
      java.io.IOException