Skip to content

Commit fb9717f

Browse files
authored
TIKA-4561 -- remove tikaconfigpath from pipesconfig (#2430)
1 parent 3eba834 commit fb9717f

11 files changed

Lines changed: 52 additions & 65 deletions

File tree

tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class TikaGrpcServerImpl extends TikaGrpc.TikaImplBase {
115115
tikaConfigPath = tikaConfigFile.getAbsolutePath();
116116
}
117117
pipesConfig = TikaLoader.load(tikaConfigFile.toPath()).configs().load("pipes", PipesConfig.class);
118-
pipesClient = new PipesClient(pipesConfig);
118+
pipesClient = new PipesClient(pipesConfig, tikaConfigFile.toPath());
119119

120120
expiringFetcherStore = new ExpiringFetcherStore(pipesConfig.getStaleFetcherTimeoutSeconds(),
121121
pipesConfig.getStaleFetcherDelaySeconds());

tika-pipes/tika-async-cli/src/test/java/org/apache/tika/async/cli/TikaConfigAsyncWriterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void testBasic(@TempDir Path dir) throws Exception {
4545
Path tmp = Files.createTempFile(dir, "plugins-",".json");
4646
pluginsWriter.write(tmp);
4747
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tmp);
48-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tmp);
48+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
4949
assertEquals("-Xmx1g", pipesConfig.getForkedJvmArgs().get(0));
5050
}
5151

tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/PipesClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ public byte getByte() {
9494

9595

9696
private final PipesConfig pipesConfig;
97+
private final Path tikaConfigPath;
9798
private final int pipesClientId;
9899
private ServerTuple serverTuple;
99100
private int filesProcessed = 0;
100101

101-
public PipesClient(PipesConfig pipesConfig) {
102+
public PipesClient(PipesConfig pipesConfig, Path tikaConfigPath) {
102103
this.pipesConfig = pipesConfig;
104+
this.tikaConfigPath = tikaConfigPath;
103105
this.pipesClientId = CLIENT_COUNTER.getAndIncrement();
104106
}
105107

@@ -572,7 +574,7 @@ private String[] getCommandline(int port, Path tmpDir) {
572574
commandLine.add("org.apache.tika.pipes.core.server.PipesServer");
573575

574576
commandLine.add(Integer.toString(port));
575-
commandLine.add(pipesConfig.getTikaConfigPath());
577+
commandLine.add(tikaConfigPath.toAbsolutePath().toString());
576578
LOG.debug("pipesClientId={}: commandline: {}", pipesClientId, commandLine);
577579
return commandLine.toArray(new String[0]);
578580
}

tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/PipesConfig.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@
1717
package org.apache.tika.pipes.core;
1818

1919
import java.io.IOException;
20-
import java.nio.file.Path;
2120
import java.util.ArrayList;
2221

23-
import com.fasterxml.jackson.annotation.JsonIgnore;
24-
2522
import org.apache.tika.config.loader.TikaJsonConfig;
2623
import org.apache.tika.exception.TikaConfigException;
2724

@@ -75,9 +72,6 @@ public class PipesConfig {
7572
public static final int DEFAULT_QUEUE_SIZE = 10000;
7673
public static final int DEFAULT_NUM_EMITTERS = 1;
7774

78-
@JsonIgnore
79-
private volatile String tikaConfigPath = null;
80-
8175
private long emitWithinMillis = DEFAULT_EMIT_WITHIN_MILLIS;
8276
private long emitMaxEstimatedBytes = DEFAULT_EMIT_MAX_ESTIMATED_BYTES;
8377
private int queueSize = DEFAULT_QUEUE_SIZE;
@@ -103,25 +97,14 @@ public class PipesConfig {
10397
* @throws IOException if deserialization fails
10498
* @throws TikaConfigException if configuration is invalid
10599
*/
106-
public static PipesConfig load(TikaJsonConfig tikaJsonConfig, Path tikaConfigPath) throws IOException, TikaConfigException {
100+
public static PipesConfig load(TikaJsonConfig tikaJsonConfig) throws IOException, TikaConfigException {
107101
PipesConfig config = tikaJsonConfig.deserialize("pipes", PipesConfig.class);
108102
if (config == null) {
109103
config = new PipesConfig();
110104
}
111-
config.setTikaConfigPath(tikaConfigPath.toAbsolutePath().toString());
112105
return config;
113106
}
114107

115-
@JsonIgnore
116-
public String getTikaConfigPath() {
117-
return tikaConfigPath;
118-
}
119-
120-
void setTikaConfigPath(String tikaConfigPath) {
121-
this.tikaConfigPath = tikaConfigPath;
122-
}
123-
124-
125108
public long getTimeoutMillis() {
126109
return timeoutMillis;
127110
}

tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/PipesParser.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import java.io.Closeable;
2020
import java.io.IOException;
21+
import java.nio.file.Path;
2122
import java.util.ArrayList;
2223
import java.util.List;
2324
import java.util.concurrent.ArrayBlockingQueue;
@@ -30,15 +31,17 @@ public class PipesParser implements Closeable {
3031

3132

3233
private final PipesConfig pipesConfig;
34+
private final Path tikaConfigPath;
3335
private final List<PipesClient> clients = new ArrayList<>();
3436
private final ArrayBlockingQueue<PipesClient> clientQueue ;
3537

3638

37-
public PipesParser(PipesConfig pipesConfig) {
39+
public PipesParser(PipesConfig pipesConfig, Path tikaConfigPath) {
3840
this.pipesConfig = pipesConfig;
41+
this.tikaConfigPath = tikaConfigPath;
3942
this.clientQueue = new ArrayBlockingQueue<>(pipesConfig.getNumClients());
4043
for (int i = 0; i < pipesConfig.getNumClients(); i++) {
41-
PipesClient client = new PipesClient(pipesConfig);
44+
PipesClient client = new PipesClient(pipesConfig, tikaConfigPath);
4245
clientQueue.offer(client);
4346
clients.add(client);
4447
}

tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/async/AsyncProcessor.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public class AsyncProcessor implements Closeable {
6868
private final ExecutorCompletionService<Integer> executorCompletionService;
6969
private final ExecutorService executorService;
7070
private final PipesConfig asyncConfig;
71+
private final Path tikaConfigPath;
7172
private final PipesReporter pipesReporter;
7273
private final AtomicLong totalProcessed = new AtomicLong(0);
7374
private static long MAX_OFFER_WAIT_MS = 120000;
@@ -84,7 +85,8 @@ public AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator) throws T
8485
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
8586
TikaPluginManager tikaPluginManager = TikaPluginManager.load(tikaJsonConfig);
8687
MetadataFilter metadataFilter = TikaLoader.load(tikaConfigPath).loadMetadataFilters();
87-
this.asyncConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
88+
this.asyncConfig = PipesConfig.load(tikaJsonConfig);
89+
this.tikaConfigPath = tikaConfigPath;
8890
this.pipesReporter = ReporterManager.load(tikaPluginManager, tikaJsonConfig);
8991
LOG.debug("loaded reporter {}", pipesReporter.getClass());
9092
this.fetchEmitTuples = new ArrayBlockingQueue<>(asyncConfig.getQueueSize());
@@ -95,12 +97,6 @@ public AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator) throws T
9597
this.executorCompletionService =
9698
new ExecutorCompletionService<>(executorService);
9799
try {
98-
if (asyncConfig.getTikaConfigPath() != null && !tikaConfigPath.toAbsolutePath().equals(asyncConfig.getTikaConfigPath())) {
99-
LOG.warn("TikaConfig for AsyncProcessor ({}) is different " +
100-
"from TikaConfig for workers ({}). If this is intended," +
101-
" please ignore this warning.", tikaConfigPath.toAbsolutePath(),
102-
asyncConfig.getTikaConfigPath());
103-
}
104100
this.executorCompletionService.submit(() -> {
105101
while (true) {
106102
try {
@@ -119,7 +115,7 @@ public AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator) throws T
119115

120116
for (int i = 0; i < asyncConfig.getNumClients(); i++) {
121117
executorCompletionService.submit(
122-
new FetchEmitWorker(asyncConfig, fetchEmitTuples, emitDatumTuples));
118+
new FetchEmitWorker(asyncConfig, tikaConfigPath, fetchEmitTuples, emitDatumTuples));
123119
}
124120

125121
EmitterManager emitterManager = EmitterManager.load(tikaPluginManager, tikaJsonConfig);
@@ -272,21 +268,24 @@ public long getTotalProcessed() {
272268
private class FetchEmitWorker implements Callable<Integer> {
273269

274270
private final PipesConfig asyncConfig;
271+
private final Path tikaConfigPath;
275272
private final ArrayBlockingQueue<FetchEmitTuple> fetchEmitTuples;
276273
private final ArrayBlockingQueue<EmitDataPair> emitDataTupleQueue;
277274

278275
private FetchEmitWorker(PipesConfig asyncConfig,
276+
Path tikaConfigPath,
279277
ArrayBlockingQueue<FetchEmitTuple> fetchEmitTuples,
280278
ArrayBlockingQueue<EmitDataPair> emitDataTupleQueue) {
281279
this.asyncConfig = asyncConfig;
280+
this.tikaConfigPath = tikaConfigPath;
282281
this.fetchEmitTuples = fetchEmitTuples;
283282
this.emitDataTupleQueue = emitDataTupleQueue;
284283
}
285284

286285
@Override
287286
public Integer call() throws Exception {
288287

289-
try (PipesClient pipesClient = new PipesClient(asyncConfig)) {
288+
try (PipesClient pipesClient = new PipesClient(asyncConfig, tikaConfigPath)) {
290289
while (true) {
291290
FetchEmitTuple t = fetchEmitTuples.poll(1, TimeUnit.SECONDS);
292291
if (t == null) {

tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/server/PipesServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public static PipesServer load(int port, Path tikaConfigPath) throws Exception {
162162
try {
163163
TikaLoader tikaLoader = TikaLoader.load(tikaConfigPath);
164164
TikaJsonConfig tikaJsonConfig = tikaLoader.getConfig();
165-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
165+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
166166

167167
// Set socket timeout from config after loading PipesConfig
168168
socket.setSoTimeout((int) pipesConfig.getSocketTimeoutMs());

tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/PassbackFilterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public class PassbackFilterTest {
5353
public void init(Path tmpDir) throws Exception {
5454
Path pipesConfigPath = PluginsTestHelper.getFileSystemFetcherConfig("tika-config-passback.json", tmpDir);
5555
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(pipesConfigPath);
56-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, pipesConfigPath);
56+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
5757
PluginsTestHelper.copyTestFilesToTmpInput(tmpDir, testPdfFile);
5858

59-
pipesClient = new PipesClient(pipesConfig);
59+
pipesClient = new PipesClient(pipesConfig, pipesConfigPath);
6060
}
6161

6262
@Test

tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/PipesClientTest.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ private PipesClient init(Path tmp, String testFileName) throws Exception {
5353
PluginsTestHelper.copyTestFilesToTmpInput(tmp, testFileName);
5454

5555
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
56-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
57-
return new PipesClient(pipesConfig);
56+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
57+
return new PipesClient(pipesConfig, tikaConfigPath);
5858
}
5959

6060
@Test
@@ -137,9 +137,9 @@ public void testRuntimeTimeoutChange(@TempDir Path tmp) throws Exception {
137137

138138
Path tikaConfigPath = PluginsTestHelper.getFileSystemFetcherConfig(tmp, inputDir, tmp.resolve("output"));
139139
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
140-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
140+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
141141

142-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
142+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
143143
// First test: Short timeout (1 second) - should timeout
144144
ParseContext shortTimeoutContext = new ParseContext();
145145
shortTimeoutContext.set(TikaTaskTimeout.class, new TikaTaskTimeout(1000));
@@ -176,9 +176,9 @@ public void testStartupFailure(@TempDir Path tmp) throws Exception {
176176
"tika-config-bad-class.json", tmp);
177177

178178
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
179-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
179+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
180180

181-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
181+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
182182
FetchEmitTuple tuple = new FetchEmitTuple(testDoc,
183183
new FetchKey("bad-fetcher", testDoc),
184184
new EmitKey(), new Metadata(), new ParseContext(),
@@ -205,9 +205,9 @@ public void testJvmStartupFailure(@TempDir Path tmp) throws Exception {
205205
PluginsTestHelper.copyTestFilesToTmpInput(tmp, testDoc);
206206

207207
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
208-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
208+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
209209

210-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
210+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
211211
FetchEmitTuple tuple = new FetchEmitTuple(testDoc,
212212
new FetchKey("fsf", testDoc),
213213
new EmitKey(), new Metadata(), new ParseContext(),
@@ -233,9 +233,9 @@ public void testFailureBeforeJvm(@TempDir Path tmp) throws Exception {
233233
PluginsTestHelper.copyTestFilesToTmpInput(tmp, testDoc);
234234

235235
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
236-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
236+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
237237

238-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
238+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
239239
FetchEmitTuple tuple = new FetchEmitTuple(testDoc,
240240
new FetchKey("fsf", testDoc),
241241
new EmitKey(), new Metadata(), new ParseContext(),
@@ -259,9 +259,9 @@ public void testCrashDuringDetection(@TempDir Path tmp) throws Exception {
259259
PluginsTestHelper.copyTestFilesToTmpInput(tmp, testDoc);
260260

261261
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
262-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
262+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
263263

264-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
264+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
265265
FetchEmitTuple tuple = new FetchEmitTuple(testDoc,
266266
new FetchKey("fsf", testDoc),
267267
new EmitKey(), new Metadata(), new ParseContext(),
@@ -309,7 +309,7 @@ public void testSocketTimeout(@TempDir Path tmp) throws Exception {
309309
"tika-config-timeout-lt-heartbeat.json", tmp);
310310

311311
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
312-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
312+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
313313

314314
// Verify the misconfiguration that triggers socket timeout
315315
assertEquals(3000, pipesConfig.getSocketTimeoutMs(), "Socket timeout should be 3 seconds");
@@ -319,7 +319,7 @@ public void testSocketTimeout(@TempDir Path tmp) throws Exception {
319319

320320
// The config file includes -Dtika.pipes.allowInvalidHeartbeat=true in forkedJvmArgs
321321
// to allow this invalid configuration for testing only
322-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
322+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
323323
FetchEmitTuple tuple = new FetchEmitTuple(testFile,
324324
new FetchKey("fsf", testFile),
325325
new EmitKey(), new Metadata(), new ParseContext(),
@@ -362,9 +362,9 @@ public void testParseSuccessWithException(@TempDir Path tmp) throws Exception {
362362

363363
Path tikaConfigPath = PluginsTestHelper.getFileSystemFetcherConfig(tmp, inputDir, tmp.resolve("output"));
364364
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
365-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
365+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
366366

367-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
367+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
368368
FetchEmitTuple tuple = new FetchEmitTuple(testFile,
369369
new FetchKey(fetcherName, testFile),
370370
new EmitKey(emitterName, ""), new Metadata(), new ParseContext(),
@@ -396,9 +396,9 @@ public void testFetchException(@TempDir Path tmp) throws Exception {
396396

397397
Path tikaConfigPath = PluginsTestHelper.getFileSystemFetcherConfig(tmp, inputDir, tmp.resolve("output"));
398398
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
399-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
399+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
400400

401-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
401+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
402402
// Request a file that doesn't exist
403403
String nonExistentFile = "does-not-exist.pdf";
404404
FetchEmitTuple tuple = new FetchEmitTuple(nonExistentFile,
@@ -450,9 +450,9 @@ public void testEmitException(@TempDir Path tmp) throws Exception {
450450
// Config has onExists=EXCEPTION which will trigger FileAlreadyExistsException
451451
Path tikaConfigPath = PluginsTestHelper.getFileSystemFetcherConfig("tika-config-emit-all.json", tmp, inputDir, outputDir, false);
452452
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
453-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
453+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
454454

455-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
455+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
456456
FetchEmitTuple tuple = new FetchEmitTuple(testFile,
457457
new FetchKey(fetcherName, testFile),
458458
new EmitKey(emitterName, ""), new Metadata(), new ParseContext(),
@@ -479,9 +479,9 @@ public void testFetcherNotFound(@TempDir Path tmp) throws Exception {
479479

480480
Path tikaConfigPath = PluginsTestHelper.getFileSystemFetcherConfig(tmp, inputDir, tmp.resolve("output"));
481481
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
482-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
482+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
483483

484-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
484+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
485485
// Use invalid fetcher name
486486
FetchEmitTuple tuple = new FetchEmitTuple("test.pdf",
487487
new FetchKey("non-existent-fetcher", "test.pdf"),
@@ -524,9 +524,9 @@ public void testEmitterNotFound(@TempDir Path tmp) throws Exception {
524524
// Use config with directEmitThresholdBytes=0 to force server-side emission
525525
Path tikaConfigPath = PluginsTestHelper.getFileSystemFetcherConfig("tika-config-emit-all.json", tmp, inputDir, tmp.resolve("output"), false);
526526
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
527-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
527+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
528528

529-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
529+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
530530
// Use invalid emitter name
531531
FetchEmitTuple tuple = new FetchEmitTuple(testFile,
532532
new FetchKey(fetcherName, testFile),
@@ -583,9 +583,9 @@ public void testHeartbeatProtocol(@TempDir Path tmp) throws Exception {
583583
Files.writeString(tikaConfigPath, configContent, StandardCharsets.UTF_8);
584584

585585
TikaJsonConfig tikaJsonConfig = TikaJsonConfig.load(tikaConfigPath);
586-
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig, tikaConfigPath);
586+
PipesConfig pipesConfig = PipesConfig.load(tikaJsonConfig);
587587

588-
try (PipesClient pipesClient = new PipesClient(pipesConfig)) {
588+
try (PipesClient pipesClient = new PipesClient(pipesConfig, tikaConfigPath)) {
589589
// Process file - should complete successfully despite multiple heartbeats
590590
PipesResult pipesResult = pipesClient.process(
591591
new FetchEmitTuple(testFile, new FetchKey(fetcherName, testFile),

0 commit comments

Comments
 (0)