stop active sync on a mount id.

@param mountId mountId to stop active sync
554317
public void stopSyncForMount(long mountId) throws InvalidPathException, IOException {
    LOG.debug("Stop sync for mount id {}", mountId);
    if (mFilterMap.containsKey(mountId)) {
      List<Pair<AlluxioURI, MountTable.Resolution>> toBeDeleted = new ArrayList<>();
      for (AlluxioURI uri : mFilterMap.get(mountId)) {
        MountTable.Resolution resolution = resolveSyncPoint(uri);
        if (resolution != null) {
          toBeDeleted.add(new Pair<>(uri, resolution));
        }
      }
      // Calling stopSyncInternal outside of the traversal of mFilterMap.get(mountId) to avoid
      // ConcurrentModificationException
      for (Pair<AlluxioURI, MountTable.Resolution> deleteInfo : toBeDeleted) {
        stopSyncInternal(deleteInfo.getFirst(), deleteInfo.getSecond());
      }
    }
  }
959123
def stop_sync(self):
        

        conn_ids = self.conns.get_connections()

        # If we have any open connections, try to close them here before shutting down
        for conn in list(conn_ids):
            try:
                self.disconnect_sync(conn)
            except HardwareError:
                pass

        self.client.disconnect()
        self.conns.stop()
1340326
public void cancel(int entryId) {
        NotificationEntry entry = mCenter.getEntry(ID, entryId);
        if (entry != null) {
            cancel(entry);
        }
    }
553065
@Override
  public void cancel(Serializable id) {
    logger.debug("Cancelling timer with id {}", id);
    this.ftScheduler.cancel(id);
  }
605368
public void suspend(String id) {
        TraceState ts = traceState.get();

        if (log.isLoggable(Level.FINEST)) {
            log.finest("Suspend trace state = " + ts + " id = " + id);
        }

        if (ts != null) {
            setExpire(ts);

            try {
                suspendedStateLock.lock();

                // Check if id already used
                if (suspendedState.containsKey(id) && log.isLoggable(Level.FINEST)) {
                    log.finest("WARNING: Overwriting previous suspended trace state = " + suspendedState.get(id)
                            + " id = " + id);
                }

                suspendedState.put(id, ts);

                traceState.remove();
            } finally {
                suspendedStateLock.unlock();
            }
        }
    }
1183053
function setMountState(value) {
      var ref = this.__;
      var isAnonymous = ref.isAnonymous;

      define(this, 'isMounted', value);

      if (!isAnonymous) {
        if (value) { this.trigger('mount'); }
        else {
          this.trigger('unmount');
          this.off('*');
          this.__.wasCreated = false;
        }
      }
    }
168638
public final void removeServlet(String mountPoint) {
        mountPoint = GenericContext.normalizeMountPoint(mountPoint);
        synchronized (servlets) {
            ServletDescriptor remove = servlets.remove(mountPoint);
            if (remove != null) {
                unregisterServletDescriptor(remove);
            }
        }

    }
761079
public void launchPollingThread(long mountId, long txId) {
    LOG.debug("launch polling thread for mount id {}, txId {}", mountId, txId);
    if (!mPollerMap.containsKey(mountId)) {
      try (CloseableResource<UnderFileSystem> ufsClient =
               mMountTable.getUfsClient(mountId).acquireUfsResource()) {
        ufsClient.get().startActiveSyncPolling(txId);
      } catch (IOException e) {
        LOG.warn("IO Exception trying to launch Polling thread {}", e);
      }
      ActiveSyncer syncer = new ActiveSyncer(mFileSystemMaster, this, mMountTable, mountId);
      Future<?> future = getExecutor().submit(
          new HeartbeatThread(HeartbeatContext.MASTER_ACTIVE_UFS_SYNC,
              syncer, (int) ServerConfiguration.getMs(PropertyKey.MASTER_ACTIVE_UFS_SYNC_INTERVAL),
              ServerConfiguration.global()));
      mPollerMap.put(mountId, future);
    }
  }
845906
public void stop() {
    if (mBackup != null) {
      mBackup.cancel(true);
      mBackup = null;
    }
    LOG.info("Daily metadata backup stopped");

    mScheduledExecutor.shutdownNow();
    String waitForMessage = "waiting for daily metadata backup executor service to shut down";
    try {
      if (!mScheduledExecutor.awaitTermination(SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
        LOG.warn("Timed out " + waitForMessage);
      }
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      LOG.warn("Interrupted while " + waitForMessage);
    }
  }
750856
public void recoverFromStopSync(AlluxioURI uri, long mountId) {
    if (mSyncPathStatus.containsKey(uri)) {
      // nothing to recover from, since the syncPathStatus still contains syncPoint
      return;
    }
    try {
      // the init sync thread has been removed, to reestablish sync, we need to sync again
      MountTable.Resolution resolution = mMountTable.resolve(uri);
      startInitSync(uri, resolution);
      launchPollingThread(resolution.getMountId(), SyncInfo.INVALID_TXID);
    } catch (Throwable t) {
      LOG.warn("Recovering from stop syncing failed {}", t);
    }
  }
606059
public void stopRemoteSession(String remoteId) {
    cmNotifier.addCall(new ClusterManagerService.sessionEnd_args(remoteId,
        SessionStatus.TIMED_OUT));
  }
697456
public void stop() {
        synchronized (LOCK) {
            if (this.active) {
                this.active = false;
                logger.info("Stopping UDP Manager");
                stopTasks();
                closeSelectors();
                cleanResources();
                logger.info("UDP Manager has stopped");
            }
        }
    }
676451
public synchronized void stop() {
        if (isRunning()) {
            running.set(false);
            DeviceFinder.getInstance().removeDeviceAnnouncementListener(announcementListener);
            dbServerPorts.clear();
            for (Client client : openClients.values()) {
                try {
                    client.close();
                } catch (Exception e) {
                    logger.warn("Problem closing " + client + " when stopping", e);
                }
            }
            openClients.clear();
            useCounts.clear();
            deliverLifecycleAnnouncement(logger, false);
        }
    }
403912
public synchronized void stop() {
        if (!monitorActive) {
            return;
        }
        monitorActive = false;
        resetAccounting(milliSecondFromNano());
        if (trafficShapingHandler != null) {
            trafficShapingHandler.doAccounting(this);
        }
        if (scheduledFuture != null) {
            scheduledFuture.cancel(true);
        }
    }
621801
private void removeMount(SlotReference slot) {
        mediaDetails.remove(slot);
        if (mediaMounts.remove(slot)) {
            deliverMountUpdate(slot, false);
        }
    }
1243597
@Override
   public void stopApplyingState(int topologyId) {
      if (trace) log.tracef("Stop keeping track of changed keys for state transfer in topology %d", topologyId);
      commitManager.stopTrack(PUT_FOR_STATE_TRANSFER);
   }
441752
public void stopWatching() {
    try {
      _watchService.close();
      _watchService = null;
      _watchedDirectories = null;
    } catch (IOException e) {
      throw new RuntimeException("Could not stop watching directories!", e);
    }
  }