Package org.apache.tez.dag.utils

Examples of org.apache.tez.dag.utils.Graph$Node


        public void addClientSubscriptionInfo() throws Exception {
                Assume.assumeTrue(TckPublisher.isJUDDI());

                ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();

                Node node = new Node();
                node.setSecurityUrl("http://localhost:8080/services");
                node.setCustodyTransferUrl("http://localhost:8080/services");
                node.setDescription("TEST");
                node.setInquiryUrl("http://localhost:8080/services");
                node.setPublishUrl("http://localhost:8080/services");
                node.setSubscriptionListenerUrl("http://localhost:8080/services");
                node.setSubscriptionUrl("http://localhost:8080/services");
                node.setProxyTransport(org.apache.juddi.v3.client.transport.JAXWSTransport.class.getCanonicalName());
               
                node.setName("addClientSubscriptionInfoNode");
                node.setClientName("addClientSubscriptionInfoNode");

                Clerk clerk = new Clerk();
                clerk.setName("addClientSubscriptionInfoClerk");
                clerk.setPublisher("root");
                clerk.setNode(node);
View Full Code Here


  public void setProperties(Properties properties) {
    this.properties = properties;
  }
 
  public Node getApiNode() {
    Node apiNode = new Node();
    apiNode.setCustodyTransferUrl(custodyTransferUrl);
    apiNode.setDescription(description);
    apiNode.setFactoryInitial(factoryInitial);
    apiNode.setFactoryNamingProvider(factoryNamingProvider);
    apiNode.setFactoryURLPkgs(factoryURLPkgs);
    apiNode.setInquiryUrl(inquiryUrl);
                //apiNode.setInquiryRESTUrl(name);
    apiNode.setJuddiApiUrl(juddiApiUrl);
    apiNode.setClientName(clientName);
    apiNode.setName(name);
    apiNode.setProxyTransport(proxyTransport);
    apiNode.setPublishUrl(publishUrl);
    apiNode.setSecurityUrl(securityUrl);
    apiNode.setSubscriptionUrl(subscriptionUrl);
    return apiNode;
  }
View Full Code Here

           

         
            SaveNode node = new SaveNode();
            node.setAuthInfo(token);
            Node n = new Node();
            n.setClientName("juddicloud");
            n.setName("juddicloud");
            n.setCustodyTransferUrl("http://uddi-jbossoverlord.rhcloud.com/services/custody-transfer");
            n.setDescription("juddicloud");
            n.setProxyTransport("org.apache.juddi.v3.client.transport.JAXWSTransport");
            n.setInquiryUrl("http://uddi-jbossoverlord.rhcloud.com/services/inquiry");
            n.setJuddiApiUrl("http://uddi-jbossoverlord.rhcloud.com/services/juddi-api");
            n.setPublishUrl("http://uddi-jbossoverlord.rhcloud.com/services/publish");
            n.setSecurityUrl( "http://uddi-jbossoverlord.rhcloud.com/services/security");
            n.setSubscriptionListenerUrl("http://uddi-jbossoverlord.rhcloud.com/services/subscription-listener");
            n.setSubscriptionUrl("http://uddi-jbossoverlord.rhcloud.com/services/subscription");
            node.getNode().add(n);
           
            PrintJUDDI<SaveNode> p = new PrintJUDDI<SaveNode>();
            System.out.println("Before sending");
            System.out.println(p.print(node));
View Full Code Here

        private String save_Clerk(HttpServletRequest parameters) {
                SaveClerk sc = new SaveClerk();
                sc.setAuthInfo(GetToken());
                Clerk c = new Clerk();
                c.setName(parameters.getParameter("CLERKsetName"));
                Node node = new Node();
                node.setClientName(parameters.getParameter("CLERKNODEsetClientName"));
                node.setCustodyTransferUrl(parameters.getParameter("CLERKNODEsetCustodyTransferUrl"));
                node.setDescription(parameters.getParameter("CLERKNODEsetDescription"));
                node.setFactoryInitial(parameters.getParameter("CLERKNODEsetFactoryInitial"));
                node.setFactoryNamingProvider(parameters.getParameter("CLERKNODEsetFactoryNamingProvider"));
                node.setFactoryURLPkgs(parameters.getParameter("CLERKNODEsetFactoryURLPkgs"));
                node.setInquiryUrl(parameters.getParameter("CLERKNODEsetInquiryUrl"));
                node.setJuddiApiUrl(parameters.getParameter("CLERKNODEsetJuddiApiUrl"));
                node.setName(parameters.getParameter("CLERKNODEsetName"));
                node.setProxyTransport(parameters.getParameter("CLERKNODEsetProxyTransport"));
                node.setPublishUrl(parameters.getParameter("CLERKNODEsetPublishUrl"));
                node.setReplicationUrl(parameters.getParameter("CLERKNODEsetReplicationUrl"));
                node.setSecurityUrl(parameters.getParameter("CLERKNODEsetSecurityUrl"));
                node.setSubscriptionListenerUrl(parameters.getParameter("CLERKNODEsetSubscriptionListenerUrl"));
                node.setSubscriptionUrl(parameters.getParameter("CLERKNODEsetSubscriptionUrl"));
                c.setNode(node);
                c.setPassword(parameters.getParameter("CLERKsetPassword"));
                c.setPublisher(parameters.getParameter("CLERKsetPublisher"));

                sc.getClerk().add(c);
View Full Code Here

        }

        private String save_Node(HttpServletRequest parameters) {
                SaveNode sn = new SaveNode();
                sn.setAuthInfo(GetToken());
                Node node = new Node();
                node.setClientName(parameters.getParameter("NODEsetClientName"));
                node.setCustodyTransferUrl(parameters.getParameter("NODEsetCustodyTransferUrl"));
                node.setDescription(parameters.getParameter("NODEsetDescription"));
                node.setFactoryInitial(parameters.getParameter("NODEsetFactoryInitial"));
                node.setFactoryNamingProvider(parameters.getParameter("NODEsetFactoryNamingProvider"));
                node.setFactoryURLPkgs(parameters.getParameter("NODEsetFactoryURLPkgs"));
                node.setInquiryUrl(parameters.getParameter("NODEsetInquiryUrl"));
                node.setJuddiApiUrl(parameters.getParameter("NODEsetJuddiApiUrl"));
                node.setName(parameters.getParameter("NODEsetName"));
                node.setProxyTransport(parameters.getParameter("NODEsetProxyTransport"));
                node.setPublishUrl(parameters.getParameter("NODEsetPublishUrl"));
                node.setReplicationUrl(parameters.getParameter("NODEsetReplicationUrl"));
                node.setSecurityUrl(parameters.getParameter("NODEsetSecurityUrl"));
                node.setSubscriptionListenerUrl(parameters.getParameter("NODEsetSubscriptionListenerUrl"));
                node.setSubscriptionUrl(parameters.getParameter("NODEsetSubscriptionUrl"));
                sn.getNode().add(node);

                try {
                        juddi.saveNode(sn);
                } catch (Exception ex) {
View Full Code Here

                x.getClientSubscriptionInfo().get(0).setLastModified(null);
                x.getClientSubscriptionInfo().get(0).setLastNotified(null);
                x.getClientSubscriptionInfo().get(0).getFromClerk().setName("ClerkName");
                x.getClientSubscriptionInfo().get(0).getFromClerk().setPublisher("username");
                x.getClientSubscriptionInfo().get(0).getFromClerk().setPassword("password");
                x.getClientSubscriptionInfo().get(0).getFromClerk().setNode(new Node());
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setClientName("clientname");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setName("nodename");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setDescription("description");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setInquiryUrl("http://localhost:8080/juddiv3/services/inquiry");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setPublishUrl("http://localhost:8080/juddiv3/services/publish");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setCustodyTransferUrl("http://localhost:8080/juddiv3/services/custody-transfer");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setSubscriptionUrl("http://localhost:8080/juddiv3/services/subscription");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setSubscriptionListenerUrl("http://localhost:8080/juddiv3/services/subscription-listener");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setJuddiApiUrl("http://localhost:8080/juddiv3/services/juddi-api");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setReplicationUrl("http://localhost:8080/juddiv3/services/replication");
               
                x.getClientSubscriptionInfo().get(0).getToClerk().setName("ClerkName");
                x.getClientSubscriptionInfo().get(0).getToClerk().setPublisher("username");
                x.getClientSubscriptionInfo().get(0).getToClerk().setPassword("password");
                x.getClientSubscriptionInfo().get(0).getToClerk().setNode(new Node());
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setClientName("clientname");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setName("nodename");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setDescription("description");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setInquiryUrl("http://localhost:8080/juddiv3/services/inquiry");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setPublishUrl("http://localhost:8080/juddiv3/services/publish");
View Full Code Here

    Matcher m = sanitizeLabelPattern.matcher(label);
    return m.replaceAll("_");
  }

  private void generateDAGVizFile(TezDAGID dagId, DAGPlan dagPB) {
    Graph graph = new Graph(sanitizeLabelForViz(dagPB.getName()));

    for (VertexPlan v : dagPB.getVertexList()) {
      String nodeLabel = sanitizeLabelForViz(v.getName())
          + "[" + getShortClassName(v.getProcessorDescriptor().getClassName() + "]");
      Graph.Node n = graph.newNode(sanitizeLabelForViz(v.getName()), nodeLabel);
      for (DAGProtos.RootInputLeafOutputProto input : v.getInputsList()) {
        Graph.Node inputNode = graph.getNode(sanitizeLabelForViz(v.getName())
            + "_" + sanitizeLabelForViz(input.getName()));
        inputNode.setLabel(sanitizeLabelForViz(v.getName())
            + "[" + sanitizeLabelForViz(input.getName()) + "]");
        inputNode.setShape("box");
        inputNode.addEdge(n, "Input"
            + " [inputClass=" + getShortClassName(input.getIODescriptor().getClassName())
            + ", initializer=" + getShortClassName(input.getControllerDescriptor().getClassName()) + "]");
      }
      for (DAGProtos.RootInputLeafOutputProto output : v.getOutputsList()) {
        Graph.Node outputNode = graph.getNode(sanitizeLabelForViz(v.getName())
            + "_" + sanitizeLabelForViz(output.getName()));
        outputNode.setLabel(sanitizeLabelForViz(v.getName())
            + "[" + sanitizeLabelForViz(output.getName()) + "]");
        outputNode.setShape("box");
        n.addEdge(outputNode, "Output"
            + " [outputClass=" + getShortClassName(output.getIODescriptor().getClassName())
            + ", initializer=" + getShortClassName(output.getControllerDescriptor().getClassName()) + "]");
      }
    }

    for (DAGProtos.EdgePlan e : dagPB.getEdgeList()) {

      Graph.Node n = graph.getNode(sanitizeLabelForViz(e.getInputVertexName()));
      n.addEdge(graph.getNode(sanitizeLabelForViz(e.getOutputVertexName())),
          "["
          + "input=" + getShortClassName(e.getEdgeSource().getClassName())
          + ", output=" + getShortClassName(e.getEdgeDestination().getClassName())
          + ", dataMovement=" + e.getDataMovementType().name().trim()
          + ", schedulingType=" + e.getSchedulingType().name().trim() + "]");
    }

    String logDirs = System.getenv(Environment.LOG_DIRS.name());
    String outputFile = "";
    if (logDirs != null && !logDirs.isEmpty()) {
      int pos = logDirs.indexOf(",");
      if (pos != -1) {
        outputFile += logDirs.substring(0, pos);
      } else {
        outputFile += logDirs;
      }
      outputFile += File.separator;
    }
    outputFile += dagId.toString() + ".dot";

    try {
      LOG.info("Generating DAG graphviz file"
          + ", dagId=" + dagId.toString()
          + ", filePath=" + outputFile);
      graph.save(outputFile);
    } catch (Exception e) {
      LOG.warn("Error occurred when trying to save graph structure"
          + " for dag " + dagId.toString(), e);
    }
  }
View Full Code Here

    }
    return className;
  }

  private void generateDAGVizFile(TezDAGID dagId, DAGPlan dagPB) {
    Graph graph = new Graph(dagPB.getName());

    for (VertexPlan v : dagPB.getVertexList()) {
      String nodeLabel = v.getName().replace("\\W","_")
          + "[" + getShortClassName(v.getProcessorDescriptor().getClassName() + "]");
      Graph.Node n = graph.newNode(v.getName(), nodeLabel);
      for (DAGProtos.RootInputLeafOutputProto input : v.getInputsList()) {
        Graph.Node inputNode = graph.getNode(v.getName()
            + "_" + input.getName());
        inputNode.setLabel(v.getName() + "[" + input.getName() + "]");
        inputNode.setShape("box");
        inputNode.addEdge(n, "Input"
            + " [inputClass=" + getShortClassName(input.getEntityDescriptor().getClassName())
            + ", initializer=" + getShortClassName(input.getInitializerClassName()) + "]");
      }
      for (DAGProtos.RootInputLeafOutputProto output : v.getOutputsList()) {
        Graph.Node outputNode = graph.getNode(v.getName()
            + "_" + output.getName());
        outputNode.setLabel(v.getName() + "[" + output.getName() + "]");
        outputNode.setShape("box");
        n.addEdge(outputNode, "Output"
            + " [outputClass=" + getShortClassName(output.getEntityDescriptor().getClassName())
            + ", initializer=" + getShortClassName(output.getInitializerClassName()) + "]");
      }
    }

    for (DAGProtos.EdgePlan e : dagPB.getEdgeList()) {

      Graph.Node n = graph.getNode(e.getInputVertexName());
      n.addEdge(graph.getNode(e.getOutputVertexName()),
          "["
          + "input=" + getShortClassName(e.getEdgeSource().getClassName())
          + ", output=" + getShortClassName(e.getEdgeDestination().getClassName())
          + ", dataMovement=" + e.getDataMovementType().name().trim()
          + ", schedulingType=" + e.getSchedulingType().name().trim() + "]");
    }

    String logDirs = System.getenv(Environment.LOG_DIRS.name());
    String outputFile = "";
    if (logDirs != null && !logDirs.isEmpty()) {
      int pos = logDirs.indexOf(",");
      if (pos != -1) {
        outputFile += logDirs.substring(0, pos);
      } else {
        outputFile += logDirs;
      }
      outputFile += File.separator;
    }
    outputFile += dagId.toString() + ".dot";

    try {
      graph.save(outputFile);
    } catch (IOException e) {
      LOG.warn("Error occurred when trying to save graph structure"
          + " for dag " + dagId.toString(), e);
    }
  }
