[ https://issues.apache.org/jira/browse/FALCON-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096128#comment-14096128
]
David Kjerrumgaard commented on FALCON-598:
-------------------------------------------
The issue is with the getStorageType() method that was added to the Process Helper class (shown
below): There isn't a null check
public static Storage.TYPE getStorageType(org.apache.falcon.entity.v0.cluster.Cluster cluster,
Process process) throws FalconException {
Storage.TYPE storageType = Storage.TYPE.FILESYSTEM;
if (process.getInputs() == null && process.getOutputs() == null) {
return storageType;
}
===> NEED NULL CHECK HERE
for (Input input : process.getInputs().getInputs()) {
Feed feed = EntityUtil.getEntity(EntityType.FEED, input.getFeed());
storageType = FeedHelper.getStorageType(feed, cluster);
if (Storage.TYPE.TABLE == storageType) {
break;
}
}
// If input feeds storage type is file system check storage type of output feeds
if (Storage.TYPE.FILESYSTEM == storageType) {
===> NEED NULL CHECK HERE
for (Output output : process.getOutputs().getOutputs()) {
Feed feed = EntityUtil.getEntity(EntityType.FEED, output.getFeed());
storageType = FeedHelper.getStorageType(feed, cluster);
if (Storage.TYPE.TABLE == storageType) {
break;
}
}
}
return storageType;
}
> org.apache.falcon.entity.ProcessHelper throws NullPointerException if the process has
no inputs OR no outputs defined
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: FALCON-598
> URL: https://issues.apache.org/jira/browse/FALCON-598
> Project: Falcon
> Issue Type: Bug
> Components: common
> Affects Versions: 0.5
> Reporter: David Kjerrumgaard
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)
|