Examples of StreamHeader


Examples of org.apache.cassandra.streaming.StreamHeader

                        return;
                    }
                    int size = input.readInt();
                    byte[] headerBytes = new byte[size];
                    input.readFully(headerBytes);
                    StreamHeader streamHeader = StreamHeader.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(headerBytes)));
                    new IncomingStreamReader(streamHeader, socket.getChannel()).read();
                    break;
                }
                else
                {
View Full Code Here

Examples of org.apache.cassandra.streaming.StreamHeader

                        return;
                    }
                    int size = input.readInt();
                    byte[] headerBytes = new byte[size];
                    input.readFully(headerBytes);
                    StreamHeader streamHeader = StreamHeader.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(headerBytes)));
                    new IncomingStreamReader(streamHeader, socket.getChannel()).read();
                    break;
                }
                else
                {
View Full Code Here

Examples of org.apache.cassandra.streaming.StreamHeader

                if (isStream)
                {
                    int size = input.readInt();
                    byte[] headerBytes = new byte[size];
                    input.readFully(headerBytes);
                    StreamHeader streamHeader = StreamHeader.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(headerBytes)));
                    new IncomingStreamReader(streamHeader, socket.getChannel()).read();
                }
                else
                {
                    int size = input.readInt();
View Full Code Here

Examples of org.apache.cassandra.streaming.StreamHeader

                if (isStream)
                {
                    int size = input.readInt();
                    byte[] headerBytes = new byte[size];
                    input.readFully(headerBytes);
                    StreamHeader streamHeader = StreamHeader.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(headerBytes)));
                    new IncomingStreamReader(streamHeader, socket.getChannel()).read();
                }
                else
                {
                    int size = input.readInt();
View Full Code Here

Examples of org.apache.cassandra.streaming.StreamHeader

        for (SSTableReader sstable : loader.openSSTables())
        {
            Descriptor desc = sstable.descriptor;
            List<Pair<Long, Long>> sections = Lists.newArrayList(Pair.create(0L, sstable.onDiskLength()));
            PendingFile pending = new PendingFile(sstable, desc, SSTable.COMPONENT_DATA, sections, OperationType.BULK_LOAD);
            StreamHeader header = new StreamHeader(directory.getName(), UUID.randomUUID(), pending, Collections.singleton(pending));
            logger.info("Streaming to {}", InetAddress.getLocalHost());
            new FileStreamTask(header, InetAddress.getLocalHost()).run();
            logger.info("Done Streaming: " + pending.toString());
            sstable.releaseReference();
            pendingFiles.add(pending);
View Full Code Here

Examples of org.apache.cassandra.streaming.StreamHeader

                if (isStream)
                {
                    int size = input.readInt();
                    byte[] headerBytes = new byte[size];
                    input.readFully(headerBytes);
                    StreamHeader streamHeader = StreamHeader.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(headerBytes)));
                    new IncomingStreamReader(streamHeader, socket.getChannel()).read();
                }
                else
                {
                    int size = input.readInt();
View Full Code Here

Examples of org.jboss.marshalling.StreamHeader

    public RiverVersionZeroMarshallerFactoryTestMarshallerProviderImpl(final MarshallerFactory factory) {
        super(factory, 0);
    }

    public Marshaller create(final MarshallingConfiguration config, final ByteOutput target) throws IOException {
        final StreamHeader header = config.getStreamHeader();
        config.setStreamHeader(new StreamHeader() {
            public void readHeader(final ByteInput input) throws IOException {
                if (header != null) header.readHeader(input);
            }

            public void writeHeader(final ByteOutput output) throws IOException {
                if (header != null) header.writeHeader(output);
                output.write(0);
            }
        });
        return super.create(config, target);
    }
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.