Builds current snapshots of nodes across all running node managers.

 @return [Hash<Node, NodeSnapshot>] the snapshots for all nodes
510077
def current_node_snapshots
      nodes = {}
      snapshots = Hash.new { |h, k| h[k] = NodeSnapshot.new(k) }
      fetch_node_manager_states.each do |node_manager, states|
        available, unavailable = states.values_at(:available, :unavailable)
        available.each do |node_string, latency|
          node = nodes[node_string] ||= node_from(node_string)
          snapshots[node].viewable_by(node_manager, latency)
        end
        unavailable.each do |node_string|
          node = nodes[node_string] ||= node_from(node_string)
          snapshots[node].unviewable_by(node_manager)
        end
      end

      snapshots
    end
39915
public function snapshot()
    {
        collect($this->measuredJobs())->each(function ($job) {
            $this->storeSnapshotForJob($job);
        });

        collect($this->measuredQueues())->each(function ($queue) {
            $this->storeSnapshotForQueue($queue);
        });

        $this->storeSnapshotTimestamp();
    }
357970
def update_master_state(node, snapshots)
      state = @node_strategy.determine_state(node, snapshots)
      case state
      when :unavailable
        handle_unavailable(node, snapshots)
      when :available
        if node.syncing_with_master?
          handle_syncing(node, snapshots)
        else
          handle_available(node, snapshots)
        end
      else
        raise InvalidNodeStateError.new(node, state)
      end
    rescue *ZK_ERRORS
      # fail hard if this is a ZK connection-related error
      raise
    rescue => ex
      logger.error("Error handling state report for #{[node, state].inspect}: #{ex.inspect}")
    end
1209921
public java.util.List<SnapshotSchedule> getSnapshotSchedules() {
        if (snapshotSchedules == null) {
            snapshotSchedules = new com.amazonaws.internal.SdkInternalList<SnapshotSchedule>();
        }
        return snapshotSchedules;
    }
299409
def _snapshot(self) -> Dict[str, Any]:
        
        try:
            return {name: item._snapshot for name, item in self._nested_items.items()}
        except Exception as e:
            raise SnapshotError('Error while creating snapshot for {}'.format(self._name)) from e
575002
def build_nodes
      value = _target_column

      for key in _key_chain
        value[key] = {} unless value[key]
        value = value[key]
      end
    end
842479
def update_nodes!(nodes)
      @node_names.each do |node_name|
        # find out if the node is already in the array
        found = nodes.index { |n| n['name'] == node_name }
        if found.nil?
          nodes.push(node_export(node_name))
        else
          nodes[found] = node_export(node_name)
        end
      end
    end
290674
def get_snapshots(topology):
    
    snapshots = []
    snap_dir = os.path.join(topology_dirname(topology), 'snapshots')
    if os.path.exists(snap_dir):
        snaps = os.listdir(snap_dir)
        for directory in snaps:
            snap_top = os.path.join(snap_dir, directory, 'topology.net')
            if os.path.exists(snap_top):
                snapshots.append({'file': snap_top,
                                  'snapshot': True})
    return snapshots
1004653
def odba_take_snapshot
			@odba_snapshot_level ||= 0
			snapshot_level = @odba_snapshot_level.next
			current_level = [self]
			tree_level = 0
			while(!current_level.empty?)
				tree_level += 1
				obj_count = 0
				next_level = []
				current_level.each { |item|
					if(item.odba_unsaved?(snapshot_level))
						obj_count += 1
						next_level += item.odba_unsaved_neighbors(snapshot_level)
						item.odba_snapshot(snapshot_level)
					end
				}
				current_level = next_level #.uniq
			end
		end
34228
def get_nodes_by_hashes(self, node_hashes: List[str]) -> List[Node]:
        """"""
        return self.session.query(Node).filter(Node.sha512.in_(node_hashes)).all()
45832
def read_snapshots(path, comments="#", directed=False, delimiter=None,
                   nodetype=None, timestamptype=None, encoding='utf-8', keys=False):
    
    ids = None
    lines = (line.decode(encoding) for line in path)
    if keys:
        ids = read_ids(path.name, delimiter=delimiter, timestamptype=timestamptype)

    return parse_snapshots(lines, comments=comments, directed=directed, delimiter=delimiter,  nodetype=nodetype,
                           timestamptype=timestamptype, keys=ids)
480149
public HashMap<KafkaTopicPartition, Long> snapshotCurrentState() {
		// this method assumes that the checkpoint lock is held
		assert Thread.holdsLock(checkpointLock);

		HashMap<KafkaTopicPartition, Long> state = new HashMap<>(subscribedPartitionStates.size());
		for (KafkaTopicPartitionState<KPH> partition : subscribedPartitionStates) {
			state.put(partition.getKafkaTopicPartition(), partition.getOffset());
		}
		return state;
	}
629188
def list_snapshots(config='root'):
    '''
    
    '''
    try:
        snapshots = snapper.ListSnapshots(config)
        return [_snapshot_to_data(s) for s in snapshots]
    except dbus.DBusException as exc:
        raise CommandExecutionError(
            'Error encountered while listing snapshots: {0}'
            .format(_dbus_exception_to_reason(exc, locals()))
        )
344654
def list_snapshots(self):
        
        return [snap for snap in self.manager.list_snapshots()
                if snap.volume_id == self.id]
89607
def snapshots
      raise Fission::Error,"VM #{@name} does not exist" unless self.exists?

      command = "#{vmrun_cmd} listSnapshots #{vmx_path.shellescape} 2>&1"
      output = `#{command}`

      raise "There was an error listing the snapshots of #{@name} :\n #{output}" unless  $?.exitstatus==0

      snaps_unfiltered = output.split("\n").select { |s| !s.include? 'Total snapshots:' }
      snaps=snaps_unfiltered.map { |s| s.strip }
      return snaps
    end
935943
def _get_source_snapshots(self, snapshot, fallback_self=False):
        
        if not snapshot:
            return []

        source_snapshots = re.findall(r"'([\w\d\.-]+)'", snapshot['Description'])
        if not source_snapshots and fallback_self:
            source_snapshots = [snapshot['Name']]

        source_snapshots.sort()
        return source_snapshots
281108
def snapshot_list(self):
        '''
        
        '''
        NO_SNAPSHOTS_TAKEN = 'No snapshots have been taken yet!'
        output = self._run_vagrant_command(['snapshot', 'list'])
        if NO_SNAPSHOTS_TAKEN in output:
            return []
        else:
            return output.splitlines()