当前位置: 首页>>代码示例>>Java>>正文


Java UpdateRequestBuilder.execute方法代码示例

本文整理汇总了Java中org.elasticsearch.action.update.UpdateRequestBuilder.execute方法的典型用法代码示例。如果您正苦于以下问题:Java UpdateRequestBuilder.execute方法的具体用法?Java UpdateRequestBuilder.execute怎么用?Java UpdateRequestBuilder.execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.action.update.UpdateRequestBuilder的用法示例。


在下文中一共展示了UpdateRequestBuilder.execute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addActionRequestBuilderForFlush

import org.elasticsearch.action.update.UpdateRequestBuilder; //导入方法依赖的package包/类
private void addActionRequestBuilderForFlush(String elementId, UpdateRequestBuilder updateRequestBuilder) {
    Future future;
    try {
        future = updateRequestBuilder.execute();
    } catch (Exception ex) {
        LOGGER.debug("Could not execute update: %s", ex.getMessage());
        future = SettableFuture.create();
        ((SettableFuture) future).setException(ex);
    }
    getFlushObjectQueue().add(new FlushObject(elementId, updateRequestBuilder, future));
}
 
开发者ID:mware-solutions,项目名称:memory-graph,代码行数:12,代码来源:Elasticsearch5SearchIndex.java

示例2: executeUpdateRequest

import org.elasticsearch.action.update.UpdateRequestBuilder; //导入方法依赖的package包/类
private void executeUpdateRequest(final StreamInput streamInput, final UpdateRequestBuilder builder) {
    builder.execute(wrap(res -> {
        processRequests(streamInput);
        // continue
    }, e -> {
        if (senderRequestRetryCount >= 0) {
            if (requestErrorCount > senderRequestRetryCount) {
                logger.error("[Sender][" + index + "][" + requestErrorCount + "] Failed to update [" + builder.request().index() + "]["
                        + builder.request().type() + "][" + builder.request().id() + "]", e);
                requestErrorCount = 0;
                writeError(requestPosition, builder.request(), wrap(r -> processRequests(streamInput), ex -> {
                    logger.warn("[Sender][" + index + "] Failed to store an error request.", ex);
                    processRequests(streamInput);
                }));
            } else {
                if (logger.isDebugEnabled()) {
                    logger.debug("[" + requestErrorCount + "] Failed to update [" + builder.request().index() + "]["
                            + builder.request().type() + "][" + builder.request().id() + "]", e);
                }
                requestErrorCount++;
                executeUpdateRequest(streamInput, builder);
            }
        } else {
            IOUtils.closeQuietly(streamInput);
            retryWithError("Failed to update (" + builder.request() + ")", e);
            // retry
        }
    }));
}
 
开发者ID:codelibs,项目名称:elasticsearch-indexing-proxy,代码行数:30,代码来源:RequestSender.java

示例3: addActionRequestBuilderForFlush

import org.elasticsearch.action.update.UpdateRequestBuilder; //导入方法依赖的package包/类
private void addActionRequestBuilderForFlush(String elementId, String rowId, UpdateRequestBuilder updateRequestBuilder) {
    Future future;
    try {
        future = updateRequestBuilder.execute();
    } catch (Exception ex) {
        LOGGER.debug("Could not execute update: %s", ex.getMessage());
        future = SettableFuture.create();
        ((SettableFuture) future).setException(ex);
    }
    getFlushObjectQueue().add(new FlushObject(elementId, rowId, updateRequestBuilder, future));
}
 
开发者ID:visallo,项目名称:vertexium,代码行数:12,代码来源:Elasticsearch5SearchIndex.java


注:本文中的org.elasticsearch.action.update.UpdateRequestBuilder.execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。