/** * Creates a new GC WAL object. * * @param context * the collection server's context * @param fs * volume manager to use * @param useTrash * true to move files to trash rather than delete them */ GarbageCollectWriteAheadLogs(final ServerContext context, VolumeManager fs, boolean useTrash) { this.context = context; this.fs = fs; this.useTrash = useTrash; this.liveServers = new LiveTServerSet(context, (current, deleted, added) -> { log.debug("New tablet servers noticed: {}", added); log.debug("Tablet servers removed: {}", deleted); }); liveServers.startListeningForTabletServerChanges(); this.walMarker = new WalStateManager(context); this.store = () -> Iterators.concat(new RootTabletStateStore(context).iterator(), new MetaDataStateStore(context).iterator()); }
protected static TabletStateStore getStoreForTablet(KeyExtent extent, ServerContext context) { if (extent.isRootTablet()) { return new ZooTabletStateStore(context); } else if (extent.isMeta()) { return new RootTabletStateStore(context); } else { return new MetaDataStateStore(context); } } }
watchers.add(new TabletGroupWatcher(this, new MetaDataStateStore(context, this), null) { @Override boolean canSuspendTablets() {
public static void unassign(TabletLocationState tls) throws DistributedStoreException { TabletStateStore store; if (tls.extent.isRootTablet()) { store = new ZooTabletStateStore(); } else { store = new MetaDataStateStore(); } store.unassign(Collections.singletonList(tls)); }
public static void setLocation(Assignment assignment) throws DistributedStoreException { TabletStateStore store; if (assignment.tablet.isRootTablet()) { store = new ZooTabletStateStore(); } else { store = new MetaDataStateStore(); } store.setLocations(Collections.singletonList(assignment)); }
@Override public Iterator<TabletLocationState> iterator() { return Iterators.concat(new RootTabletStateStore(context).iterator(), new MetaDataStateStore(context).iterator()); } };
protected static TabletStateStore getStoreForTablet(KeyExtent extent, AccumuloServerContext context) throws DistributedStoreException { if (extent.isRootTablet()) { return new ZooTabletStateStore(); } else if (extent.isMeta()) { return new RootTabletStateStore(context); } else { return new MetaDataStateStore(context); } } }
MetaDataStateStore store = new MetaDataStateStore(context, null); while (states.size() < 2) { UtilWaitThread.sleep(250);
MetaDataStateStore metaDataStateStore = new MetaDataStateStore(context, state); int count = 0; for (TabletLocationState tss : metaDataStateStore) {
final TabletStateStore stores[] = {new ZooTabletStateStore(new ZooStore(zroot)), new RootTabletStateStore(instance, systemAuths, null), new MetaDataStateStore(instance, systemAuths, null)}; watchers.add(new TabletGroupWatcher(stores[2], null)); watchers.add(new TabletGroupWatcher(stores[1], watchers.get(0)));
MetaDataStateStore store = new MetaDataStateStore(context); store.setLocations(assignments);
watchers.add(new TabletGroupWatcher(this, new MetaDataStateStore(this, this), null) { @Override boolean canSuspendTablets() {