Package org.elasticsearch.test
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 positionstatic void
corruptIndex(java.util.Random random, java.nio.file.Path indexPath, boolean corruptSegments)
-
-
-
Method Detail
-
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
-
-