View Full Code Here

    Matcher m = sanitizeLabelPattern.matcher(label);
    return m.replaceAll("_");
  }

  private void generateDAGVizFile(TezDAGID dagId, DAGPlan dagPB) {
    Graph graph = new Graph(sanitizeLabelForViz(dagPB.getName()));

    for (VertexPlan v : dagPB.getVertexList()) {
      String nodeLabel = sanitizeLabelForViz(v.getName())
          + "[" + getShortClassName(v.getProcessorDescriptor().getClassName() + "]");
      Graph.Node n = graph.newNode(sanitizeLabelForViz(v.getName()), nodeLabel);
      for (DAGProtos.RootInputLeafOutputProto input : v.getInputsList()) {
        Graph.Node inputNode = graph.getNode(sanitizeLabelForViz(v.getName())
            + "_" + sanitizeLabelForViz(input.getName()));
        inputNode.setLabel(sanitizeLabelForViz(v.getName())
            + "[" + sanitizeLabelForViz(input.getName()) + "]");
        inputNode.setShape("box");
        inputNode.addEdge(n, "Input"
            + " [inputClass=" + getShortClassName(input.getEntityDescriptor().getClassName())
            + ", initializer=" + getShortClassName(input.getInitializerClassName()) + "]");
      }
      for (DAGProtos.RootInputLeafOutputProto output : v.getOutputsList()) {
        Graph.Node outputNode = graph.getNode(sanitizeLabelForViz(v.getName())
            + "_" + sanitizeLabelForViz(output.getName()));
        outputNode.setLabel(sanitizeLabelForViz(v.getName())
            + "[" + sanitizeLabelForViz(output.getName()) + "]");
        outputNode.setShape("box");
        n.addEdge(outputNode, "Output"
            + " [outputClass=" + getShortClassName(output.getEntityDescriptor().getClassName())
            + ", initializer=" + getShortClassName(output.getInitializerClassName()) + "]");
      }
    }

    for (DAGProtos.EdgePlan e : dagPB.getEdgeList()) {

      Graph.Node n = graph.getNode(sanitizeLabelForViz(e.getInputVertexName()));
      n.addEdge(graph.getNode(sanitizeLabelForViz(e.getOutputVertexName())),
          "["
          + "input=" + getShortClassName(e.getEdgeSource().getClassName())
          + ", output=" + getShortClassName(e.getEdgeDestination().getClassName())
          + ", dataMovement=" + e.getDataMovementType().name().trim()
          + ", schedulingType=" + e.getSchedulingType().name().trim() + "]");
    }

    String logDirs = System.getenv(Environment.LOG_DIRS.name());
    String outputFile = "";
    if (logDirs != null && !logDirs.isEmpty()) {
      int pos = logDirs.indexOf(",");
      if (pos != -1) {
        outputFile += logDirs.substring(0, pos);
      } else {
        outputFile += logDirs;
      }
      outputFile += File.separator;
    }
    outputFile += dagId.toString() + ".dot";

    try {
      LOG.info("Generating DAG graphviz file"
          + ", dagId=" + dagId.toString()
          + ", filePath=" + outputFile);
      graph.save(outputFile);
    } catch (Exception e) {
      LOG.warn("Error occurred when trying to save graph structure"
          + " for dag " + dagId.toString(), e);
    }
  }
