Package org.voltdb.messaging

Examples of org.voltdb.messaging.FastDeserializer.readObject()


            ByteString bs = result.getDepData(i);
            VoltTable vt = null;
            if (bs.isEmpty() == false) {
                FastDeserializer fd = new FastDeserializer(bs.asReadOnlyByteBuffer());
                try {
                    vt = fd.readObject(VoltTable.class);
                    if (trace.val)
                        LOG.trace(String.format("Displaying results from partition %d for %s :: \n %s",
                                  result.getPartitionId(), ts, vt.toString()));                   
                } catch (Exception ex) {
                    throw new ServerFaultException("Failed to deserialize VoltTable from partition " + result.getPartitionId() + " for " + ts, ex);
View Full Code Here


                   }
               }
               while (message.hasRemaining());
               message.flip();
               FastDeserializer fds = new FastDeserializer(message);
               ClientResponseImpl response = fds.readObject(ClientResponseImpl.class);
               return response;
           }
        });
    }
   
View Full Code Here

                messageBuffer.rewind();

                final FastDeserializer fds = new FastDeserializer(messageBuffer);
                final VoltTable results[] = new VoltTable[1];
                final VoltTable resultTable = PrivateVoltTableFactory.createUninitializedVoltTable();
                results[0] = (VoltTable)fds.readObject(resultTable, this);
                return results;
            }
        } catch (final IOException e) {
            System.out.println("Exception: " + e.getMessage());
            throw new RuntimeException(e);
View Full Code Here

        @Override
        public void handleMessage(ByteBuffer buf, Connection c) {
            ClientResponseImpl response = null;
            FastDeserializer fds = new FastDeserializer(buf);
            try {
                response = fds.readObject(ClientResponseImpl.class);
            } catch (IOException e) {
                LOG.error("Invalid ClientResponse object returned by " + this, e);
                return;
            }
            if (response == null) {
View Full Code Here

            for (int ii = 0; ii < tables.length; ii++) {
                final int dependencyCount = ds.readInt(); // ignore the table count
                assert(dependencyCount == 1); //Expect one dependency generated per plan fragment
                ds.readInt(); // ignore the dependency ID
                tables[ii] = (VoltTable) ds.readObject(tables[ii], null);
            }
        }

        /**
         * Read the result dependencies returned from the execution of a plan fragment.
View Full Code Here

            final int[] depIds = new int[numDependencies];
            final VoltTable[] dependencies = new VoltTable[numDependencies];
            final FastDeserializer fds = new FastDeserializer(depsBuff);
            for (int ii = 0; ii < numDependencies; ++ii) {
                depIds[ii] = fds.readInt();
                dependencies[ii] = fds.readObject(VoltTable.class);
            }
            assert(depIds.length == 1);

            // and finally return the constructed dependency set
            return new DependencySet(depIds, dependencies);
View Full Code Here

    public static StoredProcedureInvocation decodeRequest(byte[] bytes) {
        final FastDeserializer fds = new FastDeserializer(ByteBuffer.wrap(bytes));
        StoredProcedureInvocation task;
        try {
            task = fds.readObject(StoredProcedureInvocation.class);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        task.buildParameterSet();
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.