Package org.apache.bookkeeper.metastore

Examples of org.apache.bookkeeper.metastore.MetastoreTableItem


    }

    static SortedSet<Long> entries2Ledgers(Iterator<MetastoreTableItem> entries) {
        SortedSet<Long> ledgers = new TreeSet<Long>();
        while (entries.hasNext()) {
            MetastoreTableItem item = entries.next();
            try {
                ledgers.add(key2LedgerId(item.getKey()));
            } catch (NumberFormatException nfe) {
                LOG.warn("Found invalid ledger key {}", item.getKey());
            }
        }
        return ledgers;
    }
View Full Code Here


                        return;
                    }

                    SortedSet<Long> ledgers = new TreeSet<Long>();
                    while (entries.hasNext()) {
                        MetastoreTableItem item = entries.next();
                        try {
                            ledgers.add(key2LedgerId(item.getKey()));
                        } catch (NumberFormatException nfe) {
                            LOG.warn("Found invalid ledger key {}", item.getKey());
                        }
                    }

                    if (0 == ledgers.size()) {
                        // process next batch of ledgers
View Full Code Here

                return true;
            }

            @Override
            public ByteString next() {
                MetastoreTableItem t = itemIter.next();
                return ByteString.copyFromUtf8(t.getKey());
            }

            @Override
            public void remove() {
                throw new UnsupportedOperationException("Doesn't support remove topic from topic iterator.");
View Full Code Here

                        logErrorAndFinishOperation("Could not read subscribers for cursor " + cursor,
                                callback, ctx, rc);
                        return;
                    }
                    while (items.hasNext()) {
                        MetastoreTableItem item = items.next();
                        final ByteString subscriberId = ByteString.copyFromUtf8(item.getKey().substring(keyLength));
                        try {
                            Versioned<Value> vv = item.getValue();
                            Versioned<SubscriptionData> subData = new Versioned<SubscriptionData>(
                                    value2SubscriptionData(vv.getValue()), vv.getVersion());
                            topicSubs.put(subscriberId, subData);
                        } catch (ParseException e) {
                            StringBuilder sb = new StringBuilder();
View Full Code Here

                        return;
                    }

                    SortedSet<Long> ledgers = new TreeSet<Long>();
                    while (entries.hasNext()) {
                        MetastoreTableItem item = entries.next();
                        try {
                            ledgers.add(key2LedgerId(item.getKey()));
                        } catch (NumberFormatException nfe) {
                            LOG.warn("Found invalid ledger key {}", item.getKey());
                        }
                    }

                    if (0 == ledgers.size()) {
                        // process next batch of ledgers
View Full Code Here

    }

    static SortedSet<Long> entries2Ledgers(Iterator<MetastoreTableItem> entries) {
        SortedSet<Long> ledgers = new TreeSet<Long>();
        while (entries.hasNext()) {
            MetastoreTableItem item = entries.next();
            try {
                ledgers.add(key2LedgerId(item.getKey()));
            } catch (NumberFormatException nfe) {
                LOG.warn("Found invalid ledger key {}", item.getKey());
            }
        }
        return ledgers;
    }
View Full Code Here

    }

    static SortedSet<Long> entries2Ledgers(Iterator<MetastoreTableItem> entries) {
        SortedSet<Long> ledgers = new TreeSet<Long>();
        while (entries.hasNext()) {
            MetastoreTableItem item = entries.next();
            try {
                ledgers.add(key2LedgerId(item.getKey()));
            } catch (NumberFormatException nfe) {
                LOG.warn("Found invalid ledger key {}", item.getKey());
            }
        }
        return ledgers;
    }
View Full Code Here

                        return;
                    }

                    SortedSet<Long> ledgers = new TreeSet<Long>();
                    while (entries.hasNext()) {
                        MetastoreTableItem item = entries.next();
                        try {
                            ledgers.add(key2LedgerId(item.getKey()));
                        } catch (NumberFormatException nfe) {
                            LOG.warn("Found invalid ledger key {}", item.getKey());
                        }
                    }

                    if (0 == ledgers.size()) {
                        // process next batch of ledgers
View Full Code Here

TOP

Related Classes of org.apache.bookkeeper.metastore.MetastoreTableItem

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.