Package org.voltdb.compiler

Examples of org.voltdb.compiler.PlannerTool$Result


    } catch (Exception e) {
      e.printStackTrace();
    }
     
    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    dr.getResult().add(res);
    return dr;
  }
View Full Code Here


                List<Result> r = new ArrayList<Result>();
                if (result == null) {
                        return r;
                }
                for (int i = 0; i < result.size(); i++) {
                        Result x = new Result();
                        x.setErrno(result.get(i).getErrno());
                        if (result.get(i).getKeyType() != null) {
                                switch (result.get(i).getKeyType()) {
                                        case BINDING_KEY:
                                                x.setKeyType(KeyType.BINDING_KEY);
                                                break;
                                        case BUSINESS_KEY:
                                                x.setKeyType(KeyType.BUSINESS_KEY);
                                                break;
                                        case SERVICE_KEY:
                                                x.setKeyType(KeyType.SERVICE_KEY);
                                                break;
                                        case T_MODEL_KEY:
                                                x.setKeyType(KeyType.T_MODEL_KEY);
                                                break;
                                }
                        }
                        if (result.get(i).getErrInfo() != null) {
                                x.setErrInfo(new ErrInfo());
                                x.getErrInfo().setErrCode(result.get(i).getErrInfo().getErrCode());
                                x.getErrInfo().setValue(result.get(i).getErrInfo().getValue());
                        }
                        r.add(x);
                }
                return r;
        }
View Full Code Here

                        while (result.getDetail().getDetailEntries().hasNext()) {
                                Object next = result.getDetail().getDetailEntries().next();
                                if (next instanceof DispositionReport) {

                                        DispositionReport z = (DispositionReport) next;
                                        Result x = new Result();
                                        r.addAll(MapResult(z.getFaultInfo().getResult()));

                                }
                                logger.warn("unable to parse fault detail, type:" + next.getClass().getCanonicalName() + " " + next.toString());
                        }
View Full Code Here

                        } catch (Exception ex) {
                                log.warn("Your implementation on ISubscriptionCallback is faulty and threw an error, contact the developer", ex);
                        }
                }
                DispositionReport r = new DispositionReport();
                r.getResult().add(new Result());
                return r;
        }
View Full Code Here

                @WebParam(name = "validate_values", targetNamespace = "urn:uddi-org:vs_v3", partName = "body") ValidateValues body)
                throws DispositionReportFaultMessage, RemoteException {
                messagesReceived++;
                if (VALID) {
                        DispositionReport dispositionReport = new DispositionReport();
                        dispositionReport.getResult().add(new Result());
                        return dispositionReport;
                }
                DispositionReport dispositionReport = new DispositionReport();
                Result r = new Result();
                r.setKeyType(KeyType.T_MODEL_KEY);
                r.setErrno(20200);
                r.setErrInfo(new ErrInfo());
                r.getErrInfo().setErrCode("E_invalidValue");
                r.getErrInfo().setValue("E_invalidValue");
               
                dispositionReport.getResult().add(r);
                throw new DispositionReportFaultMessage("error", dispositionReport);
        }
View Full Code Here

                }
                if (!success) {
                        throw new DispositionReportFaultMessage(err, null);
                }
                DispositionReport dr = new DispositionReport();
                Result res = new Result();
                dr.getResult().add(res);

                return dr;
        }
View Full Code Here

        String serializedCatalog = CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());
        Catalog catalog = new Catalog();
        catalog.execute(serializedCatalog);
        CatalogContext context = new CatalogContext(0, 0, catalog, bytes, null, 0, 0);

        m_pt = new PlannerTool(context.cluster, context.database, 0);

        AdHocPlannedStatement result = null;
        result = m_pt.planSqlForTest("select * from warehouse;");
        System.out.println(result);

View Full Code Here

        assertNotNull(serializedCatalog);
        Catalog c = new Catalog();
        c.execute(serializedCatalog);
        CatalogContext context = new CatalogContext(0, 0, c, bytes, null, 0, 0);

        m_pt = new PlannerTool(context.cluster, context.database, 0);

        // Bad DDL would kill the planner before it starts and this query
        // would return a Stream Closed error
        m_pt.planSqlForTest("select * from A;");
    }
View Full Code Here

        procedures = database.getProcedures();
        tables = database.getTables();
        authSystem = new AuthSystem(database, cluster.getSecurityenabled());
        this.deploymentHash = deploymentHash;
        m_jdbc = new JdbcDatabaseMetaDataGenerator(catalog, m_jarfile);
        m_ptool = new PlannerTool(cluster, database, version);
        catalogVersion = version;

        if (procedures != null) {
            for (Procedure proc : procedures) {
                if (proc.getSinglepartition()) {
View Full Code Here

        byte[] bytes = MiscUtils.fileToBytes(new File(config.m_pathToCatalog));
        String serializedCatalog = CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());
        Catalog catalog = new Catalog();
        catalog.execute(serializedCatalog);
        CatalogContext context = new CatalogContext(0, 0, catalog, bytes, null, 0, 0);
        m_pt = new PlannerTool(context.cluster, context.database, 0);
    }
View Full Code Here

TOP

Related Classes of org.voltdb.compiler.PlannerTool$Result

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.