in hollow/src/main/java/com/netflix/hollow/api/producer/HollowProducer.java [933:960]
protected void checkArguments() {
if (allowTypeResharding == true && doIntegrityCheck == false) { // type resharding feature rollout
throw new IllegalArgumentException("Enabling type re-sharding requires integrity check to also be enabled");
}
if (allowTypeResharding == true && focusHoleFillInFewestShards == true) { // type re-sharding feature rollout
// More thorough testing required before enabling these features to work in tandem
// simple test case for when features are allowed to work together passes, see {@code testReshardingWithFocusHoleFillInFewestShards}
throw new IllegalArgumentException("Producer does not yet support using both re-sharding and focusHoleFillInFewestShards features in tandem");
}
if (stager != null && compressor != null) {
throw new IllegalArgumentException(
"Both a custom BlobStager and BlobCompressor were specified -- please specify only one of these.");
}
if (stager != null && stagingDir != null) {
throw new IllegalArgumentException(
"Both a custom BlobStager and a staging directory were specified -- please specify only one of these.");
}
if (stager != null && optionalPartConfig != null) {
throw new IllegalArgumentException(
"Both a custom BlobStager and an optional blob part config were specified -- please specify only one of these.");
}
if (this.stager == null) {
BlobCompressor compressor = this.compressor != null ? this.compressor : BlobCompressor.NO_COMPRESSION;
File stagingDir = this.stagingDir != null ? this.stagingDir : new File(System.getProperty("java.io.tmpdir"));
this.stager = new HollowFilesystemBlobStager(stagingDir.toPath(), compressor, optionalPartConfig);
}
}