[12/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
NIFI-169 well it finally all builds.  There is a classpath issue still to sort 
out which impacts startup


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/19d4a150
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/19d4a150
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/19d4a150

Branch: refs/heads/NIFI-169
Commit: 19d4a150a875e0862d458e03ffb413797f2bf81b
Parents: 9ccbf8b
Author: joewitt joew...@apache.org
Authored: Mon Dec 15 05:14:32 2014 -0500
Committer: joewitt joew...@apache.org
Committed: Mon Dec 15 05:14:32 2014 -0500

--
 assemblies/nifi/pom.xml | 490 --
 .../nifi/src/main/assembly/dependencies.xml | 135 ---
 assembly/pom.xml| 446 +
 assembly/src/main/assembly/dependencies.xml | 135 +++
 commons/core-flowfile-attributes/pom.xml|   5 +-
 commons/data-provenance-utils/pom.xml   |   4 +-
 commons/flowfile-packager/pom.xml   |   4 +-
 .../apache/nifi/util/FlowFilePackagerV1.java|   4 +-
 commons/naive-search-ring-buffer/pom.xml|   2 +-
 commons/nifi-expression-language/pom.xml|   5 +-
 commons/nifi-file-utils/pom.xml |   4 +-
 commons/nifi-logging-utils/pom.xml  |   5 +-
 commons/nifi-parent/pom.xml | 217 -
 commons/nifi-properties/pom.xml |   6 +-
 commons/nifi-security-utils/pom.xml |   4 +-
 commons/nifi-socket-utils/pom.xml   |   9 +-
 commons/nifi-stream-utils/pom.xml   |  16 +-
 commons/nifi-utils/pom.xml  |   3 +-
 commons/nifi-web-utils/pom.xml  |  12 +-
 commons/pom.xml |  50 +
 commons/processor-utilities/pom.xml |   6 +-
 commons/remote-communications-utils/pom.xml |   2 +-
 commons/search-utils/pom.xml|   4 +-
 commons/wali/pom.xml|   9 +-
 extensions/file-authorization-provider/pom.xml  |  90 --
 .../FileAuthorizationProvider.java  | 568 ---
 apache.nifi.authorization.AuthorityProvider |  15 -
 .../src/main/xsd/users.xsd  |  64 --
 .../FileAuthorizationProviderTest.java  | 127 ---
 misc/nar-maven-plugin/pom.xml   | 100 --
 .../src/main/java/nifi/NarMojo.java | 610 
 .../resources/META-INF/plexus/components.xml|  52 -
 misc/pom.xml| 100 ++
 misc/src/main/java/nifi/NarMojo.java| 610 
 .../resources/META-INF/plexus/components.xml|  52 +
 .../distributed-cache-client-service/pom.xml|  67 --
 .../distributed/cache/client/CommsSession.java  |  46 -
 .../DistributedMapCacheClientService.java   | 301 --
 .../DistributedSetCacheClientService.java   | 212 
 .../cache/client/SSLCommsSession.java   | 106 --
 .../cache/client/StandardCommsSession.java  | 124 ---
 ...org.apache.nifi.controller.ControllerService |  16 -
 .../index.html  |  78 --
 .../index.html  |   0
 .../distributed-cache-protocol/pom.xml  |  39 -
 .../cache/protocol/ProtocolHandshake.java   | 119 ---
 .../protocol/exception/HandshakeException.java  |  27 -
 .../distributed-cache-server/pom.xml|  81 --
 .../cache/server/AbstractCacheServer.java   | 199 
 .../distributed/cache/server/CacheRecord.java   |  57 --
 .../distributed/cache/server/CacheServer.java   |  26 -
 .../cache/server/DistributedCacheServer.java| 107 --
 .../cache/server/DistributedSetCacheServer.java |  68 --
 .../cache/server/EvictionPolicy.java|  73 --
 .../cache/server/SetCacheServer.java| 104 --
 .../server/map/DistributedMapCacheServer.java   |  71 --
 .../distributed/cache/server/map/MapCache.java  |  29 -
 .../cache/server/map/MapCacheRecord.java|  58 --
 .../cache/server/map/MapCacheServer.java| 145 ---
 .../cache/server/map/MapPutResult.java  |  59 --
 .../cache/server/map/PersistentMapCache.java| 210 
 .../cache/server/map/SimpleMapCache.java| 165 
 .../cache/server/set/PersistentSetCache.java| 194 
 .../distributed/cache/server/set/SetCache.java  |  29 -
 .../cache/server/set/SetCacheRecord.java|  55 --
 .../cache/server/set/SetCacheResult.java|  43 -
 .../cache/server/set/SimpleSetCache.java| 117 ---
 ...org.apache.nifi.controller.ControllerService |  16 -
 .../index.html  |  82 --
 .../cache/server/TestServerAndClient.java   | 530 --
 .../src/test/resources/localhost-ks.jks | Bin 1298 - 0 bytes
 .../src/test/resources/localhost-ts.jks | Bin 891 - 0 bytes
 

[09/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java
--
diff --git 
a/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java
 
b/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java
deleted file mode 100644
index 8049d42..000
--- 
a/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.distributed.cache.protocol.exception;
-
-public class HandshakeException extends Exception {
-public HandshakeException(final String message) {
-super(message);
-}
-
-public HandshakeException(final Throwable cause) {
-super(cause);
-}
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml
--
diff --git 
a/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml
 
b/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml
deleted file mode 100644
index 5dec322..000
--- 
a/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
-!--
-  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.
---
-   modelVersion4.0.0/modelVersion
-
-   parent
-   groupIdorg.apache.nifi/groupId
-   artifactIddistributed-cache-services-bundle/artifactId
-   version0.0.1-SNAPSHOT/version
-   /parent
-
-   artifactIddistributed-cache-server/artifactId
-
-   nameDistributed Cache Server/name
-   descriptionProvides a Controller Service for hosting Distributed 
Caches/description
-
-   dependencies
-   dependency
-   groupIdorg.apache.nifi/groupId
-   artifactIdnifi-api/artifactId
-   /dependency
-   dependency
-   groupIdorg.apache.nifi/groupId
-   artifactIddistributed-cache-protocol/artifactId
-   version${project.version}/version
-   /dependency
-   dependency
-   groupIdorg.apache.nifi/groupId
-   artifactIdremote-communications-utils/artifactId
-   /dependency
-   dependency
-   groupIdorg.apache.nifi/groupId
-   artifactIdnifi-processor-utils/artifactId
-   /dependency
-   dependency
-   groupIdorg.apache.nifi/groupId
-   artifactIdnifi-stream-utils/artifactId
-   /dependency
-   dependency
-

[05/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java
--
diff --git 
a/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java
 
b/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java
new file mode 100644
index 000..5bead8c
--- /dev/null
+++ 
b/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java
@@ -0,0 +1,114 @@
+/*
+ * 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.distributed.cache.client;
+
+import java.io.IOException;
+
+import org.apache.nifi.controller.ControllerService;
+
+/**
+ * This interface defines an API that can be used for interacting with a
+ * Distributed Cache that functions similarly to a {@link java.util.Map Map}.
+ *
+ */
+public interface DistributedMapCacheClient extends ControllerService {
+
+/**
+ * Adds the specified key and value to the cache, if they are not already
+ * present, serializing the key and value with the given
+ * {@link Serializer}s.
+ *
+ * @param K
+ * @param V
+ * @param key the key for into the map
+ * @param value the value to add to the map if and only if the key is 
absent
+ * @param keySerializer
+ * @param valueSerializer
+ * @return true if the value was added to the cache, false if the value
+ * already existed in the cache
+ *
+ * @throws IOException if unable to communicate with the remote instance
+ */
+K, V boolean putIfAbsent(K key, V value, SerializerK keySerializer, 
SerializerV valueSerializer) throws IOException;
+
+/**
+ * Adds the specified key and value to the cache, if they are not already
+ * present, serializing the key and value with the given
+ * {@link Serializer}s. If a value already exists in the cache for the 
given
+ * key, the value associated with the key is returned, after being
+ * deserialized with the given valueDeserializer.
+ *
+ * @param K
+ * @param V
+ * @param key
+ * @param value
+ * @param keySerializer
+ * @param valueSerializer
+ * @param valueDeserializer
+ * @return
+ * @throws IOException
+ */
+K, V V getAndPutIfAbsent(K key, V value, SerializerK keySerializer, 
SerializerV valueSerializer, DeserializerV valueDeserializer) throws 
IOException;
+
+/**
+ * Determines if the given value is present in the cache and if so returns
+ * codetrue/code, else returns codefalse/code
+ *
+ * @param K
+ * @param key
+ * @param keySerializer
+ * @return
+ *
+ * @throws IOException if unable to communicate with the remote instance
+ */
+K boolean containsKey(K key, SerializerK keySerializer) throws 
IOException;
+
+/**
+ * Returns the value in the cache for the given key, if one exists;
+ * otherwise returns codenull/code
+ *
+ * @param K
+ * @param V
+ * @param key the key to lookup in the map
+ * @param keySerializer
+ * @param valueDeserializer
+ *
+ * @return
+ * @throws IOException
+ */
+K, V V get(K key, SerializerK keySerializer, DeserializerV 
valueDeserializer) throws IOException;
+
+/**
+ * Attempts to notify the server that we are finished communicating with it
+ * and cleans up resources
+ * @throws java.io.IOException
+ */
+void close() throws IOException;
+
+/**
+ * Removes the entry with the given key from the cache, if it is present.
+ *
+ * @param K
+ * @param key
+ * @param serializer
+ * @return codetrue/code if the entry is removed, codefalse/code if
+ * the key did not exist in the cache
+ * @throws IOException
+ */
+K boolean remove(K key, SerializerK serializer) throws IOException;
+
+}


[jira] [Commented] (NIFI-169) Better overall build process without using a shell script

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246518#comment-14246518
 ] 

ASF subversion and git services commented on NIFI-169:
--

Commit 19d4a150a875e0862d458e03ffb413797f2bf81b in incubator-nifi's branch 
refs/heads/NIFI-169 from [~joewitt]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=19d4a15 ]

NIFI-169 well it finally all builds.  There is a classpath issue still to sort 
out which impacts startup


 Better overall build process without using a shell script
 -

 Key: NIFI-169
 URL: https://issues.apache.org/jira/browse/NIFI-169
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.0.1
Reporter: Karl Heinz Marbaise
 Fix For: 0.0.1


 I would suggest to create a better build process which takes advantage of the 
 multi module capabilities of Maven and furthermore of multi threading which 
 can decrease the build time dramatically.
 Apart from that currently the build process is spreaded over different areas 
 which are configured differently (differen plugin versions etc.) which leads 
 not in a realiable build process.
 Furthermore this would make integration into a CI environment like Apache 
 area simpler.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[10/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml
--
diff --git 
a/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml 
b/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 0680d18..000
--- a/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-?xml version=1.0?
-!--
-  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.
---
-component-set
-components
-component
-roleorg.apache.maven.lifecycle.mapping.LifecycleMapping/role
-role-hintnar/role-hint
-
implementationorg.apache.maven.lifecycle.mapping.DefaultLifecycleMapping/implementation
-configuration
-lifecycles
-lifecycle
-iddefault/id
-phases
-
process-resourcesorg.apache.maven.plugins:maven-resources-plugin:resources/process-resources
-
compileorg.apache.maven.plugins:maven-compiler-plugin:compile/compile
-
process-test-resourcesorg.apache.maven.plugins:maven-resources-plugin:testResources/process-test-resources
-
test-compileorg.apache.maven.plugins:maven-compiler-plugin:testCompile/test-compile
-
testorg.apache.maven.plugins:maven-surefire-plugin:test/test
-
packageorg.apache.nifi:nar-maven-plugin:nar/package
-
installorg.apache.maven.plugins:maven-install-plugin:install/install
-
deployorg.apache.maven.plugins:maven-deploy-plugin:deploy/deploy
-/phases
-/lifecycle
-/lifecycles
-/configuration
-/component
-component
-roleorg.apache.maven.artifact.handler.ArtifactHandler/role
-role-hintnar/role-hint
-
implementationorg.apache.maven.artifact.handler.DefaultArtifactHandler/implementation
-configuration
-typenar/type
-languagejava/language
-addedToClasspathfalse/addedToClasspath
-includesDependenciestrue/includesDependencies
-/configuration
-/component
-/components
-/component-set

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/misc/pom.xml
--
diff --git a/misc/pom.xml b/misc/pom.xml
new file mode 100644
index 000..5c7ca7f
--- /dev/null
+++ b/misc/pom.xml
@@ -0,0 +1,100 @@
+?xml version=1.0?
+!--
+  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.
+--
+project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
+modelVersion4.0.0/modelVersion
+groupIdorg.apache.nifi/groupId
+artifactIdnar-maven-plugin/artifactId
+version0.0.1-SNAPSHOT/version
+packagingmaven-plugin/packaging
+nameApache NiFi NAR Plugin/name
+properties
+project.build.sourceEncodingUTF-8/project.build.sourceEncoding
+/properties
+build
+defaultGoalinstall/defaultGoal
+plugins
+plugin
+ 

[01/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-169 [created] 19d4a150a


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/pom.xml
--
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 000..8747bc4
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,966 @@
+?xml version=1.0 encoding=UTF-8?
+!--
+  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.
+--
+project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
+modelVersion4.0.0/modelVersion
+parent
+groupIdorg.apache/groupId
+artifactIdapache/artifactId
+version16/version
+/parent
+groupIdorg.apache.nifi/groupId
+artifactIdnifi-parent/artifactId
+version0.0.1-SNAPSHOT/version
+packagingpom/packaging
+nameApache NiFi (incubating) Parent/name
+descriptionApache NiFi is a dataflow system based on the concepts of 
flow-based programming. It is currently a part of the Apache 
Incubator./description
+urlhttp://nifi.incubator.apache.org/maven-site//url
+organization
+nameApache NiFi (incubating) Project/name
+urlhttp://nifi.incubating.apache.org//url
+/organization
+licenses
+license
+nameApache License, Version 2.0/name
+urlhttp://www.apache.org/licenses/LICENSE-2.0/url
+/license
+/licenses
+mailingLists
+mailingList
+nameDev/name
+subscribedev-subscr...@nifi.incubator.apache.org/subscribe
+
unsubscribedev-unsubscr...@nifi.incubator.apache.org/unsubscribe
+postd...@nifi.incubator.apache.org/post
+
archivehttp://mail-archives.apache.org/mod_mbox/incubator-nifi-dev/archive
+/mailingList
+mailingList
+nameCommits/name
+subscribecommits-subscr...@nifi.incubator.apache.org/subscribe
+
unsubscribecommits-unsubscr...@nifi.incubator.apache.org/unsubscribe
+postcommits@nifi.incubator.apache.org/post
+
archivehttp://mail-archives.apache.org/mod_mbox/incubator-nifi-commits/archive
+/mailingList
+/mailingLists
+prerequisites
+maven${maven.min-version}/maven
+/prerequisites
+modules
+modulecommons/module
+!--
+! Would prefer to have the nar-maven-plugin built as part of this 
parent.  However, Maven
+! blocks building plugins with extensions in the same reactor as other 
components which want to use the plugin.
+! See MNG-1911 and MNG-5572 for more details.
+--
+!--modulenar-maven-plugin/module--
+modulenifi-api/module
+modulenifi-bootstrap/module
+modulenifi-mock/module
+modulenar-bundles/module
+moduleassembly/module
+/modules
+scm
+
connectionscm:git:git://git.apache.org/incubator-nifi.git/connection
+
developerConnectionscm:git:https://git-wip-us.apache.org/repos/asf/incubator-nifi.git/developerConnection
+urlhttps://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git/url
+/scm
+issueManagement
+systemJIRA/system
+urlhttps://issues.apache.org/jira/browse/NIFI/url
+/issueManagement
+properties
+project.build.sourceEncodingUTF-8/project.build.sourceEncoding
+
project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding
+org.slf4j.version1.7.8/org.slf4j.version
+jetty.version9.2.5.v20141112/jetty.version
+lucene.version4.10.2/lucene.version
+spring.version4.1.2.RELEASE/spring.version
+spring.security.version3.2.5.RELEASE/spring.security.version
+jersey.version1.18.3/jersey.version
+/properties
+dependencyManagement
+dependencies
+dependency
+groupIdch.qos.logback/groupId
+artifactIdlogback-classic/artifactId
+version1.1.2/version
+/dependency
+dependency
+groupIdch.qos.logback/groupId
+artifactIdjcl-over-slf4j/artifactId
+

[03/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java
--
diff --git 
a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java
 
b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java
new file mode 100644
index 000..b5f3fd6
--- /dev/null
+++ 
b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java
@@ -0,0 +1,530 @@
+/*
+ * 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.distributed.cache.server;
+
+import org.apache.nifi.distributed.cache.server.DistributedSetCacheServer;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.ConnectException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.distributed.cache.client.Deserializer;
+import 
org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService;
+import 
org.apache.nifi.distributed.cache.client.DistributedSetCacheClientService;
+import org.apache.nifi.distributed.cache.client.Serializer;
+import 
org.apache.nifi.distributed.cache.client.exception.DeserializationException;
+import org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer;
+import org.apache.nifi.reporting.InitializationException;
+import org.apache.nifi.ssl.SSLContextService.ClientAuth;
+import org.apache.nifi.ssl.StandardSSLContextService;
+import org.apache.nifi.util.MockConfigurationContext;
+import org.apache.nifi.util.MockControllerServiceInitializationContext;
+
+import org.apache.commons.lang3.SerializationException;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestServerAndClient {
+
+private static Logger LOGGER;
+
+static {
+System.setProperty(org.slf4j.simpleLogger.defaultLogLevel, info);
+System.setProperty(org.slf4j.simpleLogger.showDateTime, true);
+
System.setProperty(org.slf4j.simpleLogger.log.nifi.distributed.cache.server.AbstractCacheServer,
 debug);
+
System.setProperty(org.slf4j.simpleLogger.log.nifi.distributed.cache.client.DistributedMapCacheClientService,
 debug);
+
System.setProperty(org.slf4j.simpleLogger.log.nifi.distributed.cache.server.TestServerAndClient,
 debug);
+
System.setProperty(org.slf4j.simpleLogger.log.nifi.remote.io.socket.ssl.SSLSocketChannel,
 trace);
+LOGGER = LoggerFactory.getLogger(TestServerAndClient.class);
+}
+
+@Test
+public void testNonPersistentSetServerAndClient() throws 
InitializationException, IOException {
+LOGGER.info(Testing  + 
Thread.currentThread().getStackTrace()[1].getMethodName());
+// Create server
+final DistributedSetCacheServer server = new 
DistributedSetCacheServer();
+MockControllerServiceInitializationContext serverInitContext = new 
MockControllerServiceInitializationContext(server, server);
+server.initialize(serverInitContext);
+
+final MapPropertyDescriptor, String serverProperties = new 
HashMap();
+final MockConfigurationContext serverContext = new 
MockConfigurationContext(serverProperties, 
serverInitContext.getControllerServiceLookup());
+server.startServer(serverContext);
+
+final DistributedSetCacheClientService client = createClient();
+final SerializerString serializer = new StringSerializer();
+final boolean added = client.addIfAbsent(test, 

[07/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml
--
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml 
b/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml
index bde025b..3cdeb07 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml
+++ b/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml
@@ -28,86 +28,107 @@
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-api/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-runtime/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-nar/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-security/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.eclipse.jetty/groupId
 artifactIdjetty-server/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.eclipse.jetty/groupId
 artifactIdjetty-servlet/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.eclipse.jetty/groupId
 artifactIdjetty-webapp/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.eclipse.jetty/groupId
 artifactIdjetty-servlets/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.eclipse.jetty/groupId
 artifactIdjetty-jsp/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdcom.sun.jersey/groupId
 artifactIdjersey-client/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdcom.sun.jersey.contribs/groupId
 artifactIdjersey-spring/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdcom.sun.jersey.contribs/groupId
 artifactIdjersey-multipart/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdcom.sun.jersey/groupId
 artifactIdjersey-server/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdcom.sun.jersey/groupId
 artifactIdjersey-json/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.aspectj/groupId
 artifactIdaspectjweaver/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdcglib/groupId 
 artifactIdcglib-nodep/artifactId 
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdclient-dto/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdcustom-ui-utilities/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdweb-security/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-web-utils/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdweb-optimistic-locking/artifactId
+scopecompile/scope
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
@@ -132,6 +153,7 @@
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdframework-cluster/artifactId
+scopecompile/scope
 /dependency
 /dependencies
 /project

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml
--
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml 
b/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml
index f4ec6b1..e7cb0e7 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml
@@ -115,6 +115,7 @@
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdclient-dto/artifactId
+version${project.version}/version
 

[04/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup

2014-12-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java
--
diff --git 
a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java
 
b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java
new file mode 100644
index 000..2c85cd8
--- /dev/null
+++ 
b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java
@@ -0,0 +1,26 @@
+/*
+ * 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.distributed.cache.server;
+
+import java.io.IOException;
+
+public interface CacheServer {
+
+void start() throws IOException;
+void stop() throws IOException;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java
--
diff --git 
a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java
 
b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java
new file mode 100644
index 000..0f962d0
--- /dev/null
+++ 
b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java
@@ -0,0 +1,107 @@
+/*
+ * 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.distributed.cache.server;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.controller.AbstractControllerService;
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.controller.annotation.OnConfigured;
+import org.apache.nifi.processor.annotation.OnShutdown;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.ssl.SSLContextService;
+
+public abstract class DistributedCacheServer extends AbstractControllerService 
{
+public static final String EVICTION_STRATEGY_LFU = Least Frequently Used;
+public static final String EVICTION_STRATEGY_LRU = Least Recently Used;
+public static final String EVICTION_STRATEGY_FIFO = First In, First Out;
+
+public static final PropertyDescriptor PORT = new 
PropertyDescriptor.Builder()
+.name(Port)
+.description(The port to listen on for incoming connections)
+.required(true)
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.defaultValue(4557)
+.build();
+public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new 
PropertyDescriptor.Builder()
+.name(SSL Context Service)
+.description(
+   

[jira] [Commented] (NIFI-169) Better overall build process without using a shell script

2014-12-15 Thread Joseph Witt (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246523#comment-14246523
 ] 

Joseph Witt commented on NIFI-169:
--

Ok well the build is totally rearranged now and does create the final result.  
Still need to sort out a classpath issue.

We cannot have a single command build because of the fact that Maven will 
apparently not allow you to have a plugin with extensions built within the same 
reactor as other artifacts that use that plugin.  So unless there is a good 
workaround there we will still have to do two different commands (build 
nar-plugin, then build all others)

 Better overall build process without using a shell script
 -

 Key: NIFI-169
 URL: https://issues.apache.org/jira/browse/NIFI-169
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.0.1
Reporter: Karl Heinz Marbaise
 Fix For: 0.0.1


 I would suggest to create a better build process which takes advantage of the 
 multi module capabilities of Maven and furthermore of multi threading which 
 can decrease the build time dramatically.
 Apart from that currently the build process is spreaded over different areas 
 which are configured differently (differen plugin versions etc.) which leads 
 not in a realiable build process.
 Furthermore this would make integration into a CI environment like Apache 
 area simpler.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[1/2] incubator-nifi git commit: Fixed classpath issue affecting startup

2014-12-15 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-169 19d4a150a - 675ea6611


Fixed classpath issue affecting startup


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/dd57a335
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/dd57a335
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/dd57a335

Branch: refs/heads/NIFI-169
Commit: dd57a33500101756d0cf601e1d3d655e6a127033
Parents: 19d4a15
Author: joewitt joew...@apache.org
Authored: Mon Dec 15 05:52:40 2014 -0500
Committer: joewitt joew...@apache.org
Committed: Mon Dec 15 05:52:40 2014 -0500

--
 misc/build-order.sh |  81 ---
 misc/pom.xml| 100 ---
 misc/src/main/java/nifi/NarMojo.java| 610 ---
 .../resources/META-INF/plexus/components.xml|  52 --
 4 files changed, 843 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/dd57a335/misc/build-order.sh
--
diff --git a/misc/build-order.sh b/misc/build-order.sh
deleted file mode 100755
index e8f8e5e..000
--- a/misc/build-order.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#MAVEN_FLAGS=-Dmaven.test.skip=true
-MAVEN_FLAGS=
-
-cd misc/nar-maven-plugin  \
-mvn $MAVEN_FLAGS install  \
-cd ../../commons/nifi-parent  \
-mvn $MAVEN_FLAGS install  \
-cd ../../nifi-bootstrap  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-api  \
-mvn $MAVEN_FLAGS install  \
-cd ../commons/  \
-cd nifi-stream-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../wali  \
-mvn $MAVEN_FLAGS install  \
-cd ../flowfile-packager  \
-mvn $MAVEN_FLAGS install  \
-cd ../core-flowfile-attributes  \
-mvn $MAVEN_FLAGS install  \
-cd ../data-provenance-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../naive-search-ring-buffer  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-expression-language  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-file-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-logging-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-properties  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-security-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-socket-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../nifi-web-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../processor-utilities  \
-mvn $MAVEN_FLAGS install  \
-cd ../remote-communications-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../search-utils  \
-mvn $MAVEN_FLAGS install  \
-cd ../../extensions/file-authorization-provider  \
-mvn $MAVEN_FLAGS install  \
-cd ../../nifi-mock  \
-mvn $MAVEN_FLAGS install  \
-cd ../nar-bundles/  \
-cd nar-container-common  \
-mvn $MAVEN_FLAGS install  \
-cd ../jetty-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../standard-services-api-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../ssl-context-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../distributed-cache-services-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../standard-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../hadoop-libraries-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../hadoop-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../volatile-provenance-repository-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../persistent-provenance-repository-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../framework-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../execute-script-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../monitor-threshold-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../update-attribute-bundle  \
-mvn $MAVEN_FLAGS install  \
-cd ../../assemblies/nifi 
-mvn assembly:assembly

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/dd57a335/misc/pom.xml
--
diff --git a/misc/pom.xml b/misc/pom.xml
deleted file mode 100644
index 5c7ca7f..000
--- a/misc/pom.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-?xml version=1.0?
-!--
-  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 

[jira] [Commented] (NIFI-169) Better overall build process without using a shell script

2014-12-15 Thread Joseph Witt (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246546#comment-14246546
 ] 

Joseph Witt commented on NIFI-169:
--

ok app builds and runs.  Please take a look over branch NIFI-169 on nifi's 
incubator git in ASF

 Better overall build process without using a shell script
 -

 Key: NIFI-169
 URL: https://issues.apache.org/jira/browse/NIFI-169
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.0.1
Reporter: Karl Heinz Marbaise
 Fix For: 0.0.1


 I would suggest to create a better build process which takes advantage of the 
 multi module capabilities of Maven and furthermore of multi threading which 
 can decrease the build time dramatically.
 Apart from that currently the build process is spreaded over different areas 
 which are configured differently (differen plugin versions etc.) which leads 
 not in a realiable build process.
 Furthermore this would make integration into a CI environment like Apache 
 area simpler.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-169) Better overall build process without using a shell script

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246751#comment-14246751
 ] 

ASF subversion and git services commented on NIFI-169:
--

Commit 614349bdfdb4b73509d6c9384b9094aefc41d7a8 in incubator-nifi's branch 
refs/heads/NIFI-169 from [~joewitt]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=614349b ]

NIFI-169 updating a few tests and build


 Better overall build process without using a shell script
 -

 Key: NIFI-169
 URL: https://issues.apache.org/jira/browse/NIFI-169
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.0.1
Reporter: Karl Heinz Marbaise
 Fix For: 0.0.1


 I would suggest to create a better build process which takes advantage of the 
 multi module capabilities of Maven and furthermore of multi threading which 
 can decrease the build time dramatically.
 Apart from that currently the build process is spreaded over different areas 
 which are configured differently (differen plugin versions etc.) which leads 
 not in a realiable build process.
 Furthermore this would make integration into a CI environment like Apache 
 area simpler.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


svn commit: r1643044 - in /incubator/nifi/site/trunk/content/images: flatlogo.svg squarishlogo.svg

2014-12-15 Thread tkurc
Author: tkurc
Date: Wed Dec  3 02:15:26 2014
New Revision: 1643044

URL: http://svn.apache.org/r1643044
Log:
adding svg images

Added:
incubator/nifi/site/trunk/content/images/flatlogo.svg
incubator/nifi/site/trunk/content/images/squarishlogo.svg

Added: incubator/nifi/site/trunk/content/images/flatlogo.svg
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/images/flatlogo.svg?rev=1643044view=auto
==
--- incubator/nifi/site/trunk/content/images/flatlogo.svg (added)
+++ incubator/nifi/site/trunk/content/images/flatlogo.svg Wed Dec  3 02:15:26 
2014
@@ -0,0 +1,194 @@
+?xml version=1.0 encoding=UTF-8 standalone=no?
+!-- Creator: CorelDRAW X6 --
+
+svg
+   xmlns:dc=http://purl.org/dc/elements/1.1/;
+   xmlns:cc=http://creativecommons.org/ns#;
+   xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;
+   xmlns:svg=http://www.w3.org/2000/svg;
+   xmlns=http://www.w3.org/2000/svg;
+   xmlns:sodipodi=http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd;
+   xmlns:inkscape=http://www.inkscape.org/namespaces/inkscape;
+   xml:space=preserve
+   width=267.71744
+   height=112.71552
+   version=1.1
+   style=fill-rule:evenodd
+   viewBox=0 0 154.34244 65.374998
+   id=svg2
+   inkscape:version=0.48.5 r10040
+   sodipodi:docname=flatlogo.svg
+   inkscape:export-filename=C:\Users\Tony Kurc\Downloads\logo76x32.png
+   inkscape:export-xdpi=25.55105
+   inkscape:export-ydpi=25.55105metadata
+   id=metadata63rdf:RDFcc:Work
+   rdf:about=dc:formatimage/svg+xml/dc:formatdc:type
+ rdf:resource=http://purl.org/dc/dcmitype/StillImage; 
/dc:title/dc:title/cc:Work/rdf:RDF/metadatasodipodi:namedview
+   pagecolor=#ff
+   bordercolor=#66
+   borderopacity=1
+   objecttolerance=10
+   gridtolerance=10
+   guidetolerance=10
+   inkscape:pageopacity=0
+   inkscape:pageshadow=2
+   inkscape:window-width=995
+   inkscape:window-height=736
+   id=namedview61
+   showgrid=false
+   inkscape:zoom=1.5903612
+   inkscape:cx=151.50277
+   inkscape:cy=101.2611
+   inkscape:window-x=0
+   inkscape:window-y=0
+   inkscape:window-maximized=0
+   inkscape:current-layer=Layer_x0020_1
+   fit-margin-top=0
+   fit-margin-left=0
+   fit-margin-right=0
+   fit-margin-bottom=0 /
+ defs
+   id=defs4
+  font
+   id=FontID0
+   horiz-adv-x=506
+   font-variant=normal
+   font-weight=400
+   horiz-origin-x=0
+   horiz-origin-y=0
+   vert-origin-x=45
+   vert-origin-y=90
+   vert-adv-y=90
+   style=font-variant:normal;font-weight:400
+   font-face
+   font-family=Oswald
+   id=font-face7
+   /font-face
+   missing-glyph
+   id=missing-glyph9path
+ d=M0 0z
+ id=path11 //missing-glyph
+   glyph
+   unicode=f
+   horiz-adv-x=302
+   id=glyph13path
+ d=M84. 648.999l0 -23.9982 -62.5012 0 0 -93.6682 62.5012 0 0 -531.333 
125 0 0 531.333 93.6682 0 0 93.6682 -93.6682 0 0 46.8313c0,45.0001 
6.83435,78.1684 51.6672,78.1684 12.3336,0 29.333,-3.83528 42.001,-4.83308l0 
92.6648c-31.167,3.99969 -46.8341,6.00096 -77.1677,6.00096 -121.499,0 
-141.5,-73.8342 -141.5,-194.834z
+ id=path15 //glyph
+   glyph
+   unicode=c
+   horiz-adv-x=439
+   id=glyph17path
+ d=M170.338 312.495c0,79.169 -12.6732,224.172 62.4919,224.172 57.673,0 
62.5037,-71.8344 62.5037,-130.334l124.996 0c0,142.003 -44.3266,227.503 
-187.499,227.503 -169.334,0 -187.499,-152.338 -187.499,-321.341 0,-168.991 
18.1653,-321.329 187.499,-321.329 139.169,0 187.499,90.3304 
187.499,227.668l-124.996 0c0,-62.5037 0,-124.996 -62.5037,-124.996 -76.4997,0 
-62.4919,139.996 -62.4919,218.657z
+ id=path19 //glyph
+   glyph
+   unicode=n
+   horiz-adv-x=484
+   id=glyph21path
+ d=M182.166 557.667l0 67.3343 -125 0 0 -625.001 125 0 0 
494.667c20.5002,16.9994 43.0017,36.6662 78.1684,36.6662 40.4987,0 
46.8313,-23.0004 46.8313,-62.4984l0 -468.834 125 0 0 532.668c0,54.6663 
-34.665,101.166 -89.833,101.166 -74.832,0 -116.331,-36.1673 -160.166,-76.1671z
+ id=path23 //glyph
+   glyph
+   unicode=h
+   horiz-adv-x=484
+   id=glyph25path
+ d=M182.173 557.667l0 317.337 -125.007 0 0 -875.004 125.007 0 0 
494.667c20.492,16.996 46.8305,36.6613 81.9918,36.6613 38.5038,0 43.0038,-24.992 
43.0038,-62.4919l0 -468.837 124.996 0 0 532.663c0,54.673 -34.6652,101.173 
-89.8343,101.173 -74.8344,0 -116.326,-36.1652 -160.157,-76.169z
+ id=path27 //glyph
+   glyph
+   unicode=e
+   horiz-adv-x=444
+   id=glyph29path
+ d=M170.338 281.337l0 31.1574 249.991 0 0 14.6692c0,169.334 
-24.3306,306.672 -187.499,306.672 -162.991,0 -187.499,-137.338 
-187.499,-306.672 0,-177.33 16.6653,-335.999 187.169,-335.999 136.169,0 
187.83,83.5036 187.83,227.668l-124.5 0c0,-62.9998 0,-124.996 -62.9998,-124.996 
-70.169,0 -62.4919,115.157 -62.4919,187.499zm124.996 93.661l-124.996 
0c0,64.4997 -1.84251,156.33 62.4919,156.33 64.0037,0 62.5037,-91.3343 
62.5037,-156.33z
+ id=path31 //glyph
+   glyph
+   unicode=p
+   horiz-adv-x=508
+   id=glyph33path
+ d=M463.333 281.337l0 9.16532c0,160.665 

incubator-nifi git commit: NIFI-145: Update nifi.sh to avoid readlink that's not always compatible; added 'install command'; made nifi.sh chkconfig compatible

2014-12-15 Thread markap14
Repository: incubator-nifi
Updated Branches:
  refs/heads/bootstrap d1271a281 - 1a231d8b9


NIFI-145: Update nifi.sh to avoid readlink that's not always compatible; added 
'install command'; made nifi.sh chkconfig compatible


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1a231d8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1a231d8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1a231d8b

Branch: refs/heads/bootstrap
Commit: 1a231d8b9599d6ff3aeddb97392acec1b885be70
Parents: d1271a2
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 13:04:54 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 13:04:54 2014 -0500

--
 .../resources/src/main/resources/bin/nifi.sh| 80 ++--
 1 file changed, 39 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1a231d8b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
--
diff --git 
a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
 
b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
index 9dc7ef6..163f8e2 100644
--- 
a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
+++ 
b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
@@ -15,19 +15,16 @@
 #See the License for the specific language governing permissions and
 #limitations under the License.
 #
+# chkconfig: 2345 20 80
+# description: Apache NiFi is a dataflow system based on the principles of 
Flow-Based Programming.
+#
 
 # Script structure inspired from Apache Karaf and other Apache projects with 
similar startup approaches
 
-DIRNAME=`dirname $0`
+NIFI_HOME=`cd $(dirname $0)  cd ..  pwd`
 PROGNAME=`basename $0`
 
 
-#
-#Readlink is not available on all systems. Change variable to appropriate 
alternative as part of OS detection
-#
-
-READLINK=readlink
-
 warn() {
 echo ${PROGNAME}: $*
 }
@@ -54,17 +51,14 @@ detectOS() {
 os400=true
 ;;
 Darwin)
-   darwin=true
-   ;;
+darwin=true
+;;
 esac
 # For AIX, set an environment variable
 if $aix; then
  export LDR_CNTRL=MAXDATA=0xB000@DSA
  echo $LDR_CNTRL
 fi
-if $darwin; then
-   READLINK=greadlink
-fi
 }
 
 unlimitFD() {
@@ -95,22 +89,6 @@ unlimitFD() {
 fi
 }
 
-locateHome() {
-if [ x$NIFI_HOME != x ]; then
-warn Ignoring predefined value for NIFI_HOME
-fi
-
-# In POSIX shells, CDPATH may cause cd to write to stdout
-(unset CDPATH) /dev/null 21  unset CDPATH
-NIFI_HOME=$(dirname $($READLINK -f $0))/../
-NIFI_HOME=$($READLINK -f $NIFI_HOME)
-cd $NIFI_HOME
-echo Directory changed to NIFI_HOME of '$NIFI_HOME'
-if [ ! -d $NIFI_HOME ]; then
-die NIFI_HOME is not valid: $NIFI_HOME
-fi
-
-}
 
 
 locateJava() {
@@ -138,9 +116,6 @@ locateJava() {
 fi
 fi
 fi
-if [ x$JAVA_HOME = x ]; then
-JAVA_HOME=$(dirname $(dirname $(pathCanonical $JAVA)))
-fi
 }
 
 init() {
@@ -150,29 +125,41 @@ init() {
 # Unlimit the number of file descriptors if possible
 unlimitFD
 
-# Locate the NiFi home directory
-locateHome
-
 # Locate the Java VM to execute
 locateJava
 }
 
+
+install() {
+SVC_NAME=nifi
+if [ x$2 != x ] ; then
+SVC_NAME=$2
+fi
+
+SVC_FILE=/etc/init.d/$SVC_NAME
+cp $0 $SVC_FILE
+sed -i s:NIFI_HOME=.*:NIFI_HOME=$NIFI_HOME: $SVC_FILE
+sed -i s:PROGNAME=.*:PROGNAME=$(basename $0): $SVC_FILE
+echo Service $SVC_NAME installed
+}
+
+
 run() {
-   BOOTSTRAP_CONF=$NIFI_HOME/conf/bootstrap.conf;
-   
+BOOTSTRAP_CONF=$NIFI_HOME/conf/bootstrap.conf;
+
 if $cygwin; then
 NIFI_HOME=`cygpath --path --windows $NIFI_HOME`
 BOOTSTRAP_CONF=`cygpath --path --windows $BOOTSTRAP_CONF`
 fi
-
-echo 
+
+echo
 echo Java home: $JAVA_HOME
 echo NiFi home: $NIFI_HOME
 echo
 echo Bootstrap Config File: $BOOTSTRAP_CONF
 echo
-
-exec $JAVA -cp $NIFI_HOME/lib/bootstrap/* -Xms12m -Xmx24m 
-Dorg.apache.nifi.bootstrap.config.file=$BOOTSTRAP_CONF 
org.apache.nifi.bootstrap.RunNiFi $1 $2
+
+exec $JAVA -cp $NIFI_HOME/lib/bootstrap/* -Xms12m -Xmx24m 
-Dorg.apache.nifi.bootstrap.config.file=$BOOTSTRAP_CONF 
org.apache.nifi.bootstrap.RunNiFi $@
 }
 
 main() {
@@ -180,4 +167,15 @@ main() {
 run $@
 }
 
-main $@
+
+case $1 in
+install)
+install $@
+;;
+start|stop|run|status)
+main $@
+;;

[2/2] incubator-nifi git commit: NIFI-43: Do not throw InvocationTargetException if it is wrapping a RuntimeException; instead just throw the RuntimeException

2014-12-15 Thread markap14
NIFI-43: Do not throw InvocationTargetException if it is wrapping a 
RuntimeException; instead just throw the RuntimeException


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e04a55d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e04a55d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e04a55d3

Branch: refs/heads/develop
Commit: e04a55d3a5097d1ae3ff5c5a4c8f8ad1e1dc56b9
Parents: 73cc6cb
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 13:14:42 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 13:14:42 2014 -0500

--
 .../org/apache/nifi/util/ReflectionUtils.java   | 72 +++-
 1 file changed, 40 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e04a55d3/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java
index 9d52eb3..e15e00a 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java
@@ -42,43 +42,51 @@ public class ReflectionUtils {
  * @throws IllegalAccessException
  */
 public static void invokeMethodsWithAnnotation(final Class? extends 
Annotation annotation, final Object instance, final Object... args) throws 
IllegalAccessException, IllegalArgumentException, InvocationTargetException {
-for (final Method method : instance.getClass().getMethods()) {
-if (method.isAnnotationPresent(annotation)) {
-final boolean isAccessible = method.isAccessible();
-method.setAccessible(true);
-
-try {
-final Class?[] argumentTypes = 
method.getParameterTypes();
-if (argumentTypes.length  args.length) {
-throw new 
IllegalArgumentException(String.format(Unable to invoke method %1$s on %2$s 
because method expects %3$s parameters but only %4$s were given,
-method.getName(), instance, 
argumentTypes.length, args.length));
-}
-
-for (int i = 0; i  argumentTypes.length; i++) {
-final Class? argType = argumentTypes[i];
-if (!argType.isAssignableFrom(args[i].getClass())) {
-throw new IllegalArgumentException(String.format(
-Unable to invoke method %1$s on %2$s 
because method parameter %3$s is expected to be of type %4$s but argument 
passed was of type %5$s,
-method.getName(), instance, i, argType, 
args[i].getClass()));
+try {
+for (final Method method : instance.getClass().getMethods()) {
+if (method.isAnnotationPresent(annotation)) {
+final boolean isAccessible = method.isAccessible();
+method.setAccessible(true);
+
+try {
+final Class?[] argumentTypes = 
method.getParameterTypes();
+if (argumentTypes.length  args.length) {
+throw new 
IllegalArgumentException(String.format(Unable to invoke method %1$s on %2$s 
because method expects %3$s parameters but only %4$s were given,
+method.getName(), instance, 
argumentTypes.length, args.length));
 }
-}
-
-if (argumentTypes.length == args.length) {
-method.invoke(instance, args);
-} else {
-final Object[] argsToPass = new 
Object[argumentTypes.length];
-for (int i = 0; i  argsToPass.length; i++) {
-argsToPass[i] = args[i];
+
+for (int i = 0; i  argumentTypes.length; i++) {
+final Class? argType = argumentTypes[i];
+if (!argType.isAssignableFrom(args[i].getClass())) 
{
+throw new 
IllegalArgumentException(String.format(
+Unable to invoke method %1$s on %2$s 
because method parameter %3$s is expected to be of type %4$s but argument 
passed was of type %5$s,
+method.getName(), instance, i, 

[jira] [Commented] (NIFI-43) ReflectionUtils should catch TargetInvocationException and throw the wrapped Exception

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246946#comment-14246946
 ] 

ASF subversion and git services commented on NIFI-43:
-

Commit e04a55d3a5097d1ae3ff5c5a4c8f8ad1e1dc56b9 in incubator-nifi's branch 
refs/heads/develop from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=e04a55d ]

NIFI-43: Do not throw InvocationTargetException if it is wrapping a 
RuntimeException; instead just throw the RuntimeException


 ReflectionUtils should catch TargetInvocationException and throw the wrapped 
 Exception
 --

 Key: NIFI-43
 URL: https://issues.apache.org/jira/browse/NIFI-43
 Project: Apache NiFi
  Issue Type: Bug
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1


 When invoking Processor Lifecycle methods, ReflectionUtils catches 
 TargetInvocationException and logs it but does not unwrap it. As a result, 
 it's very unclear what actually went wrong.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-56) TestScanContent fails intermittently

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246945#comment-14246945
 ] 

ASF subversion and git services commented on NIFI-56:
-

Commit 73cc6cbe284faab9a91b4816197a105524b1df41 in incubator-nifi's branch 
refs/heads/develop from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=73cc6cb ]

NIFI-56: Made test single-threaded


 TestScanContent fails intermittently
 

 Key: NIFI-56
 URL: https://issues.apache.org/jira/browse/NIFI-56
 Project: Apache NiFi
  Issue Type: Bug
  Components: Extensions
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1


 Unit test sets 3 concurrent threads and then runs 3 times. The number of 
 files out should be 2 to 'matched', 1 to 'unmatched'. However, the order in 
 which those files go to 'matched' is not defined (because there are 3 
 concurrent threads, which could pull/process the files in any order). The 
 Unit test assumes that the order is guaranteed. This is a threading bug in 
 the unit test, not the processor.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


incubator-nifi git commit: NIFI-49: include name of default value if it is not allowed in a property descriptor

2014-12-15 Thread markap14
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-49 [created] f0bea5c15


NIFI-49: include name of default value if it is not allowed in a property 
descriptor


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f0bea5c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f0bea5c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f0bea5c1

Branch: refs/heads/NIFI-49
Commit: f0bea5c156fa0bfc1d7773ae45ea73ba594ba77a
Parents: e04a55d
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 13:21:59 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 13:21:59 2014 -0500

--
 .../main/java/org/apache/nifi/components/PropertyDescriptor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f0bea5c1/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
--
diff --git 
a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java 
b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
index c95d449..19600ab 100644
--- a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
+++ b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
@@ -425,7 +425,7 @@ public final class PropertyDescriptor implements 
ComparablePropertyDescriptor
 throw new IllegalStateException(Must specify a name);
 }
 if (!isValueAllowed(defaultValue)) {
-throw new IllegalStateException(Default value is not in the 
set of allowable values);
+throw new IllegalStateException(Default value ' + 
defaultValue + ' is not in the set of allowable values);
 }
 
 return new PropertyDescriptor(this);



[jira] [Commented] (NIFI-49) If Processor's Property's Default Value is not allowed, the Exception thrown should indicate what the default value is

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246956#comment-14246956
 ] 

ASF subversion and git services commented on NIFI-49:
-

Commit f0bea5c156fa0bfc1d7773ae45ea73ba594ba77a in incubator-nifi's branch 
refs/heads/NIFI-49 from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=f0bea5c ]

NIFI-49: include name of default value if it is not allowed in a property 
descriptor


 If Processor's Property's Default Value is not allowed, the Exception thrown 
 should indicate what the default value is
 --

 Key: NIFI-49
 URL: https://issues.apache.org/jira/browse/NIFI-49
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1

 Attachments: defaultValue.patch


 Currently, we get the following error when the default value is not valid:
 ...
 Cause by: java.lang.IllegalStateException: Default value is not in the set of 
 allowable values
 This should indicate what that Default Value actually is. This is 
 particularly important if we have a collection of dynamically created 
 Allowable Values and use the first one as the default, for example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-49) If Processor's Property's Default Value is not allowed, the Exception thrown should indicate what the default value is

2014-12-15 Thread Mark Payne (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14247031#comment-14247031
 ] 

Mark Payne commented on NIFI-49:


+1 on the patch. Adding to the codebase.

 If Processor's Property's Default Value is not allowed, the Exception thrown 
 should indicate what the default value is
 --

 Key: NIFI-49
 URL: https://issues.apache.org/jira/browse/NIFI-49
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1

 Attachments: defaultValue.patch


 Currently, we get the following error when the default value is not valid:
 ...
 Cause by: java.lang.IllegalStateException: Default value is not in the set of 
 allowable values
 This should indicate what that Default Value actually is. This is 
 particularly important if we have a collection of dynamically created 
 Allowable Values and use the first one as the default, for example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/4] incubator-nifi git commit: NIFI-49: Included patch from Philip Young to include name of default vlaue when not allowed as a property descriptor value

2014-12-15 Thread markap14
NIFI-49: Included patch from Philip Young to include name of default vlaue when 
not allowed as a property descriptor value


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/13160429
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/13160429
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/13160429

Branch: refs/heads/develop
Commit: 13160429777e6a48a7833174a99f2771c11649ed
Parents: e04a55d
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 13:28:09 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 13:28:09 2014 -0500

--
 .../main/java/org/apache/nifi/components/PropertyDescriptor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/13160429/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
--
diff --git 
a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java 
b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
index c95d449..ba0f7dc 100644
--- a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
+++ b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
@@ -425,7 +425,7 @@ public final class PropertyDescriptor implements 
ComparablePropertyDescriptor
 throw new IllegalStateException(Must specify a name);
 }
 if (!isValueAllowed(defaultValue)) {
-throw new IllegalStateException(Default value is not in the 
set of allowable values);
+throw new IllegalStateException(Default value [+ 
defaultValue +] is not in the set of allowable values);
 }
 
 return new PropertyDescriptor(this);



[jira] [Commented] (NIFI-49) If Processor's Property's Default Value is not allowed, the Exception thrown should indicate what the default value is

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14247035#comment-14247035
 ] 

ASF subversion and git services commented on NIFI-49:
-

Commit 9e60aa0f25754751d468ef9cd3da428055c08b4e in incubator-nifi's branch 
refs/heads/develop from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=9e60aa0 ]

NIFI-49: Included patch from Philip Young to include name of default value when 
not allowed as a property descriptor value


 If Processor's Property's Default Value is not allowed, the Exception thrown 
 should indicate what the default value is
 --

 Key: NIFI-49
 URL: https://issues.apache.org/jira/browse/NIFI-49
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1

 Attachments: defaultValue.patch


 Currently, we get the following error when the default value is not valid:
 ...
 Cause by: java.lang.IllegalStateException: Default value is not in the set of 
 allowable values
 This should indicate what that Default Value actually is. This is 
 particularly important if we have a collection of dynamically created 
 Allowable Values and use the first one as the default, for example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[3/4] incubator-nifi git commit: NIFI-49: Included patch from Philip Young to include name of default vlaue when not allowed as a property descriptor value

2014-12-15 Thread markap14
NIFI-49: Included patch from Philip Young to include name of default vlaue when 
not allowed as a property descriptor value


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/ddfa621d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/ddfa621d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/ddfa621d

Branch: refs/heads/develop
Commit: ddfa621dab4f6614e426314e0685106586e08c9f
Parents: 1316042 f0bea5c
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 13:29:35 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 13:29:35 2014 -0500

--

--




[jira] [Commented] (NIFI-49) If Processor's Property's Default Value is not allowed, the Exception thrown should indicate what the default value is

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14247033#comment-14247033
 ] 

ASF subversion and git services commented on NIFI-49:
-

Commit 13160429777e6a48a7833174a99f2771c11649ed in incubator-nifi's branch 
refs/heads/develop from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=1316042 ]

NIFI-49: Included patch from Philip Young to include name of default vlaue when 
not allowed as a property descriptor value


 If Processor's Property's Default Value is not allowed, the Exception thrown 
 should indicate what the default value is
 --

 Key: NIFI-49
 URL: https://issues.apache.org/jira/browse/NIFI-49
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1

 Attachments: defaultValue.patch


 Currently, we get the following error when the default value is not valid:
 ...
 Cause by: java.lang.IllegalStateException: Default value is not in the set of 
 allowable values
 This should indicate what that Default Value actually is. This is 
 particularly important if we have a collection of dynamically created 
 Allowable Values and use the first one as the default, for example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[1/4] incubator-nifi git commit: NIFI-49: include name of default value if it is not allowed in a property descriptor

2014-12-15 Thread markap14
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop e04a55d3a - 9e60aa0f2


NIFI-49: include name of default value if it is not allowed in a property 
descriptor


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f0bea5c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f0bea5c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f0bea5c1

Branch: refs/heads/develop
Commit: f0bea5c156fa0bfc1d7773ae45ea73ba594ba77a
Parents: e04a55d
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 13:21:59 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 13:21:59 2014 -0500

--
 .../main/java/org/apache/nifi/components/PropertyDescriptor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f0bea5c1/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
--
diff --git 
a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java 
b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
index c95d449..19600ab 100644
--- a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
+++ b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
@@ -425,7 +425,7 @@ public final class PropertyDescriptor implements 
ComparablePropertyDescriptor
 throw new IllegalStateException(Must specify a name);
 }
 if (!isValueAllowed(defaultValue)) {
-throw new IllegalStateException(Default value is not in the 
set of allowable values);
+throw new IllegalStateException(Default value ' + 
defaultValue + ' is not in the set of allowable values);
 }
 
 return new PropertyDescriptor(this);



[jira] [Commented] (NIFI-49) If Processor's Property's Default Value is not allowed, the Exception thrown should indicate what the default value is

2014-12-15 Thread Matt Gilman (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14247036#comment-14247036
 ] 

Matt Gilman commented on NIFI-49:
-

+1

 If Processor's Property's Default Value is not allowed, the Exception thrown 
 should indicate what the default value is
 --

 Key: NIFI-49
 URL: https://issues.apache.org/jira/browse/NIFI-49
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1

 Attachments: defaultValue.patch


 Currently, we get the following error when the default value is not valid:
 ...
 Cause by: java.lang.IllegalStateException: Default value is not in the set of 
 allowable values
 This should indicate what that Default Value actually is. This is 
 particularly important if we have a collection of dynamically created 
 Allowable Values and use the first one as the default, for example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[4/4] incubator-nifi git commit: NIFI-49: Included patch from Philip Young to include name of default value when not allowed as a property descriptor value

2014-12-15 Thread markap14
NIFI-49: Included patch from Philip Young to include name of default value when 
not allowed as a property descriptor value


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/9e60aa0f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/9e60aa0f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/9e60aa0f

Branch: refs/heads/develop
Commit: 9e60aa0f25754751d468ef9cd3da428055c08b4e
Parents: ddfa621
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 13:53:12 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 13:53:12 2014 -0500

--
 .../nifi/components/TestPropertyDescriptor.java | 59 
 1 file changed, 59 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9e60aa0f/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java
--
diff --git 
a/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java 
b/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java
new file mode 100644
index 000..82b8111
--- /dev/null
+++ 
b/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.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.components;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.apache.nifi.components.PropertyDescriptor.Builder;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+
+/**
+ * Regression test for issue NIFI-49, to ensure that if a Processor's 
Property's Default Value is not allowed, 
+ * the Exception thrown should indicate what the default value is
+ */
+public class TestPropertyDescriptor {
+
+private static Builder invalidDescriptorBuilder;
+private static Builder validDescriptorBuilder;
+private static String DEFAULT_VALUE = Default Value;
+
+@Rule
+public ExpectedException thrown = ExpectedException.none();
+
+@BeforeClass
+public static void setUp() {
+validDescriptorBuilder = new 
PropertyDescriptor.Builder().name().allowableValues(Allowable Value, 
Another Allowable Value).defaultValue(Allowable Value);
+invalidDescriptorBuilder = new 
PropertyDescriptor.Builder().name().allowableValues(Allowable Value, 
Another Allowable Value).defaultValue(DEFAULT_VALUE);
+}
+
+@Test
+public void testExceptionThrownByDescriptorWithInvalidDefaultValue() {
+thrown.expect(IllegalStateException.class);
+thrown.expectMessage([+ DEFAULT_VALUE +]);
+
+invalidDescriptorBuilder.build();
+}
+
+@Test
+public void 
testNoExceptionThrownByPropertyDescriptorWithValidDefaultValue() {
+assertNotNull(validDescriptorBuilder.build());
+}
+}



[jira] [Resolved] (NIFI-49) If Processor's Property's Default Value is not allowed, the Exception thrown should indicate what the default value is

2014-12-15 Thread Mark Payne (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Payne resolved NIFI-49.

Resolution: Fixed

 If Processor's Property's Default Value is not allowed, the Exception thrown 
 should indicate what the default value is
 --

 Key: NIFI-49
 URL: https://issues.apache.org/jira/browse/NIFI-49
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1

 Attachments: defaultValue.patch


 Currently, we get the following error when the default value is not valid:
 ...
 Cause by: java.lang.IllegalStateException: Default value is not in the set of 
 allowable values
 This should indicate what that Default Value actually is. This is 
 particularly important if we have a collection of dynamically created 
 Allowable Values and use the first one as the default, for example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (NIFI-43) ReflectionUtils should catch TargetInvocationException and throw the wrapped Exception

2014-12-15 Thread Mark Payne (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Payne resolved NIFI-43.

Resolution: Fixed

 ReflectionUtils should catch TargetInvocationException and throw the wrapped 
 Exception
 --

 Key: NIFI-43
 URL: https://issues.apache.org/jira/browse/NIFI-43
 Project: Apache NiFi
  Issue Type: Bug
  Components: Core Framework
Reporter: Mark Payne
Priority: Minor
 Fix For: 0.0.1


 When invoking Processor Lifecycle methods, ReflectionUtils catches 
 TargetInvocationException and logs it but does not unwrap it. As a result, 
 it's very unclear what actually went wrong.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


incubator-nifi git commit: NIFI-35: Provide an EventReporter to the FlowFileSwapManager and provide events for any errors

2014-12-15 Thread markap14
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-35 [created] 1cc3ce575


NIFI-35: Provide an EventReporter to the FlowFileSwapManager and provide events 
for any errors


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1cc3ce57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1cc3ce57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1cc3ce57

Branch: refs/heads/NIFI-35
Commit: 1cc3ce57556eb7cf9a5f94b269eb24b284e518eb
Parents: 9e60aa0
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 14:28:11 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 14:28:11 2014 -0500

--
 .../nifi/controller/FileSystemSwapManager.java  | 33 +++-
 .../apache/nifi/controller/FlowController.java  | 20 +++-
 .../repository/FlowFileSwapManager.java |  5 ++-
 3 files changed, 41 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1cc3ce57/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
index 3af2098..ad95f8e 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
@@ -61,11 +61,12 @@ import 
org.apache.nifi.controller.repository.StandardFlowFileRecord;
 import org.apache.nifi.controller.repository.claim.ContentClaim;
 import org.apache.nifi.controller.repository.claim.ContentClaimManager;
 import org.apache.nifi.engine.FlowEngine;
+import org.apache.nifi.events.EventReporter;
 import org.apache.nifi.io.BufferedOutputStream;
 import org.apache.nifi.processor.QueueSize;
+import org.apache.nifi.reporting.Severity;
 import org.apache.nifi.util.FormatUtils;
 import org.apache.nifi.util.NiFiProperties;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -80,10 +81,12 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 public static final int MINIMUM_SWAP_COUNT = 1;
 private static final Pattern SWAP_FILE_PATTERN = 
Pattern.compile(\\d+-.+\\.swap);
 public static final int SWAP_ENCODING_VERSION = 6;
+public static final String EVENT_CATEGORY = Swap FlowFiles;
 
 private final ScheduledExecutorService swapQueueIdentifierExecutor;
 private final ScheduledExecutorService swapInExecutor;
 private volatile FlowFileRepository flowFileRepository;
+private volatile EventReporter eventReporter;
 
 // Maintains a mapping of FlowFile Queue to the a QueueLockWrapper, which 
provides queue locking and necessary state for swapping back in
 private final ConcurrentMapFlowFileQueue, QueueLockWrapper swapMap = new 
ConcurrentHashMap();
@@ -129,9 +132,10 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 }
 }
 
-public synchronized void start(final FlowFileRepository 
flowFileRepository, final QueueProvider connectionProvider, final 
ContentClaimManager claimManager) {
+public synchronized void start(final FlowFileRepository 
flowFileRepository, final QueueProvider connectionProvider, final 
ContentClaimManager claimManager, final EventReporter eventReporter) {
 this.claimManager = claimManager;
 this.flowFileRepository = flowFileRepository;
+this.eventReporter = eventReporter;
 swapQueueIdentifierExecutor.scheduleWithFixedDelay(new 
QueueIdentifier(connectionProvider), swapOutMillis, swapOutMillis, 
TimeUnit.MILLISECONDS);
 swapInExecutor.scheduleWithFixedDelay(new SwapInTask(), swapInMillis, 
swapInMillis, TimeUnit.MILLISECONDS);
 }
@@ -437,10 +441,15 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 }
 
 if (!swapFile.delete()) {
-logger.warn(Swapped in FlowFiles from 
file  + swapFile.getAbsolutePath() +  but failed to delete the file; this 
file can be cleaned up manually);
+final String errMsg = Swapped in 
FlowFiles from file  + swapFile.getAbsolutePath() +  but failed to delete the 
file; this file should be cleaned up manually;
+logger.warn(errMsg);
+
eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, errMsg);
 

[jira] [Commented] (NIFI-35) Failure to swap FlowFiles In/Out should result in system level bulletins

2014-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14247086#comment-14247086
 ] 

ASF subversion and git services commented on NIFI-35:
-

Commit 1cc3ce57556eb7cf9a5f94b269eb24b284e518eb in incubator-nifi's branch 
refs/heads/NIFI-35 from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=1cc3ce5 ]

NIFI-35: Provide an EventReporter to the FlowFileSwapManager and provide events 
for any errors


 Failure to swap FlowFiles In/Out should result in system level bulletins
 

 Key: NIFI-35
 URL: https://issues.apache.org/jira/browse/NIFI-35
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Matt Gilman
Priority: Minor
 Fix For: 0.0.1






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


incubator-nifi git commit: NIFI-35: Provide an EventReporter to the FlowFileSwapManager and provide events for any errors

2014-12-15 Thread markap14
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop 9e60aa0f2 - 1cc3ce575


NIFI-35: Provide an EventReporter to the FlowFileSwapManager and provide events 
for any errors


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1cc3ce57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1cc3ce57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1cc3ce57

Branch: refs/heads/develop
Commit: 1cc3ce57556eb7cf9a5f94b269eb24b284e518eb
Parents: 9e60aa0
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 14:28:11 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 14:28:11 2014 -0500

--
 .../nifi/controller/FileSystemSwapManager.java  | 33 +++-
 .../apache/nifi/controller/FlowController.java  | 20 +++-
 .../repository/FlowFileSwapManager.java |  5 ++-
 3 files changed, 41 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1cc3ce57/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
index 3af2098..ad95f8e 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
@@ -61,11 +61,12 @@ import 
org.apache.nifi.controller.repository.StandardFlowFileRecord;
 import org.apache.nifi.controller.repository.claim.ContentClaim;
 import org.apache.nifi.controller.repository.claim.ContentClaimManager;
 import org.apache.nifi.engine.FlowEngine;
+import org.apache.nifi.events.EventReporter;
 import org.apache.nifi.io.BufferedOutputStream;
 import org.apache.nifi.processor.QueueSize;
+import org.apache.nifi.reporting.Severity;
 import org.apache.nifi.util.FormatUtils;
 import org.apache.nifi.util.NiFiProperties;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -80,10 +81,12 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 public static final int MINIMUM_SWAP_COUNT = 1;
 private static final Pattern SWAP_FILE_PATTERN = 
Pattern.compile(\\d+-.+\\.swap);
 public static final int SWAP_ENCODING_VERSION = 6;
+public static final String EVENT_CATEGORY = Swap FlowFiles;
 
 private final ScheduledExecutorService swapQueueIdentifierExecutor;
 private final ScheduledExecutorService swapInExecutor;
 private volatile FlowFileRepository flowFileRepository;
+private volatile EventReporter eventReporter;
 
 // Maintains a mapping of FlowFile Queue to the a QueueLockWrapper, which 
provides queue locking and necessary state for swapping back in
 private final ConcurrentMapFlowFileQueue, QueueLockWrapper swapMap = new 
ConcurrentHashMap();
@@ -129,9 +132,10 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 }
 }
 
-public synchronized void start(final FlowFileRepository 
flowFileRepository, final QueueProvider connectionProvider, final 
ContentClaimManager claimManager) {
+public synchronized void start(final FlowFileRepository 
flowFileRepository, final QueueProvider connectionProvider, final 
ContentClaimManager claimManager, final EventReporter eventReporter) {
 this.claimManager = claimManager;
 this.flowFileRepository = flowFileRepository;
+this.eventReporter = eventReporter;
 swapQueueIdentifierExecutor.scheduleWithFixedDelay(new 
QueueIdentifier(connectionProvider), swapOutMillis, swapOutMillis, 
TimeUnit.MILLISECONDS);
 swapInExecutor.scheduleWithFixedDelay(new SwapInTask(), swapInMillis, 
swapInMillis, TimeUnit.MILLISECONDS);
 }
@@ -437,10 +441,15 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 }
 
 if (!swapFile.delete()) {
-logger.warn(Swapped in FlowFiles from 
file  + swapFile.getAbsolutePath() +  but failed to delete the file; this 
file can be cleaned up manually);
+final String errMsg = Swapped in 
FlowFiles from file  + swapFile.getAbsolutePath() +  but failed to delete the 
file; this file should be cleaned up manually;
+logger.warn(errMsg);
+
eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, errMsg);
   

[jira] [Closed] (NIFI-35) Failure to swap FlowFiles In/Out should result in system level bulletins

2014-12-15 Thread Mark Payne (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-35?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Payne closed NIFI-35.
--

 Failure to swap FlowFiles In/Out should result in system level bulletins
 

 Key: NIFI-35
 URL: https://issues.apache.org/jira/browse/NIFI-35
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Matt Gilman
Priority: Minor
 Fix For: 0.0.1






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


incubator-nifi git commit: NIFI-33: Ensure that we sync to disk, then rename file when swapping out; delete partial files on restart; destroy corrupt files on EOFException/FileNotFoundException when s

2014-12-15 Thread markap14
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-33 [created] ece5ce140


 NIFI-33: Ensure that we sync to disk, then rename file when swapping out; 
delete partial files on restart; destroy corrupt files on 
EOFException/FileNotFoundException when swapping in


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/ece5ce14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/ece5ce14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/ece5ce14

Branch: refs/heads/NIFI-33
Commit: ece5ce1409925bdb5a4e02476413d67d2d11ea6e
Parents: 1cc3ce5
Author: Mark Payne marka...@hotmail.com
Authored: Mon Dec 15 14:57:11 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Mon Dec 15 14:57:11 2014 -0500

--
 .../nifi/controller/FileSystemSwapManager.java  | 85 ++--
 1 file changed, 62 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ece5ce14/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
index ad95f8e..bf76bad 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
@@ -22,6 +22,7 @@ import java.io.DataOutputStream;
 import java.io.EOFException;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.FilenameFilter;
 import java.io.IOException;
@@ -80,6 +81,8 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 
 public static final int MINIMUM_SWAP_COUNT = 1;
 private static final Pattern SWAP_FILE_PATTERN = 
Pattern.compile(\\d+-.+\\.swap);
+private static final Pattern TEMP_SWAP_FILE_PATTERN = 
Pattern.compile(\\d+-.+\\.swap\\.part);
+
 public static final int SWAP_ENCODING_VERSION = 6;
 public static final String EVENT_CATEGORY = Swap FlowFiles;
 
@@ -441,14 +444,18 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 }
 
 if (!swapFile.delete()) {
-final String errMsg = Swapped in 
FlowFiles from file  + swapFile.getAbsolutePath() +  but failed to delete the 
file; this file should be cleaned up manually;
-logger.warn(errMsg);
-
eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, errMsg);
+warn(Swapped in FlowFiles from file  + 
swapFile.getAbsolutePath() +  but failed to delete the file; this file should 
be cleaned up manually);
 }
+} catch (final EOFException eof) {
+error(Failed to Swap In FlowFiles for  + 
flowFileQueue +  due to: Corrupt Swap File; will remove this Swap File:  + 
swapFile);
+
+if ( !swapFile.delete() ) {
+warn(Failed to remove corrupt Swap File  
+ swapFile + ; This file should be cleaned up manually);
+}
+} catch (final FileNotFoundException fnfe) {
+error(Failed to Swap In FlowFiles for  + 
flowFileQueue +  due to: Could not find Swap File  + swapFile);
 } catch (final Exception e) {
-final String errMsg = Failed to Swap In 
FlowFiles for  + flowFileQueue +  due to  + e;
-logger.error(errMsg);
-eventReporter.reportEvent(Severity.ERROR, 
EVENT_CATEGORY, errMsg);
+error(Failed to Swap In FlowFiles for  + 
flowFileQueue +  due to  + e, e);
 
 if (swapFile != null) {
 queue.add(swapFile);
@@ -463,8 +470,29 @@ public class FileSystemSwapManager implements 
FlowFileSwapManager {
 }
 }
 
+private void error(final String error, final Throwable t) {
+error(error);
+if ( logger.isDebugEnabled() ) {
+logger.error(, t);
+}
+}
+
+private void error(final String