in modules/spark/src/main/java/org/apache/fluo/recipes/spark/FluoSparkHelper.java [314:329]
private Path getTempDir(BulkImportOptions opts) {
Path tempDir;
if (opts.tempDir == null) {
try {
tempDir = getPossibleTempDir();
while (hdfs.exists(tempDir)) {
tempDir = getPossibleTempDir();
}
} catch (IOException e) {
throw new IllegalStateException(e);
}
} else {
tempDir = opts.tempDir;
}
return tempDir;
}