Package io.crate

Examples of io.crate.PartitionName.stringValue()


                .put("name", "Trillian")
                .map();
        BytesReference source = XContentFactory.jsonBuilder().map(sourceMap).bytes();
        PartitionName partitionName = new PartitionName("parted", Arrays.asList(new BytesRef("13959981214861")));
        ESIndexNode indexNode = new ESIndexNode(
                new String[]{partitionName.stringValue()},
                Arrays.asList(source),
                ImmutableList.of("123"),
                ImmutableList.of("123"),
                true,
                false
View Full Code Here


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

        refresh();

        assertTrue(
                client().admin().indices().prepareExists(partitionName.stringValue())
                        .execute().actionGet().isExists()
        );
        assertTrue(
                client().admin().indices().prepareAliasesExist("parted")
                        .execute().actionGet().exists()
View Full Code Here

        );
        assertTrue(
                client().admin().indices().prepareAliasesExist("parted")
                        .execute().actionGet().exists()
        );
        SearchHits hits = client().prepareSearch(partitionName.stringValue())
                .setTypes(Constants.DEFAULT_MAPPING_TYPE)
                .addFields("id", "name")
                .setQuery(new MapBuilder<String, Object>()
                                .put("match_all", new HashMap<String, Object>())
                                .map()
View Full Code Here

                tableInfo,
                Arrays.asList(new Assignment(
                        new QualifiedNameReference(new QualifiedName("name")),
                        new StringLiteral("foo"))),
                new Object[0]);
        assertThat(partitionName.stringValue(), is(".partitioned.users.0426crrf"));
    }
}
View Full Code Here

    @Test
    public void testRefreshPartition() throws Exception {
        PartitionName partition = new PartitionName("parted", Arrays.asList(new BytesRef("1395874800000")));
        RefreshTableAnalysis analysis = (RefreshTableAnalysis)analyze("refresh table parted PARTITION (date=1395874800000)");
        assertThat(analysis.table().ident().name(), is("parted"));
        assertThat(analysis.partitionName().stringValue(), is(partition.stringValue()));
    }

    @Test
    public void testRefreshPartitionsParameter() throws Exception {
        PartitionName partition = new PartitionName("parted", Arrays.asList(new BytesRef("1395874800000")));
View Full Code Here

    public void testRefreshPartitionsParameter() throws Exception {
        PartitionName partition = new PartitionName("parted", Arrays.asList(new BytesRef("1395874800000")));
        RefreshTableAnalysis analysis = (RefreshTableAnalysis) analyze(
                "refresh table parted PARTITION (date=?)", new Object[] {"1395874800000"});
        assertThat(analysis.table().ident().name(), is("parted"));
        assertThat(analysis.partitionName().stringValue(), is(partition.stringValue()));
    }

    @Test(expected = IllegalArgumentException.class)
    public void testRefreshInvalidPartitioned() throws Exception {
        analyze("refresh table parted partition (invalid_column='hddsGNJHSGFEFZÜ')");
View Full Code Here

            }
            PartitionName partitionName = new PartitionName(
                table().ident().name(),
                values
            );
            partitionValues.add(partitionName.stringValue());
        }
        return partitionValues;
    }

    public List<BytesReference> sourceMaps() {
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.