use of uk.gov.gchq.gaffer.spark.operation.javardd.SplitStoreFromJavaRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromJavaRDDOfElementsHandlerTest method throwsExceptionWhenMaxSampleSizeIsLessThanOne.
@Test
public void throwsExceptionWhenMaxSampleSizeIsLessThanOne() throws OperationException {
final SplitStoreFromJavaRDDOfElements splitStoreHandler = new SplitStoreFromJavaRDDOfElements.Builder().input(javaRDD).maxSampleSize(-1).build();
assertThatIllegalArgumentException().isThrownBy(() -> graph.execute(splitStoreHandler, user)).withMessageContaining("maxSampleSize must be null or greater than 0");
}
use of uk.gov.gchq.gaffer.spark.operation.javardd.SplitStoreFromJavaRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromJavaRDDOfElementsHandlerTest method throwsExceptionWhenFractionToSampleIsGreaterThanOne.
@Test
public void throwsExceptionWhenFractionToSampleIsGreaterThanOne() throws OperationException {
final SplitStoreFromJavaRDDOfElements splitStoreHandler = new SplitStoreFromJavaRDDOfElements.Builder().input(javaRDD).fractionToSample(1.000000001d).build();
assertThatIllegalArgumentException().isThrownBy(() -> graph.execute(splitStoreHandler, user)).withMessageContaining("fractionToSample must be null or between 0 exclusive and 1 inclusive");
}
use of uk.gov.gchq.gaffer.spark.operation.javardd.SplitStoreFromJavaRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromJavaRDDOfElementsHandlerTest method throwsExceptionWhenNumSplitPointsIsLessThanOne.
@Test
public void throwsExceptionWhenNumSplitPointsIsLessThanOne() throws OperationException {
final SplitStoreFromJavaRDDOfElements splitStoreHandler = new SplitStoreFromJavaRDDOfElements.Builder().input(javaRDD).numSplits(-1).build();
assertThatIllegalArgumentException().isThrownBy(() -> graph.execute(splitStoreHandler, user)).withMessageContaining("numSplits must be null or greater than 0");
}
use of uk.gov.gchq.gaffer.spark.operation.javardd.SplitStoreFromJavaRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromJavaRDDOfElementsHandlerTest method throwsExceptionWhenFractionToSampleIsZero.
@Test
public void throwsExceptionWhenFractionToSampleIsZero() throws OperationException {
final SplitStoreFromJavaRDDOfElements splitStoreHandler = new SplitStoreFromJavaRDDOfElements.Builder().input(javaRDD).fractionToSample(0d).build();
assertThatIllegalArgumentException().isThrownBy(() -> graph.execute(splitStoreHandler, user)).withMessageContaining("fractionToSample must be null or between 0 exclusive and 1 inclusive");
}
use of uk.gov.gchq.gaffer.spark.operation.javardd.SplitStoreFromJavaRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromJavaRDDOfElementsHandlerTest method throwsExceptionWhenFractionToSampleLessThanZero.
@Test
public void throwsExceptionWhenFractionToSampleLessThanZero() throws OperationException {
final SplitStoreFromJavaRDDOfElements splitStoreHandler = new SplitStoreFromJavaRDDOfElements.Builder().input(javaRDD).fractionToSample(-0.00000001d).build();
assertThatIllegalArgumentException().isThrownBy(() -> graph.execute(splitStoreHandler, user)).withMessageContaining("fractionToSample must be null or between 0 exclusive and 1 inclusive");
}
Aggregations