You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/07/01 17:43:55 UTC
[2/2] incubator-nifi git commit: NIFI-719: merged with develop
NIFI-719: merged with develop
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/a0918079
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/a0918079
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/a0918079
Branch: refs/heads/develop
Commit: a09180799d8a84108c3f5665668bded284768ecf
Parents: 5021570 ba31559
Author: Mark Payne <ma...@hotmail.com>
Authored: Wed Jul 1 10:44:42 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Wed Jul 1 10:44:42 2015 -0400
----------------------------------------------------------------------
.../nifi/controller/ConfigurationContext.java | 23 +++++++++++++++--
.../nifi/util/MockConfigurationContext.java | 11 +++++++++
.../mock/MockConfigurationContext.java | 10 ++++++++
.../apache/nifi/controller/FlowController.java | 18 +++++++-------
.../reporting/AbstractReportingTaskNode.java | 4 +--
.../scheduling/StandardProcessScheduler.java | 24 +++++++++---------
.../service/StandardConfigurationContext.java | 26 +++++++++++++++++++-
.../service/StandardControllerServiceNode.java | 2 +-
.../StandardControllerServiceProvider.java | 10 ++++----
.../apache/nifi/controller/MonitorMemory.java | 14 +++--------
10 files changed, 99 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a0918079/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockConfigurationContext.java
----------------------------------------------------------------------
diff --cc nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockConfigurationContext.java
index 742f03b,e9afb32..c90e722
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockConfigurationContext.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockConfigurationContext.java
@@@ -55,12 -49,13 +56,22 @@@ public class MockConfigurationContext i
return new HashMap<>(this.properties);
}
+ private PropertyDescriptor getActualDescriptor(final PropertyDescriptor property) {
+ if (service == null) {
+ return property;
+ }
+
+ final PropertyDescriptor resolved = service.getPropertyDescriptor(property.getName());
+ return resolved == null ? property : resolved;
+ }
++
+ @Override
+ public String getSchedulingPeriod() {
+ return "0 secs";
+ }
+
+ @Override
+ public Long getSchedulingPeriod(final TimeUnit timeUnit) {
+ return 0L;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a0918079/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockConfigurationContext.java
----------------------------------------------------------------------
diff --cc nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockConfigurationContext.java
index 1ba5499,0000000..6c9ec9d
mode 100644,000000..100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockConfigurationContext.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockConfigurationContext.java
@@@ -1,38 -1,0 +1,48 @@@
+/*
+ * 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.documentation.mock;
+
+import java.util.Collections;
+import java.util.Map;
++import java.util.concurrent.TimeUnit;
+
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.PropertyValue;
+import org.apache.nifi.controller.ConfigurationContext;
+
+public class MockConfigurationContext implements ConfigurationContext {
+
+ @Override
+ public PropertyValue getProperty(PropertyDescriptor property) {
+ return null;
+ }
+
+ @Override
+ public Map<PropertyDescriptor, String> getProperties() {
+ return Collections.emptyMap();
+ }
+
++ @Override
++ public String getSchedulingPeriod() {
++ return "0 secs";
++ }
++
++ @Override
++ public Long getSchedulingPeriod(final TimeUnit timeUnit) {
++ return 0L;
++ }
+}