This method needs to move to oozie util class