Package io.crate.executor

Examples of io.crate.executor.Job


        insertCharacters();

        ESDeleteNode node = new ESDeleteNode("characters", "2", "2", Optional.<Long>absent());
        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));
View Full Code Here


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

                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();
        assertThat(indexResult.length, is(0));
        assertThat(taskResult.rowCount(), is(1L));
View Full Code Here

                false
        );

        Plan plan = new Plan();
        plan.add(indexNode);
        Job job = executor.newJob(plan);
        assertThat(job.tasks().get(0), instanceOf(ESBulkIndexTask.class));

        List<ListenableFuture<TaskResult>> result = executor.execute(job);
        TaskResult taskResult = result.get(0).get();
        assertThat(taskResult.rowCount(), is(2L));
        Object[][] rows = result.get(0).get().rows();
View Full Code Here

        );
        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();
        Object[][] rows = taskResult.rows();

        assertThat(rows.length, is(0));
View Full Code Here

        );
        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()));
        assertThat(result.get(0).get().rowCount(), is(1L));

        List<Symbol> outputs = Arrays.<Symbol>asList(id_ref, name_ref, version_ref);
View Full Code Here

        );
        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().rowCount(), is(2L));

        refresh();
View Full Code Here

                TEST_MAPPING
        );
        Plan plan = new Plan();
        plan.add(createTableNode);

        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);
        Object[][] objects = listenableFuture.get().get(0).rows();
View Full Code Here

                TEST_MAPPING
        );
        Plan plan = new Plan();
        plan.add(createTableNode);

        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);
        Object[][] objects = listenableFuture.get().get(0).rows();
View Full Code Here

                TEST_MAPPING
        );
        Plan plan = new Plan();
        plan.add(createTableNode);

        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);
        Object[][] objects = listenableFuture.get().get(0).rows();
View Full Code Here

TOP

Related Classes of io.crate.executor.Job

Copyright © 2018 www.massapicom. 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.