Commit explicit partition/offset pairs.
544482
def commit_partition_offsets(self, partition_offsets):
        
        self.logger.debug("Committing partition offsets: %s", partition_offsets)

        commit_requests = [
            OffsetCommitRequestPayload(self.consumer.topic, partition, offset, None)
            for partition, offset in partition_offsets.items()
        ]
        commit_responses = self.consumer.client.send_offset_commit_request(
            self.consumer.group,
            commit_requests,
        )
        for commit_response in commit_responses:
            check_error(commit_response)
669851
public final void commit() {
        ensureNotYetCreated();
        ensureHasChanges();
        alreadyCreated = true;
        area.replaceMulti(Collections.unmodifiableList(list));
    }
1151562
@Override
	protected void doCommitInternalOffsetsToKafka(
			Map<KafkaTopicPartition, Long> offsets,
			@Nonnull KafkaCommitCallback commitCallback) throws Exception {

		ZookeeperOffsetHandler zkHandler = this.zookeeperOffsetHandler;
		if (zkHandler != null) {
			try {
				// the ZK handler takes care of incrementing the offsets by 1 before committing
				zkHandler.prepareAndCommitOffsets(offsets);
				commitCallback.onSuccess();
			}
			catch (Exception e) {
				if (running) {
					commitCallback.onException(e);
					throw e;
				} else {
					return;
				}
			}
		}

		// Set committed offsets in topic partition state
		for (KafkaTopicPartitionState<TopicAndPartition> partition : subscribedPartitionStates()) {
			Long offset = offsets.get(partition.getKafkaTopicPartition());
			if (offset != null) {
				partition.setCommittedOffset(offset);
			}
		}
	}
746176
public void commit()
    {
        long        elapsed = System.nanoTime() - startTimeNanos;
        driver.addTrace(name, elapsed, TimeUnit.NANOSECONDS);
    }
623405
public void commit() throws IOException {
        if(!marked)     throw new IllegalStateException();
        marked = false;
        super.append(buffer);
        buffer.setLength(0);
    }
426506
def commit_all(self):
        """"""
        while self._transaction_nesting_level != 0:
            if not self._auto_commit and self._transaction_nesting_level == 1:
                return self.commit()
            self.commit()
251891
def _flush(self, commit=True, using=None):
        
        if commit:
            # XXX: multi-set?
            if self._uses_savepoints():
                self._commit_all_savepoints(using)
            c = self.local.mget('%s_%s_*' %
                                (self.prefix, self._trunc_using(using)))
            for key, value in c.items():
                self.cache_backend.set(key, value, self.timeout)
        else:
            if self._uses_savepoints():
                self._rollback_all_savepoints(using)
        self._clear(using)
        self._clear_sid_stack(using)
594093
def commit(self):
        """"""
        if (not self._add_cache and
                not self._remove_cache and
                not self._undefined_cache):
            return

        for store_key, hash_values in self._add_cache.items():
            for hash_value in hash_values:
                super(TransactionalIndex, self).add_hashed_value(
                    hash_value, store_key)
        for store_key in self._remove_cache:
            super(TransactionalIndex, self).remove_key(store_key)
        for store_key in self._undefined_cache:
            super(TransactionalIndex, self).add_undefined(store_key)
        if not self.ephemeral:
            self.save_to_store()

        self._init_cache()
        self._in_transaction = True
530585
def __update_offset_table(self, fileobj, fmt, atom, delta, offset):
        """"""
        if atom.offset > offset:
            atom.offset += delta
        fileobj.seek(atom.offset + 12)
        data = fileobj.read(atom.length - 12)
        fmt = fmt % cdata.uint_be(data[:4])
        offsets = struct.unpack(fmt, data[4:])
        offsets = [o + (0, delta)[offset < o] for o in offsets]
        fileobj.seek(atom.offset + 16)
        fileobj.write(struct.pack(fmt, *offsets))
61757
def refresh_committed_offsets_if_needed(self):
        """"""
        if self._subscription.needs_fetch_committed_offsets:
            offsets = self.fetch_committed_offsets(self._subscription.assigned_partitions())
            for partition, offset in six.iteritems(offsets):
                # verify assignment is still active
                if self._subscription.is_assigned(partition):
                    self._subscription.assignment[partition].committed = offset.offset
            self._subscription.needs_fetch_committed_offsets = False
381933
private void commitEntries() {
    context.checkThread();

    // Sort the list of replicas, order by the last index that was replicated
    // to the replica. This will allow us to determine the median index
    // for all known replicated entries across all cluster members.
    List<MemberState> members = context.getClusterState().getActiveMemberStates((m1, m2) ->
      Long.compare(m2.getMatchIndex() != 0 ? m2.getMatchIndex() : 0L, m1.getMatchIndex() != 0 ? m1.getMatchIndex() : 0L));

    // If the active members list is empty (a configuration change occurred between an append request/response)
    // ensure all commit futures are completed and cleared.
    if (members.isEmpty()) {
      long previousCommitIndex = context.getCommitIndex();
      long commitIndex = context.getLog().lastIndex();
      context.setCommitIndex(commitIndex);
      completeCommits(previousCommitIndex, commitIndex);
      return;
    }

    // Calculate the current commit index as the median matchIndex.
    long commitIndex = members.get(quorumIndex()).getMatchIndex();

    // If the commit index has increased then update the commit index. Note that in order to ensure
    // the leader completeness property holds, we verify that the commit index is greater than or equal to
    // the index of the leader's no-op entry. Update the commit index and trigger commit futures.
    long previousCommitIndex = context.getCommitIndex();
    if (commitIndex > 0 && commitIndex > previousCommitIndex && (leaderIndex > 0 && commitIndex >= leaderIndex)) {
      context.setCommitIndex(commitIndex);
      completeCommits(previousCommitIndex, commitIndex);
    }
  }
865110
def commit_data(sha)
      sha = sha.to_s
      cdata = command_lines('cat-file', ['commit', sha])
      process_commit_data(cdata, sha, 0)
    end
985513
def assemble_pairs(p, pf, tag, target=["final.contigs.fasta"]):
    
    slink(p, pf, tag)
    assemble_dir(pf, target)
808481
def batch_commit(self, *, do_deletes=False):
        '''
        
        '''
        try:
            yield
        except Exception as exc:
            raise exc
        else:
            for key, value in self.cache.items():
                if value is not DELETED:
                    self.wrapped_db[key] = value
                elif do_deletes:
                    self.wrapped_db.pop(key, None)
                # if do_deletes is False, ignore deletes to underlying db
        finally:
            self.cache = {}
638439
def commit(self):  # pylint: disable=no-self-use
        """"""
        if self._config_changed:
            self._last_working_config = self._download_running_config()
            self._config_history.append(self._last_working_config)
            self._committed = True  # comfiguration was committed
            self._config_changed = False  # no changes since last commit :)
            return True  # this will be always true
            # since the changes are automatically applied
        self._committed = False  # make sure the _committed attribute is not True by any chance
        return False
111903
def decode_offset_commit_response(cls, response):
        
        return [
            kafka.structs.OffsetCommitResponsePayload(topic, partition, error)
            for topic, partitions in response.topics
            for partition, error in partitions
        ]
606355
def _PartitionChunks(chunks):
  """"""
  partitions = [[]]
  partition_size = 0

  for chunk in chunks:
    cursize = len(chunk["blob_chunk"])
    if (cursize + partition_size > BLOB_CHUNK_SIZE or
        len(partitions[-1]) >= CHUNKS_PER_INSERT):
      partitions.append([])
      partition_size = 0
    partitions[-1].append(chunk)
    partition_size += cursize

  return partitions