Master.log.debug("logs for dead servers: {}", logsForDeadServers); if (tabletsSuspendable) { store.suspend(assignedToDeadServers, logsForDeadServers, master.getSteadyTime()); } else { store.unassign(assignedToDeadServers, logsForDeadServers); Master.log.debug(assignedToDeadServers.size() + " suspended to gone servers: " + assignedToDeadServers.subList(0, maxServersToShow) + "..."); store.unsuspend(suspendedToGoneServers); Master.log.debug("{} assigning tablets: [{}", store.name(), builder); builder.setLength(0); Master.log.warn( "{} load balancer assigning tablet that was not nominated for assignment {}", store.name(), assignment.getKey()); Master.log.debug("{} assigning tablets: [{}", store.name(), builder); store.setFutureLocations(assignments);
public static void setLocation(ServerContext context, Assignment assignment) throws DistributedStoreException { getStoreForTablet(assignment.tablet, context) .setLocations(Collections.singletonList(assignment)); }
public static void unassign(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<Path>> logsForDeadServers) throws DistributedStoreException { getStoreForTablet(tls.extent, context).unassign(Collections.singletonList(tls), logsForDeadServers); }
public static void suspend(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<Path>> logsForDeadServers, long suspensionTimestamp) throws DistributedStoreException { getStoreForTablet(tls.extent, context).suspend(Collections.singletonList(tls), logsForDeadServers, suspensionTimestamp); }
int maxServersToShow = min(assignedToDeadServers.size(), 100); log.debug(assignedToDeadServers.size() + " assigned to dead servers: " + assignedToDeadServers.subList(0, maxServersToShow) + "..."); store.unassign(assignedToDeadServers); nextEvent.event("Marked %d tablets as unassigned because they don't have current servers", assignedToDeadServers.size()); if (unassigned.containsKey(assignment.getKey())) { if (assignment.getValue() != null) { log.debug(store.name() + " assigning tablet " + assignment); assignments.add(new Assignment(assignment.getKey(), assignment.getValue())); log.warn(store.name() + " load balancer assigning tablet that was not nominated for assignment " + assignment.getKey()); store.setFutureLocations(assignments);
&& !getConfiguration().getBoolean(Property.MASTER_METADATA_SUSPENDABLE))) { log.debug("Unassigning {}", tls); TabletStateStore.unassign(context, tls, null); } else { log.debug("Suspending " + tls); TabletStateStore.suspend(context, tls, null, requestTimeSkew + MILLISECONDS.convert(System.nanoTime(), NANOSECONDS));
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)); }
@Override public void run() { Thread.currentThread().setName("Watching " + store.name()); int[] oldCounts = new int[TabletState.values().length]; EventCoordinator.Listener eventListener = this.master.nextEvent.getListener(); iter = store.iterator(); while (iter.hasNext()) { TabletLocationState tls = iter.next(); Master.log.debug("{} location State: {}", store.name(), tls); int i = state.ordinal(); if (counts[i] > 0 && counts[i] != oldCounts[i]) { this.master.nextEvent.event("[%s]: %d tablets are %s", store.name(), counts[i], state.name()); Master.log.debug(String.format("[%s]: scan time %.2f seconds", store.name(), stats.getScanTime() / 1000.)); oldCounts = counts; if (totalUnloaded > 0) { this.master.nextEvent.event("[%s]: %d tablets unloaded", store.name(), totalUnloaded); Master.log.debug(String.format("[%s] sleeping for %.2f seconds", store.name(), Master.TIME_TO_WAIT_BETWEEN_SCANS / 1000.)); eventListener.waitForEvents(Master.TIME_TO_WAIT_BETWEEN_SCANS); Master.log.error("Error processing table state for store " + store.name(), ex); if (ex.getCause() != null && ex.getCause() instanceof BadLocationStateException) { repairMetadata(((BadLocationStateException) ex.getCause()).getEncodedEndRow());
TabletStateStore.setLocation(context, assignment);
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 void run() { Thread.currentThread().setName("Watching " + store.name()); int[] oldCounts = new int[TabletState.values().length]; EventCoordinator.Listener eventListener = nextEvent.getListener(); int i = state.ordinal(); if (counts[i] > 0 && counts[i] != oldCounts[i]) { nextEvent.event("[%s]: %d tablets are %s", store.name(), counts[i], state.name()); log.debug(String.format("[%s]: scan time %.2f seconds", store.name(), stats.getScanTime() / 1000.)); oldCounts = counts; if (totalUnloaded > 0) { nextEvent.event("[%s]: %d tablets unloaded", store.name(), totalUnloaded); log.debug(String.format("[%s] sleeping for %.2f seconds", store.name(), TIME_TO_WAIT_BETWEEN_SCANS / 1000.)); eventListener.waitForEvents(TIME_TO_WAIT_BETWEEN_SCANS); } catch (Exception ex) { log.error("Error processing table state for store " + store.name(), ex); if (ex.getCause() != null && ex.getCause() instanceof BadLocationStateException) { repairMetadata(((BadLocationStateException) ex.getCause()).getEncodedEndRow());
&& !getConfiguration().getBoolean(Property.MASTER_METADATA_SUSPENDABLE))) { log.debug("Unassigning " + tls); TabletStateStore.unassign(TabletServer.this, tls, null); } else { log.debug("Suspending " + tls); TabletStateStore.suspend(TabletServer.this, tls, null, requestTimeSkew + MILLISECONDS.convert(System.nanoTime(), NANOSECONDS));
public static void unassign(AccumuloServerContext context, TabletLocationState tls, Map<TServerInstance,List<Path>> logsForDeadServers) throws DistributedStoreException { getStoreForTablet(tls.extent, context).unassign(Collections.singletonList(tls), logsForDeadServers); }
public static void suspend(AccumuloServerContext context, TabletLocationState tls, Map<TServerInstance,List<Path>> logsForDeadServers, long suspensionTimestamp) throws DistributedStoreException { getStoreForTablet(tls.extent, context).suspend(Collections.singletonList(tls), logsForDeadServers, suspensionTimestamp); }
TabletStateStore.unassign(tls); } catch (DistributedStoreException ex) { log.warn("Unable to update storage", ex);
@Override public void run() { Thread.currentThread().setName("Watching " + store.name()); int[] oldCounts = new int[TabletState.values().length]; EventCoordinator.Listener eventListener = this.master.nextEvent.getListener(); iter = store.iterator(); while (iter.hasNext()) { TabletLocationState tls = iter.next(); Master.log.debug(store.name() + " location State: " + tls); int i = state.ordinal(); if (counts[i] > 0 && counts[i] != oldCounts[i]) { this.master.nextEvent.event("[%s]: %d tablets are %s", store.name(), counts[i], state.name()); Master.log.debug(String.format("[%s]: scan time %.2f seconds", store.name(), stats.getScanTime() / 1000.)); oldCounts = counts; if (totalUnloaded > 0) { this.master.nextEvent.event("[%s]: %d tablets unloaded", store.name(), totalUnloaded); Master.log.debug(String.format("[%s] sleeping for %.2f seconds", store.name(), Master.TIME_TO_WAIT_BETWEEN_SCANS / 1000.)); eventListener.waitForEvents(Master.TIME_TO_WAIT_BETWEEN_SCANS); Master.log.error("Error processing table state for store " + store.name(), ex); if (ex.getCause() != null && ex.getCause() instanceof BadLocationStateException) { repairMetadata(((BadLocationStateException) ex.getCause()).getEncodedEndRow());
TabletStateStore.setLocation(assignment);
Master.log.debug("logs for dead servers: " + logsForDeadServers); if (tabletsSuspendable) { store.suspend(assignedToDeadServers, logsForDeadServers, master.getSteadyTime()); } else { store.unassign(assignedToDeadServers, logsForDeadServers); Master.log.debug(assignedToDeadServers.size() + " suspended to gone servers: " + assignedToDeadServers.subList(0, maxServersToShow) + "..."); store.unsuspend(suspendedToGoneServers); Master.log.debug(store.name() + " assigning tablets: [" + builder.toString()); builder.setLength(0); Master.log.warn(store.name() + " load balancer assigning tablet that was not nominated for assignment " + assignment.getKey()); Master.log.debug(store.name() + " assigning tablets: [" + builder.toString()); store.setFutureLocations(assignments);
public static void setLocation(AccumuloServerContext context, Assignment assignment) throws DistributedStoreException { getStoreForTablet(assignment.tablet, context) .setLocations(Collections.singletonList(assignment)); }
TabletStateStore.setLocation(TabletServer.this, assignment);