public boolean overlaps(KeyExtent otherExtent) { boolean result = this.extent.overlaps(otherExtent); if (!result && needsToBeChopped(otherExtent)) return true; return result; }
private void sendChopRequest(MergeInfo info, TabletState state, TabletLocationState tls) { // Don't bother if we're in the wrong state if (!info.getState().equals(MergeState.WAITING_FOR_CHOPPED)) return; // Tablet must be online if (!state.equals(TabletState.HOSTED)) return; // Tablet isn't already chopped if (tls.chopped) return; // Tablet ranges intersect if (info.needsToBeChopped(tls.extent)) { TServerConnection conn; try { conn = this.master.tserverSet.getConnection(tls.current); if (conn != null) { Master.log.info("Asking {} to chop {}", tls.current, tls.extent); conn.chop(this.master.masterLock, tls.extent); } else { Master.log.warn("Could not connect to server {}", tls.current); } } catch (TException e) { Master.log.warn("Communications error asking tablet server to chop a tablet"); } } }
public void update(KeyExtent ke, TabletState state, boolean chopped, boolean hasWALs) { if (info.getState().equals(MergeState.NONE)) return; if (!upperSplit && info.getExtent().getEndRow().equals(ke.getPrevEndRow())) { log.info("Upper split found"); upperSplit = true; } if (!lowerSplit && info.getExtent().getPrevEndRow().equals(ke.getEndRow())) { log.info("Lower split found"); lowerSplit = true; } if (!info.overlaps(ke)) return; if (info.needsToBeChopped(ke)) { this.needsToBeChopped++; if (chopped) { if (state.equals(TabletState.HOSTED)) { this.chopped++; } else if (!hasWALs) { this.chopped++; } } } this.total++; if (state.equals(TabletState.HOSTED)) this.hosted++; if (state.equals(TabletState.UNASSIGNED) || state.equals(TabletState.SUSPENDED)) this.unassigned++; }
if (!tls.walogs.isEmpty() && verify.getMergeInfo().needsToBeChopped(tls.extent)) { log.debug("failing consistency: needs to be chopped {}", tls.extent); return false;
public boolean overlaps(KeyExtent extent) { boolean result = this.range.overlaps(extent); if (!result && needsToBeChopped(extent)) return true; return result; }
public boolean overlaps(KeyExtent otherExtent) { boolean result = this.extent.overlaps(otherExtent); if (!result && needsToBeChopped(otherExtent)) return true; return result; }
private void sendChopRequest(MergeInfo info, TabletState state, TabletLocationState tls) { // Don't bother if we're in the wrong state if (!info.getState().equals(MergeState.WAITING_FOR_CHOPPED)) return; // Tablet must be online if (!state.equals(TabletState.HOSTED)) return; // Tablet isn't already chopped if (tls.chopped) return; // Tablet ranges intersect if (info.needsToBeChopped(tls.extent)) { TServerConnection conn; try { conn = tserverSet.getConnection(tls.current); if (conn != null) { log.info("Asking " + tls.current + " to chop " + tls.extent); conn.chop(masterLock, tls.extent); } else { log.warn("Could not connect to server " + tls.current); } } catch (TException e) { log.warn("Communications error asking tablet server to chop a tablet"); } } }
private void sendChopRequest(MergeInfo info, TabletState state, TabletLocationState tls) { // Don't bother if we're in the wrong state if (!info.getState().equals(MergeState.WAITING_FOR_CHOPPED)) return; // Tablet must be online if (!state.equals(TabletState.HOSTED)) return; // Tablet isn't already chopped if (tls.chopped) return; // Tablet ranges intersect if (info.needsToBeChopped(tls.extent)) { TServerConnection conn; try { conn = this.master.tserverSet.getConnection(tls.current); if (conn != null) { Master.log.info("Asking " + tls.current + " to chop " + tls.extent); conn.chop(this.master.masterLock, tls.extent); } else { Master.log.warn("Could not connect to server " + tls.current); } } catch (TException e) { Master.log.warn("Communications error asking tablet server to chop a tablet"); } } }
if (info.needsToBeChopped(ke)) { this.needsToBeChopped++; if (chopped) {
public void update(KeyExtent ke, TabletState state, boolean chopped, boolean hasWALs) { if (info.getState().equals(MergeState.NONE)) return; if (!upperSplit && info.getExtent().getEndRow().equals(ke.getPrevEndRow())) { log.info("Upper split found"); upperSplit = true; } if (!lowerSplit && info.getExtent().getPrevEndRow().equals(ke.getEndRow())) { log.info("Lower split found"); lowerSplit = true; } if (!info.overlaps(ke)) return; if (info.needsToBeChopped(ke)) { this.needsToBeChopped++; if (chopped) { if (state.equals(TabletState.HOSTED)) { this.chopped++; } else if (!hasWALs) { this.chopped++; } } } this.total++; if (state.equals(TabletState.HOSTED)) this.hosted++; if (state.equals(TabletState.UNASSIGNED) || state.equals(TabletState.SUSPENDED)) this.unassigned++; }
if (!tls.walogs.isEmpty() && verify.getMergeInfo().needsToBeChopped(tls.extent)) { log.debug("failing consistency: needs to be chopped" + tls.extent); return false;
if (!tls.walogs.isEmpty() && verify.getMergeInfo().needsToBeChopped(tls.extent)) { log.debug("failing consistency: needs to be chopped" + tls.extent); return false;