Performs bulk operation
433726
def perform(self):
        
        for request in self._cfg[Integrator._CFG_KEY_REQUESTS]:
            request_type = self._cfg[Integrator._CFG_KEY_REQUESTS][request][Integrator._CFG_KEY_REQUEST_TYPE]
            request_cfg_file = self._cfg[Integrator._CFG_KEY_REQUESTS][request][Integrator._CFG_KEY_REQUEST_CFG_FILE]
            self._logger.debug('{}'.format(request_cfg_file))
            self._process_request(request, request_type, request_cfg_file)
252905
def bulk_upload(self, items, field_id):
        """"""

        current = 0
        new_items = 0  # total items added with bulk
        bulk_json = ""

        if not items:
            return new_items

        url = self.index_url + '/items/_bulk'

        logger.debug("Adding items to %s (in %i packs)", self.anonymize_url(url), self.max_items_bulk)
        task_init = time()

        for item in items:
            if current >= self.max_items_bulk:
                task_init = time()
                new_items += self.safe_put_bulk(url, bulk_json)
                current = 0
                json_size = sys.getsizeof(bulk_json) / (1024 * 1024)
                logger.debug("bulk packet sent (%.2f sec, %i total, %.2f MB)"
                             % (time() - task_init, new_items, json_size))
                bulk_json = ""
            data_json = json.dumps(item)
            bulk_json += '{"index" : {"_id" : "%s" } }\n' % (item[field_id])
            bulk_json += data_json + "\n"  # Bulk document
            current += 1

        if current > 0:
            new_items += self.safe_put_bulk(url, bulk_json)
            json_size = sys.getsizeof(bulk_json) / (1024 * 1024)
            logger.debug("bulk packet sent (%.2f sec prev, %i total, %.2f MB)"
                         % (time() - task_init, new_items, json_size))

        return new_items
1036819
def _add_to_bulk(self, bulkobj):
        """"""
        bulkobj.add_delete(self._filter, 0, collation=self._collation)
1269673
def execute(self, sql, parameters=None, bulk_parameters=None):
        
        if self.connection._closed:
            raise ProgrammingError("Connection closed")

        if self._closed:
            raise ProgrammingError("Cursor closed")

        self._result = self.connection.client.sql(sql, parameters,
                                                  bulk_parameters)
        if "rows" in self._result:
            self.rows = iter(self._result["rows"])
580099
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		syslog_sslvpn_responses result = (syslog_sslvpn_responses) service.get_payload_formatter().string_to_resource(syslog_sslvpn_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.syslog_sslvpn_response_array);
		}
		syslog_sslvpn[] result_syslog_sslvpn = new syslog_sslvpn[result.syslog_sslvpn_response_array.length];
		
		for(int i = 0; i < result.syslog_sslvpn_response_array.length; i++)
		{
			result_syslog_sslvpn[i] = result.syslog_sslvpn_response_array[i].syslog_sslvpn[0];
		}
		
		return result_syslog_sslvpn;
	}
1030753
def bulk_update_batches(aggregations)
      en = Enumerator.new do |e|
        i = 1
        batch = []
        aggregations.each do |agg|
          batch << agg
          if i % @bulk_update_size == 0
            e.yield batch
            batch = []
          end
          i += 1
        end
        e.yield batch if batch.count > 0  # last one
      end
      en.lazy
    end
227242
def process(self, tup):
        
        self.es.bulk(
            self.generate_bulk_body(tup.values[2]),
            index=self.index,
            doc_type=self.doc_type)
180342
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		ssl_key_responses result = (ssl_key_responses) service.get_payload_formatter().string_to_resource(ssl_key_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.ssl_key_response_array);
		}
		ssl_key[] result_ssl_key = new ssl_key[result.ssl_key_response_array.length];
		
		for(int i = 0; i < result.ssl_key_response_array.length; i++)
		{
			result_ssl_key[i] = result.ssl_key_response_array[i].ssl_key[0];
		}
		
		return result_ssl_key;
	}
851157
def _bulk_size_generator(num_records, bulk_size, active):
    
    while active and num_records > 0:
        req_size = min(num_records, bulk_size)
        num_records -= req_size
        yield req_size
35542
public function bulk($jobs, $data = '', $queue = null)
    {
        foreach ((array) $jobs as $job) {
            $this->push($job, $data, $queue);
        }
    }
353878
public void sendBulkDataAsync(List<? extends Map<String, ?>> bulkSourceList,
            String index, String type) {
        executeBulkRequestAsync(
                buildBulkIndexRequestBuilder(bulkSourceList
                        .stream().map(source -> jmESClient
                                .prepareIndex(index, type).setSource(source))
                        .collect(toList())));
    }
965650
def execute(self, write_concern, session):
        
        if not self.ops:
            raise InvalidOperation('No operations to execute')
        if self.executed:
            raise InvalidOperation('Bulk operations can '
                                   'only be executed once.')
        self.executed = True
        write_concern = write_concern or self.collection.write_concern
        session = _validate_session_write_concern(session, write_concern)

        if self.ordered:
            generator = self.gen_ordered()
        else:
            generator = self.gen_unordered()

        client = self.collection.database.client
        if not write_concern.acknowledged:
            with client._socket_for_writes(session) as sock_info:
                self.execute_no_results(sock_info, generator)
        else:
            return self.execute_command(generator, write_concern, session)
1283770
def _do_bulk_write_command(
        namespace, operation, command, docs, check_keys, opts, ctx):
    """"""
    if ctx.sock_info.max_wire_version > 5:
        return _do_batched_op_msg(
            namespace, operation, command, docs, check_keys, opts, ctx)
    return _do_batched_write_command(
        namespace, operation, command, docs, check_keys, opts, ctx)
301739
public BulkResponse
    executeBulkRequest(BulkRequestBuilder bulkRequestBuilder) {
        JMLog.info(log, "executeBulkRequest", bulkRequestBuilder);
        return bulkRequestBuilder.execute().actionGet();
    }
1210764
def _add_to_bulk(self, bulkobj):
        """"""
        bulkobj.add_replace(self._filter, self._doc, self._upsert,
                            collation=self._collation)
261573
public static function executeBulk(BulkHandler $bulkHandler, string $query): void
  {
    self::realQuery($query);

    $bulkHandler->start();

    $result = self::$mysqli->use_result();
    while (($row = $result->fetch_assoc()))
    {
      $bulkHandler->row($row);
    }
    $result->free();

    $bulkHandler->stop();

    if (self::$mysqli->more_results()) self::$mysqli->next_result();
  }
20266
def bulk_create(self, *args, **kwargs):
        
        ret_val = super(ManagerUtilsQuerySet, self).bulk_create(*args, **kwargs)
        post_bulk_operation.send(sender=self.model, model=self.model)
        return ret_val