Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.SchemaId


        Closer.close(repoSetup);
    }

    @Test
    public void testLinkIndex() throws Exception {
        SchemaId liveTag = repository.getIdGenerator().getSchemaId(UUID.randomUUID());

        Set<FieldedLink> links1 = new HashSet<FieldedLink>();
        links1.add(new FieldedLink(createAbsoluteId("id1"), field1));
        links1.add(new FieldedLink(createAbsoluteId("id2"), field1));
View Full Code Here


    private static final byte[] C1 = Bytes.toBytes("c1");
    private static final byte[] C2 = Bytes.toBytes("c2");
    private static final byte[] C3 = Bytes.toBytes("c3");

    private byte[] putRandomRecord(HTableInterface table) throws IOException {
        SchemaId id = new SchemaIdImpl(UUID.randomUUID());
        byte[] rowId = id.getBytes();
        Put put = new Put(rowId);
        put.add(CF, C1, Bytes.toBytes(random.nextInt()));
        put.add(CF, C2, Bytes.toBytes(random.nextInt()));
        put.add(CF, C3, Bytes.toBytes(random.nextInt()));
        table.put(put);
View Full Code Here

        typeTable.put(put);
    }

    @Test
    public void testGetTypeIgnoresConcurrentCounterRows() throws Exception {
        SchemaId id = new SchemaIdImpl(UUID.randomUUID());
        byte[] rowId = id.getBytes();

        typeTable.incrementColumnValue(rowId, DATA_COLUMN_FAMILY, CONCURRENT_COUNTER_COLUMN_NAME, 1);
        try {
            typeManager.getFieldTypeById(id);
            fail();
View Full Code Here

        if (!Arrays.equals(LilyHBaseSchema.RecordCf.DATA.bytes,kv.getFamily())) {
            return false;
        }
        final byte[] qualifier = kv.getQualifier();
        if (qualifier[0] == LilyHBaseSchema.RecordColumn.DATA_PREFIX) {
            SchemaId fieldId = new SchemaIdImpl(Bytes.tail(qualifier, qualifier.length - 1));
            FieldType fieldType  = null;
            try {
                fieldType = repository.getTypeManager().getFieldTypeById(fieldId);
            } catch (IllegalArgumentException e) {
                // no qualifier
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.api.SchemaId

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.