public static void setLocation(Assignment assignment) throws DistributedStoreException { TabletStateStore store; if (assignment.tablet.isRootTablet()) { store = new ZooTabletStateStore(); } else if (assignment.tablet.isMeta()) { store = new RootTabletStateStore(); } else { store = new MetaDataStateStore(); } store.setLocations(Collections.singletonList(assignment)); }
public static void unassign(TabletLocationState tls) throws DistributedStoreException { TabletStateStore store; if (tls.extent.isRootTablet()) { store = new ZooTabletStateStore(); } else if (tls.extent.isMeta()) { store = new RootTabletStateStore(); } else { store = new MetaDataStateStore(); } store.unassign(Collections.singletonList(tls)); }