* FileDataSource that is checked.
*/
private void checkFileDataSource(FileDataSourceBase<?> fileSource) {
String path = fileSource.getFilePath();
if (path == null) {
throw new InvalidProgramException("File path of FileDataSource is null.");
}
if (path.length() == 0) {
throw new InvalidProgramException("File path of FileDataSource is empty string.");
}
try {
Path p = new Path(path);
String scheme = p.toUri().getScheme();
if (scheme == null) {
throw new InvalidProgramException("File path \"" + path + "\" of FileDataSource has no file system scheme (like 'file:// or hdfs://').");
}
} catch (Exception e) {
throw new InvalidProgramException("File path \"" + path + "\" of FileDataSource is an invalid path: " + e.getMessage());
}
}