Examples of PigActionWidget


Examples of org.apache.oozie.tools.workflowgenerator.client.widget.action.PigActionWidget

                    w.setName("Pipes_".concat(nodeCount.get(NodeType.PIPES) != null ? nodeCount.get(NodeType.PIPES)
                            .toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                }
                else if (name.equals("Pig")) {
                    PigActionWidget w = new PigActionWidget(OozieWorkflowGenerator.this);
                    w.setName("Pig_".concat(nodeCount.get(NodeType.PIG) != null ? nodeCount.get(NodeType.PIG)
                            .toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                }
                else if (name.equals("Java")) {
                    JavaActionWidget w = new JavaActionWidget(OozieWorkflowGenerator.this);
                    w.setName("Java_".concat(nodeCount.get(NodeType.JAVA) != null ? nodeCount.get(NodeType.JAVA)
                            .toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                }
                else if (name.equals("FS")) {
                    FSActionWidget w = new FSActionWidget(OozieWorkflowGenerator.this);
                    w.setName("FS_".concat(nodeCount.get(NodeType.FS) != null ? nodeCount.get(NodeType.FS).toString()
                            : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                }
                else if (name.equals("SSH")) {
                    SSHActionWidget w = new SSHActionWidget(OozieWorkflowGenerator.this);
                    w.setName("SSH_".concat(nodeCount.get(NodeType.SSH) != null ? nodeCount.get(NodeType.SSH)
                            .toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));

                }
                else if (name.equals("Email")) {
                    EmailActionWidget w = new EmailActionWidget(OozieWorkflowGenerator.this);
                    w.setName("Email_".concat(nodeCount.get(NodeType.EMAIL) != null ? nodeCount.get(NodeType.EMAIL)
                            .toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));

                }
                else if (name.equals("Shell")) {
                    ShellActionWidget w = new ShellActionWidget(OozieWorkflowGenerator.this);
                    w.setName("Shell_".concat(nodeCount.get(NodeType.SHELL) != null ? nodeCount.get(NodeType.SHELL)
                            .toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));

                }
                else if (name.equals("Subworkflow")) {
                    SubWFActionWidget w = new SubWFActionWidget(OozieWorkflowGenerator.this);
                    w.setName("SubWF_".concat(nodeCount.get(NodeType.SUBWF) != null ? nodeCount.get(NodeType.SUBWF)
                            .toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));

                }
                else if (name.equals("Start")) {
                    if (start == null) {
                        StartNodeWidget w = new StartNodeWidget(OozieWorkflowGenerator.this);
                        start = w;
                        addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                    }
                }
                else if (name.equals("End")) {
                    if (end == null) {
                        EndNodeWidget w = new EndNodeWidget(OozieWorkflowGenerator.this);
                        w.setName("End");
                        end = w;
                        addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                    }
                }
                else if (name.equals("Kill")) {
                    if (kill == null) {
                        KillNodeWidget w = new KillNodeWidget(OozieWorkflowGenerator.this);
                        w.setName("Kill");
                        kill = w;
                        addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                    }
                }
                else if (name.equals("Fork/Join")) {
                    ForkNodeWidget fork = new ForkNodeWidget(OozieWorkflowGenerator.this);
                    fork.setName("Fork_".concat(nodeCount.get(NodeType.FORK) != null ? nodeCount.get(NodeType.FORK)
                            .toString() : "0"));
                    addWidget(fork, 30 + Random.nextInt(30), 30 + Random.nextInt(30));

                    JoinNodeWidget join = new JoinNodeWidget(OozieWorkflowGenerator.this);
                    join.setName("Join_".concat(nodeCount.get(NodeType.JOIN) != null ? nodeCount.get(NodeType.JOIN)
                            .toString() : "0"));
                    addWidget(join, 90 + Random.nextInt(30), 30 + Random.nextInt(30));

                }
                else if (name.equals("Decision")) {
                    DecisionNodeWidget w = new DecisionNodeWidget(OozieWorkflowGenerator.this);
                    w.setName("Decision_".concat(nodeCount.get(NodeType.DECISION) != null ? nodeCount.get(
                            NodeType.DECISION).toString() : "0"));
                    addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
                }
            }
        });
View Full Code Here

Examples of org.apache.oozie.tools.workflowgenerator.client.widget.action.PigActionWidget

        Command pig_cmd = new Command() {

            public void execute() {
                clear();
                initWidget();
                PigActionWidget pig = new PigActionWidget(OozieWorkflowGenerator.this);
                pig.setName("Pig_0");
                addWidget(pig, 300, 100);
                ((OozieDiagramController) controller).addConnection(start, pig);
                ((OozieDiagramController) controller).addConnection(pig, end);
                pig.updateOnSelection();
            }
        };

        Command java_cmd = new Command() {

            public void execute() {
                clear();
                initWidget();
                JavaActionWidget java = new JavaActionWidget(OozieWorkflowGenerator.this);
                java.setName("Java_0");
                addWidget(java, 300, 100);
                ((OozieDiagramController) controller).addConnection(start, java);
                ((OozieDiagramController) controller).addConnection(java, end);
                java.updateOnSelection();
            }
        };

        Command forkjoin_cmd = new Command() {

            public void execute() {
                clear();
                initWidget();
                ForkNodeWidget fork = new ForkNodeWidget(OozieWorkflowGenerator.this);
                fork.setName("Fork_0");
                addWidget(fork, 150, 100);
                ((OozieDiagramController) controller).addConnection(start, fork);

                MapReduceActionWidget mr = new MapReduceActionWidget(OozieWorkflowGenerator.this);
                mr.setName("MR_0");
                addWidget(mr, 300, 30);
                ((OozieDiagramController) controller).addMultiConnection(fork, mr);

                PigActionWidget pig = new PigActionWidget(OozieWorkflowGenerator.this);
                pig.setName("Pig_0");
                addWidget(pig, 300, 200);
                ((OozieDiagramController) controller).addMultiConnection(fork, pig);

                JoinNodeWidget join = new JoinNodeWidget(OozieWorkflowGenerator.this);
                join.setName("Join_0");
                addWidget(join, 450, 100);
                ((OozieDiagramController) controller).addConnection(mr, join);
                ((OozieDiagramController) controller).addConnection(pig, join);
                ((OozieDiagramController) controller).addConnection(join, end);

                fork.updateOnSelection();
                join.updateOnSelection();
                mr.updateOnSelection();
                pig.updateOnSelection();
            }
        };

        Command clear_cmd = new Command() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.