Package io.crate.executor.transport.distributed

Examples of io.crate.executor.transport.distributed.DistributedResultRequest.readFrom()


        DistributedRequestContextManager contextManager =
                new DistributedRequestContextManager(new DummyDownstreamOperationFactory(rows), functions,
                        new StatsTables(ImmutableSettings.EMPTY, mock(NodeSettingsService.class)));
        BytesStreamInput streamInput = new BytesStreamInput(streamOutput.bytes());
        DistributedResultRequest requestReceiver = new DistributedResultRequest(contextManager);
        requestReceiver.readFrom(streamInput);

        assertFalse(requestReceiver.rowsRead());
        assertNotNull(requestReceiver.memoryStream());
        assertTrue(requestReceiver.memoryStream().size() > 0);
View Full Code Here


        requestSender.writeTo(streamOutput);

        BytesStreamInput streamInput = new BytesStreamInput(streamOutput.bytes());

        DistributedResultRequest requestReceiver = new DistributedResultRequest(contextManager);
        requestReceiver.readFrom(streamInput);


        Object[][] receiverRows = requestReceiver.rows();
        for (int i = 0; i < rows.length; i++) {
            assertTrue(Arrays.equals(rows[i], receiverRows[i]));
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.