Package edu.brown.designer

Examples of edu.brown.designer.DesignerVertex


    }

    @Override
    public void generate(final PartitionTree ptree) throws Exception {
        for (Table catalog_tbl : pplan.getRoots()) {
            DesignerVertex root = info.dgraph.getVertex(catalog_tbl);
            LOG.debug("ROOT: " + root);

            // Walk down the paths in the plans and create the partition tree
            // that represents the PartitionPlan
            new VertexTreeWalker<DesignerVertex, DesignerEdge>(info.dgraph) {
                protected void populate_children(VertexTreeWalker.Children<DesignerVertex> children, DesignerVertex element) {
                    Set<Table> element_children = pplan.getChildren((Table) element.getCatalogItem());
                    if (element_children != null) {
                        for (Table child_tbl : element_children) {
                            DesignerVertex child = info.dgraph.getVertex(child_tbl);
                            children.addAfter(child);
                        } // FOR
                    }
                    return;
                }

                @Override
                protected void callback(DesignerVertex element) {
                    TableEntry entry = PartitionPlanTreeGenerator.this.pplan.getTableEntries().get((Table) element.getCatalogItem());
                    // Bad Mojo!
                    if (entry == null) {
                        LOG.warn("ERROR: No PartitionPlan entry for '" + element + "'");
                        // Non-Root
                    } else if (entry.getParent() != null) {
                        LOG.debug("Trying to create: " + entry.getParent() + "->" + element);
                        DesignerVertex parent = info.dgraph.getVertex(entry.getParent());

                        element.setAttribute(ptree, PartitionTree.VertexAttributes.ATTRIBUTE.name(), entry.getAttribute());
                        element.setAttribute(ptree, PartitionTree.VertexAttributes.METHOD.name(), entry.getMethod());

                        if (parent != null && !ptree.containsVertex(element)) {
View Full Code Here


                ObjectHistogram<Column> join_column_histogram = new ObjectHistogram<Column>();
                ObjectHistogram<Column> self_column_histogram = new ObjectHistogram<Column>();
                // Map<Column, Double> unsorted = new HashMap<Column, Double>();
                for (DesignerEdge e : edges) {
                    Collection<DesignerVertex> vertices = agraph.getIncidentVertices(e);
                    DesignerVertex v0 = CollectionUtil.get(vertices, 0);
                    DesignerVertex v1 = CollectionUtil.get(vertices, 1);
                    boolean self = (v0.equals(v) && v1.equals(v));
                    column_histogram = (self ? self_column_histogram : join_column_histogram);

                    double edge_weight = e.getTotalWeight();
                    PredicatePairs cset = e.getAttribute(AccessGraph.EdgeAttributes.COLUMNSET);
                    if (trace.val)
View Full Code Here

TOP

Related Classes of edu.brown.designer.DesignerVertex

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.