use of uk.gov.gchq.gaffer.spark.operation.scalardd.SplitStoreFromRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromRDDOfElementsHandlerTest method throwsExceptionWhenMaxSampleSizeIsLessThanOne.
@Test
public void throwsExceptionWhenMaxSampleSizeIsLessThanOne() throws OperationException {
final SplitStoreFromRDDOfElements splitStoreHandler = new SplitStoreFromRDDOfElements.Builder().input(rdd).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.scalardd.SplitStoreFromRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromRDDOfElementsHandlerTest method throwsExceptionWhenNumSplitPointsIsLessThanOne.
@Test
public void throwsExceptionWhenNumSplitPointsIsLessThanOne() throws OperationException {
final SplitStoreFromRDDOfElements splitStoreHandler = new SplitStoreFromRDDOfElements.Builder().input(rdd).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.scalardd.SplitStoreFromRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromRDDOfElementsHandlerTest method throwsExceptionWhenFractionToSampleIsGreaterThanOne.
@Test
public void throwsExceptionWhenFractionToSampleIsGreaterThanOne() throws OperationException {
final SplitStoreFromRDDOfElements splitStoreHandler = new SplitStoreFromRDDOfElements.Builder().input(rdd).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.scalardd.SplitStoreFromRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromRDDOfElementsHandlerTest method throwsExceptionWhenFractionToSampleIsZero.
@Test
public void throwsExceptionWhenFractionToSampleIsZero() throws OperationException {
final SplitStoreFromRDDOfElements splitStoreHandler = new SplitStoreFromRDDOfElements.Builder().input(rdd).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.scalardd.SplitStoreFromRDDOfElements in project Gaffer by gchq.
the class SplitStoreFromRDDOfElementsHandlerTest method throwsExceptionWhenFractionToSampleLessThanZero.
@Test
public void throwsExceptionWhenFractionToSampleLessThanZero() throws OperationException {
final SplitStoreFromRDDOfElements splitStoreHandler = new SplitStoreFromRDDOfElements.Builder().input(rdd).fractionToSample(-0.00000001d).build();
assertThatIllegalArgumentException().isThrownBy(() -> graph.execute(splitStoreHandler, user)).withMessageContaining("fractionToSample must be null or between 0 exclusive and 1 inclusive");
}
Aggregations