Examples of expectsAffectedRows()


Examples of io.crate.planner.Plan.expectsAffectedRows()

        assertThat(response.rowCount(), is(1L));

        ESDeleteIndexNode deleteIndexNode = new ESDeleteIndexNode("t");
        Plan plan = new Plan();
        plan.add(deleteIndexNode);
        plan.expectsAffectedRows(true);

        Job job = executor.newJob(plan);
        List<ListenableFuture<TaskResult>> futures = executor.execute(job);
        ListenableFuture<List<TaskResult>> listenableFuture = Futures.allAsList(futures);
        TaskResult taskResult = listenableFuture.get().get(0);
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

        assertTrue(client().admin().indices().prepareClose("t").execute().actionGet().isAcknowledged());

        ESDeleteIndexNode deleteIndexNode = new ESDeleteIndexNode("t");
        Plan plan = new Plan();
        plan.add(deleteIndexNode);
        plan.expectsAffectedRows(true);

        Job job = executor.newJob(plan);
        List<ListenableFuture<TaskResult>> futures = executor.execute(job);
        ListenableFuture<List<TaskResult>> listenableFuture = Futures.allAsList(futures);
        TaskResult taskResult = listenableFuture.get().get(0);
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

        ESClusterUpdateSettingsNode node = new ESClusterUpdateSettingsNode(persistentSettings);

        Plan plan = new Plan();
        plan.add(node);
        plan.expectsAffectedRows(true);

        Job job = executor.newJob(plan);
        List<ListenableFuture<TaskResult>> futures = executor.execute(job);
        ListenableFuture<List<TaskResult>> listenableFuture = Futures.allAsList(futures);
        TaskResult taskResult = listenableFuture.get().get(0);
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

        node = new ESClusterUpdateSettingsNode(EMPTY_SETTINGS, transientSettings);

        plan = new Plan();
        plan.add(node);
        plan.expectsAffectedRows(true);

        job = executor.newJob(plan);
        futures = executor.execute(job);
        listenableFuture = Futures.allAsList(futures);
        taskResult = listenableFuture.get().get(0);
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

        node = new ESClusterUpdateSettingsNode(persistentSettings, transientSettings);

        plan = new Plan();
        plan.add(node);
        plan.expectsAffectedRows(true);

        job = executor.newJob(plan);
        futures = executor.execute(job);
        listenableFuture = Futures.allAsList(futures);
        taskResult = listenableFuture.get().get(0);
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

                indexSettings,
                mapping,
                alias);
        Plan plan = new Plan();
        plan.add(planNode);
        plan.expectsAffectedRows(true);

        Job job = executor.newJob(plan);
        List<ListenableFuture<TaskResult>> futures = executor.execute(job);
        ListenableFuture<List<TaskResult>> listenableFuture = Futures.allAsList(futures);
        TaskResult taskResult = listenableFuture.get().get(0);
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

                true,
                false
                );
        Plan plan = new Plan();
        plan.add(indexNode);
        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();
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

                asList("1"),
                asList("1")
        );
        Plan plan = new Plan();
        plan.add(updateNode);
        plan.expectsAffectedRows(true);

        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();
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

                ImmutableList.<String>of(),
                ImmutableList.<String>of()
        );
        Plan plan = new Plan();
        plan.add(updateNode);
        plan.expectsAffectedRows(true);

        Job job = executor.newJob(plan);
        assertThat(job.tasks().get(0), instanceOf(ESUpdateByQueryTask.class));
        List<ListenableFuture<TaskResult>> result = executor.execute(job);
        assertThat(result.get(0).get().errorMessage(), is(nullValue()));
View Full Code Here

Examples of io.crate.planner.Plan.expectsAffectedRows()

        List<Symbol> outputs = Arrays.<Symbol>asList(id_ref, name_ref, version_ref);
        ESGetNode getNode = newGetNode("characters", outputs, "1");
        plan = new Plan();
        plan.add(getNode);
        plan.expectsAffectedRows(false);

        job = executor.newJob(plan);
        result = executor.execute(job);
        Object[][] rows = result.get(0).get().rows();
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.