mirror of https://github.com/apache/druid.git
throw IAE when baseDir is null in LocalFireHose
This commit is contained in:
parent
fc09929503
commit
7132428bba
|
@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.google.common.base.Throwables;
|
import com.google.common.base.Throwables;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import com.metamx.common.IAE;
|
||||||
import com.metamx.common.ISE;
|
import com.metamx.common.ISE;
|
||||||
import com.metamx.emitter.EmittingLogger;
|
import com.metamx.emitter.EmittingLogger;
|
||||||
import io.druid.data.input.Firehose;
|
import io.druid.data.input.Firehose;
|
||||||
|
@ -84,6 +85,9 @@ public class LocalFirehoseFactory implements FirehoseFactory<StringInputRowParse
|
||||||
@Override
|
@Override
|
||||||
public Firehose connect(StringInputRowParser firehoseParser) throws IOException
|
public Firehose connect(StringInputRowParser firehoseParser) throws IOException
|
||||||
{
|
{
|
||||||
|
if (baseDir == null) {
|
||||||
|
throw new IAE("baseDir is null");
|
||||||
|
}
|
||||||
log.info("Searching for all [%s] in and beneath [%s]", filter, baseDir.getAbsoluteFile());
|
log.info("Searching for all [%s] in and beneath [%s]", filter, baseDir.getAbsoluteFile());
|
||||||
|
|
||||||
Collection<File> foundFiles = FileUtils.listFiles(
|
Collection<File> foundFiles = FileUtils.listFiles(
|
||||||
|
|
Loading…
Reference in New Issue