Skip to content

Commit 5ed09b5

Browse files
committed
Fixed RealtimeFileBasedReaderTest that was broken
RB=570323 G=pinot-dev-reviewers R=kgopalak,jfim,ssubrama,dpatel,mshrivas A=ssubrama
1 parent 6e18a15 commit 5ed09b5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pinot-core/src/main/java/com/linkedin/pinot/core/indexsegment/generator/SegmentGeneratorConfig.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ private String getQualifyingDimensions(FieldType type) {
204204
}
205205

206206
public void setIndexOutputDir(String dir) {
207-
if (new File(dir).exists()) {
208-
207+
final File outputDirectory = new File(dir);
208+
if (!outputDirectory.exists()) {
209+
outputDirectory.mkdirs();
209210
}
210211
indexOutputDir = dir;
211212
}
@@ -267,9 +268,11 @@ public String getInputFilePath() {
267268
}
268269

269270
public void setInputFilePath(String path) {
270-
inputDataFilePath = new File(path);
271-
if (!inputDataFilePath.exists()) {
272-
throw new RuntimeException("input path needs to exist");
271+
if (path != null) {
272+
inputDataFilePath = new File(path);
273+
if (!inputDataFilePath.exists()) {
274+
throw new RuntimeException("input path needs to exist");
275+
}
273276
}
274277
}
275278

0 commit comments

Comments
 (0)