Package com.ngdata.sep

Examples of com.ngdata.sep.WALEditFilter


        this.walEditFilter = walEditFilter;
    }

    WALEditFilter loadEditFilter(String peerClusterId, Iterable<WALEditFilterProvider> editFilterProviders) {
        for (WALEditFilterProvider editFilterProvider : editFilterProviders) {
            WALEditFilter editFilter = editFilterProvider.getWALEditFilter(toExternalSubscriptionName(peerClusterId));
            if (editFilter != null) {
                log.debug("Loaded WALEditFilter " + editFilter);
                return editFilter;
            }
        }
View Full Code Here


        this.walEditFilter = walEditFilter;
    }

    WALEditFilter loadEditFilter(String peerClusterId, Iterable<WALEditFilterProvider> editFilterProviders) {
        for (WALEditFilterProvider editFilterProvider : editFilterProviders) {
            WALEditFilter editFilter = editFilterProvider.getWALEditFilter(toExternalSubscriptionName(peerClusterId));
            if (editFilter != null) {
                log.debug("Loaded WALEditFilter " + editFilter);
                return editFilter;
            }
        }
View Full Code Here

    @Test
    public void testLoadEditFilter_CustomFilterAvailable() {
        final String subscriptionId = "_subscription_id_";

        WALEditFilter editFilter = mock(WALEditFilter.class);
        WALEditFilterProvider filterProvider = mock(WALEditFilterProvider.class);
        when(filterProvider.getWALEditFilter(subscriptionId)).thenReturn(editFilter);

        WALEditFilter loadedFilter = sepReplicationSource.loadEditFilter(subscriptionId,
                Lists.newArrayList(filterProvider));

        assertEquals(editFilter, loadedFilter);
    }
View Full Code Here

        final String subscriptionId = "_subscription_id_";

        WALEditFilterProvider editFilterProvider = mock(WALEditFilterProvider.class);
        when(editFilterProvider.getWALEditFilter(subscriptionId)).thenReturn(null);

        WALEditFilter loadedFilter = sepReplicationSource.loadEditFilter(subscriptionId,
                Lists.newArrayList(editFilterProvider));

        assertNull(loadedFilter);
    }
View Full Code Here

        assertNull(loadedFilter);
    }

    @Test
    public void testRemoveNonReplicableEdits_CustomFilter() {
        WALEditFilter editFilter = mock(WALEditFilter.class);
        sepReplicationSource.setWALEditFilter(editFilter);

        HLog.Entry entry = buildLogEntry();

        sepReplicationSource.removeNonReplicableEdits(entry);
View Full Code Here

    @Test
    public void testLoadEditFilter_CustomFilterAvailable() {
        final String subscriptionId = "_subscription_id_";

        WALEditFilter editFilter = mock(WALEditFilter.class);
        WALEditFilterProvider filterProvider = mock(WALEditFilterProvider.class);
        when(filterProvider.getWALEditFilter(subscriptionId)).thenReturn(editFilter);

        WALEditFilter loadedFilter = sepReplicationSource.loadEditFilter(subscriptionId,
                Lists.newArrayList(filterProvider));

        assertEquals(editFilter, loadedFilter);
    }
View Full Code Here

        final String subscriptionId = "_subscription_id_";

        WALEditFilterProvider editFilterProvider = mock(WALEditFilterProvider.class);
        when(editFilterProvider.getWALEditFilter(subscriptionId)).thenReturn(null);

        WALEditFilter loadedFilter = sepReplicationSource.loadEditFilter(subscriptionId,
                Lists.newArrayList(editFilterProvider));

        assertNull(loadedFilter);
    }
View Full Code Here

        assertNull(loadedFilter);
    }

    @Test
    public void testRemoveNonReplicableEdits_CustomFilter() {
        WALEditFilter editFilter = mock(WALEditFilter.class);
        sepReplicationSource.setWALEditFilter(editFilter);

        HLog.Entry entry = new HLog.Entry();
        KeyValue keyValue = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("cf"), Bytes.toBytes("qual"),
                Bytes.toBytes("value"));
View Full Code Here

    }

    @Test
    public void testGetWALEditFilter_LinkIndexUpdater() {
        String subscriptionName = "LinkIndexUpdater";
        WALEditFilter editFilter = filterProvider.getWALEditFilter(subscriptionName);
        assertTrue(editFilter instanceof LinkIndexUpdaterEditFilter);
    }
View Full Code Here

TOP

Related Classes of com.ngdata.sep.WALEditFilter

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.