This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 9e515ff2b TIKA-4559 -- refactor fetchers and emitters json to key on
id, not type (#2428)
9e515ff2b is described below
commit 9e515ff2bc9280002604c5c1391859e32a9ffde1
Author: Tim Allison <[email protected]>
AuthorDate: Tue Dec 9 14:08:33 2025 -0500
TIKA-4559 -- refactor fetchers and emitters json to key on id, not type
(#2428)
---
.../resources/configs/config-fetch-emit-only.json | 10 ++--
.../test/resources/configs/config-template.json | 13 +++--
.../src/test/resources/kafka/plugins-template.json | 8 +--
.../resources/opensearch/plugins-template.json | 8 +--
.../opensearch/tika-config-opensearch.json | 8 +--
.../src/test/resources/s3/plugins-template.json | 15 ++++--
.../src/test/resources/solr/plugins-template.json | 8 +--
.../src/test/resources/tika-config-solr-urls.json | 12 ++---
.../src/main/resources/config-template.json | 8 +--
.../test/resources/configs/config-template.json | 21 +++++---
.../tika/pipes/core/AbstractComponentManager.java | 63 ++++++++++++++--------
.../pipes/core/emitter/EmitterManagerTest.java | 34 +++++++-----
.../pipes/core/fetcher/FetcherManagerTest.java | 34 +++++++-----
.../resources/configs/tika-config-bad-class.json | 8 +--
.../configs/tika-config-bad-java-path.json | 8 +--
.../configs/tika-config-bad-jvm-args.json | 9 ++--
.../test/resources/configs/tika-config-basic.json | 8 +--
.../configs/tika-config-crashing-detector.json | 16 +++---
.../resources/configs/tika-config-emit-all.json | 12 +++--
.../resources/configs/tika-config-passback.json | 8 +--
.../configs/tika-config-timeout-lt-heartbeat.json | 13 +++--
.../resources/configs/tika-config-truncate.json | 8 +--
.../test/resources/configs/tika-config-http.json | 4 +-
.../resources/configs/cxf-test-base-template.json | 14 ++---
.../tika-config-server-fetchers-emitters.json | 8 +--
.../resources/configs/tika-config-server-tls.json | 8 +--
.../test/resources/configs/tika-config-server.json | 8 +--
.../test/resources/configs/tika-pipes-config.json | 8 +--
.../resources/configs/cxf-test-base-template.json | 14 ++---
29 files changed, 230 insertions(+), 166 deletions(-)
diff --git a/tika-app/src/test/resources/configs/config-fetch-emit-only.json
b/tika-app/src/test/resources/configs/config-fetch-emit-only.json
index 7fb0553da..d7a3da37f 100644
--- a/tika-app/src/test/resources/configs/config-fetch-emit-only.json
+++ b/tika-app/src/test/resources/configs/config-fetch-emit-only.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "jsn",
"onExists": "EXCEPTION",
@@ -18,4 +18,4 @@
}
},
"plugin-roots": "PLUGIN_ROOTS"
-}
\ No newline at end of file
+}
diff --git a/tika-app/src/test/resources/configs/config-template.json
b/tika-app/src/test/resources/configs/config-template.json
index 783012094..d2a7c029a 100644
--- a/tika-app/src/test/resources/configs/config-template.json
+++ b/tika-app/src/test/resources/configs/config-template.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "jsn",
"onExists": "EXCEPTION",
@@ -52,7 +52,10 @@
"maxFilesProcessedPerProcess": 10000,
"staleFetcherTimeoutSeconds": 600,
"staleFetcherDelaySeconds": 60,
- "forkedJvmArgs": ["-Xmx1g", "-XX:+UseG1GC"],
+ "forkedJvmArgs": [
+ "-Xmx1g",
+ "-XX:+UseG1GC"
+ ],
"javaPath": "java"
},
"plugin-roots": "PLUGIN_ROOTS"
diff --git
a/tika-integration-tests/tika-pipes-kafka-integration-tests/src/test/resources/kafka/plugins-template.json
b/tika-integration-tests/tika-pipes-kafka-integration-tests/src/test/resources/kafka/plugins-template.json
index 5cf6b03d1..c39590ec2 100644
---
a/tika-integration-tests/tika-pipes-kafka-integration-tests/src/test/resources/kafka/plugins-template.json
+++
b/tika-integration-tests/tika-pipes-kafka-integration-tests/src/test/resources/kafka/plugins-template.json
@@ -40,15 +40,15 @@
}
],
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH"
}
}
},
"emitters": {
- "kafka-emitter": {
- "ke": {
+ "ke": {
+ "kafka-emitter": {
"topic": "EMITTER_TOPIC",
"bootstrapServers": "BOOTSTRAP_SERVERS",
"acks": "all",
diff --git
a/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/plugins-template.json
b/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/plugins-template.json
index 781e2cfa8..eeac6c2b6 100644
---
a/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/plugins-template.json
+++
b/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/plugins-template.json
@@ -1,14 +1,14 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH"
}
}
},
"emitters": {
- "opensearch-emitter": {
- "ose": {
+ "ose": {
+ "opensearch-emitter": {
"openSearchUrl": "OPEN_SEARCH_URL",
"updateStrategy": "UPDATE_STRATEGY",
"attachmentStrategy": "ATTACHMENT_STRATEGY",
diff --git
a/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/tika-config-opensearch.json
b/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/tika-config-opensearch.json
index b15e7c437..5665c3419 100644
---
a/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/tika-config-opensearch.json
+++
b/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/resources/opensearch/tika-config-opensearch.json
@@ -41,15 +41,15 @@
}
],
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH"
}
}
},
"emitters": {
- "opensearch-emitter": {
- "ose": {
+ "ose": {
+ "opensearch-emitter": {
"openSearchUrl": "OPEN_SEARCH_URL",
"updateStrategy": "UPDATE_STRATEGY",
"attachmentStrategy": "ATTACHMENT_STRATEGY",
diff --git
a/tika-integration-tests/tika-pipes-s3-integration-tests/src/test/resources/s3/plugins-template.json
b/tika-integration-tests/tika-pipes-s3-integration-tests/src/test/resources/s3/plugins-template.json
index 1415f1876..587347388 100644
---
a/tika-integration-tests/tika-pipes-s3-integration-tests/src/test/resources/s3/plugins-template.json
+++
b/tika-integration-tests/tika-pipes-s3-integration-tests/src/test/resources/s3/plugins-template.json
@@ -1,7 +1,7 @@
{
"fetchers": {
- "s3-fetcher": {
- "s3f": {
+ "s3f": {
+ "s3-fetcher": {
"region": "{REGION}",
"bucket": "{FETCH_BUCKET}",
"credentialsProvider": "key_secret",
@@ -10,13 +10,18 @@
"endpointConfigurationService": "{ENDPOINT_CONFIGURATION_SERVICE}",
"pathStyleAccessEnabled": true,
"maxConnections": 50,
- "throttleSeconds": [30, 120, 600, 1200]
+ "throttleSeconds": [
+ 30,
+ 120,
+ 600,
+ 1200
+ ]
}
}
},
"emitters": {
- "s3-emitter": {
- "s3e": {
+ "s3e": {
+ "s3-emitter": {
"region": "{REGION}",
"bucket": "{EMIT_BUCKET}",
"credentialsProvider": "key_secret",
diff --git
a/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/solr/plugins-template.json
b/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/solr/plugins-template.json
index 94f1ec99b..eed18d2c6 100644
---
a/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/solr/plugins-template.json
+++
b/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/solr/plugins-template.json
@@ -40,15 +40,15 @@
}
],
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH"
}
}
},
"emitters": {
- "solr-emitter": {
- "se": {
+ "se": {
+ "solr-emitter": {
"solrCollection": "testcol",
"solrUrls": SOLR_URLS,
"solrZkHosts": SOLR_ZK_HOSTS,
diff --git
a/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/tika-config-solr-urls.json
b/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/tika-config-solr-urls.json
index 134f77962..9b6aadf08 100644
---
a/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/tika-config-solr-urls.json
+++
b/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/resources/tika-config-solr-urls.json
@@ -55,15 +55,15 @@
"timeoutMillis": 60000
},
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "{PATH_TO_DOCS}"
}
}
},
"emitters": {
- "solr-emitter": {
- "se": {
+ "se": {
+ "solr-emitter": {
"solrUrls": "{SOLR_CONNECTION}",
"updateStrategy": "{UPDATE_STRATEGY}",
"solrCollection": "testcol",
@@ -74,8 +74,8 @@
"socketTimeout": 60000
}
},
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "/path/to/extracts"
}
}
diff --git a/tika-pipes/tika-async-cli/src/main/resources/config-template.json
b/tika-pipes/tika-async-cli/src/main/resources/config-template.json
index 678e12fd7..e295290dd 100644
--- a/tika-pipes/tika-async-cli/src/main/resources/config-template.json
+++ b/tika-pipes/tika-async-cli/src/main/resources/config-template.json
@@ -25,16 +25,16 @@
}
],
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
diff --git
a/tika-pipes/tika-async-cli/src/test/resources/configs/config-template.json
b/tika-pipes/tika-async-cli/src/test/resources/configs/config-template.json
index 41db19628..cbc6defe1 100644
--- a/tika-pipes/tika-async-cli/src/test/resources/configs/config-template.json
+++ b/tika-pipes/tika-async-cli/src/test/resources/configs/config-template.json
@@ -1,20 +1,22 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse-json": {
+ "fse-json": {
+ "file-system-emitter": {
"basePath": "JSON_EMITTER_BASE_PATH",
"fileExtension": "",
"onExists": "EXCEPTION"
- },
- "fse-bytes": {
+ }
+ },
+ "fse-bytes": {
+ "file-system-emitter": {
"basePath": "BYTES_EMITTER_BASE_PATH",
"fileExtension": "",
"onExists": "EXCEPTION"
@@ -36,8 +38,11 @@
"maxFilesProcessedPerProcess": 10000,
"staleFetcherTimeoutSeconds": 600,
"staleFetcherDelaySeconds": 60,
- "forkedJvmArgs": ["-Xmx1g", "-XX:+UseG1GC"],
+ "forkedJvmArgs": [
+ "-Xmx1g",
+ "-XX:+UseG1GC"
+ ],
"javaPath": "java"
},
"plugin-roots": "PLUGIN_ROOTS"
-}
\ No newline at end of file
+}
diff --git
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/AbstractComponentManager.java
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/AbstractComponentManager.java
index 7dab511e0..603248ea0 100644
---
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/AbstractComponentManager.java
+++
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/AbstractComponentManager.java
@@ -92,36 +92,55 @@ public abstract class AbstractComponentManager<T extends
TikaExtension,
Map<String, ExtensionConfig> configs = new HashMap<>();
if (configNode != null && !configNode.isNull()) {
- // Outer loop: iterate over type names
- Iterator<Map.Entry<String, JsonNode>> typeFields =
configNode.fields();
- while (typeFields.hasNext()) {
+ // Outer loop: iterate over instance IDs
+ Iterator<Map.Entry<String, JsonNode>> instanceFields =
configNode.fields();
+ while (instanceFields.hasNext()) {
+ Map.Entry<String, JsonNode> instanceEntry =
instanceFields.next();
+ String instanceId = instanceEntry.getKey();
+ JsonNode typeNode = instanceEntry.getValue();
+
+ // Check for duplicate IDs (should not happen due to JSON
parsing, but validate)
+ if (configs.containsKey(instanceId)) {
+ throw new TikaConfigException("Duplicate " +
getComponentName() +
+ " id: " + instanceId);
+ }
+
+ // Inner loop: extract the type name
+ // The structure should be: { "type-name": { config } }
+ // We expect exactly ONE type per instance
+ Iterator<Map.Entry<String, JsonNode>> typeFields =
typeNode.fields();
+
+ if (!typeFields.hasNext()) {
+ throw new TikaConfigException(
+ "Invalid " + getComponentName() + " configuration
for id '" + instanceId +
+ "': missing type specification. Expected format:
{\"" + instanceId +
+ "\": {\"type-name\": {...}}}");
+ }
+
Map.Entry<String, JsonNode> typeEntry = typeFields.next();
String typeName = typeEntry.getKey();
- JsonNode instancesNode = typeEntry.getValue();
+ JsonNode config = typeEntry.getValue();
- // Validate that factory exists
+ // Validate that there's only one type per instance
+ if (typeFields.hasNext()) {
+ Map.Entry<String, JsonNode> extraTypeEntry =
typeFields.next();
+ throw new TikaConfigException(
+ "Invalid " + getComponentName() + " configuration
for id '" + instanceId +
+ "': multiple types specified ('" + typeName + "',
'" +
+ extraTypeEntry.getKey() + "'). Each instance can
only have one type.");
+ }
+
+ // Validate that factory exists for this type
F factory = factories.get(typeName);
if (factory == null) {
throw new TikaConfigException(
- "Unknown " + getComponentName() + " type: " +
typeName +
- ". Available: " + factories.keySet());
+ "Unknown " + getComponentName() + " type: '" +
typeName +
+ "' for instance id '" + instanceId + "'. Available
types: " +
+ factories.keySet());
}
- // Inner loop: iterate over instances of this type
- Iterator<Map.Entry<String, JsonNode>> instanceFields =
instancesNode.fields();
- while (instanceFields.hasNext()) {
- Map.Entry<String, JsonNode> instanceEntry =
instanceFields.next();
- String instanceId = instanceEntry.getKey();
- JsonNode config = instanceEntry.getValue();
-
- if (configs.containsKey(instanceId)) {
- throw new TikaConfigException("Duplicate " +
getComponentName() +
- " id: " + instanceId);
- }
-
- configs.put(instanceId, new ExtensionConfig(instanceId,
typeName,
- toJsonString(config)));
- }
+ configs.put(instanceId, new ExtensionConfig(instanceId,
typeName,
+ toJsonString(config)));
}
}
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/emitter/EmitterManagerTest.java
b/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/emitter/EmitterManagerTest.java
index 8d98865c9..5b7ce9ced 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/emitter/EmitterManagerTest.java
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/emitter/EmitterManagerTest.java
@@ -95,12 +95,14 @@ public class EmitterManagerTest {
String configJson = String.format(Locale.ROOT, """
{
"emitters": {
- "file-system-emitter": {
- "fse1": {
+ "fse1": {
+ "file-system-emitter": {
"basePath": "%s",
"onExists": "REPLACE"
- },
- "fse2": {
+ }
+ },
+ "fse2": {
+ "file-system-emitter": {
"basePath": "%s",
"onExists": "REPLACE"
}
@@ -225,8 +227,8 @@ public class EmitterManagerTest {
String configJson = """
{
"emitters": {
- "non-existent-emitter-type": {
- "emitter1": {
+ "emitter1": {
+ "non-existent-emitter-type": {
"someProp": "value"
}
}
@@ -255,12 +257,14 @@ public class EmitterManagerTest {
String configJson = String.format(Locale.ROOT, """
{
"emitters": {
- "file-system-emitter": {
- "fse1": {
+ "fse1": {
+ "file-system-emitter": {
"basePath": "%s",
"onExists": "REPLACE"
- },
- "fse1": {
+ }
+ },
+ "fse1": {
+ "file-system-emitter": {
"basePath": "%s",
"onExists": "REPLACE"
}
@@ -304,12 +308,14 @@ public class EmitterManagerTest {
String configJson = String.format(Locale.ROOT, """
{
"emitters": {
- "file-system-emitter": {
- "fse1": {
+ "fse1": {
+ "file-system-emitter": {
"basePath": "%s",
"onExists": "REPLACE"
- },
- "fse2": {
+ }
+ },
+ "fse2": {
+ "file-system-emitter": {
"basePath": "%s",
"onExists": "REPLACE"
}
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/fetcher/FetcherManagerTest.java
b/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/fetcher/FetcherManagerTest.java
index 7e206257c..b52677547 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/fetcher/FetcherManagerTest.java
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/java/org/apache/tika/pipes/core/fetcher/FetcherManagerTest.java
@@ -95,11 +95,13 @@ public class FetcherManagerTest {
String configJson = String.format(Locale.ROOT, """
{
"fetchers": {
- "file-system-fetcher": {
- "fsf1": {
+ "fsf1": {
+ "file-system-fetcher": {
"basePath": "%s"
- },
- "fsf2": {
+ }
+ },
+ "fsf2": {
+ "file-system-fetcher": {
"basePath": "%s"
}
}
@@ -223,8 +225,8 @@ public class FetcherManagerTest {
String configJson = """
{
"fetchers": {
- "non-existent-fetcher-type": {
- "fetcher1": {
+ "fetcher1": {
+ "non-existent-fetcher-type": {
"someProp": "value"
}
}
@@ -253,11 +255,13 @@ public class FetcherManagerTest {
String configJson = String.format(Locale.ROOT, """
{
"fetchers": {
- "file-system-fetcher": {
- "fsf1": {
+ "fsf1": {
+ "file-system-fetcher": {
"basePath": "%s"
- },
- "fsf1": {
+ }
+ },
+ "fsf1": {
+ "file-system-fetcher": {
"basePath": "%s"
}
}
@@ -300,11 +304,13 @@ public class FetcherManagerTest {
String configJson = String.format(Locale.ROOT, """
{
"fetchers": {
- "file-system-fetcher": {
- "fsf1": {
+ "fsf1": {
+ "file-system-fetcher": {
"basePath": "%s"
- },
- "fsf2": {
+ }
+ },
+ "fsf2": {
+ "file-system-fetcher": {
"basePath": "%s"
}
}
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-class.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-class.json
index 51e22b0ad..780180804 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-class.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-class.json
@@ -1,7 +1,7 @@
{
"fetchers": {
- "non-existent-fetcher-plugin": {
- "bad-fetcher": {
+ "bad-fetcher": {
+ "non-existent-fetcher-plugin": {
"basePath": "FETCHER_BASE_PATH"
}
}
@@ -9,7 +9,9 @@
"pipes": {
"numClients": 1,
"timeoutMillis": 5000,
- "forkedJvmArgs": ["-Xmx256m"],
+ "forkedJvmArgs": [
+ "-Xmx256m"
+ ],
"directEmitThresholdBytes": 1000000
},
"plugin-roots": "PLUGINS_PATHS"
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-java-path.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-java-path.json
index cf7f051c2..4035660ff 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-java-path.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-java-path.json
@@ -1,7 +1,7 @@
{
"fetchers": {
- "non-existent-fetcher-plugin": {
- "bad-fetcher": {
+ "bad-fetcher": {
+ "non-existent-fetcher-plugin": {
"basePath": "FETCHER_BASE_PATH"
}
}
@@ -10,7 +10,9 @@
"numClients": 1,
"timeoutMillis": 5000,
"javaPath": "thisIsntJava",
- "forkedJvmArgs": ["-Xmx256m"],
+ "forkedJvmArgs": [
+ "-Xmx256m"
+ ],
"directEmitThresholdBytes": 1000000
},
"plugin-roots": "PLUGINS_PATHS"
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-jvm-args.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-jvm-args.json
index 5c63904cd..2faecfed5 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-jvm-args.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-bad-jvm-args.json
@@ -1,7 +1,7 @@
{
"fetchers": {
- "non-existent-fetcher-plugin": {
- "bad-fetcher": {
+ "bad-fetcher": {
+ "non-existent-fetcher-plugin": {
"basePath": "FETCHER_BASE_PATH"
}
}
@@ -9,7 +9,10 @@
"pipes": {
"numClients": 1,
"timeoutMillis": 5000,
- "forkedJvmArgs": ["-Xmx256m", "-ThisIsntAThing"],
+ "forkedJvmArgs": [
+ "-Xmx256m",
+ "-ThisIsntAThing"
+ ],
"directEmitThresholdBytes": 1000000
},
"plugin-roots": "PLUGINS_PATHS"
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-basic.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-basic.json
index a8fbe4f10..6c1c454dd 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-basic.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-basic.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-crashing-detector.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-crashing-detector.json
index 61fcd5032..7daa902ee 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-crashing-detector.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-crashing-detector.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
@@ -19,11 +19,15 @@
"pipes": {
"numClients": 1,
"timeoutMillis": 5000,
- "forkedJvmArgs": ["-Xmx256m"],
+ "forkedJvmArgs": [
+ "-Xmx256m"
+ ],
"directEmitThresholdBytes": 1000000
},
"detectors": [
- {"org.apache.tika.pipes.core.CrashingDetector": {}}
+ {
+ "org.apache.tika.pipes.core.CrashingDetector": {}
+ }
],
"plugin-roots": "PLUGINS_PATHS"
}
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-emit-all.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-emit-all.json
index 6389562eb..7d517f842 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-emit-all.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-emit-all.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
@@ -19,7 +19,9 @@
"pipes": {
"numClients": 1,
"timeoutMillis": 60000,
- "forkedJvmArgs": ["-Xmx256m"],
+ "forkedJvmArgs": [
+ "-Xmx256m"
+ ],
"directEmitThresholdBytes": 0
},
"plugin-roots": "PLUGINS_PATHS"
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-passback.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-passback.json
index 3f81bdd19..9c48a2e5c 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-passback.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-passback.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-timeout-lt-heartbeat.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-timeout-lt-heartbeat.json
index c40ff1407..1efc06129 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-timeout-lt-heartbeat.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-timeout-lt-heartbeat.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
@@ -21,7 +21,10 @@
"timeoutMillis": 60000,
"socketTimeoutMs": 3000,
"heartbeatIntervalMs": 10000,
- "forkedJvmArgs": ["-Xmx256m", "-Dtika.pipes.allowInvalidHeartbeat=true"]
+ "forkedJvmArgs": [
+ "-Xmx256m",
+ "-Dtika.pipes.allowInvalidHeartbeat=true"
+ ]
},
"plugin-roots": "PLUGINS_PATHS"
}
diff --git
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-truncate.json
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-truncate.json
index e13838e1a..0d86c4b14 100644
---
a/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-truncate.json
+++
b/tika-pipes/tika-pipes-integration-tests/src/test/resources/configs/tika-config-truncate.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse": {
+ "fse": {
+ "file-system-emitter": {
"basePath": "EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
diff --git
a/tika-pipes/tika-pipes-plugins/tika-pipes-http/src/test/resources/configs/tika-config-http.json
b/tika-pipes/tika-pipes-plugins/tika-pipes-http/src/test/resources/configs/tika-config-http.json
index 8a6af535d..dd8ac7ad0 100644
---
a/tika-pipes/tika-pipes-plugins/tika-pipes-http/src/test/resources/configs/tika-config-http.json
+++
b/tika-pipes/tika-pipes-plugins/tika-pipes-http/src/test/resources/configs/tika-config-http.json
@@ -1,7 +1,7 @@
{
"fetchers": {
- "http-fetcher": {
- "http-fetcher-1": {
+ "http-fetcher-1": {
+ "http-fetcher": {
"httpHeaders": [
"Connection",
"Expires",
diff --git
a/tika-server/tika-server-core/src/test/resources/configs/cxf-test-base-template.json
b/tika-server/tika-server-core/src/test/resources/configs/cxf-test-base-template.json
index 475441885..db24bf2be 100644
---
a/tika-server/tika-server-core/src/test/resources/configs/cxf-test-base-template.json
+++
b/tika-server/tika-server-core/src/test/resources/configs/cxf-test-base-template.json
@@ -1,20 +1,22 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse-json": {
+ "fse-json": {
+ "file-system-emitter": {
"basePath": "JSON_EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
- },
- "fse-bytes": {
+ }
+ },
+ "fse-bytes": {
+ "file-system-emitter": {
"basePath": "BYTES_EMITTER_BASE_PATH",
"fileExtension": "",
"onExists": "EXCEPTION"
diff --git
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-fetchers-emitters.json
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-fetchers-emitters.json
index 0ead781e4..baeacf06c 100644
---
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-fetchers-emitters.json
+++
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-fetchers-emitters.json
@@ -9,16 +9,16 @@
]
},
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse-json": {
+ "fse-json": {
+ "file-system-emitter": {
"basePath": "BASE_PATH",
"onExists": "EXCEPTION"
}
diff --git
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-tls.json
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-tls.json
index 029e45e96..17c72590c 100644
---
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-tls.json
+++
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-server-tls.json
@@ -19,16 +19,16 @@
}
},
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse-json": {
+ "fse-json": {
+ "file-system-emitter": {
"basePath": "BASE_PATH",
"onExists": "EXCEPTION"
}
diff --git
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-server.json
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-server.json
index 8c327e9fa..89a13e92e 100644
---
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-server.json
+++
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-server.json
@@ -10,16 +10,16 @@
]
},
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse-json": {
+ "fse-json": {
+ "file-system-emitter": {
"basePath": "BASE_PATH",
"onExists": "EXCEPTION"
}
diff --git
a/tika-server/tika-server-core/src/test/resources/configs/tika-pipes-config.json
b/tika-server/tika-server-core/src/test/resources/configs/tika-pipes-config.json
index afe9f8efb..1417029ba 100644
---
a/tika-server/tika-server-core/src/test/resources/configs/tika-pipes-config.json
+++
b/tika-server/tika-server-core/src/test/resources/configs/tika-pipes-config.json
@@ -1,15 +1,15 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse-json": {
+ "fse-json": {
+ "file-system-emitter": {
"basePath": "BASE_PATH",
"onExists": "EXCEPTION"
}
diff --git
a/tika-server/tika-server-standard/src/test/resources/configs/cxf-test-base-template.json
b/tika-server/tika-server-standard/src/test/resources/configs/cxf-test-base-template.json
index 475441885..db24bf2be 100644
---
a/tika-server/tika-server-standard/src/test/resources/configs/cxf-test-base-template.json
+++
b/tika-server/tika-server-standard/src/test/resources/configs/cxf-test-base-template.json
@@ -1,20 +1,22 @@
{
"fetchers": {
- "file-system-fetcher": {
- "fsf": {
+ "fsf": {
+ "file-system-fetcher": {
"basePath": "FETCHER_BASE_PATH",
"extractFileSystemMetadata": false
}
}
},
"emitters": {
- "file-system-emitter": {
- "fse-json": {
+ "fse-json": {
+ "file-system-emitter": {
"basePath": "JSON_EMITTER_BASE_PATH",
"fileExtension": "json",
"onExists": "EXCEPTION"
- },
- "fse-bytes": {
+ }
+ },
+ "fse-bytes": {
+ "file-system-emitter": {
"basePath": "BYTES_EMITTER_BASE_PATH",
"fileExtension": "",
"onExists": "EXCEPTION"