Package org.apache.jackrabbit.oak.plugins.segment.file

Examples of org.apache.jackrabbit.oak.plugins.segment.file.FileStore.readSegment()


                        long dataSize = 0;
                        int bulkCount = 0;
                        long bulkSize = 0;
                        for (UUID uuid : store.getSegmentIds()) {
                            if (SegmentIdFactory.isDataSegmentId(uuid)) {
                                Segment segment = store.readSegment(uuid);
                                dataCount++;
                                dataSize += segment.size();
                                idmap.put(uuid, segment.getReferencedIds());
                            } else if (SegmentIdFactory.isBulkSegmentId(uuid)) {
                                bulkCount++;
View Full Code Here


                                dataCount++;
                                dataSize += segment.size();
                                idmap.put(uuid, segment.getReferencedIds());
                            } else if (SegmentIdFactory.isBulkSegmentId(uuid)) {
                                bulkCount++;
                                bulkSize += store.readSegment(uuid).size();
                                idmap.put(uuid, Collections.<UUID>emptyList());
                            }
                        }
                        System.out.println("Total size:");
                        System.out.format(
View Full Code Here

                        bulkCount = 0;
                        bulkSize = 0;
                        for (UUID uuid : garbage) {
                            if (SegmentIdFactory.isDataSegmentId(uuid)) {
                                dataCount++;
                                dataSize += store.readSegment(uuid).size();
                            } else if (SegmentIdFactory.isBulkSegmentId(uuid)) {
                                bulkCount++;
                                bulkSize += store.readSegment(uuid).size();
                            }
                        }
View Full Code Here

                            if (SegmentIdFactory.isDataSegmentId(uuid)) {
                                dataCount++;
                                dataSize += store.readSegment(uuid).size();
                            } else if (SegmentIdFactory.isBulkSegmentId(uuid)) {
                                bulkCount++;
                                bulkSize += store.readSegment(uuid).size();
                            }
                        }
                        System.out.println("Available for garbage collection:");
                        System.out.format(
                                "%6dMB in %6d data segments%n",
View Full Code Here

                                "%6dMB in %6d bulk segments%n",
                                bulkSize / (1024 * 1024), bulkCount);
                    } else {
                        for (int i = 1; i < args.length; i++) {
                            UUID uuid = UUID.fromString(args[i]);
                            System.out.println(store.readSegment(uuid));
                        }
                    }
                } finally {
                    store.close();
                }
View Full Code Here

                File file = new File(args[0]);
                FileStore store = new FileStore(file, 256 * 1024 * 1024, false);
                try {
                    for (int i = 1; i < args.length; i++) {
                        UUID uuid = UUID.fromString(args[i]);
                        System.out.println(store.readSegment(uuid));
                    }
                } finally {
                    store.close();
                }
            }
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.