@Override
    public ResourceUri apply(ResourceUri resourceUri) {
      try {
        return resourceUri.getUri().toLowerCase().startsWith("hdfs:")
            ? destinationResourceUri(resourceUri)
            : resourceUri;
      } catch (IOException | SemanticException e) {
        throw new RuntimeException(e);
      }
    }
This is to understand how task dependencies work.
 All root tasks are executed in parallel. For bootstrap replication there should be only one root task of creating db. Incremental can be multiple ( have to verify ).
 Task has children, which are put in queue for execution after the parent has finished execution.
 One -to- One dependency can be satisfied by adding children to a given task, do this recursively where the relation holds.
 for many to one , create a barrier task that is the child of every item in 'many' dependencies, make the 'one' dependency as child of barrier task.
 add the 'many' to parent/root tasks. The execution environment will make sure that the child barrier task will not get executed unless all parents of the barrier task are complete,
 which should only happen when the last task is finished, at which point the child of the barrier task is picked up.
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/CreateFunctionHandler.java