Package org.voltdb.exceptions

Examples of org.voltdb.exceptions.ServerFaultException


                this.fstream.write(b.b.asReadOnlyBuffer());
                this.fstream.force(true);
                this.singletonLogEntry.finish();
            } catch (Exception e) {
                String message = "Failed to write single log entry for " + ts.toString();
                throw new ServerFaultException(message, e, ts.getTransactionId());
            }
        }
       
        return (sendResponse);
    }
View Full Code Here


                try {
                    procParams = fds.readObject(ParameterSet.class);
                } catch (Exception ex) {
                    String msg = String.format("Failed to deserialize procedure ParameterSet for txn #%d from %s",
                                               txn_id, request.getClass().getSimpleName());
                    throw new ServerFaultException(msg, ex, txn_id);
                }
            }
           
            // If we don't have a handle, we need to make one so that we can stick in the
            // things that we need to keep track of at this site. At this point we know that we're on
View Full Code Here

        // we don't know about.
        LocalTransaction ts = hstore_site.getTransaction(txn_id);
        if (ts == null) {
            String msg = String.format("Unexpected transaction id %d for incoming %s",
                                       txn_id, request.getClass().getSimpleName());
            throw new ServerFaultException(msg, txn_id);
        }
       
        // We want to store this before sending back the acknowledgment so that the transaction can get
        // access to it right away
        PartitionExecutor executor = hstore_site.getPartitionExecutor(ts.getBasePartition());
View Full Code Here

            fd.setBuffer(rawParams.get(i).asReadOnlyByteBuffer());
            try {
                params[i] = fd.readObject(ParameterSet.class);
            } catch (IOException ex) {
                String msg = "Failed to deserialize pre-fetch ParameterSet at offset #" + i;
                throw new ServerFaultException(msg, ex, ts.getTransactionId());
            }
            if (debug.val)
                LOG.debug(String.format("%s - Prefetch ParameterSet [%02d] -> %s",
                          ts, i, params[i]));
        } // FOR
View Full Code Here

                        String msg = String.format("Unable to get %s value for %s in %s\n" +
                                               "ProcParams: %s\nParameterMapping: %s",
                                                   catalog_param.fullName(), ts, counted_stmt,
                                                   procParams, pm);
                        LOG.error(msg, ex);
                        throw new ServerFaultException(msg, ex, ts.getTransactionId());
                    }
                }
                else {
                    ProcParameter catalog_proc_param = pm.procedure_parameter;
                    assert(catalog_proc_param != null) :
View Full Code Here

                              txn_id, i, fds.buffer()));
                try {
                    parameterSets[i] = fds.readObject(ParameterSet.class);
                } catch (Exception ex) {
                    String msg = String.format("Failed to deserialize ParameterSet[%d] for txn #%d TransactionRequest", i, txn_id);
                    throw new ServerFaultException(msg, ex, txn_id);
                }
                // LOG.info("PARAMETER[" + i + "]: " + parameterSets[i]);
            } else {
                parameterSets[i] = ParameterSet.EMPTY;
            }
        } // FOR
        ts.attachParameterSets(parameterSets);
       
        // Deserialize attached VoltTable input dependencies
        FastDeserializer fds = null;
        VoltTable vt = null;
        for (int i = 0, cnt = request.getAttachedDataCount(); i < cnt; i++) {
            int input_dep_id = request.getAttachedDepId(i);
            ByteString data = request.getAttachedData(i);
            if (data.isEmpty()) {
                String msg = String.format("%s input dependency %d is empty", ts, input_dep_id);
                LOG.warn(msg + "\n" + request);
                throw new ServerFaultException(msg, txn_id);
            }
           
            if (fds == null) fds = new FastDeserializer(data.asReadOnlyByteBuffer());
            else fds.setBuffer(data.asReadOnlyByteBuffer());

            vt = null;
            try {
                vt = fds.readObject(VoltTable.class);
            } catch (Exception ex) {
                String msg = String.format("Failed to deserialize VoltTable[%d] for txn #%d", input_dep_id, txn_id);
                throw new ServerFaultException(msg, ex, txn_id);
            }
            assert(vt != null);
            ts.attachInputDependency(input_dep_id, vt);
        } // FOR
       
View Full Code Here

                eeTemp.tick(this.lastTickTime, 0);
            }
        }
        // just print error info an bail if we run into an error here
        catch (final Exception ex) {
            throw new ServerFaultException("Failed to initialize PartitionExecutor", ex);
        }
        this.ee = eeTemp;
        this.hsql = hsqlTemp;
        m_snapshotter = snapshotter;
        assert(this.ee != null);
View Full Code Here

        // -------------------------------
        // BAD MOJO!
        // -------------------------------
        else {
            String msg = "Unexpected work message in queue: " + work;
            throw new ServerFaultException(msg, this.currentTxnId);
        }
    }
View Full Code Here

            final String className = catalog_proc.getClassname();
            try {
                p_class = (Class<? extends VoltProcedure>)Class.forName(className);
                volt_proc = (VoltProcedure)p_class.newInstance();
            } catch (Exception e) {
                throw new ServerFaultException("Failed to created VoltProcedure instance for " + catalog_proc.getName() , e);
            }
           
        } else {
            volt_proc = new VoltProcedure.StmtProcedure();
        }
View Full Code Here

                      work.getClass().getSimpleName(), ts.getProcedure().getName(), this.partitionId,
                      this.currentDtxn, this.work_queue.size(), this.currentExecMode));
        boolean success = this.work_queue.offer(work); // , force);
        if (debug.val && force && success == false) {
            String msg = String.format("Failed to add %s even though force flag was true!", ts);
            throw new ServerFaultException(msg, ts.getTransactionId());
        }
        if (success && hstore_conf.site.specexec_enable) this.specExecScheduler.interruptSearch(work);
        return (success);
    }
View Full Code Here

TOP

Related Classes of org.voltdb.exceptions.ServerFaultException

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.