|
7 | 7 | import org.elasticsearch.action.support.DefaultShardOperationFailedException;
|
8 | 8 | import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException;
|
9 | 9 | import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction;
|
| 10 | +import org.elasticsearch.cache.recycler.CacheRecycler; |
10 | 11 | import org.elasticsearch.cluster.ClusterService;
|
11 | 12 | import org.elasticsearch.cluster.ClusterState;
|
12 | 13 | import org.elasticsearch.cluster.block.ClusterBlockException;
|
@@ -50,15 +51,19 @@ public abstract class AbstractTransportExportAction extends TransportBroadcastOp
|
50 | 51 |
|
51 | 52 | private final Exporter exporter;
|
52 | 53 |
|
| 54 | + private final CacheRecycler cacheRecycler; |
| 55 | + |
53 | 56 | private String nodePath;
|
54 | 57 |
|
55 | 58 | public AbstractTransportExportAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
|
56 | 59 | TransportService transportService, IndicesService indicesService,
|
57 |
| - ScriptService scriptService, IExportParser exportParser, Exporter exporter, |
| 60 | + ScriptService scriptService, CacheRecycler cacheRecycler, |
| 61 | + IExportParser exportParser, Exporter exporter, |
58 | 62 | NodeEnvironment nodeEnv) {
|
59 | 63 | super(settings, threadPool, clusterService, transportService);
|
60 | 64 | this.indicesService = indicesService;
|
61 | 65 | this.scriptService = scriptService;
|
| 66 | + this.cacheRecycler = cacheRecycler; |
62 | 67 | this.exportParser = exportParser;
|
63 | 68 | this.exporter = exporter;
|
64 | 69 | File[] paths = nodeEnv.nodeDataLocations();
|
@@ -142,7 +147,9 @@ protected ShardExportResponse shardOperation(ShardExportRequest request) throws
|
142 | 147 | IndexShard indexShard = indexService.shardSafe(request.shardId());
|
143 | 148 |
|
144 | 149 | SearchShardTarget shardTarget = new SearchShardTarget(clusterService.localNode().id(), request.index(), request.shardId());
|
145 |
| - ExportContext context = new ExportContext(0, new ShardSearchRequest().types(request.types()).filteringAliases(request.filteringAliases()), shardTarget, indexShard.searcher(), indexService, indexShard, scriptService, nodePath); |
| 150 | + ExportContext context = new ExportContext(0, |
| 151 | + new ShardSearchRequest().types(request.types()).filteringAliases(request.filteringAliases()), |
| 152 | + shardTarget, indexShard.searcher(), indexService, indexShard, scriptService, cacheRecycler, nodePath); |
146 | 153 | ExportContext.setCurrent(context);
|
147 | 154 |
|
148 | 155 | try {
|
|
0 commit comments