Package org.lilyproject.repository.impl

Examples of org.lilyproject.repository.impl.BlobIncubatorMonitor$MyLeaderElectionCallback


    @PostConstruct
    public void start() throws LeaderElectionSetupException, IOException, InterruptedException, KeeperException {
        long minimalAge = 1000 * blobManagerConf.getChild("blobIncubatorMonitor").getAttributeAsLong("minimalAge");
        long monitorDelay = blobManagerConf.getChild("blobIncubatorMonitor").getAttributeAsLong("monitorDelay");
        long runDelay = 1000 * blobManagerConf.getChild("blobIncubatorMonitor").getAttributeAsLong("runDelay");
        blobIncubatorMonitor = new BlobIncubatorMonitor(zookeeper, hbaseTableFactory, tableManager,
                                        blobManager, typeManager, minimalAge, monitorDelay, runDelay);

        List<String> blobIncubatorNodes = Collections.EMPTY_LIST;
        Conf nodesConf = blobManagerConf.getChild("blobIncubatorMonitor").getChild("nodes");
        if (nodesConf != null) {
View Full Code Here


        Blob blob = writeBlob(bytes, "aMediaType", "testCreate");

        // Give time for the blob to expire
        Thread.sleep(60);

        BlobIncubatorMonitor monitor = new BlobIncubatorMonitor(repoSetup.getZk(), repoSetup.getHbaseTableFactory(),
                repoSetup.getTableManager(), blobManager, typeManager, 50, 0, 0);
        monitor.runMonitorOnce();

        assertBlobDelete(true, blob);
    }
View Full Code Here

        blobManager.reserveBlobs(blobs);

        // Give time for the blob to expire
        Thread.sleep(60);

        BlobIncubatorMonitor monitor = new BlobIncubatorMonitor(repoSetup.getZk(), repoSetup.getHbaseTableFactory(),
                                            repoSetup.getTableManager(), blobManager, typeManager, 50, 0, 0);
        monitor.runMonitorOnce();

        assertBlobDelete(true, blob);
    }
View Full Code Here

        blobIncubatorTable.put(put);

        // Give time for the blob to expire
        Thread.sleep(60);

        BlobIncubatorMonitor monitor = new BlobIncubatorMonitor(repoSetup.getZk(), repoSetup.getHbaseTableFactory(),
                                            repoSetup.getTableManager(), blobManager, typeManager, 50, 0, 0);
        monitor.runMonitorOnce();

        assertBlobDelete(false, blob);
        Get get = new Get(blob.getValue());
        Result result = blobIncubatorTable.get(get);
        assertTrue(result == null || result.isEmpty());
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.impl.BlobIncubatorMonitor$MyLeaderElectionCallback

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.