http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceReportingSchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceReportingSchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceReportingSchema.java new file mode 100644 index 0000000..8e98ffe --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceReportingSchema.java @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.minifi.bootstrap.util.schema; + +import org.apache.nifi.minifi.bootstrap.util.schema.common.BaseSchema; +import org.apache.nifi.scheduling.SchedulingStrategy; + +import java.util.Map; + +import static org.apache.nifi.minifi.bootstrap.util.schema.RemoteProcessingGroupSchema.TIMEOUT_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.COMMENT_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.PROVENANCE_REPORTING_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.SCHEDULING_PERIOD_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.SCHEDULING_STRATEGY_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.USE_COMPRESSION_KEY; + +/** + * + */ +public class ProvenanceReportingSchema extends BaseSchema { + public static final String DESTINATION_URL_KEY = "destination url"; + public static final String PORT_NAME_KEY = "port name"; + public static final String ORIGINATING_URL_KEY = "originating url"; + public static final String BATCH_SIZE_KEY = "batch size"; + + private String comment; + private String schedulingStrategy; + private String schedulingPeriod; + private String destinationUrl; + private String portName; + private String originatingUrl = "http://${hostname(true)}:8080/nifi"; + private Boolean useCompression = true; + private String timeout = "30 secs"; + private Number batchSize = 1000; + + public ProvenanceReportingSchema() { + } + + public ProvenanceReportingSchema(Map map) { + comment = getOptionalKeyAsType(map, COMMENT_KEY, String.class, PROVENANCE_REPORTING_KEY, null); + + schedulingStrategy = getRequiredKeyAsType(map, SCHEDULING_STRATEGY_KEY, String.class, PROVENANCE_REPORTING_KEY); + try { + SchedulingStrategy.valueOf(schedulingStrategy); + } catch (IllegalArgumentException e) { + addValidationIssue(SCHEDULING_STRATEGY_KEY, PROVENANCE_REPORTING_KEY, "it is not a valid scheduling strategy"); + } + + schedulingPeriod = getRequiredKeyAsType(map, SCHEDULING_PERIOD_KEY, String.class, PROVENANCE_REPORTING_KEY); + + destinationUrl = getRequiredKeyAsType(map, DESTINATION_URL_KEY, String.class, PROVENANCE_REPORTING_KEY); + portName = getRequiredKeyAsType(map, PORT_NAME_KEY, String.class, PROVENANCE_REPORTING_KEY); + + originatingUrl = getOptionalKeyAsType(map, ORIGINATING_URL_KEY, String.class, PROVENANCE_REPORTING_KEY, "http://${hostname(true)}:8080/nifi"); + + useCompression = getOptionalKeyAsType(map, USE_COMPRESSION_KEY, Boolean.class, PROVENANCE_REPORTING_KEY, true); + + timeout = getOptionalKeyAsType(map, TIMEOUT_KEY, String.class, PROVENANCE_REPORTING_KEY, "30 secs"); + + batchSize = getOptionalKeyAsType(map, BATCH_SIZE_KEY, Number.class, PROVENANCE_REPORTING_KEY, 1000); + } + + public String getComment() { + return comment; + } + + public String getSchedulingStrategy() { + return schedulingStrategy; + } + + public String getSchedulingPeriod() { + return schedulingPeriod; + } + + public String getDestinationUrl() { + return destinationUrl; + } + + public String getPortName() { + return portName; + } + + public String getOriginatingUrl() { + return originatingUrl; + } + + public boolean getUseCompression() { + return useCompression; + } + + public String getTimeout() { + return timeout; + } + + public Number getBatchSize() { + return batchSize; + } +}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceRepositorySchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceRepositorySchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceRepositorySchema.java new file mode 100644 index 0000000..4a3b404 --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/ProvenanceRepositorySchema.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.minifi.bootstrap.util.schema; + +import org.apache.nifi.minifi.bootstrap.util.schema.common.BaseSchema; + +import java.util.Map; + +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.PROVENANCE_REPO_KEY; + +public class ProvenanceRepositorySchema extends BaseSchema { + + + public static final String PROVENANCE_REPO_ROLLOVER_TIME_KEY = "provenance rollover time"; + + private String provenanceRepoRolloverTime = "1 min"; + + public ProvenanceRepositorySchema(){ + } + + public ProvenanceRepositorySchema(Map map) { + provenanceRepoRolloverTime = getOptionalKeyAsType(map, PROVENANCE_REPO_ROLLOVER_TIME_KEY, String.class, PROVENANCE_REPO_KEY, "1 min"); + } + + public String getProvenanceRepoRolloverTimeKey() { + return provenanceRepoRolloverTime; + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteInputPortSchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteInputPortSchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteInputPortSchema.java new file mode 100644 index 0000000..cfcb611 --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteInputPortSchema.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.minifi.bootstrap.util.schema; + +import org.apache.nifi.minifi.bootstrap.util.schema.common.BaseSchema; + +import java.util.Map; + +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.COMMENT_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.ID_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.INPUT_PORTS_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.MAX_CONCURRENT_TASKS_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.NAME_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.USE_COMPRESSION_KEY; + +/** + * + */ +public class RemoteInputPortSchema extends BaseSchema { + + private String id; + private String name; + private String comment = ""; + private Number maxConcurrentTasks = 1; + private Boolean useCompression = true; + + public RemoteInputPortSchema() { + } + + public RemoteInputPortSchema(Map map) { + id = getRequiredKeyAsType(map, ID_KEY, String.class, INPUT_PORTS_KEY); + name = getRequiredKeyAsType(map, NAME_KEY, String.class, INPUT_PORTS_KEY); + + comment = getOptionalKeyAsType(map, COMMENT_KEY, String.class, INPUT_PORTS_KEY, ""); + maxConcurrentTasks = getOptionalKeyAsType(map, MAX_CONCURRENT_TASKS_KEY, Number.class, INPUT_PORTS_KEY, 1); + useCompression = getOptionalKeyAsType(map, USE_COMPRESSION_KEY, Boolean.class, INPUT_PORTS_KEY, true); + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public String getComment() { + return comment; + } + + public Number getMax_concurrent_tasks() { + return maxConcurrentTasks; + } + + public boolean getUseCompression() { + return useCompression; + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteProcessingGroupSchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteProcessingGroupSchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteProcessingGroupSchema.java new file mode 100644 index 0000000..e69f023 --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/RemoteProcessingGroupSchema.java @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.minifi.bootstrap.util.schema; + +import org.apache.nifi.minifi.bootstrap.util.schema.common.BaseSchema; + +import java.util.List; +import java.util.Map; + +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.COMMENT_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.INPUT_PORTS_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.NAME_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.REMOTE_PROCESSING_GROUPS_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.YIELD_PERIOD_KEY; + +/** + * + */ +public class RemoteProcessingGroupSchema extends BaseSchema { + public static final String URL_KEY = "url"; + public static final String TIMEOUT_KEY = "timeout"; + + private String name; + private String comment = ""; + private String url; + private String timeout = "30 secs"; + private String yieldPeriod = "10 sec"; + private List<RemoteInputPortSchema> inputPorts; + + public RemoteProcessingGroupSchema() { + } + + public RemoteProcessingGroupSchema(Map map) { + name = getRequiredKeyAsType(map, NAME_KEY, String.class, REMOTE_PROCESSING_GROUPS_KEY); + url = getRequiredKeyAsType(map, URL_KEY, String.class, REMOTE_PROCESSING_GROUPS_KEY); + + comment = getOptionalKeyAsType(map, COMMENT_KEY, String.class, REMOTE_PROCESSING_GROUPS_KEY, ""); + timeout = getOptionalKeyAsType(map, TIMEOUT_KEY, String.class, REMOTE_PROCESSING_GROUPS_KEY, "30 secs"); + yieldPeriod = getOptionalKeyAsType(map, YIELD_PERIOD_KEY, String.class, REMOTE_PROCESSING_GROUPS_KEY, "10 sec"); + + inputPorts = getRequiredKeyAsType(map, INPUT_PORTS_KEY, List.class, REMOTE_PROCESSING_GROUPS_KEY); + if (inputPorts != null) { + transformListToType(inputPorts, "input port", RemoteInputPortSchema.class, INPUT_PORTS_KEY); + + for (RemoteInputPortSchema remoteInputPortSchema: inputPorts) { + addIssuesIfNotNull(remoteInputPortSchema); + } + } + } + + public String getName() { + return name; + } + + public String getComment() { + return comment; + } + + public String getUrl() { + return url; + } + + public String getTimeout() { + return timeout; + } + + public String getYieldPeriod() { + return yieldPeriod; + } + + public List<RemoteInputPortSchema> getInputPorts() { + return inputPorts; + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SecurityPropertiesSchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SecurityPropertiesSchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SecurityPropertiesSchema.java new file mode 100644 index 0000000..96a9261 --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SecurityPropertiesSchema.java @@ -0,0 +1,164 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.minifi.bootstrap.util.schema; + +import org.apache.nifi.minifi.bootstrap.util.schema.common.BaseSchema; + +import java.util.Map; + +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.SECURITY_PROPS_KEY; +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.SENSITIVE_PROPS_KEY; + +/** + * + */ +public class SecurityPropertiesSchema extends BaseSchema { + + public static final String KEYSTORE_KEY = "keystore"; + public static final String KEYSTORE_TYPE_KEY = "keystore type"; + public static final String KEYSTORE_PASSWORD_KEY = "keystore password"; + public static final String KEY_PASSWORD_KEY = "key password"; + public static final String TRUSTSTORE_KEY = "truststore"; + public static final String TRUSTSTORE_TYPE_KEY = "truststore type"; + public static final String TRUSTSTORE_PASSWORD_KEY = "truststore password"; + public static final String SSL_PROTOCOL_KEY = "ssl protocol"; + + private String keystore; + private String keystoreType; + private String keystorePassword; + private String keyPassword; + private String truststore; + private String truststoreType; + private String truststorePassword; + private String sslProtocol; + private SensitivePropsSchema sensitiveProps; + + public SecurityPropertiesSchema() { + sensitiveProps = new SensitivePropsSchema(); + } + + public SecurityPropertiesSchema(Map map) { + keystore = getOptionalKeyAsType(map, KEYSTORE_KEY, String.class, SECURITY_PROPS_KEY, null); + + keystoreType = getOptionalKeyAsType(map, KEYSTORE_TYPE_KEY, String.class, SECURITY_PROPS_KEY, null); + if (keystoreType != null) { + if (validateStoreType(keystoreType)) { + addValidationIssue(KEYSTORE_TYPE_KEY, SECURITY_PROPS_KEY, "it is not a supported type (must be either PKCS12 or JKS format)"); + } + } + + keystorePassword = getOptionalKeyAsType(map, KEYSTORE_PASSWORD_KEY, String.class, SECURITY_PROPS_KEY, null); + + keyPassword = getOptionalKeyAsType(map, KEY_PASSWORD_KEY, String.class, SECURITY_PROPS_KEY, null); + + truststore = getOptionalKeyAsType(map, TRUSTSTORE_KEY, String.class, SECURITY_PROPS_KEY, null); + + truststoreType = getOptionalKeyAsType(map, TRUSTSTORE_TYPE_KEY, String.class, SECURITY_PROPS_KEY, null); + if (truststoreType != null) { + if (validateStoreType(truststoreType)) { + addValidationIssue(TRUSTSTORE_TYPE_KEY, SECURITY_PROPS_KEY, "it is not a supported type (must be either PKCS12 or JKS format)"); + } + } + + truststorePassword = getOptionalKeyAsType(map, TRUSTSTORE_PASSWORD_KEY, String.class, SECURITY_PROPS_KEY, null); + + sslProtocol = getOptionalKeyAsType(map, SSL_PROTOCOL_KEY, String.class, SECURITY_PROPS_KEY, null); + if (sslProtocol != null) { + switch (sslProtocol) { + case "SSL": + break; + case "SSLv2Hello": + break; + case "SSLv3": + break; + case "TLS": + break; + case "TLSv1": + break; + case "TLSv1.1": + break; + case "TLSv1.2": + break; + default: + addValidationIssue(SSL_PROTOCOL_KEY, SECURITY_PROPS_KEY, "it is not an allowable value of SSL protocol"); + break; + } + } + + if (sslProtocol != null) { + if (keystore == null) { + validationIssues.add("When the '" + SSL_PROTOCOL_KEY + "' key of '" + SECURITY_PROPS_KEY + "' is set, the '" + KEYSTORE_KEY + "' must also be set"); + } else if (keystoreType == null || keystorePassword == null || keyPassword == null) { + validationIssues.add("When the '" + KEYSTORE_KEY + "' key of '" + SECURITY_PROPS_KEY + "' is set, the '" + KEYSTORE_TYPE_KEY + "', '" + KEYSTORE_PASSWORD_KEY + + "' and '" + KEY_PASSWORD_KEY + "' all must also be set"); + } + + if (truststore != null && (truststoreType == null || truststorePassword == null)) { + validationIssues.add("When the '" + TRUSTSTORE_KEY + "' key of '" + SECURITY_PROPS_KEY + "' is set, the '" + TRUSTSTORE_TYPE_KEY + "' and '" + + TRUSTSTORE_PASSWORD_KEY + "' must also be set"); + } + } + + sensitiveProps = getMapAsType(map, SENSITIVE_PROPS_KEY, SensitivePropsSchema.class, SECURITY_PROPS_KEY, false); + + addIssuesIfNotNull(sensitiveProps); + } + + private boolean validateStoreType(String store) { + return !store.isEmpty() && !(store.equalsIgnoreCase("JKS") || store.equalsIgnoreCase("PKCS12")); + } + + public boolean useSSL() { + return sslProtocol != null && !(sslProtocol.isEmpty()); + } + + public String getKeystore() { + return keystore; + } + + public String getKeystoreType() { + return keystoreType; + } + + public String getKeystorePassword() { + return keystorePassword; + } + + public String getKeyPassword() { + return keyPassword; + } + + public String getTruststore() { + return truststore; + } + + public String getTruststoreType() { + return truststoreType; + } + + public String getTruststorePassword() { + return truststorePassword; + } + + public String getSslProtocol() { + return sslProtocol; + } + + public SensitivePropsSchema getSensitiveProps() { + return sensitiveProps; + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SensitivePropsSchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SensitivePropsSchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SensitivePropsSchema.java new file mode 100644 index 0000000..36cd07a --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SensitivePropsSchema.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.minifi.bootstrap.util.schema; + +import org.apache.nifi.minifi.bootstrap.util.schema.common.BaseSchema; + +import java.util.Map; + +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.SENSITIVE_PROPS_KEY; + +/** + * + */ +public class SensitivePropsSchema extends BaseSchema { + public static final String SENSITIVE_PROPS_KEY_KEY = "key"; + public static final String SENSITIVE_PROPS_ALGORITHM_KEY = "algorithm"; + public static final String SENSITIVE_PROPS_PROVIDER_KEY = "provider"; + + private String key = ""; + private String algorithm = "PBEWITHMD5AND256BITAES-CBC-OPENSSL"; + private String provider = "BC"; + + public SensitivePropsSchema() { + } + + public SensitivePropsSchema(Map map) { + key = getOptionalKeyAsType(map, SENSITIVE_PROPS_KEY_KEY, String.class, SENSITIVE_PROPS_KEY, ""); + + algorithm = getOptionalKeyAsType(map, SENSITIVE_PROPS_ALGORITHM_KEY, String.class, SENSITIVE_PROPS_KEY, "PBEWITHMD5AND256BITAES-CBC-OPENSSL"); + + provider = getOptionalKeyAsType(map, SENSITIVE_PROPS_PROVIDER_KEY, String.class, SENSITIVE_PROPS_KEY, "BC"); + } + + public String getKey() { + return key; + } + + public String getAlgorithm() { + return algorithm; + } + + public String getProvider() { + return provider; + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SwapSchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SwapSchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SwapSchema.java new file mode 100644 index 0000000..ec6563f --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/SwapSchema.java @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.minifi.bootstrap.util.schema; + +import org.apache.nifi.minifi.bootstrap.util.schema.common.BaseSchema; + +import java.util.Map; + +import static org.apache.nifi.minifi.bootstrap.util.schema.common.CommonPropertyKeys.SWAP_PROPS_KEY; + +/** + * + */ +public class SwapSchema extends BaseSchema { + public static final String THRESHOLD_KEY = "threshold"; + public static final String IN_PERIOD_KEY = "in period"; + public static final String IN_THREADS_KEY = "in threads"; + public static final String OUT_PERIOD_KEY = "out period"; + public static final String OUT_THREADS_KEY = "out threads"; + + private Number threshold = 20000; + private String inPeriod = "5 sec"; + private Number inThreads = 1; + private String outPeriod = "5 sec"; + private Number outThreads = 4; + + public SwapSchema() { + } + + public SwapSchema(Map map) { + threshold = getOptionalKeyAsType(map, THRESHOLD_KEY, Number.class, SWAP_PROPS_KEY, 20000); + + inPeriod = getOptionalKeyAsType(map, IN_PERIOD_KEY, String.class, SWAP_PROPS_KEY, "5 sec"); + + inThreads = getOptionalKeyAsType(map, IN_THREADS_KEY, Number.class, SWAP_PROPS_KEY, 1); + + outPeriod = getOptionalKeyAsType(map, OUT_PERIOD_KEY, String.class, SWAP_PROPS_KEY, "5 sec"); + + outThreads = getOptionalKeyAsType(map, OUT_THREADS_KEY, Number.class, SWAP_PROPS_KEY, 4); + } + + public Number getThreshold() { + return threshold; + } + + public String getInPeriod() { + return inPeriod; + } + + public Number getInThreads() { + return inThreads; + } + + public String getOutPeriod() { + return outPeriod; + } + + public Number getOutThreads() { + return outThreads; + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/BaseSchema.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/BaseSchema.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/BaseSchema.java new file mode 100644 index 0000000..a29be6d --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/BaseSchema.java @@ -0,0 +1,134 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.minifi.bootstrap.util.schema.common; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +public class BaseSchema { + + /******* Validation Issue helper methods *******/ + public List<String> validationIssues = new LinkedList<>(); + + public boolean isValid() { + return validationIssues.isEmpty(); + } + + public List<String> getValidationIssues() { + return validationIssues; + } + + public String getValidationIssuesAsString() { + StringBuilder stringBuilder = new StringBuilder(); + boolean first = true; + for (String validationIssue : validationIssues) { + if (!first) { + stringBuilder.append(", "); + } + stringBuilder.append("["); + stringBuilder.append(validationIssue); + stringBuilder.append("]"); + first = false; + } + return stringBuilder.toString(); + } + + public void addValidationIssue(String keyName, String wrapperName, String reason) { + validationIssues.add("'" + keyName + "' in section '" + wrapperName + "' because " + reason); + } + + public void addIssuesIfNotNull(BaseSchema baseSchema) { + if (baseSchema != null) { + validationIssues.addAll(baseSchema.getValidationIssues()); + } + } + + /******* Value Access/Interpretation helper methods *******/ + public <T> T getOptionalKeyAsType(Map valueMap, String key, Class targetClass, String wrapperName, T defaultValue) { + return getKeyAsType(valueMap, key, targetClass, wrapperName, false, defaultValue); + } + + public <T> T getRequiredKeyAsType(Map valueMap, String key, Class targetClass, String wrapperName) { + return getKeyAsType(valueMap, key, targetClass, wrapperName, true, null); + } + + <T> T getKeyAsType(Map valueMap, String key, Class targetClass, String wrapperName, boolean required, T defaultValue) { + Object value = valueMap.get(key); + if (value == null) { + if (defaultValue != null) { + return defaultValue; + } else if(required) { + addValidationIssue(key, wrapperName, "it was not found and it is required"); + } + } else { + if (targetClass.isInstance(value)) { + return (T) value; + } else { + addValidationIssue(key, wrapperName, "it is found but could not be parsed as a " + targetClass.getSimpleName()); + } + } + return null; + } + + + public <T> T getMapAsType(Map valueMap, String key, Class targetClass, String wrapperName, boolean required) { + Object obj = valueMap.get(key); + return interpretValueAsType(obj, key, targetClass, wrapperName, required); + } + + public void transformListToType(List list, String simpleListType, Class targetClass, String wrapperName){ + for (int i = 0; i < list.size(); i++) { + Object obj = interpretValueAsType(list.get(i), simpleListType + " number " + i, targetClass, wrapperName, false); + if (obj != null) { + list.set(i, obj); + } + } + } + + private <T> T interpretValueAsType(Object obj, String key, Class targetClass, String wrapperName, boolean required) { + if (obj == null) { + if (required){ + addValidationIssue(key, wrapperName, "it is a required property but was not found"); + } else { + try { + return (T) targetClass.newInstance(); + } catch (InstantiationException | IllegalAccessException e) { + addValidationIssue(key, wrapperName, "it is optional and when attempting to create it the following exception was thrown:" + e.getMessage()); + } + } + } else if (obj instanceof Map) { + Constructor<?> constructor; + try { + constructor = targetClass.getConstructor(Map.class); + return (T) constructor.newInstance((Map) obj); + } catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) { + addValidationIssue(key, wrapperName, "it is found as a map and when attempting to interpret it the following exception was thrown:" + e.getMessage()); + } + } else { + try { + return (T) obj; + } catch (ClassCastException e) { + addValidationIssue(key, wrapperName, "it is found but could not be parsed as a map"); + } + } + return null; + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/CommonPropertyKeys.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/CommonPropertyKeys.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/CommonPropertyKeys.java new file mode 100644 index 0000000..fc0a681 --- /dev/null +++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/schema/common/CommonPropertyKeys.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.minifi.bootstrap.util.schema.common; + +public class CommonPropertyKeys { + public static final String CORE_PROPS_KEY = "Core Properties"; + public static final String FLOWFILE_REPO_KEY = "FlowFile Repository"; + public static final String SWAP_PROPS_KEY = "Swap"; + public static final String FLOW_CONTROLLER_PROPS_KEY = "Flow Controller"; + public static final String CONTENT_REPO_KEY = "Content Repository"; + public static final String COMPONENT_STATUS_REPO_KEY = "Component Status Repository"; + public static final String SECURITY_PROPS_KEY = "Security Properties"; + public static final String SENSITIVE_PROPS_KEY = "Sensitive Props"; + public static final String PROCESSORS_KEY = "Processors"; + public static final String CONNECTIONS_KEY = "Connections"; + public static final String PROVENANCE_REPORTING_KEY = "Provenance Reporting"; + public static final String REMOTE_PROCESSING_GROUPS_KEY = "Remote Processing Groups"; + public static final String INPUT_PORTS_KEY = "Input Ports"; + public static final String PROVENANCE_REPO_KEY = "Provenance Repository"; + + + public static final String NAME_KEY = "name"; + public static final String COMMENT_KEY = "comment"; + public static final String ALWAYS_SYNC_KEY = "always sync"; + public static final String YIELD_PERIOD_KEY = "yield period"; + public static final String MAX_CONCURRENT_THREADS_KEY = "max concurrent threads"; + public static final String MAX_CONCURRENT_TASKS_KEY = "max concurrent tasks"; + public static final String ID_KEY = "id"; + public static final String SCHEDULING_STRATEGY_KEY = "scheduling strategy"; + public static final String SCHEDULING_PERIOD_KEY = "scheduling period"; + public static final String USE_COMPRESSION_KEY = "use compression"; + + private CommonPropertyKeys() { + } +} http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/TestConfigTransformer.java ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/TestConfigTransformer.java b/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/TestConfigTransformer.java index d0a7d71..cb373bf 100644 --- a/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/TestConfigTransformer.java +++ b/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/TestConfigTransformer.java @@ -17,12 +17,13 @@ package org.apache.nifi.minifi.bootstrap.util; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.File; import java.io.FileInputStream; -import org.apache.nifi.minifi.bootstrap.configuration.ConfigurationChangeException; +import org.apache.nifi.minifi.bootstrap.exception.InvalidConfigurationException; import org.junit.Assert; import org.junit.Test; @@ -30,7 +31,6 @@ public class TestConfigTransformer { @Test public void doesTransformFile() throws Exception { - ConfigTransformer.transformConfigFile("./src/test/resources/config.yml", "./target/"); File nifiPropertiesFile = new File("./target/nifi.properties"); @@ -66,7 +66,6 @@ public class TestConfigTransformer { @Test public void doesTransformOnDefaultFile() throws Exception { - ConfigTransformer.transformConfigFile("./src/test/resources/default.yml", "./target/"); File nifiPropertiesFile = new File("./target/nifi.properties"); @@ -82,19 +81,122 @@ public class TestConfigTransformer { flowXml.deleteOnExit(); } - @Test(expected = IllegalArgumentException.class) - public void handleTransformInvalidFile() throws Exception { + @Test + public void doesTransformOnMultipleProcessors() throws Exception { + ConfigTransformer.transformConfigFile("./src/test/resources/config-multiple-processors.yml", "./target/"); + File nifiPropertiesFile = new File("./target/nifi.properties"); + + assertTrue(nifiPropertiesFile.exists()); + assertTrue(nifiPropertiesFile.canRead()); + + nifiPropertiesFile.deleteOnExit(); + + File flowXml = new File("./target/flow.xml.gz"); + assertTrue(flowXml.exists()); + assertTrue(flowXml.canRead()); + + flowXml.deleteOnExit(); + } + + @Test + public void doesTransformOnMultipleRemoteProcessingGroups() throws Exception { + ConfigTransformer.transformConfigFile("./src/test/resources/config-multiple-RPGs.yml", "./target/"); + File nifiPropertiesFile = new File("./target/nifi.properties"); + + assertTrue(nifiPropertiesFile.exists()); + assertTrue(nifiPropertiesFile.canRead()); - ConfigTransformer.transformConfigFile("./src/test/resources/config-invalid.yml", "./target/"); + nifiPropertiesFile.deleteOnExit(); + + File flowXml = new File("./target/flow.xml.gz"); + assertTrue(flowXml.exists()); + assertTrue(flowXml.canRead()); - Assert.fail("Invalid configuration file was not detected."); + flowXml.deleteOnExit(); } - @Test(expected = ConfigurationChangeException.class) + @Test + public void doesTransformOnMultipleInputPorts() throws Exception { + ConfigTransformer.transformConfigFile("./src/test/resources/config-multiple-input-ports.yml", "./target/"); + File nifiPropertiesFile = new File("./target/nifi.properties"); + + assertTrue(nifiPropertiesFile.exists()); + assertTrue(nifiPropertiesFile.canRead()); + + nifiPropertiesFile.deleteOnExit(); + + File flowXml = new File("./target/flow.xml.gz"); + assertTrue(flowXml.exists()); + assertTrue(flowXml.canRead()); + + flowXml.deleteOnExit(); + } + + @Test + public void doesTransformOnMinimal() throws Exception { + ConfigTransformer.transformConfigFile("./src/test/resources/config-minimal.yml", "./target/"); + File nifiPropertiesFile = new File("./target/nifi.properties"); + + assertTrue(nifiPropertiesFile.exists()); + assertTrue(nifiPropertiesFile.canRead()); + + nifiPropertiesFile.deleteOnExit(); + + File flowXml = new File("./target/flow.xml.gz"); + assertTrue(flowXml.exists()); + assertTrue(flowXml.canRead()); + + flowXml.deleteOnExit(); + } + + @Test + public void handleTransformInvalidFile() throws Exception { + try { + ConfigTransformer.transformConfigFile("./src/test/resources/config-invalid.yml", "./target/"); + Assert.fail("Invalid configuration file was not detected."); + } catch (InvalidConfigurationException e){ + assertEquals("Provided YAML configuration is not a Map", e.getMessage()); + } + } + + @Test + public void handleTransformMalformedField() throws Exception { + try { + ConfigTransformer.transformConfigFile("./src/test/resources/config-malformed-field.yml", "./target/"); + Assert.fail("Invalid configuration file was not detected."); + } catch (InvalidConfigurationException e){ + assertEquals("Failed to transform config file due to:['threshold' in section 'Swap' because it is found but could not be parsed as a Number]", e.getMessage()); + } + } + + @Test public void handleTransformEmptyFile() throws Exception { + try { + ConfigTransformer.transformConfigFile("./src/test/resources/config-empty.yml", "./target/"); + Assert.fail("Invalid configuration file was not detected."); + } catch (InvalidConfigurationException e){ + assertEquals("Provided YAML configuration is not a Map", e.getMessage()); + } + } - ConfigTransformer.transformConfigFile("./src/test/resources/config-empty.yml", "./target/"); + @Test + public void handleTransformFileMissingRequiredField() throws Exception { + try { + ConfigTransformer.transformConfigFile("./src/test/resources/config-missing-required-field.yml", "./target/"); + Assert.fail("Invalid configuration file was not detected."); + } catch (InvalidConfigurationException e){ + assertEquals("Failed to transform config file due to:['class' in section 'Processors' because it was not found and it is required]", e.getMessage()); + } + } - Assert.fail("Invalid configuration file was not detected."); + @Test + public void handleTransformFileMultipleProblems() throws Exception { + try { + ConfigTransformer.transformConfigFile("./src/test/resources/config-multiple-problems.yml", "./target/"); + Assert.fail("Invalid configuration file was not detected."); + } catch (InvalidConfigurationException e){ + assertEquals("Failed to transform config file due to:['scheduling strategy' in section 'Provenance Reporting' because it is not a valid scheduling strategy], ['class' in section " + + "'Processors' because it was not found and it is required], ['source name' in section 'Connections' because it was not found and it is required]", e.getMessage()); + } } } http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-empty.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-empty.yml b/minifi-bootstrap/src/test/resources/config-empty.yml index fbbbeb9..8141ad7 100644 --- a/minifi-bootstrap/src/test/resources/config-empty.yml +++ b/minifi-bootstrap/src/test/resources/config-empty.yml @@ -11,8 +11,4 @@ # distributed under the License is distributed on an \"AS IS\" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. - -Flow Controller: - name: MiNiFi Flow - comment: \ No newline at end of file +# limitations under the License. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-malformed-field.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-malformed-field.yml b/minifi-bootstrap/src/test/resources/config-malformed-field.yml new file mode 100644 index 0000000..ecce9a8 --- /dev/null +++ b/minifi-bootstrap/src/test/resources/config-malformed-field.yml @@ -0,0 +1,109 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the \"License\"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flow Controller: + name: MiNiFi Flow + comment: + +Core Properties: + flow controller graceful shutdown period: 10 sec + flow service write delay interval: 500 ms + administrative yield duration: 30 sec + bored yield duration: 10 millis + max concurrent threads: 1 + +FlowFile Repository: + partitions: 256 + checkpoint interval: 2 mins + always sync: false + Swap: + # Threshold should be a number + threshold: this is not a number + in period: 5 sec + in threads: 1 + out period: 5 sec + out threads: 4 + +Content Repository: + content claim max appendable size: 10 MB + content claim max flow files: 100 + always sync: false + +Component Status Repository: + buffer size: 1440 + snapshot frequency: 1 min + +Security Properties: + keystore: /tmp/ssl/localhost-ks.jks + keystore type: JKS + keystore password: localtest + key password: localtest + truststore: /tmp/ssl/localhost-ts.jks + truststore type: JKS + truststore password: localtest + ssl protocol: TLS + Sensitive Props: + key: + algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL + provider: BC + +Processors: + - name: TailFile + class: org.apache.nifi.processors.standard.TailFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 1 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + Properties: + File to Tail: logs/minifi-app.log + Rolling Filename Pattern: minifi-app* + Initial Start Position: Beginning of File + +Connections: + - name: TailToS2S + source name: TailFile + source relationship name: success + destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + +Remote Processing Groups: + - name: NiFi Flow + comment: + url: https://localhost:8090/nifi + timeout: 30 secs + yield period: 10 sec + Input Ports: + - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + name: tailed log + comments: + max concurrent tasks: 1 + use compression: false + +Provenance Reporting: + comment: + scheduling strategy: TIMER_DRIVEN + scheduling period: 30 sec + destination url: https://localhost:8090/ + port name: provenance + originating url: http://${hostname(true)}:8081/nifi + use compression: true + timeout: 30 secs + batch size: 1000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-minimal.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-minimal.yml b/minifi-bootstrap/src/test/resources/config-minimal.yml new file mode 100644 index 0000000..573fef6 --- /dev/null +++ b/minifi-bootstrap/src/test/resources/config-minimal.yml @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the \"License\"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flow Controller: + name: MiNiFi Flow + +# When creating the Flow (not doing the transform) these processors will be invalid due to not having the necesary properties/auto-terminated relationships +Processors: + - name: TailAppLog + class: org.apache.nifi.processors.standard.TailFile + scheduling strategy: TIMER_DRIVEN + scheduling period: 10 sec + - name: PutFile + class: org.apache.nifi.processors.standard.PutFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 0 sec + +Connections: + - name: TailToSplit + source name: RouteErrors + source relationship name: success + destination name: PutFile http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-missing-required-field.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-missing-required-field.yml b/minifi-bootstrap/src/test/resources/config-missing-required-field.yml new file mode 100644 index 0000000..9339d8c --- /dev/null +++ b/minifi-bootstrap/src/test/resources/config-missing-required-field.yml @@ -0,0 +1,109 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the \"License\"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flow Controller: + name: MiNiFi Flow + comment: + +Core Properties: + flow controller graceful shutdown period: 10 sec + flow service write delay interval: 500 ms + administrative yield duration: 30 sec + bored yield duration: 10 millis + max concurrent threads: 1 + +FlowFile Repository: + partitions: 256 + checkpoint interval: 2 mins + always sync: false + Swap: + threshold: 20000 + in period: 5 sec + in threads: 1 + out period: 5 sec + out threads: 4 + +Content Repository: + content claim max appendable size: 10 MB + content claim max flow files: 100 + always sync: false + +Component Status Repository: + buffer size: 1440 + snapshot frequency: 1 min + +Security Properties: + keystore: /tmp/ssl/localhost-ks.jks + keystore type: JKS + keystore password: localtest + key password: localtest + truststore: /tmp/ssl/localhost-ts.jks + truststore type: JKS + truststore password: localtest + ssl protocol: TLS + Sensitive Props: + key: + algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL + provider: BC + +Processors: + - name: TailFile + # 'class' is a required field + # class: org.apache.nifi.processors.standard.TailFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 1 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + Properties: + File to Tail: logs/minifi-app.log + Rolling Filename Pattern: minifi-app* + Initial Start Position: Beginning of File + +Connections: + - name: TailToS2S + source name: TailFile + source relationship name: success + destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + +Remote Processing Groups: + - name: NiFi Flow + comment: + url: https://localhost:8090/nifi + timeout: 30 secs + yield period: 10 sec + Input Ports: + - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + name: tailed log + comments: + max concurrent tasks: 1 + use compression: false + +Provenance Reporting: + comment: + scheduling strategy: TIMER_DRIVEN + scheduling period: 30 sec + destination url: https://localhost:8090/ + port name: provenance + originating url: http://${hostname(true)}:8081/nifi + use compression: true + timeout: 30 secs + batch size: 1000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml b/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml new file mode 100644 index 0000000..48ce749 --- /dev/null +++ b/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml @@ -0,0 +1,127 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the \"License\"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flow Controller: + name: MiNiFi Flow + comment: + +Core Properties: + flow controller graceful shutdown period: 10 sec + flow service write delay interval: 500 ms + administrative yield duration: 30 sec + bored yield duration: 10 millis + max concurrent threads: 1 + +FlowFile Repository: + partitions: 256 + checkpoint interval: 2 mins + always sync: false + Swap: + threshold: 20000 + in period: 5 sec + in threads: 1 + out period: 5 sec + out threads: 4 + +Content Repository: + content claim max appendable size: 10 MB + content claim max flow files: 100 + always sync: false + +Component Status Repository: + buffer size: 1440 + snapshot frequency: 1 min + +Security Properties: + keystore: /tmp/ssl/localhost-ks.jks + keystore type: JKS + keystore password: localtest + key password: localtest + truststore: /tmp/ssl/localhost-ts.jks + truststore type: JKS + truststore password: localtest + ssl protocol: TLS + Sensitive Props: + key: + algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL + provider: BC + +Processors: + - name: TailAppLog + class: org.apache.nifi.processors.standard.TailFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 10 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + Properties: + File to Tail: logs/minifi-app.log + Rolling Filename Pattern: minifi-app* + Initial Start Position: Beginning of File + +Connections: + - name: TailToS2S + source name: TailFile + source relationship name: success + destination name: dgs809qe-9qw7-q985-jl1u-y789ohi87g78 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + - name: TailToS2S-2 + source name: TailFile + source relationship name: success + destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + +Remote Processing Groups: + - name: NiFi Flow + comment: + url: https://localhost:8090/nifi + timeout: 30 secs + yield period: 10 sec + Input Ports: + - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + name: tailed log + comments: + max concurrent tasks: 1 + use compression: false + - name: NiFi Flow 2 + comment: + url: https://localhost:8089/nifi + timeout: 30 secs + yield period: 10 sec + Input Ports: + - id: dgs809qe-9qw7-q985-jl1u-y789ohi87g78 + name: tailed log + comments: + max concurrent tasks: 1 + use compression: false + +Provenance Reporting: + comment: + scheduling strategy: TIMER_DRIVEN + scheduling period: 30 sec + destination url: https://localhost:8080/ + port name: provenance + originating url: http://${hostname(true)}:8081/nifi + use compression: true + timeout: 30 secs + batch size: 1000 http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml b/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml new file mode 100644 index 0000000..9498eae --- /dev/null +++ b/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml @@ -0,0 +1,121 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the \"License\"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flow Controller: + name: MiNiFi Flow + comment: + +Core Properties: + flow controller graceful shutdown period: 10 sec + flow service write delay interval: 500 ms + administrative yield duration: 30 sec + bored yield duration: 10 millis + max concurrent threads: 1 + +FlowFile Repository: + partitions: 256 + checkpoint interval: 2 mins + always sync: false + Swap: + threshold: 20000 + in period: 5 sec + in threads: 1 + out period: 5 sec + out threads: 4 + +Content Repository: + content claim max appendable size: 10 MB + content claim max flow files: 100 + always sync: false + +Component Status Repository: + buffer size: 1440 + snapshot frequency: 1 min + +Security Properties: + keystore: /tmp/ssl/localhost-ks.jks + keystore type: JKS + keystore password: localtest + key password: localtest + truststore: /tmp/ssl/localhost-ts.jks + truststore type: JKS + truststore password: localtest + ssl protocol: TLS + Sensitive Props: + key: + algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL + provider: BC + +Processors: + - name: TailAppLog + class: org.apache.nifi.processors.standard.TailFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 10 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + Properties: + File to Tail: logs/minifi-app.log + Rolling Filename Pattern: minifi-app* + Initial Start Position: Beginning of File + +Connections: + - name: TailToS2S + source name: TailFile + source relationship name: success + destination name: dgs809qe-9qw7-q985-jl1u-y789ohi87g78 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + - name: TailToS2S-2 + source name: TailFile + source relationship name: success + destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + +Remote Processing Groups: + - name: NiFi Flow + comment: + url: https://localhost:8090/nifi + timeout: 30 secs + yield period: 10 sec + Input Ports: + - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + name: tailed log + comments: + max concurrent tasks: 1 + use compression: false + - id: dgs809qe-9qw7-q985-jl1u-y789ohi87g78 + name: tailed log2 + comments: + max concurrent tasks: 1 + use compression: false + +Provenance Reporting: + comment: + scheduling strategy: TIMER_DRIVEN + scheduling period: 30 sec + destination url: https://localhost:8080/ + port name: provenance + originating url: http://${hostname(true)}:8081/nifi + use compression: true + timeout: 30 secs + batch size: 1000 http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-multiple-problems.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-multiple-problems.yml b/minifi-bootstrap/src/test/resources/config-multiple-problems.yml new file mode 100644 index 0000000..c30bfb9 --- /dev/null +++ b/minifi-bootstrap/src/test/resources/config-multiple-problems.yml @@ -0,0 +1,111 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the \"License\"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flow Controller: + name: MiNiFi Flow + comment: + +Core Properties: + flow controller graceful shutdown period: 10 sec + flow service write delay interval: 500 ms + administrative yield duration: 30 sec + bored yield duration: 10 millis + max concurrent threads: 1 + +FlowFile Repository: + partitions: 256 + checkpoint interval: 2 mins + always sync: false + Swap: + threshold: 20000 + in period: 5 sec + in threads: 1 + out period: 5 sec + out threads: 4 + +Content Repository: + content claim max appendable size: 10 MB + content claim max flow files: 100 + always sync: false + +Component Status Repository: + buffer size: 1440 + snapshot frequency: 1 min + +Security Properties: + keystore: /tmp/ssl/localhost-ks.jks + keystore type: JKS + keystore password: localtest + key password: localtest + truststore: /tmp/ssl/localhost-ts.jks + truststore type: JKS + truststore password: localtest + ssl protocol: TLS + Sensitive Props: + key: + algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL + provider: BC + +Processors: + - name: TailFile + # 'class' is a required field + # class: org.apache.nifi.processors.standard.TailFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 1 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + Properties: + File to Tail: logs/minifi-app.log + Rolling Filename Pattern: minifi-app* + Initial Start Position: Beginning of File + +Connections: + - name: TailToS2S + # Source name is needed + source name: + source relationship name: success + destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: + +Remote Processing Groups: + - name: NiFi Flow + comment: + url: https://localhost:8090/nifi + timeout: 30 secs + yield period: 10 sec + Input Ports: + - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + name: tailed log + comments: + max concurrent tasks: 1 + use compression: false + +Provenance Reporting: + comment: + # Not a valid strategy + scheduling strategy: ALL THE TIEMS! + scheduling period: 30 sec + destination url: https://localhost:8090/ + port name: provenance + originating url: http://${hostname(true)}:8081/nifi + use compression: true + timeout: 30 secs + batch size: 1000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config-multiple-processors.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config-multiple-processors.yml b/minifi-bootstrap/src/test/resources/config-multiple-processors.yml new file mode 100644 index 0000000..5a3cf92 --- /dev/null +++ b/minifi-bootstrap/src/test/resources/config-multiple-processors.yml @@ -0,0 +1,165 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the \"License\"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an \"AS IS\" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flow Controller: + name: MiNiFi Flow + comment: + +Core Properties: + flow controller graceful shutdown period: 10 sec + flow service write delay interval: 500 ms + administrative yield duration: 30 sec + bored yield duration: 10 millis + max concurrent threads: 1 + +FlowFile Repository: + partitions: 256 + checkpoint interval: 2 mins + always sync: false + Swap: + threshold: 20000 + in period: 5 sec + in threads: 1 + out period: 5 sec + out threads: 4 + +Content Repository: + content claim max appendable size: 10 MB + content claim max flow files: 100 + always sync: false + +Component Status Repository: + buffer size: 1440 + snapshot frequency: 1 min + +Security Properties: + keystore: /tmp/ssl/localhost-ks.jks + keystore type: JKS + keystore password: localtest + key password: localtest + truststore: /tmp/ssl/localhost-ts.jks + truststore type: JKS + truststore password: localtest + ssl protocol: TLS + Sensitive Props: + key: + algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL + provider: BC + +Processors: + - name: TailAppLog + class: org.apache.nifi.processors.standard.TailFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 10 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + Properties: + File to Tail: logs/minifi-app.log + Rolling Filename Pattern: minifi-app* + Initial Start Position: Beginning of File + - name: SplitIntoSingleLines + class: org.apache.nifi.processors.standard.SplitText + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 0 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + - failure + - original + Properties: + Line Split Count: 1 + Header Line Count: 0 + Remove Trailing Newlines: true + - name: RouteErrors + class: org.apache.nifi.processors.standard.RouteText + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 0 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + - unmatched + - original + Properties: + Routing Strategy: Route to 'matched' if line matches all conditions + Matching Strategy: Contains + Character Set: UTF-8 + Ignore Leading/Trailing Whitespace: true + Ignore Case: true + Grouping Regular Expression: + WALFFR: WriteAheadFlowFileRepository + - name: PutFile + class: org.apache.nifi.processors.standard.PutFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 0 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + - failure + - success + Properties: + Directory: ./ + Conflict Resolution Strategy: replace + Create Missing Directories: true + Maximum File Count: + Last Modified Time: + Permissions: + Owner: + Group: + +Connections: + - name: TailToSplit + source name: TailAppLog + source relationship name: success + destination name: SplitIntoSingleLines + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + - name: SplitToRoute + source name: SplitIntoSingleLines + source relationship name: splits + destination name: RouteErrors + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + - name: RouteToS2S + source name: RouteErrors + source relationship name: matched + destination name: PutFile + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer + +Provenance Reporting: + comment: + scheduling strategy: TIMER_DRIVEN + scheduling period: 30 sec + destination url: https://localhost:8080/ + port name: provenance + originating url: http://${hostname(true)}:8081/nifi + use compression: true + timeout: 30 secs + batch size: 1000 http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/config.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/config.yml b/minifi-bootstrap/src/test/resources/config.yml index bb4dec4..2af6b9b 100644 --- a/minifi-bootstrap/src/test/resources/config.yml +++ b/minifi-bootstrap/src/test/resources/config.yml @@ -22,6 +22,7 @@ Core Properties: flow service write delay interval: 500 ms administrative yield duration: 30 sec bored yield duration: 10 millis + max concurrent threads: 1 FlowFile Repository: partitions: 256 @@ -60,40 +61,43 @@ Security Properties: algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL provider: BC -Processor Configuration: - name: TailFile - class: org.apache.nifi.processors.standard.TailFile - max concurrent tasks: 1 - scheduling strategy: TIMER_DRIVEN - scheduling period: 1 sec - penalization period: 30 sec - yield period: 1 sec - run duration nanos: 0 - auto-terminated relationships list: - Properties: - File to Tail: logs/minifi-app.log - Rolling Filename Pattern: minifi-app* - Initial Start Position: Beginning of File +Processors: + - name: TailFile + class: org.apache.nifi.processors.standard.TailFile + max concurrent tasks: 1 + scheduling strategy: TIMER_DRIVEN + scheduling period: 1 sec + penalization period: 30 sec + yield period: 1 sec + run duration nanos: 0 + auto-terminated relationships list: + Properties: + File to Tail: logs/minifi-app.log + Rolling Filename Pattern: minifi-app* + Initial Start Position: Beginning of File -Connection Properties: - name: - max work queue size: 0 - max work queue data size: 0 MB - flowfile expiration: 0 sec - queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer +Connections: + - name: TailToS2S + source name: TailFile + source relationship name: success + destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + max work queue size: 0 + max work queue data size: 1 MB + flowfile expiration: 60 sec + queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer -Remote Processing Group: - name: NiFi Flow - comment: - url: https://localhost:8090/nifi - timeout: 30 secs - yield period: 10 sec - Input Port: - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61 - name: tailed log - comments: - max concurrent tasks: 1 - use compression: false +Remote Processing Groups: + - name: NiFi Flow + comment: + url: https://localhost:8090/nifi + timeout: 30 secs + yield period: 10 sec + Input Ports: + - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61 + name: tailed log + comments: + max concurrent tasks: 1 + use compression: false Provenance Reporting: comment: http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/6f528bbc/minifi-bootstrap/src/test/resources/default.yml ---------------------------------------------------------------------- diff --git a/minifi-bootstrap/src/test/resources/default.yml b/minifi-bootstrap/src/test/resources/default.yml index 5043900..89b1011 100644 --- a/minifi-bootstrap/src/test/resources/default.yml +++ b/minifi-bootstrap/src/test/resources/default.yml @@ -22,6 +22,7 @@ Core Properties: flow service write delay interval: 500 ms administrative yield duration: 30 sec bored yield duration: 10 millis + max concurrent threads: 1 FlowFile Repository: partitions: 256 @@ -34,7 +35,7 @@ FlowFile Repository: out period: 5 sec out threads: 4 -Content Repository: +Content Repository: content claim max appendable size: 10 MB content claim max flow files: 100 always sync: false @@ -60,45 +61,10 @@ Security Properties: algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL provider: BC -Processor Configuration: - name: - class: - max concurrent tasks: - scheduling strategy: - scheduling period: - penalization period: - yield period: - run duration nanos: - auto-terminated relationships list: - Properties: +Processors: -Connection Properties: - name: - max work queue size: 0 - max work queue data size: 0 MB - flowfile expiration: 0 sec - queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer +Connections: -Remote Processing Group: - name: - comment: - url: - timeout: - yield period: - Input Port: - id: - name: - comments: - max concurrent tasks: - use compression: +Remote Processing Groups: -Provenance Reporting: - comment: - scheduling strategy: - scheduling period: - destination url: - port name: - originating url: - use compression: - timeout: - batch size: \ No newline at end of file +Provenance Reporting: \ No newline at end of file
