in o2a/mappers/fs_mapper.py [0:0]
def parse_tasks(self) -> List[Task]:
"""
Processes the nodes responsible for determining what operations are performed on the filesystem and
returns the tasks that suit them.
"""
tasks: List[Task] = []
operation_nodes = [node for node in self.oozie_node if node.tag in FS_OPERATION_MAPPERS.keys()]
operation_nodes_count = len(operation_nodes)
for index, node in enumerate(operation_nodes):
task = self.parse_fs_operation(index, node, operation_nodes_count)
tasks.append(task)
if not tasks:
# Each mapper must return at least one task
return [Task(task_id=self.name, template_name="dummy.tpl")]
return tasks