Examples of IdGeneratorImpl


Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

        HBASE_PROXY = new HBaseProxy();
        HBASE_PROXY.start();
        zooKeeper = ZkUtil.connect(HBASE_PROXY.getZkConnectString(), 10000);
        hbaseTableFactory = new HBaseTableFactoryImpl(HBASE_PROXY.getConf());
        typeTable = LilyHBaseSchema.getTypeTable(hbaseTableFactory);
        typeManager = new HBaseTypeManager(new IdGeneratorImpl(), HBASE_PROXY.getConf(), zooKeeper, hbaseTableFactory);
        valueType = typeManager.getValueType("LONG");
    }
View Full Code Here

Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

        return reader.fromJson(JsonFormat.deserializeNonStd(data), new NamespacesImpl(false), repository);
    }

    @Test
    public void testScanRecordId() throws Exception {
        IdGenerator idGenerator = new IdGeneratorImpl();

        RecordScan scan = new RecordScan();
        scan.setStartRecordId(idGenerator.newRecordId());
        scan.setStopRecordId(idGenerator.newRecordId("foo"));

        byte[] data = scanToBytes(scan);
        RecordScan parsedScan = scanFromBytes(data);

        assertEquals(scan.getStartRecordId(), parsedScan.getStartRecordId());
View Full Code Here

Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

                node.get("recordFilter").get("recordType").getTextValue());
    }

    @Test
    public void testScanRecordIdPrefixFilter() throws Exception {
        IdGenerator idGenerator = new IdGeneratorImpl();

        RecordId recordId = idGenerator.newRecordId("foo");

        RecordScan scan = new RecordScan();
        scan.setRecordFilter(new RecordIdPrefixFilter(recordId));

        byte[] data = scanToBytes(scan);
View Full Code Here

Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

        }
    }

    @Test
    public void testScanRecordVariantFilter() throws Exception {
        IdGenerator idGenerator = new IdGeneratorImpl();

        final Map<String, String> variantProperties = new HashMap<String, String>();
        variantProperties.put("lang", "en");
        variantProperties.put("branch", null);

        RecordId recordId = idGenerator.newRecordId("foo");

        RecordScan scan = new RecordScan();
        scan.setRecordFilter(new RecordVariantFilter(recordId, variantProperties));

        byte[] data = scanToBytes(scan);
View Full Code Here

Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

        assertEquals(null, node.get("recordFilter").get("variantProperties").get("branch").getTextValue());
    }

    @Test
    public void testScanRecordFilterList() throws Exception {
        IdGenerator idGenerator = new IdGeneratorImpl();

        RecordId recordId = idGenerator.newRecordId("foo");

        RecordScan scan = new RecordScan();
        RecordFilterList filterList = new RecordFilterList(RecordFilterList.Operator.MUST_PASS_ONE);
        filterList.addFilter(new RecordIdPrefixFilter(recordId));
        filterList.addFilter(new RecordTypeFilter(new QName("ns", "stringField")));
View Full Code Here

Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

        solrUpdateWriter = new FakeSolrUpdateWriter();
    }

    @Test
    public void testMap() throws Exception {
        IdGenerator idGenerator = new IdGeneratorImpl();
        System.out.println(Bytes.toString(idGenerator.fromString("USER.batch-index-custom").toBytes()));
        LTable table = repository.getDefaultTable();
        Record record = table.recordBuilder()
                .assignNewUuid()
                .recordType(new QName(NS1, "rt1"))
                .field(new QName(NS1, "a_string"), "myvalue")
View Full Code Here

Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

    public void setupTypeManager() throws Exception {
        if (typeManagerSetup) {
            return;
        }

        idGenerator = new IdGeneratorImpl();
        typeManager = new HBaseTypeManager(idGenerator, hadoopConf, zk, hbaseTableFactory);

        typeManagerSetup = true;
    }
View Full Code Here

Examples of org.lilyproject.repository.impl.id.IdGeneratorImpl

     * Returns a new instance of a HBaseTypeManager, different than the default
     * typemanager.
     */
    public TypeManager getNewTypeManager() throws IOException, InterruptedException, KeeperException,
            RepositoryException {
        return new HBaseTypeManager(new IdGeneratorImpl(), hadoopConf, zk, hbaseTableFactory);
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.IdGeneratorImpl

        private final Map<IdType, IdGenerator> generators = new HashMap<IdType, IdGenerator>();
       
        public IdGenerator open( String fileName, int grabSize, IdType idType,
                long highestIdInUse )
        {
            IdGenerator generator = new IdGeneratorImpl( fileName, grabSize, idType.getMaxValue() );
            generators.put( idType, generator );
            return generator;
        }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.IdGeneratorImpl

    /** @return the id generator for model object. Subclasses may override. */
    protected IdGenerator createIdGenerator() {
      final String seed = getSessionId();
      // Replace with session.
      return new IdGeneratorImpl(getSignedInUser().getDomain(), new Seed() {
        @Override
        public String get() {
          return seed;
        }
      });
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.