use of org.talend.designer.hdfsbrowse.model.EHadoopFileTypes in project tbd-studio-se by Talend.
the class HDFSFileSelectorForm method fetchChildren.
private long fetchChildren(IHDFSNode node, IProgressMonitor monitor) {
if (monitor != null && monitor.isCanceled()) {
return 0;
}
node.forceFetchChildren();
long nodeSize = 0;
EHadoopFileTypes type = node.getType();
if (type == EHadoopFileTypes.FILE) {
nodeSize++;
}
List<IHDFSNode> children = node.getChildren();
if (monitor != null && monitor.isCanceled()) {
return 0;
}
if (children != null) {
for (IHDFSNode child : children) {
nodeSize += fetchChildren(child, monitor);
}
}
return nodeSize;
}
Aggregations