Package org.voltdb.VoltProcedure

Examples of org.voltdb.VoltProcedure.VoltAbortException


    public VoltTable[] run(long p, byte shouldRollback) {
        voltQueueSQL(max);
        VoltTable[] results = voltExecuteSQL(true);
        if (results[0].getRowCount() != 1) {
            throw new VoltAbortException("rowcount for max is not one");
        }
        if (shouldRollback != 0) {
            throw new VoltAbortException("EXPECTED ROLLBACK");
        }
        return results;
    }
View Full Code Here


        String fullMsg = "Expectation failing in procedure: " + procedureName + "\n";
        fullMsg += "  Running SQL: " + stmt.getText() + "\n";
        fullMsg += "  Error message: " + errMsg;

        throw new VoltAbortException(fullMsg);
    }
View Full Code Here

            boolean undo)
    throws VoltAbortException
    {
        Cluster cluster = m_context.cluster;
        if (cluster == null) {
            throw new VoltAbortException("cluster '" + clusterName + "' does not exist");
        }
        Database db = cluster.getDatabases().get(databaseName);
        if (db == null) {
            throw new VoltAbortException("database '" + databaseName + "' does not exist in cluster " + clusterName);
        }
        Table table = db.getTables().getIgnoreCase(tableName);
        if (table == null) {
            throw new VoltAbortException("table '" + tableName + "' does not exist in database " + clusterName + "." + databaseName);
        }

        return loadTable(txnId, spHandle, table.getRelativeIndex(), data, returnUniqueViolations, shouldDRStream, undo);
    }
View Full Code Here

            String tableName, VoltTable data,
            boolean returnUniqueViolations, boolean shouldDRStream, boolean undo) throws VoltAbortException
    {
        Cluster cluster = m_context.cluster;
        if (cluster == null) {
            throw new VoltAbortException("cluster '" + clusterName + "' does not exist");
        }
        Database db = cluster.getDatabases().get(databaseName);
        if (db == null) {
            throw new VoltAbortException("database '" + databaseName + "' does not exist in cluster " + clusterName);
        }
        Table table = db.getTables().getIgnoreCase(tableName);
        if (table == null) {
            throw new VoltAbortException("table '" + tableName + "' does not exist in database " + clusterName + "." + databaseName);
        }

        return loadTable(txnId, spHandle, table.getRelativeIndex(), data, returnUniqueViolations, shouldDRStream, undo);
    }
View Full Code Here

TOP

Related Classes of org.voltdb.VoltProcedure.VoltAbortException

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.