Package org.lilyproject.repository.model.impl

Examples of org.lilyproject.repository.model.impl.RepositoryModelImpl


        IdGenerator idGenerator = new IdGeneratorImpl();
        configuration = HBASE_PROXY.getConf();
        zooKeeper = new StateWatchingZooKeeper(HBASE_PROXY.getZkConnectString(), 10000);
        hbaseTableFactory = new HBaseTableFactoryImpl(HBASE_PROXY.getConf());

        RepositoryModel repositoryModel = new RepositoryModelImpl(zooKeeper);

        typeManager = new HBaseTypeManager(idGenerator, configuration, zooKeeper, hbaseTableFactory);

        DFSBlobStoreAccess dfsBlobStoreAccess = new DFSBlobStoreAccess(HBASE_PROXY.getBlobFS(), new Path("/lily/blobs"));
        List<BlobStoreAccess> blobStoreAccesses = Collections.<BlobStoreAccess>singletonList(dfsBlobStoreAccess);
View Full Code Here


                        forceOption.getLongOpt());
                System.out.println();
            }
        }

        repositoryModel = new RepositoryModelImpl(zk);

        return 0;
    }
View Full Code Here

        return lilyServerTestUtility;
    }

    public void createRepository(String repositoryName) {
        try {
            RepositoryModel model = new RepositoryModelImpl(getZooKeeper());
            if (!model.repositoryExistsAndActive(repositoryName)) {
                model.create(repositoryName);
                model.waitUntilRepositoryInState(repositoryName, RepositoryDefinition.RepositoryLifecycleState.ACTIVE,
                        100000);
            }
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
View Full Code Here

    public void test() throws Exception {
        LilyProxy lilyProxy = createLilyProxy();

        LilyClient client = lilyProxy.getLilyServerProxy().getClient();

        RepositoryModelImpl repositoryModel = new RepositoryModelImpl(lilyProxy.getLilyServerProxy().getZooKeeper());
        repositoryModel.create("repo1");
        assertTrue(repositoryModel.waitUntilRepositoryInState("repo1", RepositoryLifecycleState.ACTIVE, 60000L));
        repositoryModel.create("repo2");
        assertTrue(repositoryModel.waitUntilRepositoryInState("repo2", RepositoryLifecycleState.ACTIVE, 60000L));
        repositoryModel.close();

        // Make a schema
        TypeManager typeMgr = client.getDefaultRepository().getTypeManager();

        QName field1 = new QName("ns", "f1");
View Full Code Here

        }

        //
        // Also create some content in another repository with two tables
        //
        RepositoryModelImpl repositoryModel = new RepositoryModelImpl(lilyProxy.getLilyServerProxy().getZooKeeper());
        String repositoryName = "otherrepo";
        repositoryModel.create(repositoryName);
        assertTrue(repositoryModel.waitUntilRepositoryInState(repositoryName, RepositoryLifecycleState.ACTIVE, 60000L));
        repositoryModel.close();

        LRepository repository2 = repoMgr.getRepository(repositoryName);
        repository2.getTableManager().createTable("foobar");
        LTable table2 = repository2.getTable("foobar");
        LTable table3 = repository2.getDefaultTable();
View Full Code Here

    }

    private static HBaseRepository createHBaseRepository(String repositoryName, String tableName, ZooKeeperItf zk,
                                                         Configuration conf, HBaseTableFactory hbaseTableFactory)
            throws KeeperException, InterruptedException, IOException, RepositoryException {
        RepositoryModel repositoryModel = new RepositoryModelImpl(zk);
        IdGenerator idGenerator = new IdGeneratorImpl();
        TypeManager typeManager = new HBaseTypeManager(idGenerator, conf, zk, hbaseTableFactory);
        RecordFactory recordFactory = new RecordFactoryImpl();

        RepositoryManager repositoryManager = new HBaseRepositoryManager(typeManager, idGenerator,
View Full Code Here

                .fieldEntry().use(ft2).add()
                .create();
    }

    public LRepository getAlternateTestRespository(String name) throws Exception {
        RepositoryModelImpl model = new RepositoryModelImpl(lilyProxy.getLilyServerProxy().getZooKeeper());
        if (!model.repositoryExistsAndActive(name)) {
            model.create(name);
            model.waitUntilRepositoryInState(name, RepositoryDefinition.RepositoryLifecycleState.ACTIVE, MINS15);
        }
        return lilyProxy.getLilyServerProxy().getClient().getRepository(name);
    }
View Full Code Here

    private void init() throws InterruptedException, KeeperException, NoServersException, RepositoryException {
        this.isClosed = false; // needs to be before refreshServers and schemaCache.start()
        zk.addDefaultWatcher(watcher);
        refreshServers();
        repositoryModel = new RepositoryModelImpl(zk);

        LoadBalancingUtil.LBInstanceProvider<TypeManager> typeManagerProvider = new LoadBalancingUtil.LBInstanceProvider<TypeManager>() {
            @Override
            public TypeManager getInstance(String repositoryName, String tableName)
                    throws RepositoryException, InterruptedException {
View Full Code Here

        testUtil.stop();
    }

    @Before
    public void setUp() throws Exception {
        model = new RepositoryModelImpl(lilyProxy.getLilyServerProxy().getZooKeeper());
        hBaseAdmin = new HBaseAdmin(lilyProxy.getHBaseProxy().getConf());
        indexerModel = lilyProxy.getLilyServerProxy().getIndexerModel();
    }
View Full Code Here

        hbaseProxy.start();
        hadoopConf = hbaseProxy.getConf();
        zk = ZkUtil.connect(hbaseProxy.getZkConnectString(), 10000);

        hbaseTableFactory = new HBaseTableFactoryImpl(hadoopConf);
        repositoryModel = new RepositoryModelImpl(zk);
        repositoryMaster = new RepositoryMaster(zk, repositoryModel, new DummyLilyInfo(),
                Collections.<RepositoryMasterHook>singletonList(new CoreRepositoryMasterHook(hbaseTableFactory, hbaseProxy.getConf())));
        repositoryMaster.start();

        coreSetup = true;
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.model.impl.RepositoryModelImpl

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.