Package io.crate.executor

Examples of io.crate.executor.TaskResult.rows()


        Job job = executor.newJob(plan);
        ESDeleteByQueryTask task = (ESDeleteByQueryTask) job.tasks().get(0);

        task.start();
        TaskResult taskResult = task.result().get(0).get();
        Object[][] rows = taskResult.rows();
        assertThat(rows.length, is(0));
        assertThat(taskResult.rowCount(), is(-1L));

        // verify deletion
        DocTableInfo characters = docSchemaInfo.getTableInfo("characters");
View Full Code Here


        Plan plan = new Plan();
        plan.add(node);
        Job job = executor.newJob(plan);
        List<ListenableFuture<TaskResult>> result = executor.execute(job);
        TaskResult taskResult = result.get(0).get();
        Object[][] rows = taskResult.rows();
        assertThat(rows.length, is(0));
        assertThat(taskResult.rowCount(), is(1L));

        // verify deletion
        ImmutableList<Symbol> outputs = ImmutableList.<Symbol>of(id_ref, name_ref);
View Full Code Here

        Job job = executor.newJob(plan);
        assertThat(job.tasks().get(0), instanceOf(ESIndexTask.class));

        List<ListenableFuture<TaskResult>> result = executor.execute(job);
        TaskResult taskResult = result.get(0).get();
        Object[][] rows = taskResult.rows();
        assertThat(rows.length, is(0));
        assertThat(taskResult.rowCount(), is(1L));


        // verify insertion
View Full Code Here

        plan.expectsAffectedRows(true);
        Job job = executor.newJob(plan);
        assertThat(job.tasks().get(0), instanceOf(ESIndexTask.class));
        List<ListenableFuture<TaskResult>> result = executor.execute(job);
        TaskResult taskResult = result.get(0).get();
        Object[][] indexResult = taskResult.rows();
        assertThat(indexResult.length, is(0));
        assertThat(taskResult.rowCount(), is(1L));

        refresh();
View Full Code Here

        Job job = executor.newJob(plan);
        assertThat(job.tasks().get(0), instanceOf(ESUpdateByIdTask.class));
        List<ListenableFuture<TaskResult>> result = executor.execute(job);
        TaskResult taskResult = result.get(0).get();
        Object[][] rows = taskResult.rows();

        assertThat(rows.length, is(0));
        assertThat(taskResult.rowCount(), is(1L));

        // verify update
View Full Code Here

                                                   long requestCreationTime,
                                                   boolean includeTypesOnResponse) {
        assert result.size() == 1;

        TaskResult taskResult = result.get(0);
        Object[][] rows = taskResult.rows();
        long rowCount = 0;
        if (plan.expectsAffectedRows() && taskResult instanceof QueryResult) {
            if (rows.length >= 1 && rows[0].length >= 1) {
                rowCount = ((Number) rows[0][0]).longValue();
            }
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.