View Full Code Here

    Matcher m = sanitizeLabelPattern.matcher(label);
    return m.replaceAll("_");
  }

  private void generateDAGVizFile(TezDAGID dagId, DAGPlan dagPB) {
    Graph graph = new Graph(sanitizeLabelForViz(dagPB.getName()));

    for (VertexPlan v : dagPB.getVertexList()) {
      String nodeLabel = sanitizeLabelForViz(v.getName())
          + "[" + getShortClassName(v.getProcessorDescriptor().getClassName() + "]");
      Graph.Node n = graph.newNode(sanitizeLabelForViz(v.getName()), nodeLabel);
      for (DAGProtos.RootInputLeafOutputProto input : v.getInputsList()) {
        Graph.Node inputNode = graph.getNode(sanitizeLabelForViz(v.getName())
            + "_" + sanitizeLabelForViz(input.getName()));
        inputNode.setLabel(sanitizeLabelForViz(v.getName())
            + "[" + sanitizeLabelForViz(input.getName()) + "]");
        inputNode.setShape("box");
        inputNode.addEdge(n, "Input"
            + " [inputClass=" + getShortClassName(input.getEntityDescriptor().getClassName())
            + ", initializer=" + getShortClassName(input.getInitializerClassName()) + "]");
      }
      for (DAGProtos.RootInputLeafOutputProto output : v.getOutputsList()) {
        Graph.Node outputNode = graph.getNode(sanitizeLabelForViz(v.getName())
            + "_" + sanitizeLabelForViz(output.getName()));
        outputNode.setLabel(sanitizeLabelForViz(v.getName())
            + "[" + sanitizeLabelForViz(output.getName()) + "]");
        outputNode.setShape("box");
        n.addEdge(outputNode, "Output"
            + " [outputClass=" + getShortClassName(output.getEntityDescriptor().getClassName())
            + ", initializer=" + getShortClassName(output.getInitializerClassName()) + "]");
      }
    }

    for (DAGProtos.EdgePlan e : dagPB.getEdgeList()) {

      Graph.Node n = graph.getNode(sanitizeLabelForViz(e.getInputVertexName()));
      n.addEdge(graph.getNode(sanitizeLabelForViz(e.getOutputVertexName())),
          "["
          + "input=" + getShortClassName(e.getEdgeSource().getClassName())
          + ", output=" + getShortClassName(e.getEdgeDestination().getClassName())
          + ", dataMovement=" + e.getDataMovementType().name().trim()
          + ", schedulingType=" + e.getSchedulingType().name().trim() + "]");
    }

    String logDirs = System.getenv(Environment.LOG_DIRS.name());
    String outputFile = "";
    if (logDirs != null && !logDirs.isEmpty()) {
      int pos = logDirs.indexOf(",");
      if (pos != -1) {
        outputFile += logDirs.substring(0, pos);
      } else {
        outputFile += logDirs;
      }
      outputFile += File.separator;
    }
    outputFile += dagId.toString() + ".dot";

    try {
      LOG.info("Generating DAG graphviz file"
          + ", dagId=" + dagId.toString()
          + ", filePath=" + outputFile);
      graph.save(outputFile);
    } catch (Exception e) {
      LOG.warn("Error occurred when trying to save graph structure"
          + " for dag " + dagId.toString(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.tez.dag.utils.Graph$Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.