[1/7] incubator-nifi git commit: NIFI-270 prepare release nifi-nar-maven-plugin-1.0.0-incubating-RC1

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-270-RC1 [created] 7ad2b21c8


NIFI-270 prepare release nifi-nar-maven-plugin-1.0.0-incubating-RC1


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

Branch: refs/heads/NIFI-270-RC1
Commit: 2a1f485c7c4bf4c431e093305b17d79f08220b80
Parents: cff8b0d
Author: joewitt joew...@apache.org
Authored: Wed Jan 21 02:17:28 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Jan 21 02:17:28 2015 -0500

--
 nifi-nar-maven-plugin/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2a1f485c/nifi-nar-maven-plugin/pom.xml
--
diff --git a/nifi-nar-maven-plugin/pom.xml b/nifi-nar-maven-plugin/pom.xml
index cb59c13..c8c9fdb 100644
--- a/nifi-nar-maven-plugin/pom.xml
+++ b/nifi-nar-maven-plugin/pom.xml
@@ -24,7 +24,7 @@
 /parent
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-nar-maven-plugin/artifactId
-version1.0.0-incubating-SNAPSHOT/version
+version1.0.0-incubating/version
 packagingmaven-plugin/packaging
 descriptionApache NiFi Nar Plugin. It is currently a part of the Apache 
Incubator./description
 urlhttp://nifi.incubator.apache.org/maven-site//url
@@ -58,7 +58,7 @@
 
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
-tagHEAD/tag
+tagnifi-nar-maven-plugin-1.0.0-incubating-RC1/tag
 /scm
 issueManagement
 systemJIRA/system



Git Push Summary

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Tags:  refs/tags/nifi-0.0.1-incubating-RC1 [created] d86d9c7e4


[3/7] incubator-nifi git commit: NIFI-270 updating to release version of nifi nar maven plugin

2015-01-21 Thread joewitt
NIFI-270 updating to release version of nifi nar maven plugin


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

Branch: refs/heads/NIFI-270-RC1
Commit: 31509c287e589bc830a9366ca8a0100b5ef75f12
Parents: e9331af
Author: joewitt joew...@apache.org
Authored: Wed Jan 21 02:37:30 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Jan 21 02:37:30 2015 -0500

--
 nifi/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/31509c28/nifi/pom.xml
--
diff --git a/nifi/pom.xml b/nifi/pom.xml
index 4237cc2..87c08d4 100644
--- a/nifi/pom.xml
+++ b/nifi/pom.xml
@@ -972,7 +972,7 @@
 plugin
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-nar-maven-plugin/artifactId
-version1.0.0-incubating-SNAPSHOT/version
+version1.0.0-incubating/version
 extensionstrue/extensions
 /plugin
 /plugins



Git Push Summary

2015-01-20 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-270-6 [deleted] 33871d5a8


incubator-nifi git commit: NIFI-270 fixing versions in test file

2015-01-20 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop f6d9354bf - cff8b0de4


NIFI-270 fixing versions in test file


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

Branch: refs/heads/develop
Commit: cff8b0de40c66a9dfcceafc89502957fd49959ca
Parents: f6d9354
Author: joewitt joew...@apache.org
Authored: Wed Jan 21 02:12:20 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Jan 21 02:12:20 2015 -0500

--
 .../nifi-site-to-site/src/test/resources/nifi.properties | 4 ++--
 .../src/test/resources/access-control/nifi.properties| 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cff8b0de/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/resources/nifi.properties
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/resources/nifi.properties
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/resources/nifi.properties
index b850c0f..5d9e47e 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/resources/nifi.properties
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/resources/nifi.properties
@@ -25,7 +25,7 @@ nifi.flowfile.repository.checkpoint.millis=12
 nifi.content.repository.directory.default=./content_repository
 nifi.provenance.repository.capacity=25000
 nifi.templates.directory=./conf/templates
-nifi.version=nifi-community 3.0.0-SNAPSHOT
+nifi.version=nifi 0.0.1-incubating-SNAPSHOT
 nifi.ui.banner.text=DEFAULT BANNER
 nifi.ui.autorefresh.interval.seconds=30
 nifi.flowcontroller.autoStartProcessors=true
@@ -108,4 +108,4 @@ nifi.cluster.manager.node.api.read.timeout.ms=3
 nifi.cluster.manager.node.api.request.threads=10
 nifi.cluster.manager.flow.retrieval.delay.seconds=5
 nifi.cluster.manager.protocol.threads=10
-nifi.cluster.manager.safemode.seconds=0
\ No newline at end of file
+nifi.cluster.manager.safemode.seconds=0

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cff8b0de/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/resources/access-control/nifi.properties
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/resources/access-control/nifi.properties
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/resources/access-control/nifi.properties
index bc56878..3ea2a23 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/resources/access-control/nifi.properties
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/resources/access-control/nifi.properties
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 # Core Properties #
-nifi.version=nifi 3.0.0-SNAPSHOT
+nifi.version=nifi 0.0.1-incubating-SNAPSHOT 
 nifi.flow.configuration.file=
 nifi.flow.configuration.archive.dir=target/archive
 nifi.flowcontroller.autoResumeState=true
@@ -133,4 +133,4 @@ nifi.cluster.manager.node.api.read.timeout=30 sec
 nifi.cluster.manager.node.api.request.threads=10
 nifi.cluster.manager.flow.retrieval.delay=5 sec
 nifi.cluster.manager.protocol.threads=10
-nifi.cluster.manager.safemode.duration=0 sec
\ No newline at end of file
+nifi.cluster.manager.safemode.duration=0 sec



[26/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceEventDTO.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceEventDTO.java
 
b/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceEventDTO.java
deleted file mode 100644
index b1ead42..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceEventDTO.java
+++ /dev/null
@@ -1,630 +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.web.api.dto.provenance;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.apache.nifi.web.api.dto.util.TimestampAdapter;
-
-/**
- * A provenance event.
- */
-@XmlType(name = provenanceEvent)
-public class ProvenanceEventDTO {
-
-private String id;
-
-// in search results table
-private Long eventId;
-private Date eventTime;
-private Long eventDuration;
-private Long lineageDuration;
-private String eventType;
-private String flowFileUuid;
-private String fileSize;
-private Long fileSizeBytes;
-private String clusterNodeId;// include when clustered
-private String clusterNodeAddress; // include when clustered
-
-private String groupId;
-private String componentId;
-private String componentType;
-private String componentName;
-private String sourceSystemFlowFileId;
-private String alternateIdentifierUri;
-private CollectionAttributeDTO attributes;
-private ListString parentUuids;
-private ListString childUuids;
-
-private String transitUri;
-
-private String relationship;
-private String details;
-
-// content
-private Boolean contentEqual;
-private Boolean inputContentAvailable;
-private String inputContentClaimSection;
-private String inputContentClaimContainer;
-private String inputContentClaimIdentifier;
-private Long inputContentClaimOffset;
-private String inputContentClaimFileSize;
-private Long inputContentClaimFileSizeBytes;
-private Boolean outputContentAvailable;
-private String outputContentClaimSection;
-private String outputContentClaimContainer;
-private String outputContentClaimIdentifier;
-private Long outputContentClaimOffset;
-private String outputContentClaimFileSize;
-private Long outputContentClaimFileSizeBytes;
-
-// replay
-private Boolean replayAvailable;
-private String replayExplanation;
-private String sourceConnectionIdentifier;
-
-/**
- * The event uuid.
- *
- * @return
- */
-public String getId() {
-return id;
-}
-
-public void setId(String id) {
-this.id = id;
-}
-
-/**
- * The event id.
- *
- * @return
- */
-public Long getEventId() {
-return eventId;
-}
-
-public void setEventId(Long eventId) {
-this.eventId = eventId;
-}
-
-/**
- * The time the event occurred.
- *
- * @return
- */
-@XmlJavaTypeAdapter(TimestampAdapter.class)
-public Date getEventTime() {
-return eventTime;
-}
-
-public void setEventTime(Date eventTime) {
-this.eventTime = eventTime;
-}
-
-/**
- * The UUID of the FlowFile for this event.
- *
- * @return
- */
-public String getFlowFileUuid() {
-return flowFileUuid;
-}
-
-public void setFlowFileUuid(String flowFileUuid) {
-this.flowFileUuid = flowFileUuid;
-}
-
-/**
- * The size of the FlowFile for this event.
- *
- * @return
- */
-public String getFileSize() {
-return fileSize;
-}
-
-public void setFileSize(String fileSize) {
-this.fileSize = fileSize;
-}
-
-/**
- * The size of the 

[34/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/wali/pom.xml
--
diff --git a/nifi/commons/wali/pom.xml b/nifi/commons/wali/pom.xml
deleted file mode 100644
index 0d653f8..000
--- a/nifi/commons/wali/pom.xml
+++ /dev/null
@@ -1,41 +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.
---
-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
-
-parent
-groupIdorg.apache.nifi/groupId
-artifactIdnifi-commons-parent/artifactId
-version0.0.1-incubating-SNAPSHOT/version
-/parent
-
-artifactIdwali/artifactId
-version0.0.1-incubating-SNAPSHOT/version
-packagingjar/packaging
-
-nameWALI : Write-Ahead Log Implementation/name
-
-dependencies
-dependency
-groupIdorg.slf4j/groupId
-artifactIdslf4j-api/artifactId
-/dependency
-dependency
-groupIdorg.apache.nifi/groupId
-artifactIdnifi-utils/artifactId
-/dependency
-/dependencies
-/project

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java
--
diff --git 
a/nifi/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java 
b/nifi/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java
deleted file mode 100644
index 19208d3..000
--- a/nifi/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java
+++ /dev/null
@@ -1,1008 +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.wali;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.channels.FileChannel;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardOpenOption;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.SortedSet;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.regex.Pattern;
-
-import org.apache.nifi.stream.io.BufferedInputStream;
-import org.apache.nifi.stream.io.BufferedOutputStream;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 

[08/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
 
b/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
deleted file mode 100644
index f36a459..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
+++ /dev/null
@@ -1,329 +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.controller;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.nifi.connectable.Connectable;
-import org.apache.nifi.connectable.Connection;
-import org.apache.nifi.processor.Relationship;
-import org.apache.nifi.util.Connectables;
-
-public class EventDrivenWorkerQueue implements WorkerQueue {
-
-private final Object workMonitor = new Object();
-
-private final MapConnectable, Worker workerMap = new HashMap();   // 
protected by synchronizing on workMonitor
-private final WorkerReadyQueue workerQueue;
-
-public EventDrivenWorkerQueue(final boolean clustered, final boolean 
primary, final ProcessScheduler scheduler) {
-workerQueue = new WorkerReadyQueue(scheduler);
-workerQueue.setClustered(clustered);
-workerQueue.setPrimary(primary);
-}
-
-@Override
-public void setClustered(final boolean clustered) {
-workerQueue.setClustered(clustered);
-}
-
-@Override
-public void setPrimary(final boolean primary) {
-workerQueue.setPrimary(primary);
-}
-
-@Override
-public Worker poll(final long timeout, final TimeUnit timeUnit) {
-final long maxTime = System.currentTimeMillis() + 
TimeUnit.MILLISECONDS.convert(timeout, timeUnit);
-while (System.currentTimeMillis()  maxTime) {
-synchronized (workMonitor) {
-final Worker worker = workerQueue.poll();
-if (worker == null) {
-// nothing to do. wait until we have something to do.
-final long timeLeft = maxTime - System.currentTimeMillis();
-if (timeLeft = 0) {
-return null;
-}
-
-try {
-workMonitor.wait(timeLeft);
-} catch (final InterruptedException ignored) {
-}
-} else {
-// Decrement the amount of work there is to do for this 
worker.
-final int workLeft = worker.decrementEventCount();
-if (workLeft  0) {
-workerQueue.offer(worker);
-}
-
-return worker;
-}
-}
-}
-
-return null;
-}
-
-@Override
-public void offer(final Connectable connectable) {
-synchronized (workMonitor) {
-Worker worker = workerMap.get(connectable);
-if (worker == null) {
-// if worker is null, then it has not been scheduled to run; 
ignore the event.
-return;
-}
-
-final int countBefore = worker.incrementEventCount();
-if (countBefore  0) {
-worker.setWorkCount(1);
-}
-if (countBefore = 0) {
-// If countBefore  0 then it's already on the queue, so just 
incrementing its counter is sufficient.
-workerQueue.offer(worker);
-}
-
-workMonitor.notify();
-}
-}
-
-private int getWorkCount(final Connectable connectable) {
-int sum = 0;
-for (final Connection connection : 
connectable.getIncomingConnections()) {
- 

[48/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java
--
diff --git 
a/nifi/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java
 
b/nifi/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java
deleted file mode 100644
index afb56e8..000
--- 
a/nifi/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java
+++ /dev/null
@@ -1,324 +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.provenance;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.nifi.provenance.lineage.ComputeLineageResult;
-import org.apache.nifi.provenance.lineage.EdgeNode;
-import org.apache.nifi.provenance.lineage.EventNode;
-import org.apache.nifi.provenance.lineage.FlowFileNode;
-import org.apache.nifi.provenance.lineage.LineageEdge;
-import org.apache.nifi.provenance.lineage.LineageNode;
-
-/**
- *
- */
-public class StandardLineageResult implements ComputeLineageResult {
-
-public static final int TTL = (int) TimeUnit.MILLISECONDS.convert(30, 
TimeUnit.MINUTES);
-private static final Logger logger = 
LoggerFactory.getLogger(StandardLineageResult.class);
-
-private final CollectionString flowFileUuids;
-private final CollectionProvenanceEventRecord relevantRecords = new 
ArrayList();
-private final SetLineageNode nodes = new HashSet();
-private final SetLineageEdge edges = new HashSet();
-private final int numSteps;
-private final long creationNanos;
-private long computationNanos;
-
-private final ReadWriteLock rwLock = new ReentrantReadWriteLock();
-private final Lock readLock = rwLock.readLock();
-private final Lock writeLock = rwLock.writeLock();
-
-private Date expirationDate = null;
-private String error = null;
-private int numCompletedSteps = 0;
-
-private volatile boolean canceled = false;
-
-public StandardLineageResult(final int numSteps, final CollectionString 
flowFileUuids) {
-this.numSteps = numSteps;
-this.creationNanos = System.nanoTime();
-this.flowFileUuids = flowFileUuids;
-
-updateExpiration();
-}
-
-@Override
-public ListLineageNode getNodes() {
-readLock.lock();
-try {
-return new ArrayList(nodes);
-} finally {
-readLock.unlock();
-}
-}
-
-@Override
-public ListLineageEdge getEdges() {
-readLock.lock();
-try {
-return new ArrayList(edges);
-} finally {
-readLock.unlock();
-}
-}
-
-public int getNumberOfEdges() {
-readLock.lock();
-try {
-return edges.size();
-} finally {
-readLock.unlock();
-}
-}
-
-public int getNumberOfNodes() {
-readLock.lock();
-try {
-return nodes.size();
-} finally {
-readLock.unlock();
-}
-}
-
-public long getComputationTime(final TimeUnit timeUnit) {
-readLock.lock();
-try {
-return timeUnit.convert(computationNanos, TimeUnit.NANOSECONDS);
-} finally {
-readLock.unlock();
-}
-}
-
-@Override
-public Date getExpiration() {
-readLock.lock();
-try {
-return expirationDate;
-} finally {
-readLock.unlock();
-}
-}
-
-@Override
-public String getError() {
-readLock.lock();
-try {
-return error;
- 

[31/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUserGroupAction.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUserGroupAction.java
 
b/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUserGroupAction.java
deleted file mode 100644
index 5377c46..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUserGroupAction.java
+++ /dev/null
@@ -1,50 +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.admin.service.action;
-
-import org.apache.nifi.admin.dao.DAOFactory;
-import org.apache.nifi.admin.dao.DataAccessException;
-import org.apache.nifi.admin.dao.UserDAO;
-import org.apache.nifi.authorization.AuthorityProvider;
-import org.apache.nifi.user.NiFiUserGroup;
-
-/**
- *
- */
-public class GetUserGroupAction implements AdministrationActionNiFiUserGroup 
{
-
-private final String group;
-
-public GetUserGroupAction(String group) {
-this.group = group;
-}
-
-@Override
-public NiFiUserGroup execute(DAOFactory daoFactory, AuthorityProvider 
authorityProvider) throws DataAccessException {
-final UserDAO userDAO = daoFactory.getUserDAO();
-final NiFiUserGroup userGroup = new NiFiUserGroup();
-
-// set the group
-userGroup.setGroup(group);
-
-// get the users in this group
-userGroup.setUsers(userDAO.findUsersForGroup(group));
-
-// return the group
-return userGroup;
-}
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUsersAction.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUsersAction.java
 
b/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUsersAction.java
deleted file mode 100644
index 42d180e..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/GetUsersAction.java
+++ /dev/null
@@ -1,39 +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.admin.service.action;
-
-import java.util.Collection;
-import org.apache.nifi.admin.dao.DAOFactory;
-import org.apache.nifi.admin.dao.DataAccessException;
-import org.apache.nifi.admin.dao.UserDAO;
-import org.apache.nifi.authorization.AuthorityProvider;
-import org.apache.nifi.user.NiFiUser;
-
-/**
- *
- */
-public class GetUsersAction implements 
AdministrationActionCollectionNiFiUser {
-
-@Override
-public CollectionNiFiUser execute(DAOFactory daoFactory, 
AuthorityProvider authorityProvider) throws DataAccessException {
-// get a UserDAO
-UserDAO userDAO = daoFactory.getUserDAO();
-
-// return the desired user
-return userDAO.findUsers();
-}
-}


[39/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/MulticastUtils.java
--
diff --git 
a/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/MulticastUtils.java
 
b/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/MulticastUtils.java
deleted file mode 100644
index 8a8b7c0..000
--- 
a/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/MulticastUtils.java
+++ /dev/null
@@ -1,109 +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.io.socket.multicast;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.MulticastSocket;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author unattributed
- */
-public final class MulticastUtils {
-
-private static final Logger logger = new 
org.apache.nifi.logging.NiFiLog(LoggerFactory.getLogger(MulticastUtils.class));
-
-public static MulticastSocket createMulticastSocket(final 
MulticastConfiguration config) throws IOException {
-return createMulticastSocket(0, config);
-}
-
-public static MulticastSocket createMulticastSocket(final int port, final 
MulticastConfiguration config) throws IOException {
-if (config == null) {
-throw new IllegalArgumentException(Configuration may not be 
null.);
-}
-
-final MulticastSocket socket;
-if (port = 0) {
-socket = new MulticastSocket();
-} else {
-socket = new MulticastSocket(port);
-}
-socket.setTimeToLive(config.getTtl().getTtl());
-
-if (config.getSocketTimeout() != null) {
-socket.setSoTimeout(config.getSocketTimeout());
-}
-
-if (config.getReuseAddress() != null) {
-socket.setReuseAddress(config.getReuseAddress());
-}
-
-if (config.getReceiveBufferSize() != null) {
-socket.setReceiveBufferSize(config.getReceiveBufferSize());
-}
-
-if (config.getSendBufferSize() != null) {
-socket.setSendBufferSize(config.getSendBufferSize());
-}
-
-if (config.getTrafficClass() != null) {
-socket.setTrafficClass(config.getTrafficClass());
-}
-
-if (config.getLoopbackMode() != null) {
-socket.setLoopbackMode(config.getLoopbackMode());
-}
-
-return socket;
-}
-
-public static void closeQuietly(final MulticastSocket socket) {
-
-if (socket == null) {
-return;
-}
-
-try {
-socket.close();
-} catch (final Exception ex) {
-logger.debug(Failed to close multicast socket due to:  + ex, ex);
-}
-
-}
-
-public static void closeQuietly(final MulticastSocket socket, final 
InetAddress groupAddress) {
-
-if (socket == null) {
-return;
-}
-
-try {
-socket.leaveGroup(groupAddress);
-} catch (final Exception ex) {
-logger.debug(Failed to leave multicast group due to:  + ex, ex);
-}
-
-try {
-socket.close();
-} catch (final Exception ex) {
-logger.debug(Failed to close multicast socket due to:  + ex, ex);
-}
-
-}
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/ServiceDiscovery.java
--
diff --git 
a/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/ServiceDiscovery.java
 
b/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/ServiceDiscovery.java
deleted file mode 100644
index 173146e..000
--- 
a/nifi/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/multicast/ServiceDiscovery.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the 

[35/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
--
diff --git 
a/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
 
b/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
deleted file mode 100644
index f576e94..000
--- 
a/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
+++ /dev/null
@@ -1,71 +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.util.file.monitor;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.file.Path;
-import java.util.UUID;
-
-
-import org.junit.Test;
-
-public class TestCompoundUpdateMonitor {
-
-@Test
-public void test() throws IOException {
-final UpdateMonitor lastModified = new LastModifiedMonitor();
-final MD5SumMonitor md5 = new MD5SumMonitor();
-final CompoundUpdateMonitor compound = new 
CompoundUpdateMonitor(lastModified, md5);
-
-final File file = new File(target/ + UUID.randomUUID().toString());
-if (file.exists()) {
-assertTrue(file.delete());
-}
-assertTrue(file.createNewFile());
-
-final Path path = file.toPath();
-
-final Object curState = compound.getCurrentState(path);
-final Object state2 = compound.getCurrentState(path);
-
-assertEquals(curState, state2);
-file.setLastModified(System.currentTimeMillis() + 1000L);
-final Object state3 = compound.getCurrentState(path);
-assertEquals(state2, state3);
-
-final Object state4 = compound.getCurrentState(path);
-assertEquals(state3, state4);
-
-final long lastModifiedDate = file.lastModified();
-try (final OutputStream out = new FileOutputStream(file)) {
-out.write(Hello.getBytes(UTF-8));
-}
-
-file.setLastModified(lastModifiedDate);
-
-final Object state5 = compound.getCurrentState(path);
-assertNotSame(state4, state5);
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
--
diff --git 
a/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
 
b/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
deleted file mode 100644
index 7125581..000
--- 
a/nifi/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
+++ /dev/null
@@ -1,61 +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.util.file.monitor;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import 

[12/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
 
b/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
deleted file mode 100644
index 630631f..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
+++ /dev/null
@@ -1,39 +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.cluster;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-public class NodeInformationAdapter extends XmlAdapterAdaptedNodeInformation, 
NodeInformation {
-
-@Override
-public NodeInformation unmarshal(final AdaptedNodeInformation adapted) 
throws Exception {
-return new NodeInformation(adapted.getHostname(), 
adapted.getSiteToSitePort(), adapted.getApiPort(), 
adapted.isSiteToSiteSecure(), adapted.getTotalFlowFiles());
-}
-
-@Override
-public AdaptedNodeInformation marshal(final NodeInformation 
nodeInformation) throws Exception {
-final AdaptedNodeInformation adapted = new AdaptedNodeInformation();
-adapted.setHostname(nodeInformation.getHostname());
-adapted.setSiteToSitePort(nodeInformation.getSiteToSitePort());
-adapted.setApiPort(nodeInformation.getAPIPort());
-adapted.setSiteToSiteSecure(nodeInformation.isSiteToSiteSecure());
-adapted.setTotalFlowFiles(nodeInformation.getTotalFlowFiles());
-return adapted;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
 
b/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
deleted file mode 100644
index 57c1c30..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
+++ /dev/null
@@ -1,41 +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.cluster.protocol;
-
-public interface DataFlow {
-
-/**
- * @return the raw byte array of the flow
- */
-public byte[] getFlow();
-
-/**
- * @return the raw byte array of the templates
- */
-public byte[] getTemplates();
-
-/**
- * @return the raw byte array of the snippets
- */
-public byte[] getSnippets();
-
-/**
- * @return true if processors should be automatically started at 
application
- * startup; false otherwise
- */
-public boolean isAutoStartProcessors();
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/connectable/Connectable.java
--
diff --git 

[28/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerDTO.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerDTO.java
 
b/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerDTO.java
deleted file mode 100644
index 9e15fc1..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerDTO.java
+++ /dev/null
@@ -1,262 +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.web.api.dto;
-
-import java.util.Set;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Configuration details for a NiFi controller. Primary use of this DTO is for
- * consumption by a remote NiFi instance to initiate site to site
- * communications.
- */
-@XmlType(name = controller)
-public class ControllerDTO {
-
-private String id;
-private String name;
-private String comments;
-
-private Integer runningCount;
-private Integer stoppedCount;
-private Integer invalidCount;
-private Integer disabledCount;
-private Integer activeRemotePortCount;
-private Integer inactiveRemotePortCount;
-
-private Integer inputPortCount;
-private Integer outputPortCount;
-
-private Integer remoteSiteListeningPort;
-private Boolean siteToSiteSecure;
-private String instanceId;
-private SetPortDTO inputPorts;
-private SetPortDTO outputPorts;
-
-/**
- * The id of this NiFi controller.
- *
- * @return
- */
-public String getId() {
-return id;
-}
-
-public void setId(String id) {
-this.id = id;
-}
-
-/**
- * The name of this NiFi controller.
- *
- * @return The name of this controller
- */
-public String getName() {
-return name;
-}
-
-public void setName(String name) {
-this.name = name;
-}
-
-/**
- * The comments of this NiFi controller.
- *
- * @return
- */
-public String getComments() {
-return comments;
-}
-
-public void setComments(String comments) {
-this.comments = comments;
-}
-
-/**
- * The input ports available to send data to this NiFi controller.
- *
- * @return
- */
-public SetPortDTO getInputPorts() {
-return inputPorts;
-}
-
-public void setInputPorts(SetPortDTO inputPorts) {
-this.inputPorts = inputPorts;
-}
-
-/**
- * The output ports available to received data from this NiFi controller.
- *
- * @return
- */
-public SetPortDTO getOutputPorts() {
-return outputPorts;
-}
-
-public void setOutputPorts(SetPortDTO outputPorts) {
-this.outputPorts = outputPorts;
-}
-
-/**
- * The Instance ID of the cluster, if this node is connected to a Cluster
- * Manager, or of this individual instance of in standalone mode
- *
- * @return
- */
-public String getInstanceId() {
-return instanceId;
-}
-
-public void setInstanceId(String instanceId) {
-this.instanceId = instanceId;
-}
-
-/**
- * The Socket Port on which this instance is listening for Remote Transfers
- * of Flow Files. If this instance is not configured to receive Flow Files
- * from remote instances, this will be null.
- *
- * @return a integer between 1 and 65535, or null, if not configured for
- * remote transfer
- */
-public Integer getRemoteSiteListeningPort() {
-return remoteSiteListeningPort;
-}
-
-public void setRemoteSiteListeningPort(final Integer port) {
-this.remoteSiteListeningPort = port;
-}
-
-/**
- * Indicates whether or not Site-to-Site communications with this instance
- * is secure (2-way authentication)
- *
- * @return
- */
-public Boolean isSiteToSiteSecure() {
-return siteToSiteSecure;
-}
-
-public void setSiteToSiteSecure(Boolean 

[38/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
--
diff --git 
a/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
 
b/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
deleted file mode 100644
index 5810488..000
--- 
a/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
+++ /dev/null
@@ -1,602 +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.remote.io.socket.ssl;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketTimeoutException;
-import java.nio.ByteBuffer;
-import java.nio.channels.ClosedByInterruptException;
-import java.nio.channels.SocketChannel;
-import java.util.concurrent.TimeUnit;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLEngine;
-import javax.net.ssl.SSLEngineResult;
-import javax.net.ssl.SSLEngineResult.Status;
-import javax.net.ssl.SSLHandshakeException;
-import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.security.cert.CertificateExpiredException;
-import javax.security.cert.CertificateNotYetValidException;
-import javax.security.cert.X509Certificate;
-
-import org.apache.nifi.remote.exception.TransmissionDisabledException;
-import org.apache.nifi.remote.io.socket.BufferStateManager;
-import org.apache.nifi.remote.io.socket.BufferStateManager.Direction;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SSLSocketChannel implements Closeable {
-
-public static final int MAX_WRITE_SIZE = 65536;
-
-private static final Logger logger = 
LoggerFactory.getLogger(SSLSocketChannel.class);
-private static final long BUFFER_FULL_EMPTY_WAIT_NANOS = 
TimeUnit.NANOSECONDS.convert(10, TimeUnit.MILLISECONDS);
-
-private final String hostname;
-private final int port;
-private final SSLEngine engine;
-private final SocketAddress socketAddress;
-
-private BufferStateManager streamInManager;
-private BufferStateManager streamOutManager;
-private BufferStateManager appDataManager;
-
-private SocketChannel channel;
-
-private final byte[] oneByteBuffer = new byte[1];
-
-private int timeoutMillis = 3;
-private volatile boolean connected = false;
-private boolean handshaking = false;
-private boolean closed = false;
-private volatile boolean interrupted = false;
-
-public SSLSocketChannel(final SSLContext sslContext, final String 
hostname, final int port, final boolean client) throws IOException {
-this.socketAddress = new InetSocketAddress(hostname, port);
-this.channel = SocketChannel.open();
-this.hostname = hostname;
-this.port = port;
-this.engine = sslContext.createSSLEngine();
-this.engine.setUseClientMode(client);
-engine.setNeedClientAuth(true);
-
-streamInManager = new 
BufferStateManager(ByteBuffer.allocate(engine.getSession().getPacketBufferSize()));
-streamOutManager = new 
BufferStateManager(ByteBuffer.allocate(engine.getSession().getPacketBufferSize()));
-appDataManager = new 
BufferStateManager(ByteBuffer.allocate(engine.getSession().getApplicationBufferSize()));
-}
-
-public SSLSocketChannel(final SSLContext sslContext, final SocketChannel 
socketChannel, final boolean client) throws IOException {
-if (!socketChannel.isConnected()) {
-throw new IllegalArgumentException(Cannot pass an un-connected 
SocketChannel);
-}
-
-this.channel = socketChannel;
-
-this.socketAddress = socketChannel.getRemoteAddress();
-final Socket socket = socketChannel.socket();
-this.hostname = socket.getInetAddress().getHostName();
-this.port = socket.getPort();
-
-this.engine = sslContext.createSSLEngine();
-this.engine.setUseClientMode(client);
-engine.setNeedClientAuth(true);
-
-

[02/51] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-20 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java
 
b/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java
deleted file mode 100644
index 6c27470..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java
+++ /dev/null
@@ -1,111 +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.controller.reporting;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.nifi.controller.AbstractConfiguredComponent;
-import org.apache.nifi.controller.Availability;
-import org.apache.nifi.controller.ConfigurationContext;
-import org.apache.nifi.controller.ControllerServiceLookup;
-import org.apache.nifi.controller.ProcessScheduler;
-import org.apache.nifi.controller.ReportingTaskNode;
-import org.apache.nifi.controller.ValidationContextFactory;
-import org.apache.nifi.controller.service.ControllerServiceProvider;
-import org.apache.nifi.controller.service.StandardConfigurationContext;
-import org.apache.nifi.reporting.ReportingTask;
-import org.apache.nifi.scheduling.SchedulingStrategy;
-import org.apache.nifi.util.FormatUtils;
-
-public abstract class AbstractReportingTaskNode extends 
AbstractConfiguredComponent implements ReportingTaskNode {
-
-private final ReportingTask reportingTask;
-private final ProcessScheduler processScheduler;
-private final ControllerServiceLookup serviceLookup;
-
-private final AtomicReferenceSchedulingStrategy schedulingStrategy = new 
AtomicReference(SchedulingStrategy.TIMER_DRIVEN);
-private final AtomicReferenceString schedulingPeriod = new 
AtomicReference(5 mins);
-private final AtomicReferenceAvailability availability = new 
AtomicReference(Availability.NODE_ONLY);
-
-public AbstractReportingTaskNode(final ReportingTask reportingTask, final 
String id,
-final ControllerServiceProvider controllerServiceProvider, final 
ProcessScheduler processScheduler,
-final ValidationContextFactory validationContextFactory) {
-super(reportingTask, id, validationContextFactory, 
controllerServiceProvider);
-this.reportingTask = reportingTask;
-this.processScheduler = processScheduler;
-this.serviceLookup = controllerServiceProvider;
-}
-
-@Override
-public Availability getAvailability() {
-return availability.get();
-}
-
-@Override
-public void setAvailability(final Availability availability) {
-this.availability.set(availability);
-}
-
-@Override
-public void setSchedulingStrategy(final SchedulingStrategy 
schedulingStrategy) {
-this.schedulingStrategy.set(schedulingStrategy);
-}
-
-@Override
-public SchedulingStrategy getSchedulingStrategy() {
-return schedulingStrategy.get();
-}
-
-@Override
-public String getSchedulingPeriod() {
-return schedulingPeriod.get();
-}
-
-@Override
-public long getSchedulingPeriod(final TimeUnit timeUnit) {
-return FormatUtils.getTimeDuration(schedulingPeriod.get(), timeUnit);
-}
-
-@Override
-public void setScheduldingPeriod(final String schedulingPeriod) {
-this.schedulingPeriod.set(schedulingPeriod);
-}
-
-@Override
-public ReportingTask getReportingTask() {
-return reportingTask;
-}
-
-@Override
-public boolean isRunning() {
-return processScheduler.isScheduled(this) || 
processScheduler.getActiveThreadCount(this)  0;
-}
-
-@Override
-public ConfigurationContext getConfigurationContext() {
-return new StandardConfigurationContext(this, serviceLookup);
-}
-
-@Override
-public void verifyModifiable() throws 

Git Push Summary

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Tags:  refs/tags/nifi-0.0.1-incubating-RC1 [deleted] d86d9c7e4


Git Push Summary

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-270-RC1 [deleted] 7ad2b21c8


Git Push Summary

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Tags:  refs/tags/nifi-nar-maven-plugin-1.0.0-incubating-RC2 [created] 
6de9cd7ce


Git Push Summary

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Tags:  refs/tags/nifi-0.0.1-incubating-RC2 [created] 1042fadd6


[6/8] incubator-nifi git commit: NIFI-270 prepare release nifi-0.0.1-incubating-RC2

2015-01-21 Thread joewitt
NIFI-270 prepare release nifi-0.0.1-incubating-RC2


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

Branch: refs/heads/NIFI-270-RC2
Commit: 8086322f10027f97855ec8f0d4440d0893f45cd1
Parents: 58f0a6c
Author: joewitt joew...@apache.org
Authored: Wed Jan 21 09:06:45 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Jan 21 09:06:45 2015 -0500

--
 nifi/nifi-api/pom.xml   |  4 +-
 nifi/nifi-assembly/pom.xml  |  6 +-
 nifi/nifi-bootstrap/pom.xml |  2 +-
 .../nifi-data-provenance-utils/pom.xml  |  4 +-
 .../nifi-expression-language/pom.xml|  4 +-
 .../nifi-commons/nifi-flowfile-packager/pom.xml |  4 +-
 nifi/nifi-commons/nifi-logging-utils/pom.xml|  4 +-
 .../nifi-processor-utilities/pom.xml|  4 +-
 nifi/nifi-commons/nifi-properties/pom.xml   |  4 +-
 nifi/nifi-commons/nifi-security-utils/pom.xml   |  4 +-
 nifi/nifi-commons/nifi-socket-utils/pom.xml |  4 +-
 nifi/nifi-commons/nifi-utils/pom.xml|  4 +-
 nifi/nifi-commons/nifi-web-utils/pom.xml|  4 +-
 nifi/nifi-commons/nifi-write-ahead-log/pom.xml  |  4 +-
 nifi/nifi-commons/pom.xml   |  5 +-
 nifi/nifi-docs/pom.xml  |  6 +-
 nifi/nifi-mock/pom.xml  |  4 +-
 .../nifi-framework-nar/pom.xml  |  4 +-
 .../nifi-framework/nifi-administration/pom.xml  |  4 +-
 .../nifi-framework/nifi-client-dto/pom.xml  |  2 +-
 .../nifi-cluster-authorization-provider/pom.xml |  2 +-
 .../nifi-cluster-protocol/pom.xml   |  2 +-
 .../nifi-framework/nifi-cluster-web/pom.xml |  2 +-
 .../nifi-framework/nifi-cluster/pom.xml |  2 +-
 .../nifi-file-authorization-provider/pom.xml|  4 +-
 .../nifi-framework-core-api/pom.xml |  4 +-
 .../nifi-framework/nifi-framework-core/pom.xml  |  2 +-
 .../nifi-framework/nifi-nar-utils/pom.xml   |  2 +-
 .../nifi-framework/nifi-resources/pom.xml   |  2 +-
 .../nifi-framework/nifi-runtime/pom.xml |  2 +-
 .../nifi-framework/nifi-security/pom.xml|  4 +-
 .../nifi-framework/nifi-site-to-site/pom.xml|  4 +-
 .../nifi-framework/nifi-user-actions/pom.xml|  4 +-
 .../nifi-web/nifi-custom-ui-utilities/pom.xml   |  2 +-
 .../nifi-framework/nifi-web/nifi-jetty/pom.xml  |  2 +-
 .../nifi-web/nifi-web-api/pom.xml   |  4 +-
 .../nifi-web/nifi-web-docs/pom.xml  |  2 +-
 .../nifi-web/nifi-web-error/pom.xml |  2 +-
 .../nifi-web-optimistic-locking/pom.xml |  2 +-
 .../nifi-web/nifi-web-security/pom.xml  |  2 +-
 .../nifi-framework/nifi-web/nifi-web-ui/pom.xml |  2 +-
 .../nifi-framework/nifi-web/pom.xml | 10 +--
 .../nifi-framework/pom.xml  |  4 +-
 .../nifi-framework-bundle/pom.xml   | 36 +--
 .../nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml  |  4 +-
 .../nifi-hdfs-processors/pom.xml|  2 +-
 .../nifi-nar-bundles/nifi-hadoop-bundle/pom.xml |  6 +-
 .../nifi-hadoop-libraries-nar/pom.xml   |  4 +-
 .../nifi-hadoop-libraries-bundle/pom.xml|  4 +-
 nifi/nifi-nar-bundles/nifi-jetty-bundle/pom.xml |  4 +-
 .../nifi-kafka-bundle/nifi-kafka-nar/pom.xml|  4 +-
 .../nifi-kafka-processors/pom.xml   |  2 +-
 nifi/nifi-nar-bundles/nifi-kafka-bundle/pom.xml |  4 +-
 .../pom.xml |  2 +-
 .../nifi-provenance-repository-nar/pom.xml  |  4 +-
 .../nifi-volatile-provenance-repository/pom.xml |  2 +-
 .../nifi-provenance-repository-bundle/pom.xml   |  8 +--
 .../nifi-standard-nar/pom.xml   |  4 +-
 .../nifi-standard-prioritizers/pom.xml  |  2 +-
 .../nifi-standard-processors/pom.xml|  2 +-
 .../nifi-standard-reporting-tasks/pom.xml   |  2 +-
 .../nifi-standard-bundle/pom.xml| 10 +--
 .../pom.xml |  2 +-
 .../pom.xml |  2 +-
 .../nifi-distributed-cache-protocol/pom.xml |  2 +-
 .../nifi-distributed-cache-server/pom.xml   |  2 +-
 .../nifi-distributed-cache-services-nar/pom.xml |  4 +-
 .../pom.xml |  4 +-
 .../nifi-load-distribution-service-api/pom.xml  |  4 +-
 .../nifi-ssl-context-nar/pom.xml|  4 +-
 .../nifi-ssl-context-service/pom.xml|  2 +-
 .../nifi-ssl-context-bundle/pom.xml |  4 +-
 .../nifi-ssl-context-service-api/pom.xml|  2 +-
 .../nifi-standard-services-api-nar/pom.xml  |  4 +-
 .../nifi-standard-services/pom.xml  |  4 +-
 .../nifi-update-attribute-model

[1/8] incubator-nifi git commit: NIFI-270 added rat exclusion

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-270-RC2 [created] 1d198727e


NIFI-270 added rat exclusion


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

Branch: refs/heads/NIFI-270-RC2
Commit: 2a0e33d0121032eff686309a40cdf8d170deb8d1
Parents: cff8b0d
Author: joewitt joew...@apache.org
Authored: Wed Jan 21 08:57:10 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Jan 21 08:57:10 2015 -0500

--
 nifi-nar-maven-plugin/pom.xml | 1 +
 nifi/pom.xml  | 1 +
 2 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2a0e33d0/nifi-nar-maven-plugin/pom.xml
--
diff --git a/nifi-nar-maven-plugin/pom.xml b/nifi-nar-maven-plugin/pom.xml
index cb59c13..e914085 100644
--- a/nifi-nar-maven-plugin/pom.xml
+++ b/nifi-nar-maven-plugin/pom.xml
@@ -208,6 +208,7 @@
 excludes
 excludenb-configuration.xml/exclude
 excludenbactions.xml/exclude
+excludeDEPENDENCIES/exclude
 /excludes
 /configuration
 /plugin

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2a0e33d0/nifi/pom.xml
--
diff --git a/nifi/pom.xml b/nifi/pom.xml
index 4237cc2..825ce45 100644
--- a/nifi/pom.xml
+++ b/nifi/pom.xml
@@ -966,6 +966,7 @@
 excludesrc/test/resources//exclude !-- Test 
datasets --
 excludenb-configuration.xml/exclude
 excludenbactions.xml/exclude
+excludeDEPENDENCIES/exclude
 /excludes
 /configuration
 /plugin



[4/8] incubator-nifi git commit: NIFI-270 doing RC2

2015-01-21 Thread joewitt
NIFI-270 doing RC2


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

Branch: refs/heads/NIFI-270-RC2
Commit: 58f0a6cc4c75835df27b4a92f80cd75ffdc8dbf8
Parents: 1ce1458
Author: joewitt joew...@apache.org
Authored: Wed Jan 21 09:00:30 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Jan 21 09:00:30 2015 -0500

--
 nifi/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/58f0a6cc/nifi/pom.xml
--
diff --git a/nifi/pom.xml b/nifi/pom.xml
index 825ce45..7b2815d 100644
--- a/nifi/pom.xml
+++ b/nifi/pom.xml
@@ -973,7 +973,7 @@
 plugin
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-nar-maven-plugin/artifactId
-version1.0.0-incubating-SNAPSHOT/version
+version1.0.0-incubating/version
 extensionstrue/extensions
 /plugin
 /plugins



[3/8] incubator-nifi git commit: NIFI-270 prepare for next development iteration

2015-01-21 Thread joewitt
NIFI-270 prepare for next development iteration


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

Branch: refs/heads/NIFI-270-RC2
Commit: 1ce1458801fec8747f8008e07e2cf3ee61d77e9d
Parents: ad8a505
Author: joewitt joew...@apache.org
Authored: Wed Jan 21 08:58:38 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Jan 21 08:58:38 2015 -0500

--
 nifi-nar-maven-plugin/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1ce14588/nifi-nar-maven-plugin/pom.xml
--
diff --git a/nifi-nar-maven-plugin/pom.xml b/nifi-nar-maven-plugin/pom.xml
index 100e847..4a0ab89 100644
--- a/nifi-nar-maven-plugin/pom.xml
+++ b/nifi-nar-maven-plugin/pom.xml
@@ -24,7 +24,7 @@
 /parent
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-nar-maven-plugin/artifactId
-version1.0.0-incubating/version
+version1.0.1-incubating-SNAPSHOT/version
 packagingmaven-plugin/packaging
 descriptionApache NiFi Nar Plugin. It is currently a part of the Apache 
Incubator./description
 urlhttp://nifi.incubator.apache.org/maven-site//url
@@ -58,7 +58,7 @@
 
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
-tagnifi-nar-maven-plugin-1.0.0-incubating-RC2/tag
+tagHEAD/tag
 /scm
 issueManagement
 systemJIRA/system



Git Push Summary

2015-01-21 Thread joewitt
Repository: incubator-nifi
Updated Tags:  refs/tags/nifi-nar-maven-plugin-1.0.0-incubating-RC1 [deleted] 
faa150cf8


[5/8] incubator-nifi git commit: NIFI-270 prepare release nifi-0.0.1-incubating-RC2

2015-01-21 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8086322f/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-nar/pom.xml
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-nar/pom.xml
 
b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-nar/pom.xml
index 0941cd9..a3e3fc9 100644
--- 
a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-nar/pom.xml
+++ 
b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-nar/pom.xml
@@ -17,10 +17,10 @@
 parent
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-update-attribute-bundle/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 /parent
 artifactIdnifi-update-attribute-nar/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 packagingnar/packaging
 
 dependencies

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8086322f/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/pom.xml
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/pom.xml
 
b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/pom.xml
index a39ab34..64215c6 100644
--- 
a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/pom.xml
+++ 
b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/pom.xml
@@ -18,7 +18,7 @@
 parent
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-update-attribute-bundle/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 /parent
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-update-attribute-processor/artifactId

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8086322f/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
 
b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
index e1962d2..70aefc6 100644
--- 
a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
+++ 
b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
@@ -18,7 +18,7 @@
 parent
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-update-attribute-bundle/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 /parent
 artifactIdnifi-update-attribute-ui/artifactId
 packagingwar/packaging

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8086322f/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/pom.xml
--
diff --git a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/pom.xml 
b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/pom.xml
index ef74687..e20e77b 100644
--- a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/pom.xml
@@ -18,11 +18,11 @@
 parent
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-nar-bundles/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 /parent
 
 artifactIdnifi-update-attribute-bundle/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 packagingpom/packaging
 
 modules
@@ -37,18 +37,18 @@
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-update-attribute-model/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-update-attribute-processor/artifactId
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 /dependency
 dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-update-attribute-ui/artifactId
 typewar/type
-version0.0.1-incubating-SNAPSHOT/version
+version0.0.1-incubating/version
 /dependency
 /dependencies
 /dependencyManagement

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8086322f/nifi/nifi-nar-bundles/pom.xml
--
diff --git a/nifi/nifi-nar-bundles/pom.xml 

svn commit: r937111 - /websites/production/nifi/content/

2015-01-21 Thread joewitt
Author: joewitt
Date: Wed Jan 21 14:12:58 2015
New Revision: 937111

Log:
Publishing svnmucc operation to nifi site by joewitt

Added:
websites/production/nifi/content/
  - copied from r937110, websites/staging/nifi/trunk/content/



svn commit: r1653538 - /incubator/nifi/site/trunk/content/development/quickstart.md

2015-01-21 Thread joewitt
Author: joewitt
Date: Wed Jan 21 14:06:16 2015
New Revision: 1653538

URL: http://svn.apache.org/r1653538
Log:
updated to reflect nifi- dir structure

Modified:
incubator/nifi/site/trunk/content/development/quickstart.md

Modified: incubator/nifi/site/trunk/content/development/quickstart.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/quickstart.md?rev=1653538r1=1653537r2=1653538view=diff
==
--- incubator/nifi/site/trunk/content/development/quickstart.md (original)
+++ incubator/nifi/site/trunk/content/development/quickstart.md Wed Jan 21 
14:06:16 2015
@@ -36,7 +36,7 @@ Then checkout the 'develop' branch
 
 1. You need a recent Java 7 (or newer) JDK.
 2. You need Apache [Maven 3.X][maven]. We've successfully used 3.2.3 and as 
far back as 3.0.5
-3. Build the maven plugins.  In the root dir of the source tree cd to 
`nar-maven-plugin`.
+3. Build the maven plugins.  In the root dir of the source tree cd to 
`nifi-nar-maven-plugin`.
Run `mvn clean install`
 4. Build the entire code base.  In the root dir of the source tree cd to 
`nifi` and run `mvn -T C2.0 clean install`
You can tweak the maven build settings as you like but the previous command 
will execute with 2 threads per core.
@@ -54,7 +54,7 @@ to 8080 is a good start, but on systems
 
  Decompress and launch
 
-Running the above build will create a tar.gz (and zip) file in 
`nifi/assembly/target`. This tar.gz should
+Running the above build will create a tar.gz (and zip) file in 
`nifi/nifi-assembly/target`. This tar.gz should
 contain the full application. Decompressing the tar.gz should make a directory 
for you containing several other
 directories. `conf` contains application configuration, `bin` contains scripts
 for launching the application. On linux and OSX, NiFi can be run using 
`bin/nifi.sh command` where




svn commit: r937109 - /websites/production/nifi/content/

2015-01-21 Thread joewitt
Author: joewitt
Date: Wed Jan 21 14:06:36 2015
New Revision: 937109

Log:
Publishing svnmucc operation to nifi site by joewitt

Added:
websites/production/nifi/content/
  - copied from r937108, websites/staging/nifi/trunk/content/



svn commit: r1653540 - /incubator/nifi/site/trunk/content/development/release-guide.md

2015-01-21 Thread joewitt
Author: joewitt
Date: Wed Jan 21 14:12:35 2015
New Revision: 1653540

URL: http://svn.apache.org/r1653540
Log:
added nifi- to a bunch of places.  not all

Modified:
incubator/nifi/site/trunk/content/development/release-guide.md

Modified: incubator/nifi/site/trunk/content/development/release-guide.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/release-guide.md?rev=1653540r1=1653539r2=1653540view=diff
==
--- incubator/nifi/site/trunk/content/development/release-guide.md (original)
+++ incubator/nifi/site/trunk/content/development/release-guide.md Wed Jan 21 
14:12:35 2015
@@ -64,17 +64,17 @@ There are two lists here: one of specifi
 - Specifically look in the *-sources.zip artifact and ensure these items 
are present at the root of the archive.
   - Evaluate the sources and dependencies.  Does the overall LICENSE and 
NOTICE appear correct?  Do all licenses fit within the ASF approved licenses?
 - Here is an example path to a sources artifact:  
-  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nar-maven-plugin/0.0.1-incubating/nar-maven-plugin-0.0.1-incubating-source-release.zip`
+  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nifi-nar-maven-plugin/0.0.1-incubating/nifi-nar-maven-plugin-0.0.1-incubating-source-release.zip`
   - Is there a README available that explains how to build the application and 
to execute it?
 - Look in the *-sources.zip artifact root for the readme.
   - Are the signatures and hashes correct for the source release?
 - Validate the hashes of the sources artifact do in fact match:
-  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nar-maven-plugin/0.0.1-incubating/nar-maven-plugin-0.0.1-incubating-source-release.zip.md5`
-  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nar-maven-plugin/0.0.1-incubating/nar-maven-plugin-0.0.1-incubating-source-release.zip.sha1`
+  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nifi-nar-maven-plugin/0.0.1-incubating/nifi-nar-maven-plugin-0.0.1-incubating-source-release.zip.md5`
+  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nifi-nar-maven-plugin/0.0.1-incubating/nifi-nar-maven-plugin-0.0.1-incubating-source-release.zip.sha1`
 - Validate the signatures of the sources artifact and of each of the 
hashes.  Here are example paths:
-  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nar-maven-plugin/0.0.1-incubating/nar-maven-plugin-0.0.1-incubating-source-release.zip.asc`
-  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nar-maven-plugin/0.0.1-incubating/nar-maven-plugin-0.0.1-incubating-source-release.zip.asc.md5`
-  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nar-maven-plugin/0.0.1-incubating/nar-maven-plugin-0.0.1-incubating-source-release.zip.asc.sha1`
+  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nifi-nar-maven-plugin/0.0.1-incubating/nifi-nar-maven-plugin-0.0.1-incubating-source-release.zip.asc`
+  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nifi-nar-maven-plugin/0.0.1-incubating/nifi-nar-maven-plugin-0.0.1-incubating-source-release.zip.asc.md5`
+  - 
`https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nifi-nar-maven-plugin/0.0.1-incubating/nifi-nar-maven-plugin-0.0.1-incubating-source-release.zip.asc.sha1`
   - Need a quick reminder on how to [verify a 
signature](http://www.apache.org/dev/release-signing.html#verifying-signature)?
   - Do all sources have necessary headers?
 - Unzip the sources file into a directory and execute `mvn install 
-Pcheck-licenses`
@@ -111,7 +111,7 @@ Create the next version in JIRA if neces
 Create new branch off develop named after the JIRA ticket or just use the 
develop branch itself.  Here we'll use a branch off of develop with
 `git checkout -b NIFI-270`
 
-Change directory into that of the project you wish to release.  For example 
either `cd nifi` or `cd nar-maven-plugin`
+Change directory into that of the project you wish to release.  For example 
either `cd nifi` or `cd nifi-nar-maven-plugin`
 
 Verify that Maven has sufficient heap space to perform the build tasks.  Some 
plugins and parts of the build 
 consumes a surprisingly large amount of space.  These settings have been shown 
to 
@@ -150,18 +150,18 @@ This command `mvn install -Pcheck

svn commit: r936680 - /websites/production/nifi/content/

2015-01-18 Thread joewitt
Author: joewitt
Date: Sun Jan 18 19:59:59 2015
New Revision: 936680

Log:
Publishing svnmucc operation to nifi site by joewitt

Added:
websites/production/nifi/content/
  - copied from r936679, websites/staging/nifi/trunk/content/



svn commit: r1652824 - /incubator/nifi/site/trunk/content/development/release-guide.md

2015-01-18 Thread joewitt
Author: joewitt
Date: Sun Jan 18 18:30:17 2015
New Revision: 1652824

URL: http://svn.apache.org/r1652824
Log:
CMS commit to nifi by joewitt

Modified:
incubator/nifi/site/trunk/content/development/release-guide.md

Modified: incubator/nifi/site/trunk/content/development/release-guide.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/release-guide.md?rev=1652824r1=1652823r2=1652824view=diff
==
--- incubator/nifi/site/trunk/content/development/release-guide.md (original)
+++ incubator/nifi/site/trunk/content/development/release-guide.md Sun Jan 18 
18:30:17 2015
@@ -24,23 +24,23 @@ capacity of a [Release Manager][release-
 
 ## Background Material
 
-- These documents are necessary for all committers to be familiar with
- - [Apache License V2.0][apache-license]
- - [Apache Legal License/Resolved][apache-legal-resolve]
- - [Apache How-to Apply License][apache-license-apply]
-
-- These documents are necessary for someone acting as the RM
- - [Apache Encryption Software / ECCN Info][apache-encryption]
- - [Apache Release Policy][apache-release-policy]
- - [Apache Release Guide][apache-release-guide]
- - [Apache Incubator Release Guide][apache-incubator-release-guide]
- - [another Apache Incubator Release 
Guide][another-apache-incubator-release-guide]
- - [Apache Incubator Policy][apache-incubator-policy]
-
-- These documents are helpful for general environmental setup to perform 
releases
- - [Apache PGP Info][apache-pgp]
- - [Apache Release Signing][apache-release-signing]
- - [Apache Guide to publish Maven Artifacts][apache-guide-publish-maven]
+  - These documents are necessary for all committers to be familiar with
+- [Apache License V2.0][apache-license]
+- [Apache Legal License/Resolved][apache-legal-resolve]
+- [Apache How-to Apply License][apache-license-apply]
+
+  - These documents are necessary for someone acting as the RM
+- [Apache Encryption Software / ECCN Info][apache-encryption]
+- [Apache Release Policy][apache-release-policy]
+- [Apache Release Guide][apache-release-guide]
+- [Apache Incubator Release Guide][apache-incubator-release-guide]
+- [another Apache Incubator Release 
Guide][another-apache-incubator-release-guide]
+- [Apache Incubator Policy][apache-incubator-policy]
+
+  - These documents are helpful for general environmental setup to perform 
releases
+- [Apache PGP Info][apache-pgp]
+- [Apache Release Signing][apache-release-signing]
+- [Apache Guide to publish Maven Artifacts][apache-guide-publish-maven]
 
 ## The Objective
 




svn commit: r1652823 - /incubator/nifi/site/trunk/content/development/release-guide.md

2015-01-18 Thread joewitt
Author: joewitt
Date: Sun Jan 18 18:20:19 2015
New Revision: 1652823

URL: http://svn.apache.org/r1652823
Log:
initial stub of a release guide / checkpoint checkin

Added:
incubator/nifi/site/trunk/content/development/release-guide.md

Added: incubator/nifi/site/trunk/content/development/release-guide.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/release-guide.md?rev=1652823view=auto
==
--- incubator/nifi/site/trunk/content/development/release-guide.md (added)
+++ incubator/nifi/site/trunk/content/development/release-guide.md Sun Jan 18 
18:20:19 2015
@@ -0,0 +1,68 @@
+Title:
+Notice: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.
+
+# img alt=NiFi logo style=float: right 
src=/images/niFi-logo-horizontal.png / Apache NiFi Release Guide
+
+The purpose of this document is to capture and describe the steps involved in 
producing 
+an official release of Apache NiFi.  It is written specifically to someone 
acting in the
+capacity of a [Release Manager][release-manager] (RM).  
+
+## Background Material
+
+- These documents are necessary for all committers to be familiar with
+ - [Apache License V2.0][apache-license]
+ - [Apache Legal License/Resolved][apache-legal-resolve]
+ - [Apache How-to Apply License][apache-license-apply]
+
+- These documents are necessary for someone acting as the RM
+ - [Apache Encryption Software / ECCN Info][apache-encryption]
+ - [Apache Release Policy][apache-release-policy]
+ - [Apache Release Guide][apache-release-guide]
+ - [Apache Incubator Release Guide][apache-incubator-release-guide]
+ - [another Apache Incubator Release 
Guide][another-apache-incubator-release-guide]
+ - [Apache Incubator Policy][apache-incubator-policy]
+
+- These documents are helpful for general environmental setup to perform 
releases
+ - [Apache PGP Info][apache-pgp]
+ - [Apache Release Signing][apache-release-signing]
+ - [Apache Guide to publish Maven Artifacts][apache-guide-publish-maven]
+
+## The Objective
+
+So with all the background material in mind and with the intent to perform
+a release established it is important to acknkowledge the objective here.
+The aim is to produce an official Apache release.  That means producing a 
legally
+valid and signed bundle of source code which one can download and build for 
themselves.
+The other items like prebuilt binaries of the full application are not the 
official
+release artifact they are conveniences for users who cannot readily build the 
application
+themselves.  The same is true then of maven artifacts published to Apache or
+mirrored artifact repositories.
+
+[release-manager]: 
http://www.apache.org/dev/release-publishing.html#release_manager
+[apache-license]: http://apache.org/licenses/LICENSE-2.0
+[apache-license-apply]: http://www.apache.org/dev/apply-license.html
+[apache-legal-resolve]: http://www.apache.org/legal/resolved.html
+[apache-encryption]: http://www.apache.org/licenses/exports/
+[apache-release-policy]: http://www.apache.org/dev/release.html
+[apache-release-guide]: http://www.apache.org/dev/release-publishing
+[apache-incubator-release-guide]: 
http://incubator.apache.org/guides/releasemanagement.html
+[another-apache-incubator-release-guide]: 
http://incubator.apache.org/guides/release.html
+[apache-incubator-policy]: 
http://incubator.apache.org/incubation/Incubation_Policy.html
+[apache-pgp]: http://www.apache.org/dev/openpgp.html
+[apache-release-signing]: http://www.apache.org/dev/release-signing.html
+[apache-guide-publish-maven]: 
http://www.apache.org/dev/publishing-maven-artifacts.html
\ No newline at end of file




svn commit: r936684 - /websites/production/nifi/content/

2015-01-18 Thread joewitt
Author: joewitt
Date: Sun Jan 18 20:11:06 2015
New Revision: 936684

Log:
Publishing svnmucc operation to nifi site by joewitt

Added:
websites/production/nifi/content/
  - copied from r936683, websites/staging/nifi/trunk/content/



svn commit: r1652844 - /incubator/nifi/site/trunk/templates/nav.html

2015-01-18 Thread joewitt
Author: joewitt
Date: Sun Jan 18 20:09:50 2015
New Revision: 1652844

URL: http://svn.apache.org/r1652844
Log:
added link to release guide

Modified:
incubator/nifi/site/trunk/templates/nav.html

Modified: incubator/nifi/site/trunk/templates/nav.html
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/templates/nav.html?rev=1652844r1=1652843r2=1652844view=diff
==
--- incubator/nifi/site/trunk/templates/nav.html (original)
+++ incubator/nifi/site/trunk/templates/nav.html Sun Jan 18 20:09:50 2015
@@ -40,6 +40,7 @@
 a href=# class=dropdown-toggle data-toggle=dropdown 
role=button aria-expanded=falseDevelopmentspan class=caret/span/a
 ul class=dropdown-menu role=menu
 lia 
href=/development/quickstart.htmlQuickstart/a/li
+   lia 
href=/development/release-guide.htmlRelease Guide/a/li
 lia 
href=https://git-wip-us.apache.org/repos/asf/incubator-nifi.git;span 
class=glyphicon glyphicon-link aria-hidden=true/span Source/a/li
 li class=divider/li
 li class=dropdown-headerTools/li




svn commit: r1652843 - /incubator/nifi/site/trunk/content/development/release-guide.md

2015-01-18 Thread joewitt
Author: joewitt
Date: Sun Jan 18 20:07:41 2015
New Revision: 1652843

URL: http://svn.apache.org/r1652843
Log:
making progress - still a long ways to go

Modified:
incubator/nifi/site/trunk/content/development/release-guide.md

Modified: incubator/nifi/site/trunk/content/development/release-guide.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/release-guide.md?rev=1652843r1=1652842r2=1652843view=diff
==
--- incubator/nifi/site/trunk/content/development/release-guide.md (original)
+++ incubator/nifi/site/trunk/content/development/release-guide.md Sun Jan 18 
20:07:41 2015
@@ -42,16 +42,31 @@ capacity of a [Release Manager][release-
 - [Apache Release Signing][apache-release-signing]
 - [Apache Guide to publish Maven Artifacts][apache-guide-publish-maven]
 
-## The Objective
+## The objective
+
+Our aim is to produce and official Apache release.  
+The following is a list of the sorts of things that will be validated:
+
+  - Do the resulting artifacts have 'incubating' in the name?
+  - Is the LICENSE and NOTICE file present in the source root and complete?
+  - Is the DISCLAIMER present with the LICENSE and NOTICE?
+  - Is there a README available that explains how to build the application and 
to execute it?
+  - Are the signatures and hashes correct for the source release?
+  - Do all sources have necessary headers?
+  - Are there no unexpected binary files in the release?
+  - Can one compile and run the application with tests from the source bundle?
+  
+## The flow of a release (an outline)
+  - The community is contributing to a series of JIRA tickets assigned to the 
next release
+  - The number of tickets open/remaining for that next release approaches zero
+  - A member of the community suggests a release and initiates a discussion
+  - Someone volunteers to be an RM for the release (can be a committer but 
apache guides indicate preference is a PPMC member)
+  - A release candidate is put together and a vote sent to the team.
+  - If the team rejects the vote the issues noted are resolved and another RC 
is generated
+  - Once a vote is accepted within the NiFi PPMC for a release candidate then 
the vote is sent to the IPMC
+  - If the IPMC rejects the vote then the issues are resolved and a new RC 
prepared and voted upon within the PPMC
+  - If the IPMC accepts the vote then the release is 'releasable' and can be 
placed into the appropriate 'dist' location, maven artifacts released from 
staging.
 
-So with all the background material in mind and with the intent to perform
-a release established it is important to acknkowledge the objective here.
-The aim is to produce an official Apache release.  That means producing a 
legally
-valid and signed bundle of source code which one can download and build for 
themselves.
-The other items like prebuilt binaries of the full application are not the 
official
-release artifact they are conveniences for users who cannot readily build the 
application
-themselves.  The same is true then of maven artifacts published to Apache or
-mirrored artifact repositories.
 
 [release-manager]: 
http://www.apache.org/dev/release-publishing.html#release_manager
 [apache-license]: http://apache.org/licenses/LICENSE-2.0




[01/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop ad74a4304 - 300952a98


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
deleted file mode 100644
index 071be4d..000
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
+++ /dev/null
@@ -1,1243 +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.controller;
-
-import org.apache.nifi.controller.ProcessScheduler;
-import org.apache.nifi.controller.ValidationContextFactory;
-import org.apache.nifi.controller.ProcessorNode;
-import static java.util.Objects.requireNonNull;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.nifi.components.ValidationContext;
-import org.apache.nifi.components.ValidationResult;
-import org.apache.nifi.connectable.Connectable;
-import org.apache.nifi.connectable.ConnectableType;
-import org.apache.nifi.connectable.Connection;
-import org.apache.nifi.connectable.Position;
-import org.apache.nifi.controller.service.ControllerServiceProvider;
-import org.apache.nifi.groups.ProcessGroup;
-import org.apache.nifi.logging.LogLevel;
-import org.apache.nifi.logging.LogRepositoryFactory;
-import org.apache.nifi.nar.NarCloseable;
-import org.apache.nifi.processor.ProcessContext;
-import org.apache.nifi.processor.ProcessSessionFactory;
-import org.apache.nifi.processor.Processor;
-import org.apache.nifi.processor.Relationship;
-import org.apache.nifi.processor.annotation.CapabilityDescription;
-import org.apache.nifi.processor.annotation.EventDriven;
-import org.apache.nifi.processor.annotation.SideEffectFree;
-import org.apache.nifi.processor.annotation.SupportsBatching;
-import org.apache.nifi.processor.annotation.TriggerSerially;
-import org.apache.nifi.processor.annotation.TriggerWhenAnyDestinationAvailable;
-import org.apache.nifi.processor.annotation.TriggerWhenEmpty;
-import org.apache.nifi.scheduling.SchedulingStrategy;
-import org.apache.nifi.util.FormatUtils;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.quartz.CronExpression;
-import org.slf4j.LoggerFactory;
-
-/**
- * ProcessorNode provides thread-safe access to a FlowFileProcessor as it 
exists
- * within a controlled flow. This node keeps track of the processor, its
- * scheduling information and its relationships to other processors and 
whatever
- * scheduled futures exist for it. Must be thread safe.
- *
- * @author none
- */
-public class StandardProcessorNode extends ProcessorNode implements 
Connectable {
-
-public static final String BULLETIN_OBSERVER_ID = bulletin-observer;
-
-public static final TimeUnit DEFAULT_TIME_UNIT = TimeUnit.MILLISECONDS;
-public static final String DEFAULT_YIELD_PERIOD = 1 sec;
-public static final String DEFAULT_PENALIZATION_PERIOD = 30 sec;
-private final AtomicReferenceProcessGroup processGroup;
-private final Processor processor;
-private final AtomicReferenceString identifier;
-private final MapConnection, Connectable destinations;
-private final MapRelationship, SetConnection connections;
-private final AtomicReferenceSetRelationship 
undefinedRelationshipsToTerminate;
-

[13/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
 
b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
deleted file mode 100644
index 511bb7d..000
--- 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
+++ /dev/null
@@ -1,3620 +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.cluster.manager.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import java.util.Queue;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.TreeMap;
-import java.util.UUID;
-import java.util.concurrent.CompletionService;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ExecutorCompletionService;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.regex.Pattern;
-
-import javax.net.ssl.SSLContext;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.StreamingOutput;
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-
-import org.apache.nifi.admin.service.AuditService;
-import org.apache.nifi.cluster.BulletinsPayload;
-import org.apache.nifi.cluster.ClusterNodeInformation;
-import org.apache.nifi.cluster.HeartbeatPayload;
-import org.apache.nifi.cluster.NodeInformation;
-import org.apache.nifi.cluster.context.ClusterContext;
-import org.apache.nifi.cluster.context.ClusterContextImpl;
-import org.apache.nifi.cluster.event.Event;
-import org.apache.nifi.cluster.event.EventManager;
-import org.apache.nifi.cluster.firewall.ClusterNodeFirewall;
-import org.apache.nifi.cluster.flow.ClusterDataFlow;
-import org.apache.nifi.cluster.flow.DaoException;
-import org.apache.nifi.cluster.flow.DataFlowManagementService;
-import org.apache.nifi.cluster.flow.PersistedFlowState;
-import org.apache.nifi.cluster.manager.HttpClusterManager;
-import org.apache.nifi.cluster.manager.HttpRequestReplicator;
-import org.apache.nifi.cluster.manager.HttpResponseMapper;
-import org.apache.nifi.cluster.manager.NodeResponse;
-import 
org.apache.nifi.cluster.manager.exception.ConnectingNodeMutableRequestException;
-import 
org.apache.nifi.cluster.manager.exception.DisconnectedNodeMutableRequestException;
-import org.apache.nifi.cluster.manager.exception.IllegalClusterStateException;
-import org.apache.nifi.cluster.manager.exception.IllegalNodeDeletionException;
-import 
org.apache.nifi.cluster.manager.exception.IllegalNodeDisconnectionException;
-import 
org.apache.nifi.cluster.manager.exception.IllegalNodeReconnectionException;
-import 
org.apache.nifi.cluster.manager.exception.IneligiblePrimaryNodeException;
-import org.apache.nifi.cluster.manager.exception.NoConnectedNodesException;
-import org.apache.nifi.cluster.manager.exception.NoResponseFromNodesException;
-import org.apache.nifi.cluster.manager.exception.NodeDisconnectionException;
-import 

[39/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
--
diff --git 
a/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
 
b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
deleted file mode 100644
index 5810488..000
--- 
a/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
+++ /dev/null
@@ -1,602 +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.remote.io.socket.ssl;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketTimeoutException;
-import java.nio.ByteBuffer;
-import java.nio.channels.ClosedByInterruptException;
-import java.nio.channels.SocketChannel;
-import java.util.concurrent.TimeUnit;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLEngine;
-import javax.net.ssl.SSLEngineResult;
-import javax.net.ssl.SSLEngineResult.Status;
-import javax.net.ssl.SSLHandshakeException;
-import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.security.cert.CertificateExpiredException;
-import javax.security.cert.CertificateNotYetValidException;
-import javax.security.cert.X509Certificate;
-
-import org.apache.nifi.remote.exception.TransmissionDisabledException;
-import org.apache.nifi.remote.io.socket.BufferStateManager;
-import org.apache.nifi.remote.io.socket.BufferStateManager.Direction;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SSLSocketChannel implements Closeable {
-
-public static final int MAX_WRITE_SIZE = 65536;
-
-private static final Logger logger = 
LoggerFactory.getLogger(SSLSocketChannel.class);
-private static final long BUFFER_FULL_EMPTY_WAIT_NANOS = 
TimeUnit.NANOSECONDS.convert(10, TimeUnit.MILLISECONDS);
-
-private final String hostname;
-private final int port;
-private final SSLEngine engine;
-private final SocketAddress socketAddress;
-
-private BufferStateManager streamInManager;
-private BufferStateManager streamOutManager;
-private BufferStateManager appDataManager;
-
-private SocketChannel channel;
-
-private final byte[] oneByteBuffer = new byte[1];
-
-private int timeoutMillis = 3;
-private volatile boolean connected = false;
-private boolean handshaking = false;
-private boolean closed = false;
-private volatile boolean interrupted = false;
-
-public SSLSocketChannel(final SSLContext sslContext, final String 
hostname, final int port, final boolean client) throws IOException {
-this.socketAddress = new InetSocketAddress(hostname, port);
-this.channel = SocketChannel.open();
-this.hostname = hostname;
-this.port = port;
-this.engine = sslContext.createSSLEngine();
-this.engine.setUseClientMode(client);
-engine.setNeedClientAuth(true);
-
-streamInManager = new 
BufferStateManager(ByteBuffer.allocate(engine.getSession().getPacketBufferSize()));
-streamOutManager = new 
BufferStateManager(ByteBuffer.allocate(engine.getSession().getPacketBufferSize()));
-appDataManager = new 
BufferStateManager(ByteBuffer.allocate(engine.getSession().getApplicationBufferSize()));
-}
-
-public SSLSocketChannel(final SSLContext sslContext, final SocketChannel 
socketChannel, final boolean client) throws IOException {
-if (!socketChannel.isConnected()) {
-throw new IllegalArgumentException(Cannot pass an un-connected 
SocketChannel);
-}
-
-this.channel = socketChannel;
-
-this.socketAddress = socketChannel.getRemoteAddress();
-final Socket socket = socketChannel.socket();
-this.hostname = socket.getInetAddress().getHostName();
-this.port = socket.getPort();
-
-this.engine = sslContext.createSSLEngine();
-this.engine.setUseClientMode(client);
-engine.setNeedClientAuth(true);
-
-streamInManager = 

[24/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SnippetDTO.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SnippetDTO.java
 
b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SnippetDTO.java
deleted file mode 100644
index 2ee1310..000
--- 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SnippetDTO.java
+++ /dev/null
@@ -1,239 +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.web.api.dto;
-
-import java.util.HashSet;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * The contents of a snippet of a flow.
- */
-@XmlType(name = snippet)
-public class SnippetDTO {
-
-private String id;
-private String uri;
-private String parentGroupId;
-private Boolean linked;
-
-// when specified these are only considered during creation
-private SetString processGroups = new HashSet();
-private SetString remoteProcessGroups = new HashSet();
-private SetString processors = new HashSet();
-private SetString inputPorts = new HashSet();
-private SetString outputPorts = new HashSet();
-private SetString connections = new HashSet();
-private SetString labels = new HashSet();
-private SetString funnels = new HashSet();
-
-private FlowSnippetDTO contents;
-
-/**
- * The id of this snippet.
- *
- * @return
- */
-public String getId() {
-return id;
-}
-
-public void setId(String id) {
-this.id = id;
-}
-
-/**
- * The uri of this snippet.
- *
- * @return
- */
-public String getUri() {
-return uri;
-}
-
-public void setUri(String uri) {
-this.uri = uri;
-}
-
-/**
- * The group id for the components in this snippet.
- *
- * @return
- */
-public String getParentGroupId() {
-return parentGroupId;
-}
-
-public void setParentGroupId(String parentGroupId) {
-this.parentGroupId = parentGroupId;
-}
-
-/**
- * Whether or not this snippet is linked to the underlying data flow.
- *
- * @return
- */
-public Boolean isLinked() {
-return linked;
-}
-
-public void setLinked(Boolean linked) {
-this.linked = linked;
-}
-
-/**
- * The ids of the connections in this snippet. These ids will be populated
- * within each response. They can be specified when creating a snippet.
- * However, once a snippet has been created its contents cannot be modified
- * (these ids are ignored during update requests).
- *
- * @return
- */
-public SetString getConnections() {
-return connections;
-}
-
-public void setConnections(SetString connections) {
-this.connections = connections;
-}
-
-/**
- * The ids of the funnels in this snippet. These ids will be populated
- * within each response. They can be specified when creating a snippet.
- * However, once a snippet has been created its contents cannot be modified
- * (these ids are ignored during update requests).
- *
- * @param funnels
- */
-public SetString getFunnels() {
-return funnels;
-}
-
-public void setFunnels(SetString funnels) {
-this.funnels = funnels;
-}
-
-/**
- * The ids of the input port in this snippet. These ids will be populated
- * within each response. They can be specified when creating a snippet.
- * However, once a snippet has been created its contents cannot be modified
- * (these ids are ignored during update requests).
- *
- * @return
- */
-public SetString getInputPorts() {
-return inputPorts;
-}
-
-public void setInputPorts(SetString inputPorts) {
-this.inputPorts = inputPorts;
-}
-
-/**
- * The ids of the labels in this snippet. These ids will be populated 
within
- * each response. They can be 

[16/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/testutils/ReflexiveProtocolHandler.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/testutils/ReflexiveProtocolHandler.java
 
b/nar-bundles/framework-bundle/framework/cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/testutils/ReflexiveProtocolHandler.java
deleted file mode 100644
index 4e3b932..000
--- 
a/nar-bundles/framework-bundle/framework/cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/testutils/ReflexiveProtocolHandler.java
+++ /dev/null
@@ -1,47 +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.cluster.protocol.impl.testutils;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.nifi.cluster.protocol.ProtocolException;
-import org.apache.nifi.cluster.protocol.ProtocolHandler;
-import org.apache.nifi.cluster.protocol.message.ProtocolMessage;
-
-/**
- * @author unattributed
- */
-public class ReflexiveProtocolHandler implements ProtocolHandler {
-
-private ListProtocolMessage messages = new ArrayList();
-
-@Override
-public ProtocolMessage handle(ProtocolMessage msg) throws 
ProtocolException {
-messages.add(msg);
-return msg;
-}
-
-@Override
-public boolean canHandle(ProtocolMessage msg) {
-return true;
-}
-
-public ListProtocolMessage getMessages() {
-return messages;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster-web/.gitignore
--
diff --git a/nar-bundles/framework-bundle/framework/cluster-web/.gitignore 
b/nar-bundles/framework-bundle/framework/cluster-web/.gitignore
deleted file mode 100755
index ea8c4bf..000
--- a/nar-bundles/framework-bundle/framework/cluster-web/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster-web/pom.xml
--
diff --git a/nar-bundles/framework-bundle/framework/cluster-web/pom.xml 
b/nar-bundles/framework-bundle/framework/cluster-web/pom.xml
deleted file mode 100644
index a7c39c6..000
--- a/nar-bundles/framework-bundle/framework/cluster-web/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-?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.nifi/groupId
-artifactIdnifi-framework-parent/artifactId
-version0.0.1-SNAPSHOT/version
-/parent
-artifactIdframework-cluster-web/artifactId
-packagingjar/packaging
-nameNiFi Framework Cluster Web/name
-descriptionThe clustering software for communicating with the NiFi web 
api./description
-dependencies
-dependency
-groupIdorg.apache.nifi/groupId
-

[36/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
--
diff --git 
a/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
 
b/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
deleted file mode 100644
index f576e94..000
--- 
a/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java
+++ /dev/null
@@ -1,71 +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.util.file.monitor;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.file.Path;
-import java.util.UUID;
-
-
-import org.junit.Test;
-
-public class TestCompoundUpdateMonitor {
-
-@Test
-public void test() throws IOException {
-final UpdateMonitor lastModified = new LastModifiedMonitor();
-final MD5SumMonitor md5 = new MD5SumMonitor();
-final CompoundUpdateMonitor compound = new 
CompoundUpdateMonitor(lastModified, md5);
-
-final File file = new File(target/ + UUID.randomUUID().toString());
-if (file.exists()) {
-assertTrue(file.delete());
-}
-assertTrue(file.createNewFile());
-
-final Path path = file.toPath();
-
-final Object curState = compound.getCurrentState(path);
-final Object state2 = compound.getCurrentState(path);
-
-assertEquals(curState, state2);
-file.setLastModified(System.currentTimeMillis() + 1000L);
-final Object state3 = compound.getCurrentState(path);
-assertEquals(state2, state3);
-
-final Object state4 = compound.getCurrentState(path);
-assertEquals(state3, state4);
-
-final long lastModifiedDate = file.lastModified();
-try (final OutputStream out = new FileOutputStream(file)) {
-out.write(Hello.getBytes(UTF-8));
-}
-
-file.setLastModified(lastModifiedDate);
-
-final Object state5 = compound.getCurrentState(path);
-assertNotSame(state4, state5);
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
--
diff --git 
a/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
 
b/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
deleted file mode 100644
index 7125581..000
--- 
a/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java
+++ /dev/null
@@ -1,61 +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.util.file.monitor;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.nio.file.Files;
-import java.nio.file.Path;

[15/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java
 
b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java
deleted file mode 100644
index 72b594a..000
--- 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java
+++ /dev/null
@@ -1,600 +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.cluster.flow.impl;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import java.util.UUID;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.commons.compress.archivers.ArchiveEntry;
-import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
-import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
-import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
-import org.apache.nifi.cluster.flow.ClusterDataFlow;
-import org.apache.nifi.cluster.flow.DaoException;
-import org.apache.nifi.cluster.flow.DataFlowDao;
-import org.apache.nifi.cluster.flow.PersistedFlowState;
-import org.apache.nifi.cluster.protocol.DataFlow;
-import org.apache.nifi.cluster.protocol.NodeIdentifier;
-import org.apache.nifi.cluster.protocol.StandardDataFlow;
-import org.apache.nifi.cluster.protocol.jaxb.message.NodeIdentifierAdapter;
-import org.apache.nifi.logging.NiFiLog;
-import org.apache.nifi.stream.io.BufferedInputStream;
-import org.apache.nifi.stream.io.BufferedOutputStream;
-import org.apache.nifi.stream.io.ByteArrayInputStream;
-import org.apache.nifi.stream.io.StreamUtils;
-import org.apache.nifi.util.file.FileUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Implements the FlowDao interface. The implementation tracks the state of the
- * dataflow by annotating the filename of the flow state file. Specifically, 
the
- * implementation correlates PersistedFlowState states to filename extensions.
- * The correlation is as follows:
- * ul
- * li CURRENT maps to flow.xml /li
- * li STALE maps to flow.xml.stale /li
- * li UNKNOWN maps to flow.xml.unknown /li
- * /ul
- * Whenever the flow state changes, the flow state file's name is updated to
- * denote its state.
- *
- * The implementation also provides for a restore directory that may be
- * configured for higher availability. At instance creation, if the primary or
- * restore directories have multiple flow state files, an exception is thrown.
- * If the primary directory has a current flow state file, but the restore
- * directory does not, then the primary flow state file is copied to the 
restore
- * directory. If the restore directory has a current flow state file, but the
- * primary directory does not, then the restore flow state file is copied to 
the
- * primary directory. If both the primary and restore directories have a 
current
- * flow state file and the files are different, then an exception is thrown.
- *
- * When the flow state file is saved, it is always saved first to the restore

[30/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
 
b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
deleted file mode 100644
index 4b89655..000
--- 
a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
+++ /dev/null
@@ -1,1056 +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.admin.dao.impl;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.nifi.action.Action;
-import org.apache.nifi.action.Component;
-import org.apache.nifi.action.Operation;
-import org.apache.nifi.action.component.details.ComponentDetails;
-import org.apache.nifi.action.component.details.ProcessorDetails;
-import org.apache.nifi.action.component.details.RemoteProcessGroupDetails;
-import org.apache.nifi.action.details.ActionDetails;
-import org.apache.nifi.action.details.ConfigureDetails;
-import org.apache.nifi.action.details.ConnectDetails;
-import org.apache.nifi.action.details.MoveDetails;
-import org.apache.nifi.action.details.PurgeDetails;
-import org.apache.nifi.admin.RepositoryUtils;
-import org.apache.nifi.admin.dao.ActionDAO;
-import org.apache.nifi.admin.dao.DataAccessException;
-import org.apache.nifi.history.History;
-import org.apache.nifi.history.HistoryQuery;
-import org.apache.nifi.history.PreviousValue;
-import org.apache.commons.lang3.StringUtils;
-
-/**
- *
- */
-public class StandardActionDAO implements ActionDAO {
-
-// 
-// action table
-// 
-private static final String INSERT_ACTION = INSERT INTO ACTION (
-+ USER_DN, USER_NAME, SOURCE_ID, SOURCE_NAME, SOURCE_TYPE, 
OPERATION, ACTION_TIMESTAMP
-+ ) VALUES (
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ );
-
-// -
-// component details
-// -
-private static final String INSERT_PROCESSOR_DETAILS = INSERT INTO 
PROCESSOR_DETAILS (
-+ ACTION_ID, TYPE
-+ ) VALUES (
-+ ?, 
-+ ?
-+ );
-
-private static final String INSERT_REMOTE_PROCESS_GROUP_DETAILS = INSERT 
INTO REMOTE_PROCESS_GROUP_DETAILS (
-+ ACTION_ID, URI
-+ ) VALUES (
-+ ?, 
-+ ?
-+ );
-
-// --
-// action details
-// --
-private static final String INSERT_CONFIGURE_DETAILS = INSERT INTO 
CONFIGURE_DETAILS (
-+ ACTION_ID, NAME, VALUE, PREVIOUS_VALUE
-+ ) VALUES (
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?
-+ );
-
-private static final String INSERT_CONNECT_DETAILS = INSERT INTO 
CONNECT_DETAILS (
-+ ACTION_ID, SOURCE_ID, SOURCE_NAME, SOURCE_TYPE, RELATIONSHIP, 
DESTINATION_ID, DESTINATION_NAME, DESTINATION_TYPE
-+ ) VALUES (
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?
-+ );
-
-private static final String INSERT_MOVE_DETAILS = INSERT INTO 
MOVE_DETAILS (
-+ ACTION_ID, GROUP_ID, GROUP_NAME, PREVIOUS_GROUP_ID, 
PREVIOUS_GROUP_NAME
-+ ) VALUES (
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?, 
-+ ?
-+ );
-
-private static final String INSERT_PURGE_DETAILS = INSERT INTO 

[08/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java
 
b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java
deleted file mode 100644
index e434905..000
--- 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java
+++ /dev/null
@@ -1,28 +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.controller.repository;
-
-import java.util.Map;
-
-public interface RepositoryStatusReport {
-
-void addReportEntry(FlowFileEvent entry);
-
-MapString, FlowFileEvent getReportEntries();
-
-FlowFileEvent getReportEntry(String componentId);
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java
 
b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java
deleted file mode 100644
index 6f9c237..000
--- 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java
+++ /dev/null
@@ -1,40 +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.controller.service;
-
-import org.apache.nifi.controller.Availability;
-import org.apache.nifi.controller.ConfiguredComponent;
-import org.apache.nifi.controller.ControllerService;
-
-public interface ControllerServiceNode extends ConfiguredComponent {
-
-ControllerService getControllerService();
-
-Availability getAvailability();
-
-void setAvailability(Availability availability);
-
-boolean isDisabled();
-
-void setDisabled(boolean disabled);
-
-ControllerServiceReference getReferences();
-
-void addReference(ConfiguredComponent referringComponent);
-
-void removeReference(ConfiguredComponent referringComponent);
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java
 
b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java
deleted file mode 100644
index 35a255d..000
--- 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this 

[10/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
 
b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
deleted file mode 100644
index 630631f..000
--- 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/NodeInformationAdapter.java
+++ /dev/null
@@ -1,39 +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.cluster;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-public class NodeInformationAdapter extends XmlAdapterAdaptedNodeInformation, 
NodeInformation {
-
-@Override
-public NodeInformation unmarshal(final AdaptedNodeInformation adapted) 
throws Exception {
-return new NodeInformation(adapted.getHostname(), 
adapted.getSiteToSitePort(), adapted.getApiPort(), 
adapted.isSiteToSiteSecure(), adapted.getTotalFlowFiles());
-}
-
-@Override
-public AdaptedNodeInformation marshal(final NodeInformation 
nodeInformation) throws Exception {
-final AdaptedNodeInformation adapted = new AdaptedNodeInformation();
-adapted.setHostname(nodeInformation.getHostname());
-adapted.setSiteToSitePort(nodeInformation.getSiteToSitePort());
-adapted.setApiPort(nodeInformation.getAPIPort());
-adapted.setSiteToSiteSecure(nodeInformation.isSiteToSiteSecure());
-adapted.setTotalFlowFiles(nodeInformation.getTotalFlowFiles());
-return adapted;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
 
b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
deleted file mode 100644
index 57c1c30..000
--- 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/cluster/protocol/DataFlow.java
+++ /dev/null
@@ -1,41 +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.cluster.protocol;
-
-public interface DataFlow {
-
-/**
- * @return the raw byte array of the flow
- */
-public byte[] getFlow();
-
-/**
- * @return the raw byte array of the templates
- */
-public byte[] getTemplates();
-
-/**
- * @return the raw byte array of the snippets
- */
-public byte[] getSnippets();
-
-/**
- * @return true if processors should be automatically started at 
application
- * startup; false otherwise
- */
-public boolean isAutoStartProcessors();
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/connectable/Connectable.java
--
diff --git 

[03/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
deleted file mode 100644
index d459b00..000
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
+++ /dev/null
@@ -1,875 +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.controller;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardOpenOption;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.UUID;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
-import org.apache.nifi.cluster.ConnectionException;
-import org.apache.nifi.cluster.protocol.ConnectionRequest;
-import org.apache.nifi.cluster.protocol.ConnectionResponse;
-import org.apache.nifi.cluster.protocol.DataFlow;
-import org.apache.nifi.cluster.protocol.NodeIdentifier;
-import org.apache.nifi.cluster.protocol.ProtocolException;
-import org.apache.nifi.cluster.protocol.ProtocolHandler;
-import org.apache.nifi.cluster.protocol.StandardDataFlow;
-import org.apache.nifi.cluster.protocol.UnknownServiceAddressException;
-import org.apache.nifi.cluster.protocol.impl.NodeProtocolSenderListener;
-import org.apache.nifi.cluster.protocol.message.ConnectionRequestMessage;
-import 
org.apache.nifi.cluster.protocol.message.ControllerStartupFailureMessage;
-import org.apache.nifi.cluster.protocol.message.DisconnectMessage;
-import org.apache.nifi.cluster.protocol.message.FlowRequestMessage;
-import org.apache.nifi.cluster.protocol.message.FlowResponseMessage;
-import org.apache.nifi.cluster.protocol.message.PrimaryRoleAssignmentMessage;
-import org.apache.nifi.cluster.protocol.message.ProtocolMessage;
-import org.apache.nifi.cluster.protocol.message.ReconnectionFailureMessage;
-import org.apache.nifi.cluster.protocol.message.ReconnectionRequestMessage;
-import org.apache.nifi.cluster.protocol.message.ReconnectionResponseMessage;
-import org.apache.nifi.engine.FlowEngine;
-import org.apache.nifi.events.BulletinFactory;
-import org.apache.nifi.util.file.FileUtils;
-import org.apache.nifi.groups.ProcessGroup;
-import org.apache.nifi.lifecycle.LifeCycleStartException;
-import org.apache.nifi.logging.LogLevel;
-import org.apache.nifi.persistence.FlowConfigurationDAO;
-import org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO;
-import org.apache.nifi.reporting.Bulletin;
-import org.apache.nifi.services.FlowService;
-import org.apache.nifi.util.FormatUtils;
-import org.apache.nifi.util.NiFiProperties;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.nifi.encrypt.StringEncryptor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class StandardFlowService implements FlowService, ProtocolHandler {
-
-private static final String EVENT_CATEGORY = Controller;
-
-private final FlowController controller;
-private final Path flowXml;
-private final Path taskConfigXml;
-private final Path serviceConfigXml;
-private final FlowConfigurationDAO dao;
-private final int gracefulShutdownSeconds;
-private final boolean autoResumeState;
-private final int connectionRetryMillis;
-private final StringEncryptor encryptor;
-
-// Lock is used to protect the flow.xml file.
-private final 

[43/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java
--
diff --git 
a/commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java
 
b/commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java
deleted file mode 100644
index 8dfbaf1..000
--- 
a/commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java
+++ /dev/null
@@ -1,1143 +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.attribute.expression.language;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.nifi.attribute.expression.language.Query.Range;
-import org.apache.nifi.attribute.expression.language.evaluation.QueryResult;
-import 
org.apache.nifi.attribute.expression.language.exception.AttributeExpressionLanguageException;
-import 
org.apache.nifi.attribute.expression.language.exception.AttributeExpressionLanguageParsingException;
-import org.apache.nifi.expression.AttributeExpression.ResultType;
-import org.apache.nifi.flowfile.FlowFile;
-import org.antlr.runtime.tree.Tree;
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-public class TestQuery {
-
-@Test
-public void testCompilation() {
-assertInvalid(${attr:uuid()});
-assertInvalid(${attr:indexOf(length())});
-assertValid(${UUID()});
-assertInvalid(${UUID():nextInt()});
-assertValid(${nextInt()});
-assertValid(${now():format('/MM/dd')});
-assertInvalid(${attr:times(3)});
-assertValid(${attr:toNumber():multiply(3)});
-// left here because it's convenient for looking at the output
-//System.out.println(Query.compile().evaluate(null));
-}
-
-private void assertValid(final String query) {
-try {
-Query.compile(query);
-} catch (final Exception e) {
-e.printStackTrace();
-Assert.fail(Expected query to be valid, but it failed to compile 
due to  + e);
-}
-}
-
-private void assertInvalid(final String query) {
-try {
-Query.compile(query);
-Assert.fail(Expected query to be invalid, but it did compile);
-} catch (final Exception e) {
-}
-}
-
-@Test
-public void testIsValidExpression() {
-Query.validateExpression(${abc:substring(${xyz:length()})}, false);
-Query.isValidExpression(${now():format('-MM-dd')});
-
-
-try {
-Query.validateExpression($${attr}, false);
-Assert.fail(invalid query validated);
-} catch (final AttributeExpressionLanguageParsingException e) {
-}
-
-Query.validateExpression($${attr}, true);
-
-Query.validateExpression(${filename:startsWith('T8MTXBC')\n 
-+ :or( ${filename:startsWith('C4QXABC')} )\n
-+ :or( ${filename:startsWith('U6CXEBC')} )
-+ :or( ${filename:startsWith('KYM3ABC')} )}, false);
-}
-
-
-@Test
-public void testCompileEmbedded() {
-final String expression = ${x:equals( ${y} )};
-final Query query = Query.compile(expression);
-final Tree tree = query.getTree();
-System.out.println( printTree(tree) );
-
-final MapString, String attributes = new HashMap();
-attributes.put(x, x);
-attributes.put(y, x);
-final String result = Query.evaluateExpressions(expression, 
attributes, null);
-assertEquals(true, result);
-
-Query.validateExpression(expression, false);
-}
-
-private String printTree(final Tree tree) {
-final 

[21/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerStatusEntity.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerStatusEntity.java
 
b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerStatusEntity.java
deleted file mode 100644
index 94d8aca..000
--- 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerStatusEntity.java
+++ /dev/null
@@ -1,45 +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.web.api.entity;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.nifi.web.api.dto.status.ControllerStatusDTO;
-
-/**
- * A serialized representation of this class can be placed in the entity body 
of
- * a request or response to or from the API. This particular entity holds a
- * reference to a ControllerStatusDTO.
- */
-@XmlRootElement(name = controllerStatusEntity)
-public class ControllerStatusEntity extends Entity {
-
-private ControllerStatusDTO controllerStatus;
-
-/**
- * The ControllerStatusDTO that is being serialized.
- *
- * @return The ControllerStatusDTO object
- */
-public ControllerStatusDTO getControllerStatus() {
-return controllerStatus;
-}
-
-public void setControllerStatus(ControllerStatusDTO controllerStatus) {
-this.controllerStatus = controllerStatus;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java
 
b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java
deleted file mode 100644
index 666dc75..000
--- 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java
+++ /dev/null
@@ -1,45 +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.web.api.entity;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.nifi.web.api.dto.CounterDTO;
-
-/**
- * A serialized representation of this class can be placed in the entity body 
of
- * a response from the API. This particular entity holds a reference to a
- * CounterDTO.
- */
-@XmlRootElement(name = counterEntity)
-public class CounterEntity extends Entity {
-
-private CounterDTO counter;
-
-/**
- * Get the counter.
- *
- * @return
- */
-public CounterDTO getCounter() {
-return counter;
-}
-
-public void setCounter(CounterDTO counter) {
-this.counter = counter;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CountersEntity.java
--
diff --git 

[31/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.py
--
diff --git 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.py
 
b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.py
deleted file mode 100644
index ed5408a..000
--- 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.py
+++ /dev/null
@@ -1,37 +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.
-import re
-
-class RoutingReader(ReaderScript):
-A = Relationship.Builder().name(a).description(some good stuff).build()
-B = Relationship.Builder().name(b).description(some other 
stuff).build()
-C = Relationship.Builder().name(c).description(some bad stuff).build()
-
-def getRelationships(self):
-return [self.A,self.B,self.C]
-  
-def getExceptionRoute(self):
-return self.C
-  
-def route( self, input ):
-for line in FileUtil.wrap(input):
-if re.match(^bad, line, re.IGNORECASE):
-return self.B
-if re.match(^sed, line):
-raise RuntimeError(That's no good!)
-
-return self.A
-
-instance = RoutingReader()

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.rb
--
diff --git 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.rb
 
b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.rb
deleted file mode 100644
index 38249ae..000
--- 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/routeTest.rb
+++ /dev/null
@@ -1,39 +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.
-class SimpleJRubyReader  ReaderScript
-
-@@a = Relationship::Builder.new().name(a).description(some good 
stuff).build()
-@@b = Relationship::Builder.new().name(b).description(some bad 
stuff).build()
-@@c = Relationship::Builder.new().name(c).description(some other 
stuff).build()
-  
-  def getRelationships
-return [@@a, @@b, @@c]
-  end
-  
-  def getExceptionRoute
-@@c
-  end
-  
-  def route( input )
-input.to_io.each_line do |line|
-  return @@b if line.match /^bad/i
-  raise That's no good! if line.match /^sed/i
-end
-
-@@a
-   end
-end
-
-SimpleJRubyReader.new

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/simpleConverter.js
--
diff --git 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/simpleConverter.js
 
b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/simpleConverter.js
deleted file mode 100644
index 72bb80e..000
--- 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/simpleConverter.js
+++ /dev/null
@@ -1,45 +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 

[45/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java
--
diff --git 
a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java
 
b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java
deleted file mode 100644
index 6b7b838..000
--- 
a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java
+++ /dev/null
@@ -1,57 +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.attribute.expression.language.evaluation.functions;
-
-import java.util.Map;
-
-import org.apache.nifi.attribute.expression.language.evaluation.Evaluator;
-import 
org.apache.nifi.attribute.expression.language.evaluation.NumberEvaluator;
-import 
org.apache.nifi.attribute.expression.language.evaluation.NumberQueryResult;
-import org.apache.nifi.attribute.expression.language.evaluation.QueryResult;
-
-public class ModEvaluator extends NumberEvaluator {
-
-private final NumberEvaluator subject;
-private final NumberEvaluator modValue;
-
-public ModEvaluator(final NumberEvaluator subject, final NumberEvaluator 
modValue) {
-this.subject = subject;
-this.modValue = modValue;
-}
-
-@Override
-public QueryResultLong evaluate(final MapString, String attributes) {
-final Long subjectValue = subject.evaluate(attributes).getValue();
-if (subjectValue == null) {
-return new NumberQueryResult(null);
-}
-
-final Long mod = modValue.evaluate(attributes).getValue();
-if (mod == null) {
-return new NumberQueryResult(null);
-}
-
-final long result = subjectValue % mod;
-return new NumberQueryResult(result);
-}
-
-@Override
-public Evaluator? getSubjectEvaluator() {
-return subject;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java
--
diff --git 
a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java
 
b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java
deleted file mode 100644
index a3b03ed..000
--- 
a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java
+++ /dev/null
@@ -1,57 +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.attribute.expression.language.evaluation.functions;
-
-import java.util.Map;
-
-import org.apache.nifi.attribute.expression.language.evaluation.Evaluator;
-import 
org.apache.nifi.attribute.expression.language.evaluation.NumberEvaluator;
-import 
org.apache.nifi.attribute.expression.language.evaluation.NumberQueryResult;
-import org.apache.nifi.attribute.expression.language.evaluation.QueryResult;
-
-public 

[05/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
deleted file mode 100644
index 346e801..000
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
+++ /dev/null
@@ -1,3579 +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.controller;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import javax.net.ssl.SSLContext;
-
-import org.apache.nifi.admin.service.UserService;
-import org.apache.nifi.cluster.BulletinsPayload;
-import org.apache.nifi.cluster.HeartbeatPayload;
-import org.apache.nifi.cluster.protocol.DataFlow;
-import org.apache.nifi.cluster.protocol.Heartbeat;
-import org.apache.nifi.cluster.protocol.NodeBulletins;
-import org.apache.nifi.cluster.protocol.NodeIdentifier;
-import org.apache.nifi.cluster.protocol.NodeProtocolSender;
-import org.apache.nifi.cluster.protocol.UnknownServiceAddressException;
-import org.apache.nifi.cluster.protocol.message.HeartbeatMessage;
-import org.apache.nifi.cluster.protocol.message.NodeBulletinsMessage;
-import org.apache.nifi.connectable.Connectable;
-import org.apache.nifi.connectable.ConnectableType;
-import org.apache.nifi.connectable.Connection;
-import org.apache.nifi.connectable.Funnel;
-import org.apache.nifi.connectable.LocalPort;
-import org.apache.nifi.connectable.Port;
-import org.apache.nifi.connectable.Position;
-import org.apache.nifi.connectable.Size;
-import org.apache.nifi.connectable.StandardConnection;
-import org.apache.nifi.controller.exception.CommunicationsException;
-import org.apache.nifi.controller.exception.ProcessorInstantiationException;
-import org.apache.nifi.controller.exception.ProcessorLifeCycleException;
-import org.apache.nifi.controller.label.Label;
-import org.apache.nifi.controller.label.StandardLabel;
-import 
org.apache.nifi.controller.reporting.ReportingTaskInstantiationException;
-import org.apache.nifi.controller.reporting.StandardReportingTaskNode;
-import org.apache.nifi.controller.repository.ContentRepository;
-import org.apache.nifi.controller.repository.CounterRepository;
-import org.apache.nifi.controller.repository.FlowFileEvent;
-import org.apache.nifi.controller.repository.FlowFileEventRepository;
-import org.apache.nifi.controller.repository.FlowFileRecord;
-import org.apache.nifi.controller.repository.FlowFileRepository;
-import org.apache.nifi.controller.repository.FlowFileSwapManager;
-import org.apache.nifi.controller.repository.QueueProvider;
-import org.apache.nifi.controller.repository.RepositoryRecord;
-import org.apache.nifi.controller.repository.RepositoryStatusReport;
-import org.apache.nifi.controller.repository.StandardCounterRepository;
-import org.apache.nifi.controller.repository.StandardFlowFileRecord;
-import org.apache.nifi.controller.repository.StandardRepositoryRecord;
-import 

[14/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/ConnectingNodeMutableRequestException.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/ConnectingNodeMutableRequestException.java
 
b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/ConnectingNodeMutableRequestException.java
deleted file mode 100644
index 365b5f0..000
--- 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/ConnectingNodeMutableRequestException.java
+++ /dev/null
@@ -1,41 +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.cluster.manager.exception;
-
-/**
- * Represents the exceptional case when a HTTP request that may change a node's
- * dataflow is to be replicated while a node is connecting to the cluster.
- *
- * @author unattributed
- */
-public class ConnectingNodeMutableRequestException extends 
MutableRequestException {
-
-public ConnectingNodeMutableRequestException() {
-}
-
-public ConnectingNodeMutableRequestException(String msg) {
-super(msg);
-}
-
-public ConnectingNodeMutableRequestException(Throwable cause) {
-super(cause);
-}
-
-public ConnectingNodeMutableRequestException(String msg, Throwable cause) {
-super(msg, cause);
-}
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java
 
b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java
deleted file mode 100644
index 412a555..000
--- 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java
+++ /dev/null
@@ -1,41 +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.cluster.manager.exception;
-
-/**
- * Represents the exceptional case when a HTTP request that may change a node's
- * dataflow is to be replicated while one or more nodes are disconnected.
- *
- * @author unattributed
- */
-public class DisconnectedNodeMutableRequestException extends 
MutableRequestException {
-
-public DisconnectedNodeMutableRequestException() {
-}
-
-public DisconnectedNodeMutableRequestException(String msg) {
-super(msg);
-}
-
-public DisconnectedNodeMutableRequestException(Throwable cause) {
-super(cause);
-}
-
-public DisconnectedNodeMutableRequestException(String msg, Throwable 
cause) {
-super(msg, cause);
-}
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/IllegalClusterStateException.java

[32/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/execute-script-bundle/execute-script-processors/src/test/java/org/apache/nifi/processors/script/TestExecuteScript.java
--
diff --git 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/java/org/apache/nifi/processors/script/TestExecuteScript.java
 
b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/java/org/apache/nifi/processors/script/TestExecuteScript.java
deleted file mode 100644
index 3a34769..000
--- 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/java/org/apache/nifi/processors/script/TestExecuteScript.java
+++ /dev/null
@@ -1,939 +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.processors.script;
-
-import org.apache.nifi.processors.script.ExecuteScript;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.nifi.processor.Relationship;
-import org.apache.nifi.util.MockFlowFile;
-import org.apache.nifi.util.TestRunner;
-import org.apache.nifi.util.TestRunners;
-
-import org.apache.commons.io.FileUtils;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author unattributed
- *
- */
-public class TestExecuteScript {
-
-static Logger LOG;
-
-static {
-System.setProperty(org.slf4j.simpleLogger.defaultLogLevel, info);
-System.setProperty(org.slf4j.simpleLogger.showDateTime, true);
-
System.setProperty(org.slf4j.simpleLogger.log.nifi.processors.script.ExecuteScript,
 trace);
-
System.setProperty(org.slf4j.simpleLogger.log.nifi.processors.script.TestExecuteScript,
 debug);
-
System.setProperty(org.slf4j.simpleLogger.log.nifi.processors.AbstractProcessor,
 debug);
-LOG = LoggerFactory.getLogger(TestExecuteScript.class);
-}
-
-private TestRunner controller;
-
-private final String multiline = Lorem ipsum dolor sit amet,\n
-+ consectetur adipisicing elit,\n
-+ sed do eiusmod tempor incididunt ut labore et dolore magna 
aliqua.\n
-+ Ut enim ad minim veniam,\n
-+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 
commodo consequat.\n
-+ Duis aute irure dolor in reprehenderit in voluptate velit esse 
cillum dolore eu fugiat nulla pariatur.\n
-+ Excepteur sint occaecat cupidatat non proident,\n
-+ sunt in culpa qui officia deserunt mollit anim id est laborum.;
-
-/**
- * Create a mock SingleProcessorController using our processor and pass 
data
- * to it via byte array. Returns the Sink that provides access to any files
- * that pass out of the processor
- */
-@Before
-public void setupEach() throws IOException {
-controller = TestRunners.newTestRunner(ExecuteScript.class);
-controller.setValidateExpressionUsage(false);
-
-// copy all scripts to target directory and run from there. some python
-// scripts create .class files that end up in src/test/resources.
-FileUtils.copyDirectory(new File(src/test/resources), new 
File(target/test-scripts));
-}
-
-// Fail if the specified relationship does not contain exactly one file
-// with the expected value
-private void assertRelationshipContents(String expected, String 
relationship) {
-controller.assertTransferCount(relationship, 1);
-MockFlowFile ff = 
controller.getFlowFilesForRelationship(relationship).get(0);
-ff.assertContentEquals(expected);
-}
-
-// Fail if the specified relationship does not contain specified number of 
files
-// with the expected value
-private void assertRelationshipContents(String expected, String 
relationship, int count) {
-controller.assertTransferCount(relationship, count);
-MockFlowFile ff = 
controller.getFlowFilesForRelationship(relationship).get(count - 1);
-

[29/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java
 
b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java
deleted file mode 100644
index 86256fd..000
--- 
a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java
+++ /dev/null
@@ -1,161 +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.admin.service;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.nifi.authorization.Authority;
-import org.apache.nifi.authorization.DownloadAuthorization;
-import org.apache.nifi.user.NiFiUser;
-import org.apache.nifi.user.NiFiUserGroup;
-
-/**
- * Manages NiFi user accounts.
- */
-public interface UserService {
-
-/**
- * Creates a new user account using the specified dn and justification.
- *
- * @param dn
- * @param justification
- * @return
- */
-NiFiUser createPendingUserAccount(String dn, String justification);
-
-/**
- * Determines if there are any PENDING user accounts present.
- *
- * @return
- */
-Boolean hasPendingUserAccount();
-
-/**
- * Determines if the users in the dnChain are authorized to download 
content 
- * with the specified attributes.
- * 
- * @param dnChain
- * @param attributes
- * @return 
- */
-DownloadAuthorization authorizeDownload(ListString dnChain, MapString, 
String attributes);
-
-/**
- * Updates a user group using the specified group comprised of the 
specified
- * users. Returns all the users that are currently in the specified group.
- *
- * @param group
- * @param userIds
- * @param authorities
- * @return
- */
-NiFiUserGroup updateGroup(String group, SetString userIds, 
SetAuthority authorities);
-
-/**
- * Authorizes the user specified.
- *
- * @param dn
- * @return
- */
-NiFiUser checkAuthorization(String dn);
-
-/**
- * Deletes the user with the specified id.
- *
- * @param id
- */
-void deleteUser(String id);
-
-/**
- * Disables the specified users account.
- *
- * @param id
- * @return
- */
-NiFiUser disable(String id);
-
-/**
- * Disables the specified user group.
- *
- * @param group
- * @return
- */
-NiFiUserGroup disableGroup(String group);
-
-/**
- * Updates the specified user with the specified authorities.
- *
- * @param id
- * @param authorities
- * @return
- */
-NiFiUser update(String id, SetAuthority authorities);
-
-/**
- * Invalidates the specified user account.
- *
- * @param id
- */
-void invalidateUserAccount(String id);
-
-/**
- * Invalidates the user accounts associated with the specified user group.
- *
- * @param group
- */
-void invalidateUserGroupAccount(String group);
-
-/**
- * Ungroups the specified group.
- *
- * @param group
- */
-void ungroup(String group);
-
-/**
- * Ungroups the specified user.
- *
- * @param id
- */
-void ungroupUser(String id);
-
-/**
- * Returns a collection of all NiFiUsers.
- *
- * @return
- */
-CollectionNiFiUser getUsers();
-
-/**
- * Finds the specified user by id.
- *
- * @param id
- * @return
- */
-NiFiUser getUserById(String id);
-
-/**
- * Finds the specified user by dn.
- *
- * @param dn
- * @return
- * @throws AdministrationException
- */
-NiFiUser getUserByDn(String dn);
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/AbstractUserAction.java

[20/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java
 
b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java
deleted file mode 100644
index 963e853..000
--- 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java
+++ /dev/null
@@ -1,45 +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.web.api.entity;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.nifi.web.api.dto.UserDTO;
-
-/**
- * A serialized representation of this class can be placed in the entity body 
of
- * a request or response to or from the API. This particular entity holds a
- * reference to a UserDTO.
- */
-@XmlRootElement(name = userEntity)
-public class UserEntity extends Entity {
-
-private UserDTO user;
-
-/**
- * The UserDTO that is being serialized.
- *
- * @return The UserDTO object
- */
-public UserDTO getUser() {
-return user;
-}
-
-public void setUser(UserDTO user) {
-this.user = user;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java
 
b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java
deleted file mode 100644
index a6542c8..000
--- 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java
+++ /dev/null
@@ -1,45 +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.web.api.entity;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.nifi.web.api.dto.UserGroupDTO;
-
-/**
- * A serialized representation of this class can be placed in the entity body 
of
- * a request or response to or from the API. This particular entity holds a
- * reference to a UserGroupDTO.
- */
-@XmlRootElement(name = userGroupEntity)
-public class UserGroupEntity extends Entity {
-
-private UserGroupDTO userGroup;
-
-/**
- * The UserGroupDTO that is being serialized.
- *
- * @return The UserGroupDTO object
- */
-public UserGroupDTO getUserGroup() {
-return userGroup;
-}
-
-public void setUserGroup(UserGroupDTO userGroup) {
-this.userGroup = userGroup;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java
 

[37/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java
--
diff --git 
a/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java 
b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java
deleted file mode 100644
index 41a0557..000
--- a/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java
+++ /dev/null
@@ -1,623 +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.util.file;
-
-import java.io.BufferedInputStream;
-import java.io.Closeable;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Random;
-
-import org.slf4j.Logger;
-
-/**
- * A utility class containing a few useful static methods to do typical IO
- * operations.
- *
- * @author unattributed
- */
-public class FileUtils {
-
-public static final long TRANSFER_CHUNK_SIZE_BYTES = 1024 * 1024 * 8; //8 
MB chunks
-public static final long MILLIS_BETWEEN_ATTEMPTS = 50L;
-
-/**
- * Closes the given closeable quietly - no logging, no exceptions...
- *
- * @param closeable
- */
-public static void closeQuietly(final Closeable closeable) {
-if (null != closeable) {
-try {
-closeable.close();
-} catch (final IOException io) {/*IGNORE*/
-
-}
-}
-}
-
-/**
- * Releases the given lock quietly - no logging, no exception
- *
- * @param lock
- */
-public static void releaseQuietly(final FileLock lock) {
-if (null != lock) {
-try {
-lock.release();
-} catch (final IOException io) {
-/*IGNORE*/
-}
-}
-}
-
-public static void ensureDirectoryExistAndCanAccess(final File dir) throws 
IOException {
-if (dir.exists()  !dir.isDirectory()) {
-throw new IOException(dir.getAbsolutePath() +  is not a 
directory);
-} else if (!dir.exists()) {
-final boolean made = dir.mkdirs();
-if (!made) {
-throw new IOException(dir.getAbsolutePath() +  could not be 
created);
-}
-}
-if (!(dir.canRead()  dir.canWrite())) {
-throw new IOException(dir.getAbsolutePath() +  directory does not 
have read/write privilege);
-}
-}
-
-/**
- * Deletes the given file. If the given file exists but could not be 
deleted
- * this will be printed as a warning to the given logger
- *
- * @param file
- * @param logger
- * @return
- */
-public static boolean deleteFile(final File file, final Logger logger) {
-return FileUtils.deleteFile(file, logger, 1);
-}
-
-/**
- * Deletes the given file. If the given file exists but could not be 
deleted
- * this will be printed as a warning to the given logger
- *
- * @param file
- * @param logger
- * @param attempts indicates how many times an attempt to delete should be
- * made
- * @return true if given file no longer exists
- */
-public static boolean deleteFile(final File file, final Logger logger, 
final int attempts) {
-if (file == null) {
-return false;
-}
-boolean isGone = false;
-try {
-if (file.exists()) {
-final int effectiveAttempts = Math.max(1, attempts);
-for (int i = 0; i  effectiveAttempts  !isGone; i++) {
-isGone = file.delete() || !file.exists();
-if (!isGone  (effectiveAttempts - i)  1) {
-

[11/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpRequest.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpRequest.java
 
b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpRequest.java
deleted file mode 100644
index 35380dd..000
--- 
a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpRequest.java
+++ /dev/null
@@ -1,239 +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.cluster.manager.testutils;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.core.MediaType;
-import org.apache.commons.lang3.StringUtils;
-
-/**
- * Encapsulates an HTTP request. The toString method returns the
- * specification-compliant request.
- *
- * @author unattributed
- */
-public class HttpRequest {
-
-private String method;
-private String uri;
-private String rawUri;
-private String version;
-private String body;
-private String rawRequest;
-private MapString, String headers = new HashMap();
-private MapString, ListString parameters = new HashMap();
-
-public static HttpRequestBuilder createFromRequestLine(final String 
requestLine) {
-return new HttpRequestBuilder(requestLine);
-}
-
-public String getBody() {
-return body;
-}
-
-public MapString, String getHeaders() {
-return Collections.unmodifiableMap(headers);
-}
-
-public String getHeaderValue(final String header) {
-for (final Map.EntryString, String entry : getHeaders().entrySet()) {
-if (entry.getKey().equalsIgnoreCase(header)) {
-return entry.getValue();
-}
-}
-return null;
-}
-
-public String getMethod() {
-return method;
-}
-
-public MapString, ListString getParameters() {
-final MapString, ListString result = new HashMap();
-for (final Map.EntryString, ListString entry : 
parameters.entrySet()) {
-result.put(entry.getKey(), 
Collections.unmodifiableList(entry.getValue()));
-}
-return Collections.unmodifiableMap(result);
-}
-
-public String getUri() {
-return uri;
-}
-
-public String getRawUri() {
-return rawUri;
-}
-
-public String getVersion() {
-return version;
-}
-
-@Override
-public String toString() {
-return rawRequest;
-}
-
-/**
- * A builder for constructing basic HTTP requests. It handles only enough 
of
- * the HTTP specification to support basic unit testing, and it should not
- * be used otherwise.
- */
-public static class HttpRequestBuilder {
-
-private String method;
-private String uri;
-private String rawUri;
-private String version;
-private MapString, String headers = new HashMap();
-private MapString, ListString parameters = new HashMap();
-private int contentLength = 0;
-private String contentType;
-private String body = ;
-private StringBuilder rawRequest = new StringBuilder();
-
-private HttpRequestBuilder(final String requestLine) {
-
-final String[] tokens = requestLine.split( );
-if (tokens.length != 3) {
-throw new IllegalArgumentException(Invalid HTTP Request Line: 
 + requestLine);
-}
-
-method = tokens[0];
-if (HttpMethod.GET.equalsIgnoreCase(method) || 
HttpMethod.HEAD.equalsIgnoreCase(method) || 
HttpMethod.DELETE.equalsIgnoreCase(method) || 
HttpMethod.OPTIONS.equalsIgnoreCase(method)) {
-final int queryIndex = 

[26/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/InvalidateUserAccountActionTest.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/InvalidateUserAccountActionTest.java
 
b/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/InvalidateUserAccountActionTest.java
deleted file mode 100644
index 93dbe61..000
--- 
a/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/InvalidateUserAccountActionTest.java
+++ /dev/null
@@ -1,131 +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.admin.service.action;
-
-import java.util.Date;
-import org.junit.Assert;
-import org.apache.nifi.admin.dao.DAOFactory;
-import org.apache.nifi.admin.dao.DataAccessException;
-import org.apache.nifi.admin.dao.UserDAO;
-import org.apache.nifi.admin.service.AccountNotFoundException;
-import org.apache.nifi.user.NiFiUser;
-import org.apache.commons.lang3.StringUtils;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-/**
- * Test case for InvalidateUserAccountAction.
- */
-public class InvalidateUserAccountActionTest {
-
-private static final String USER_ID_1 = 1;
-private static final String USER_ID_2 = 2;
-private static final String USER_ID_3 = 3;
-
-private DAOFactory daoFactory;
-private UserDAO userDao;
-
-@Before
-public void setup() throws Exception {
-// mock the user dao
-userDao = Mockito.mock(UserDAO.class);
-Mockito.doAnswer(new AnswerNiFiUser() {
-@Override
-public NiFiUser answer(InvocationOnMock invocation) throws 
Throwable {
-Object[] args = invocation.getArguments();
-String id = (String) args[0];
-
-NiFiUser user = null;
-if (USER_ID_1.equals(id)) {
-// leave uninitialized
-} else if (USER_ID_2.equals(id)) {
-user = new NiFiUser();
-user.setId(USER_ID_2);
-} else if (USER_ID_3.equals(id)) {
-user = new NiFiUser();
-user.setId(USER_ID_3);
-user.setLastVerified(new Date());
-}
-return user;
-}
-}).when(userDao).findUserById(Mockito.anyString());
-Mockito.doAnswer(new AnswerVoid() {
-@Override
-public Void answer(InvocationOnMock invocation) throws Throwable {
-Object[] args = invocation.getArguments();
-NiFiUser user = (NiFiUser) args[0];
-
-if (USER_ID_2.equals(user.getId())) {
-throw new DataAccessException(StringUtils.EMPTY);
-}
-
-// do nothing
-return null;
-}
-}).when(userDao).updateUser(Mockito.any(NiFiUser.class));
-
-// mock the dao factory
-daoFactory = Mockito.mock(DAOFactory.class);
-Mockito.when(daoFactory.getUserDAO()).thenReturn(userDao);
-}
-
-/**
- * Tests when the user account cannot be found.
- *
- * @throws Exception
- */
-@Test(expected = AccountNotFoundException.class)
-public void testAccountNotFoundException() throws Exception {
-InvalidateUserAccountAction invalidateUserAccount = new 
InvalidateUserAccountAction(USER_ID_1);
-invalidateUserAccount.execute(daoFactory, null);
-}
-
-/**
- * Tests when a data access exception occurs when updating the user record.
- *
- * @throws Exception
- */
-@Test(expected = DataAccessException.class)
-public void testDataAccessException() throws Exception {
-InvalidateUserAccountAction invalidateUserAccount = new 
InvalidateUserAccountAction(USER_ID_2);

[07/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/RootGroupPort.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/RootGroupPort.java
 
b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/RootGroupPort.java
deleted file mode 100644
index 4afdfb7..000
--- 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/RootGroupPort.java
+++ /dev/null
@@ -1,78 +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.remote;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.nifi.connectable.Port;
-import org.apache.nifi.remote.exception.BadRequestException;
-import org.apache.nifi.remote.exception.NotAuthorizedException;
-import org.apache.nifi.remote.exception.RequestExpiredException;
-import org.apache.nifi.remote.protocol.ServerProtocol;
-
-public interface RootGroupPort extends Port {
-
-boolean isTransmitting();
-
-void setGroupAccessControl(SetString groups);
-
-SetString getGroupAccessControl();
-
-void setUserAccessControl(SetString users);
-
-SetString getUserAccessControl();
-
-/**
- * Verifies that the specified user is authorized to interact with this 
port
- * and returns a {@link PortAuthorizationResult} indicating why the user is
- * unauthorized if this assumption fails
- *
- * @param dn
- * @return
- */
-PortAuthorizationResult checkUserAuthorization(String dn);
-
-/**
- * Receives data from the given stream
- *
- * @param peer
- * @param serverProtocol
- * @param requestHeaders
- *
- * @return the number of FlowFiles received
- * @throws org.apache.nifi.remote.exception.NotAuthorizedException
- * @throws org.apache.nifi.remote.exception.BadRequestException
- * @throws org.apache.nifi.remote.exception.RequestExpiredException
- */
-int receiveFlowFiles(Peer peer, ServerProtocol serverProtocol, MapString, 
String requestHeaders) throws NotAuthorizedException, BadRequestException, 
RequestExpiredException;
-
-/**
- * Transfers data to the given stream
- *
- * @param peer
- * @param requestHeaders
- * @param serverProtocol
- *
- * @return the number of FlowFiles transferred
- * @throws org.apache.nifi.remote.exception.NotAuthorizedException
- * @throws org.apache.nifi.remote.exception.BadRequestException
- * @throws org.apache.nifi.remote.exception.RequestExpiredException
- */
-int transferFlowFiles(Peer peer, ServerProtocol serverProtocol, 
MapString, String requestHeaders) throws NotAuthorizedException, 
BadRequestException, RequestExpiredException;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java
 
b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java
deleted file mode 100644
index 56432d5..000
--- 
a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java
+++ /dev/null
@@ -1,23 +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 

[41/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/nio/ChannelDispatcher.java
--
diff --git 
a/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/nio/ChannelDispatcher.java
 
b/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/nio/ChannelDispatcher.java
deleted file mode 100644
index 2ae2c07..000
--- 
a/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/nio/ChannelDispatcher.java
+++ /dev/null
@@ -1,160 +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.io.nio;
-
-import java.io.IOException;
-import java.nio.channels.DatagramChannel;
-import java.nio.channels.SelectableChannel;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import java.util.Iterator;
-import java.util.UUID;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.nifi.io.nio.consumer.StreamConsumerFactory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * @author none
- */
-public final class ChannelDispatcher implements Runnable {
-
-private static final Logger LOGGER = 
LoggerFactory.getLogger(ChannelDispatcher.class);
-private final Selector serverSocketSelector;
-private final Selector socketChannelSelector;
-private final ScheduledExecutorService executor;
-private final BufferPool emptyBuffers;
-private final StreamConsumerFactory factory;
-private final AtomicLong channelReaderFrequencyMilliseconds = new 
AtomicLong(DEFAULT_CHANNEL_READER_PERIOD_MILLISECONDS);
-private final long timeout;
-private volatile boolean stop = false;
-public static final long DEFAULT_CHANNEL_READER_PERIOD_MILLISECONDS = 100L;
-
-public ChannelDispatcher(final Selector serverSocketSelector, final 
Selector socketChannelSelector, final ScheduledExecutorService service,
-final StreamConsumerFactory factory, final BufferPool buffers, 
final long timeout, final TimeUnit unit) {
-this.serverSocketSelector = serverSocketSelector;
-this.socketChannelSelector = socketChannelSelector;
-this.executor = service;
-this.factory = factory;
-emptyBuffers = buffers;
-this.timeout = TimeUnit.MILLISECONDS.convert(timeout, unit);
-}
-
-public void setChannelReaderFrequency(final long period, final TimeUnit 
timeUnit) {
-
channelReaderFrequencyMilliseconds.set(TimeUnit.MILLISECONDS.convert(period, 
timeUnit));
-}
-
-@Override
-public void run() {
-while (!stop) {
-try {
-selectServerSocketKeys();
-selectSocketChannelKeys();
-} catch (final Exception ex) {
-LOGGER.warn(Key selection failed: {} Normal during 
shutdown., new Object[]{ex});
-}
-}
-}
-
-/*
- * When serverSocketsChannels are registered with the selector, want each 
invoke of this method to loop through all
- * channels' keys.
- * 
- * @throws IOException
- */
-private void selectServerSocketKeys() throws IOException {
-int numSelected = serverSocketSelector.select(timeout);
-if (numSelected == 0) {
-return;
-}
-
-// for each registered server socket - see if any connections are 
waiting to be established
-final IteratorSelectionKey itr = 
serverSocketSelector.selectedKeys().iterator();
-while (itr.hasNext()) {
-SelectionKey serverSocketkey = itr.next();
-final SelectableChannel channel = serverSocketkey.channel();
-AbstractChannelReader reader = null;
-if (serverSocketkey.isValid()  serverSocketkey.isAcceptable()) {
-final ServerSocketChannel ssChannel = (ServerSocketChannel) 
serverSocketkey.channel();
-final SocketChannel sChannel = ssChannel.accept();
-if 

[23/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceOptionsDTO.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceOptionsDTO.java
 
b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceOptionsDTO.java
deleted file mode 100644
index 7f939b9..000
--- 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceOptionsDTO.java
+++ /dev/null
@@ -1,43 +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.web.api.dto.provenance;
-
-import java.util.List;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * A provenance search options.
- */
-@XmlType(name = provenanceOptions)
-public class ProvenanceOptionsDTO {
-
-private ListProvenanceSearchableFieldDTO searchableFields;
-
-/**
- * The available searchable fields for this NiFi instance.
- *
- * @return
- */
-public ListProvenanceSearchableFieldDTO getSearchableFields() {
-return searchableFields;
-}
-
-public void setSearchableFields(ListProvenanceSearchableFieldDTO 
searchableFields) {
-this.searchableFields = searchableFields;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceRequestDTO.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceRequestDTO.java
 
b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceRequestDTO.java
deleted file mode 100644
index e9e5453..000
--- 
a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceRequestDTO.java
+++ /dev/null
@@ -1,118 +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.web.api.dto.provenance;
-
-import java.util.Date;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.apache.nifi.web.api.dto.util.DateTimeAdapter;
-
-/**
- * A request for provenance.
- */
-@XmlType(name = provenanceRequest)
-public class ProvenanceRequestDTO {
-
-private MapString, String searchTerms;
-private Date startDate;
-private Date endDate;
-private String minimumFileSize;
-private String maximumFileSize;
-private Integer maxResults;
-
-/**
- * Returns the search terms to use for this search
- *
- * @return
- */
-public MapString, String getSearchTerms() {
-return searchTerms;
-}
-
-public void setSearchTerms(final MapString, String searchTerms) {
-this.searchTerms = searchTerms;
-}
-
-/**
- * The earliest event time to include in the query
- *
- * @return
- */
-@XmlJavaTypeAdapter(DateTimeAdapter.class)
-public Date getStartDate() {
-return startDate;
-}
-
-public void setStartDate(Date startDate) {
-

[12/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java
 
b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java
deleted file mode 100644
index 84565da..000
--- 
a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java
+++ /dev/null
@@ -1,252 +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.cluster.node;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.nifi.cluster.HeartbeatPayload;
-import org.apache.nifi.cluster.protocol.Heartbeat;
-import org.apache.nifi.cluster.protocol.NodeIdentifier;
-import org.apache.nifi.cluster.protocol.ProtocolException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents a connected flow controller. Nodes always have an immutable
- * identifier and a status. The status may be changed, but never null.
- *
- * A Node may be cloned, but the cloning is a shallow copy of the instance.
- *
- * This class overrides hashCode and equals and considers two instances to be
- * equal if they have the equal NodeIdentifiers.
- *
- * @author unattributed
- */
-public class Node implements Cloneable, ComparableNode {
-
-private static final Logger lockLogger = 
LoggerFactory.getLogger(cluster.lock);
-
-/**
- * The semantics of a Node status are as follows:
- * ul
- * liCONNECTED -- a flow controller that is connected to the cluster. A
- * connecting node transitions to connected after the cluster receives the
- * flow controller's first heartbeat. A connected node can transition to
- * disconnecting./li
- * liCONNECTING -- a flow controller has issued a connection request to
- * the cluster, but has not yet sent a heartbeat. A connecting node can
- * transition to disconnecting or connected. The cluster will not accept 
any
- * external requests to change the flow while any node is connecting./li
- * liDISCONNECTED -- a flow controller that is not connected to the
- * cluster. A disconnected node can transition to connecting./li
- * liDISCONNECTING -- a flow controller that is in the process of
- * disconnecting from the cluster. A disconnecting node will always
- * transition to disconnected./li
- * /ul
- */
-public static enum Status {
-
-CONNECTED,
-CONNECTING,
-DISCONNECTED,
-DISCONNECTING
-}
-
-/**
- * the node's unique identifier
- */
-private final NodeIdentifier nodeId;
-
-/**
- * the node statue
- */
-private Status status;
-
-/**
- * the last heartbeat received by from the node
- */
-private Heartbeat lastHeartbeat;
-
-/**
- * the payload of the last heartbeat received from the node
- */
-private HeartbeatPayload lastHeartbeatPayload;
-
-/**
- * the last time the connection for this node was requested
- */
-private AtomicLong connectionRequestedTimestamp = new AtomicLong(0L);
-
-/**
- * a flag to indicate this node was disconnected because of a lack of
- * heartbeat
- */
-private boolean heartbeatDisconnection;
-
-public Node(final NodeIdentifier id, final Status status) {
-if (id == null) {
-throw new IllegalArgumentException(ID may not be null.);
-} else if (status == null) {
-throw new IllegalArgumentException(Status may not be null.);
-}
-this.nodeId = id;
-this.status = status;
-}
-
-public NodeIdentifier getNodeId() {
-return nodeId;
-}
-
-/**
- * Returns the last received heartbeat or null if no heartbeat has been 
set.
- *
- * @return a heartbeat or null
- */
-public Heartbeat getHeartbeat() {
-return lastHeartbeat;
-}
-
-public HeartbeatPayload getHeartbeatPayload() {
-return lastHeartbeatPayload;
-}
-
-   

[38/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
--
diff --git 
a/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
 
b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
deleted file mode 100644
index ae075b5..000
--- 
a/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
+++ /dev/null
@@ -1,331 +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.stream.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-public class LeakyBucketStreamThrottler implements StreamThrottler {
-
-private final int maxBytesPerSecond;
-private final BlockingQueueRequest requestQueue = new 
LinkedBlockingQueueRequest();
-private final ScheduledExecutorService executorService;
-private final AtomicBoolean shutdown = new AtomicBoolean(false);
-
-public LeakyBucketStreamThrottler(final int maxBytesPerSecond) {
-this.maxBytesPerSecond = maxBytesPerSecond;
-
-executorService = Executors.newSingleThreadScheduledExecutor();
-final Runnable task = new Drain();
-executorService.scheduleAtFixedRate(task, 0, 1000, 
TimeUnit.MILLISECONDS);
-}
-
-@Override
-public void close() {
-this.shutdown.set(true);
-
-executorService.shutdown();
-try {
-// Should not take more than 2 seconds because we run every 
second. If it takes more than
-// 2 seconds, it is because the Runnable thread is blocking on a 
write; in this case,
-// we will just ignore it and return
-executorService.awaitTermination(2, TimeUnit.SECONDS);
-} catch (InterruptedException e) {
-}
-}
-
-@Override
-public OutputStream newThrottledOutputStream(final OutputStream toWrap) {
-return new OutputStream() {
-@Override
-public void write(final int b) throws IOException {
-write(new byte[]{(byte) b}, 0, 1);
-}
-
-@Override
-public void write(byte[] b) throws IOException {
-write(b, 0, b.length);
-}
-
-@Override
-public void write(byte[] b, int off, int len) throws IOException {
-final InputStream in = new ByteArrayInputStream(b, off, len);
-LeakyBucketStreamThrottler.this.copy(in, toWrap);
-}
-
-@Override
-public void close() throws IOException {
-toWrap.close();
-}
-
-@Override
-public void flush() throws IOException {
-toWrap.flush();
-}
-};
-}
-
-@Override
-public InputStream newThrottledInputStream(final InputStream toWrap) {
-return new InputStream() {
-final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-@Override
-public int read() throws IOException {
-final ByteArrayOutputStream baos = new 
ByteArrayOutputStream(1);
-LeakyBucketStreamThrottler.this.copy(toWrap, baos, 1L);
-if (baos.getBufferLength()  1) {
-return -1;
-}
-
-return baos.getUnderlyingBuffer()[0]  0xFF;
-}
-
-@Override
-public int read(final byte[] b) throws IOException {
-if(b.length == 0){
-return 0;
-}
-return read(b, 0, b.length);
-}
-
-@Override
-public int read(byte[] b, int off, int len) throws IOException {
-if ( len  0 ) {
-

[49/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardProvenanceEventRecord.java
--
diff --git 
a/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardProvenanceEventRecord.java
 
b/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardProvenanceEventRecord.java
deleted file mode 100644
index cfbae88..000
--- 
a/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardProvenanceEventRecord.java
+++ /dev/null
@@ -1,752 +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.provenance;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.nifi.flowfile.FlowFile;
-import org.apache.nifi.flowfile.attributes.CoreAttributes;
-import org.apache.nifi.processor.Relationship;
-
-/**
- * Holder for provenance relevant information
- * p/
- * @author none
- */
-public final class StandardProvenanceEventRecord implements 
ProvenanceEventRecord {
-
-private final long eventTime;
-private final long entryDate;
-private final ProvenanceEventType eventType;
-private final long lineageStartDate;
-private final SetString lineageIdentifiers;
-private final String componentId;
-private final String componentType;
-private final String transitUri;
-private final String sourceSystemFlowFileIdentifier;
-private final String uuid;
-private final ListString parentUuids;
-private final ListString childrenUuids;
-private final String alternateIdentifierUri;
-private final String details;
-private final String relationship;
-private final long storageByteOffset;
-private final String storageFilename;
-private final long eventDuration;
-
-private final String contentClaimSection;
-private final String contentClaimContainer;
-private final String contentClaimIdentifier;
-private final Long contentClaimOffset;
-private final long contentSize;
-
-private final String previousClaimSection;
-private final String previousClaimContainer;
-private final String previousClaimIdentifier;
-private final Long previousClaimOffset;
-private final Long previousSize;
-
-private final String sourceQueueIdentifier;
-
-private final MapString, String previousAttributes;
-private final MapString, String updatedAttributes;
-
-private volatile long eventId;
-
-private StandardProvenanceEventRecord(final Builder builder) {
-this.eventTime = builder.eventTime;
-this.entryDate = builder.entryDate;
-this.eventType = builder.eventType;
-this.componentId = builder.componentId;
-this.componentType = builder.componentType;
-this.transitUri = builder.transitUri;
-this.sourceSystemFlowFileIdentifier = 
builder.sourceSystemFlowFileIdentifier;
-this.uuid = builder.uuid;
-this.parentUuids = builder.parentUuids;
-this.childrenUuids = builder.childrenUuids;
-this.alternateIdentifierUri = builder.alternateIdentifierUri;
-this.details = builder.details;
-this.relationship = builder.relationship;
-this.storageByteOffset = builder.storageByteOffset;
-this.storageFilename = builder.storageFilename;
-this.eventDuration = builder.eventDuration;
-this.lineageStartDate = builder.lineageStartDate;
-this.lineageIdentifiers = 
Collections.unmodifiableSet(builder.lineageIdentifiers);
-
-previousClaimSection = builder.previousClaimSection;
-previousClaimContainer = builder.previousClaimContainer;
-previousClaimIdentifier = builder.previousClaimIdentifier;
-previousClaimOffset = builder.previousClaimOffset;
-previousSize = builder.previousSize;
-
-contentClaimSection = builder.contentClaimSection;
-contentClaimContainer = builder.contentClaimContainer;
-

[27/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java
 
b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java
deleted file mode 100644
index 31a01be..000
--- 
a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java
+++ /dev/null
@@ -1,529 +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.authorization;
-
-import java.io.File;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.xml.XMLConstants;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import org.apache.nifi.authorization.annotation.AuthorityProviderContext;
-import org.apache.nifi.authorization.exception.AuthorityAccessException;
-import org.apache.nifi.authorization.exception.IdentityAlreadyExistsException;
-import org.apache.nifi.authorization.exception.ProviderCreationException;
-import org.apache.nifi.authorization.exception.ProviderDestructionException;
-import org.apache.nifi.authorization.exception.UnknownIdentityException;
-import org.apache.nifi.authorization.generated.AuthorityProviders;
-import org.apache.nifi.authorization.generated.Property;
-import org.apache.nifi.authorization.generated.Provider;
-import org.apache.nifi.nar.ExtensionManager;
-import org.apache.nifi.nar.NarCloseable;
-import org.apache.nifi.util.NiFiProperties;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.xml.sax.SAXException;
-
-/**
- * Factory bean for loading the configured authority provider.
- */
-public class AuthorityProviderFactoryBean implements FactoryBean, 
ApplicationContextAware, DisposableBean, AuthorityProviderLookup {
-
-private static final Logger logger = 
LoggerFactory.getLogger(AuthorityProviderFactoryBean.class);
-private static final String AUTHORITY_PROVIDERS_XSD = 
/authority-providers.xsd;
-private static final String JAXB_GENERATED_PATH = 
org.apache.nifi.authorization.generated;
-private static final JAXBContext JAXB_CONTEXT = initializeJaxbContext();
-
-/**
- * Load the JAXBContext.
- */
-private static JAXBContext initializeJaxbContext() {
-try {
-return JAXBContext.newInstance(JAXB_GENERATED_PATH, 
AuthorityProviderFactoryBean.class.getClassLoader());
-} catch (JAXBException e) {
-throw new RuntimeException(Unable to create JAXBContext.);
-}
-}
-
-private ApplicationContext applicationContext;
-private AuthorityProvider authorityProvider;
-private NiFiProperties properties;
-private final MapString, AuthorityProvider authorityProviders = new 
HashMap();
-
-@Override
-public AuthorityProvider getAuthorityProvider(String identifier) {
-return authorityProviders.get(identifier);
-}
-
-@Override
-public Object getObject() throws Exception {
-if (authorityProvider == null) {
-// look up the authority provider to use
-final String 

[33/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/OutputStreamHandler.java
--
diff --git 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/OutputStreamHandler.java
 
b/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/OutputStreamHandler.java
deleted file mode 100644
index d879722..000
--- 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/OutputStreamHandler.java
+++ /dev/null
@@ -1,24 +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.scripting;
-
-import java.io.OutputStream;
-
-public interface OutputStreamHandler {
-
-void write(OutputStream out);
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/ReaderScript.java
--
diff --git 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/ReaderScript.java
 
b/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/ReaderScript.java
deleted file mode 100644
index b1d89c0..000
--- 
a/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/scripting/ReaderScript.java
+++ /dev/null
@@ -1,79 +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.scripting;
-
-import java.io.InputStream;
-import java.util.Map;
-
-import javax.script.Invocable;
-import javax.script.ScriptException;
-
-import org.apache.nifi.processor.Relationship;
-
-/**
- * p
- * Script authors should extend this class if they want to follow the reader
- * paradigm for NiFi processors.
- * /p
- *
- * p
- * User scripts should implement {@link #route(InputStream)}. 
coderoute/code
- * uses a returned relationship name to determine where FlowFiles go. Scripts
- * may also implement {@link #getProcessorRelationships()} to specify available
- * relationship names.
- * /p
- *
- */
-public class ReaderScript extends Script {
-
-private Object routeCallback;
-
-public ReaderScript(Object... callbacks) {
-super(callbacks);
-for (Object callback : callbacks) {
-if (callback instanceof Map?, ?) {
-routeCallback = routeCallback == null  ((Map?, ?) 
callback).containsKey(route) ? callback : routeCallback;
-}
-}
-}
-
-public ReaderScript() {
-
-}
-
-// Simple helper
-public void process(InputStream input) throws NoSuchMethodException, 
ScriptException {
-lastRoute = route(input);
-}
-
-/**
- * Subclasses should examine the provided inputstream, then determine which
- * relationship the file will be sent down and return its name.
- *
- *
- * @param in a Java InputStream containing the incoming FlowFile.
- * @return a relationship name
- * @throws ScriptException
- * @throws NoSuchMethodException
- */
-public Relationship route(InputStream in) throws NoSuchMethodException, 
ScriptException {
-Relationship relationship = null;
-Invocable 

[48/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/commons/flowfile-packager/src/main/java/org/apache/nifi/util/Unpackage.java
--
diff --git 
a/commons/flowfile-packager/src/main/java/org/apache/nifi/util/Unpackage.java 
b/commons/flowfile-packager/src/main/java/org/apache/nifi/util/Unpackage.java
deleted file mode 100644
index 19f702c..000
--- 
a/commons/flowfile-packager/src/main/java/org/apache/nifi/util/Unpackage.java
+++ /dev/null
@@ -1,119 +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.util;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Map;
-import java.util.UUID;
-
-public class Unpackage {
-
-private static void printUsage() {
-System.out.println(java  + Unpackage.class.getCanonicalName() +  
version input file 1 [input file 2 input file 3 ... input file N]);
-System.out.println(version : The version of the FlowFile Package 
format. Valid values are 1, 2, 3);
-System.out.println(input file X : The FlowFile package to unpack);
-System.out.println();
-}
-
-public static void main(final String[] args) throws IOException {
-if (args.length  2) {
-printUsage();
-return;
-}
-
-final String version = args[0];
-
-int inputFileCount = 0;
-int outputFileCount = 0;
-
-for (int i = 1; i  args.length; i++) {
-final String filename = args[i];
-final File inFile = new File(filename);
-
-if (inFile.isDirectory()) {
-System.out.println(WARNING: input file  + inFile +  is a 
directory; skipping);
-continue;
-}
-
-if (!inFile.exists() || !inFile.canRead()) {
-System.out.println(ERROR: unable to read file  + inFile);
-continue;
-}
-
-final File outputDir = new File(inFile.getAbsolutePath() + 
.unpacked);
-if (!outputDir.exists()  !outputDir.mkdir()) {
-System.out.println(ERROR: Unable to create directory  + 
outputDir);
-continue;
-}
-
-final File tempFile = new File(outputDir, .temp. + 
UUID.randomUUID().toString() + .unpackage);
-inputFileCount++;
-try (final FileInputStream fis = new FileInputStream(inFile);
-final BufferedInputStream bufferedIn = new 
BufferedInputStream(fis)) {
-
-final FlowFileUnpackager unpackager = 
createUnpackager(version);
-while (unpackager.hasMoreData()) {
-outputFileCount++;
-final MapString, String attributes;
-
-try (final FileOutputStream fos = new 
FileOutputStream(tempFile);
-final BufferedOutputStream bufferedOut = new 
BufferedOutputStream(fos)) {
-attributes = unpackager.unpackageFlowFile(bufferedIn, 
bufferedOut);
-}
-
-String outputFilename = attributes.get(filename);
-if (outputFilename == null) {
-outputFilename = attributes.get(nf.file.name);
-}
-
-final File outputFile = new File(outputDir, 
outputFilename);
-tempFile.renameTo(outputFile);
-
-final File attributeFilename = new File(outputDir, 
outputFilename + .attributes);
-try (final FileOutputStream fos = new 
FileOutputStream(attributeFilename);
-final BufferedOutputStream bufferedOut = new 
BufferedOutputStream(fos)) {
-
-for (final Map.EntryString, String entry : 
attributes.entrySet()) {
-bufferedOut.write((entry.getKey() + = + 
entry.getValue() + \n).getBytes(UTF-8));
-}
-}
-}
-}
-}
-
-System.out.println(Unpacked  + 

[06/51] [partial] incubator-nifi git commit: Reworked overall directory structure to make releasing nifi vs maven plugis easier

2015-01-15 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/300952a9/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
deleted file mode 100644
index f36a459..000
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/EventDrivenWorkerQueue.java
+++ /dev/null
@@ -1,329 +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.controller;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.nifi.connectable.Connectable;
-import org.apache.nifi.connectable.Connection;
-import org.apache.nifi.processor.Relationship;
-import org.apache.nifi.util.Connectables;
-
-public class EventDrivenWorkerQueue implements WorkerQueue {
-
-private final Object workMonitor = new Object();
-
-private final MapConnectable, Worker workerMap = new HashMap();   // 
protected by synchronizing on workMonitor
-private final WorkerReadyQueue workerQueue;
-
-public EventDrivenWorkerQueue(final boolean clustered, final boolean 
primary, final ProcessScheduler scheduler) {
-workerQueue = new WorkerReadyQueue(scheduler);
-workerQueue.setClustered(clustered);
-workerQueue.setPrimary(primary);
-}
-
-@Override
-public void setClustered(final boolean clustered) {
-workerQueue.setClustered(clustered);
-}
-
-@Override
-public void setPrimary(final boolean primary) {
-workerQueue.setPrimary(primary);
-}
-
-@Override
-public Worker poll(final long timeout, final TimeUnit timeUnit) {
-final long maxTime = System.currentTimeMillis() + 
TimeUnit.MILLISECONDS.convert(timeout, timeUnit);
-while (System.currentTimeMillis()  maxTime) {
-synchronized (workMonitor) {
-final Worker worker = workerQueue.poll();
-if (worker == null) {
-// nothing to do. wait until we have something to do.
-final long timeLeft = maxTime - System.currentTimeMillis();
-if (timeLeft = 0) {
-return null;
-}
-
-try {
-workMonitor.wait(timeLeft);
-} catch (final InterruptedException ignored) {
-}
-} else {
-// Decrement the amount of work there is to do for this 
worker.
-final int workLeft = worker.decrementEventCount();
-if (workLeft  0) {
-workerQueue.offer(worker);
-}
-
-return worker;
-}
-}
-}
-
-return null;
-}
-
-@Override
-public void offer(final Connectable connectable) {
-synchronized (workMonitor) {
-Worker worker = workerMap.get(connectable);
-if (worker == null) {
-// if worker is null, then it has not been scheduled to run; 
ignore the event.
-return;
-}
-
-final int countBefore = worker.incrementEventCount();
-if (countBefore  0) {
-worker.setWorkCount(1);
-}
-if (countBefore = 0) {
-// If countBefore  0 then it's already on the queue, so just 
incrementing its counter is sufficient.
-workerQueue.offer(worker);
-}
-
-workMonitor.notify();
-}
-}
-
-private int getWorkCount(final Connectable connectable) {
-int sum = 0;
-for (final Connection connection : 
connectable.getIncomingConnections()) {
-sum += 

svn commit: r1658745 - /incubator/nifi/site/trunk/content/development/licensing-guide.md

2015-02-10 Thread joewitt
Author: joewitt
Date: Tue Feb 10 16:07:48 2015
New Revision: 1658745

URL: http://svn.apache.org/r1658745
Log:
fixed 'written by lawyers'

Modified:
incubator/nifi/site/trunk/content/development/licensing-guide.md

Modified: incubator/nifi/site/trunk/content/development/licensing-guide.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/licensing-guide.md?rev=1658745r1=1658744r2=1658745view=diff
==
--- incubator/nifi/site/trunk/content/development/licensing-guide.md (original)
+++ incubator/nifi/site/trunk/content/development/licensing-guide.md Tue Feb 10 
16:07:48 2015
@@ -22,7 +22,7 @@ This document provides guidance to contr
 
  Disclaimer:
 
-This document is not written lawyers.  The guidance in this document is meant 
to compliment Apache Incubator and Apache Software Foundation guides and 
policies.  If anything in this document is inconsistent with those then it is a 
defect in this document.
+This document is not written by lawyers.  The guidance in this document is 
meant to compliment Apache Incubator and Apache Software Foundation guides and 
policies.  If anything in this document is inconsistent with those then it is a 
defect in this document.
   
 ## Background Material
 




[17/29] incubator-nifi git commit: Moving the JsonPath Validator to the JsonPathUtil class so that it can be reused by other processors.

2015-02-17 Thread joewitt
Moving the JsonPath Validator to the JsonPathUtil class so that it can be 
reused by other processors.


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

Branch: refs/heads/NIFI-360
Commit: 5a81f19b25bc073ec1089c115b6e6fcf01056f91
Parents: 0a19ada
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 09:44:30 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 09:44:30 2015 -0500

--
 .../processors/standard/EvaluateJsonPath.java   | 21 +++---
 .../processors/standard/util/JsonPathUtils.java | 44 
 2 files changed, 50 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5a81f19b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index fe89635..05d31da 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -16,7 +16,10 @@
  */
 package org.apache.nifi.processors.standard;
 
-import com.jayway.jsonpath.*;
+import com.jayway.jsonpath.Configuration;
+import com.jayway.jsonpath.DocumentContext;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.PathNotFoundException;
 import com.jayway.jsonpath.spi.json.JsonProvider;
 import net.minidev.json.JSONValue;
 import org.apache.nifi.annotation.behavior.EventDriven;
@@ -27,13 +30,13 @@ import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.components.ValidationContext;
 import org.apache.nifi.components.ValidationResult;
-import org.apache.nifi.components.Validator;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.logging.ProcessorLog;
 import org.apache.nifi.processor.*;
 import org.apache.nifi.processor.exception.ProcessException;
 import org.apache.nifi.processor.io.InputStreamCallback;
 import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processors.standard.util.JsonPathUtils;
 import org.apache.nifi.stream.io.BufferedInputStream;
 import org.apache.nifi.stream.io.BufferedOutputStream;
 import org.apache.nifi.util.BooleanHolder;
@@ -147,7 +150,7 @@ public class EvaluateJsonPath extends AbstractProcessor {
 return new PropertyDescriptor.Builder()
 .name(propertyDescriptorName)
 .expressionLanguageSupported(false)
-.addValidator(new JsonPathValidator())
+.addValidator(JsonPathUtils.JSON_PATH_VALIDATOR)
 .required(false)
 .dynamic(true)
 .build();
@@ -278,17 +281,5 @@ public class EvaluateJsonPath extends AbstractProcessor {
 return (obj instanceof String);
 }
 
-private static class JsonPathValidator implements Validator {
-@Override
-public ValidationResult validate(String subject, String input, 
ValidationContext context) {
-String error = null;
-try {
-JsonPath compile = JsonPath.compile(input);
-} catch (InvalidPathException ipe) {
-error = ipe.toString();
-}
-return new ValidationResult.Builder().valid(error == 
null).explanation(error).build();
-}
-}
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5a81f19b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonPathUtils.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonPathUtils.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonPathUtils.java
new file mode 100644
index 000..ecd2ad0
--- /dev/null
+++ 

[28/29] incubator-nifi git commit: Merge branch 'json-processors' of https://github.com/apiri/incubator-nifi into NIFI-360

2015-02-17 Thread joewitt
Merge branch 'json-processors' of https://github.com/apiri/incubator-nifi into 
NIFI-360


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

Branch: refs/heads/NIFI-360
Commit: f05cc9383cc86f3697aed59edefff00d35336838
Parents: dde5fd5 9a5b6d5
Author: joewitt joew...@apache.org
Authored: Tue Feb 17 22:17:05 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Tue Feb 17 22:17:05 2015 -0500

--
 nifi/LICENSE|  28 ++
 .../nifi-standard-processors/pom.xml|   4 +
 .../processors/standard/EvaluateJsonPath.java   | 240 +++
 .../nifi/processors/standard/SplitJson.java | 143 +++
 .../processors/standard/util/JsonUtils.java | 127 ++
 .../org.apache.nifi.processor.Processor |   2 +
 .../standard/TestEvaluateJsonPath.java  | 252 +++
 .../nifi/processors/standard/TestSplitJson.java | 126 ++
 .../test/resources/TestJson/json-sample.json| 415 +++
 nifi/pom.xml|   5 +
 10 files changed, 1342 insertions(+)
--




[14/29] incubator-nifi git commit: Adjusting error where the return type of string was omitted from the possible selections

2015-02-17 Thread joewitt
Adjusting error where the return type of string was omitted from the possible 
selections


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

Branch: refs/heads/NIFI-360
Commit: 5b145e10e8508bec5293aab7318978fc3c9e2b57
Parents: 7e58130
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Mon Feb 16 18:34:23 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Mon Feb 16 18:34:23 2015 -0500

--
 .../java/org/apache/nifi/processors/standard/EvaluateJsonPath.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5b145e10/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index 13eb50b..d6bcdc1 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -72,7 +72,7 @@ public class EvaluateJsonPath extends AbstractProcessor {
 .name(Return Type)
 .description(Indicates the desired return type of the JSON Path 
expressions.  Selecting 'auto-detect' will set the return type to 'json' for a 
Destination of 'flowfile-content', and 'string' for a Destination of 
'flowfile-attribute'.)
 .required(true)
-.allowableValues(RETURN_TYPE_AUTO, RETURN_TYPE_AUTO, 
RETURN_TYPE_STRING)
+.allowableValues(RETURN_TYPE_AUTO, RETURN_TYPE_JSON, 
RETURN_TYPE_STRING)
 .defaultValue(RETURN_TYPE_AUTO)
 .build();
 



[11/29] incubator-nifi git commit: Adding a test for multiple attributes where neither evaluates to a found path.

2015-02-17 Thread joewitt
Adding a test for multiple attributes where neither evaluates to a found path.


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

Branch: refs/heads/NIFI-360
Commit: d4a94c37eea9c4a545e9f764c113a3d863257e57
Parents: 78ad0a3
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Mon Feb 16 18:24:57 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Mon Feb 16 18:24:57 2015 -0500

--
 .../processors/standard/EvaluateJsonPath.java   | 35 +++-
 .../standard/TestEvaluateJsonPath.java  | 22 
 2 files changed, 41 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d4a94c37/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index e747838..13eb50b 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -212,28 +212,31 @@ public class EvaluateJsonPath extends AbstractProcessor {
 
 String jsonPathAttrKey = attributeJsonPathEntry.getKey();
 JsonPath jsonPathExp = attributeJsonPathEntry.getValue();
-final String evalResult = evaluatePathForContext(jsonPathExp, 
documentContext);
 
+
+final ObjectHolderString resultHolder = new 
ObjectHolder();
 try {
-switch (destination) {
-case DESTINATION_ATTRIBUTE:
-jsonPathResults.put(jsonPathAttrKey, evalResult);
-break;
-case DESTINATION_CONTENT:
-flowFile = processSession.write(flowFile, new 
OutputStreamCallback() {
-@Override
-public void process(final OutputStream out) 
throws IOException {
-try (OutputStream outputStream = new 
BufferedOutputStream(out)) {
-
outputStream.write(evalResult.getBytes(StandardCharsets.UTF_8));
-}
-}
-});
-break;
-}
+resultHolder.set(evaluatePathForContext(jsonPathExp, 
documentContext));
 } catch (PathNotFoundException e) {
 logger.error(FlowFile {} could not find path {} for 
attribute key {}., new Object[]{flowFile.getId(), jsonPathExp.getPath(), 
jsonPathAttrKey}, e);
 jsonPathResults.put(jsonPathAttrKey, );
 }
+
+switch (destination) {
+case DESTINATION_ATTRIBUTE:
+jsonPathResults.put(jsonPathAttrKey, 
resultHolder.get());
+break;
+case DESTINATION_CONTENT:
+flowFile = processSession.write(flowFile, new 
OutputStreamCallback() {
+@Override
+public void process(final OutputStream out) throws 
IOException {
+try (OutputStream outputStream = new 
BufferedOutputStream(out)) {
+
outputStream.write(resultHolder.get().getBytes(StandardCharsets.UTF_8));
+}
+}
+});
+break;
+}
 }
 flowFile = processSession.putAllAttributes(flowFile, 
jsonPathResults);
 processSession.transfer(flowFile, REL_MATCH);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d4a94c37/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
--
diff --git 

[19/29] incubator-nifi git commit: Providing a SplitJson processor which will break JSON Arrays into their individual elements. Refactored supporting JsonUtils code and EvaluateJsonPath to reuse commo

2015-02-17 Thread joewitt
Providing a SplitJson processor which will break JSON Arrays into their 
individual elements.  Refactored supporting JsonUtils code and EvaluateJsonPath 
to reuse common functionality.


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

Branch: refs/heads/NIFI-360
Commit: 2e05dcbbfdb37843456dff121d9878d8679d7067
Parents: 59ad194
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 15:15:53 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 15:17:12 2015 -0500

--
 .../processors/standard/EvaluateJsonPath.java   |   8 +-
 .../nifi/processors/standard/SplitJson.java | 140 +++
 .../processors/standard/util/JsonUtils.java |   8 ++
 .../org.apache.nifi.processor.Processor |   1 +
 .../standard/TestEvaluateJsonPath.java  |   3 +-
 .../nifi/processors/standard/TestSplitJson.java | 115 +++
 6 files changed, 268 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2e05dcbb/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index 0bdd20c..8cdf1a2 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -192,7 +192,7 @@ public class EvaluateJsonPath extends AbstractProcessor {
 final ObjectHolderObject resultHolder = new 
ObjectHolder(null);
 try {
 Object result = documentContext.read(jsonPathExp);
-if (returnType.equals(RETURN_TYPE_SCALAR)  
!isScalar(result)) {
+if (returnType.equals(RETURN_TYPE_SCALAR)  
!JsonUtils.isJsonScalar(result)) {
 logger.error(Unable to return a scalar value for the 
expression {} for FlowFile {}. Evaluated value was {}. Transferring to {}.,
 new Object[]{jsonPathExp.getPath(), 
flowFile.getId(), result.toString(), REL_FAILURE.getName()});
 processSession.transfer(flowFile, REL_FAILURE);
@@ -233,15 +233,11 @@ public class EvaluateJsonPath extends AbstractProcessor {
 }
 
 private static String getResultRepresentation(Object jsonPathResult) {
-if (isScalar(jsonPathResult)) {
+if (JsonUtils.isJsonScalar(jsonPathResult)) {
 return jsonPathResult.toString();
 }
 return JsonUtils.JSON_PROVIDER.toJson(jsonPathResult);
 }
 
-private static boolean isScalar(Object obj) {
-return (obj instanceof String);
-}
-
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2e05dcbb/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
new file mode 100644
index 000..e589b48
--- /dev/null
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ * 

[10/29] incubator-nifi git commit: Adding a test for multiple attribute paths

2015-02-17 Thread joewitt
Adding a test for multiple attribute paths


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

Branch: refs/heads/NIFI-360
Commit: 78ad0a3147cf1f3573f94f79685ebb868b5d190d
Parents: 974617d
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Mon Feb 16 18:20:31 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Mon Feb 16 18:20:31 2015 -0500

--
 .../standard/TestEvaluateJsonPath.java  | 22 
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78ad0a31/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
index 308440f..60e19d9 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
@@ -96,6 +96,28 @@ public class TestEvaluateJsonPath {
 }
 
 @Test
+public void testExtractPath_destinationAttributes_twoPaths() throws 
Exception {
+final TestRunner testRunner = TestRunners.newTestRunner(new 
EvaluateJsonPath());
+testRunner.setProperty(EvaluateJsonPath.DESTINATION, 
EvaluateJsonPath.DESTINATION_ATTRIBUTE);
+
+String jsonPathIdAttrKey = evaluatejson.id;
+String jsonPathNameAttrKey = evaluatejson.name;
+
+testRunner.setProperty(jsonPathIdAttrKey, $[0]._id);
+testRunner.setProperty(jsonPathNameAttrKey, $[0].name);
+
+testRunner.enqueue(JSON_SNIPPET);
+testRunner.run();
+
+Relationship expectedRel = EvaluateJsonPath.REL_MATCH;
+
+testRunner.assertAllFlowFilesTransferred(expectedRel, 1);
+final MockFlowFile out = 
testRunner.getFlowFilesForRelationship(expectedRel).get(0);
+Assert.assertEquals(Transferred flow file did not have the correct 
result for id attribute, 54df94072d5dbf7dc6340cc5, 
out.getAttribute(jsonPathIdAttrKey));
+Assert.assertEquals(Transferred flow file did not have the correct 
result for name attribute, {\first\:\Shaffer\,\last\:\Pearson\}, 
out.getAttribute(jsonPathNameAttrKey));
+}
+
+@Test
 public void testExtractPath_destinationContent() throws Exception {
 String jsonPathAttrKey = JsonPath;
 



[25/29] incubator-nifi git commit: Adding missing apostrophe for description of SplitJson

2015-02-17 Thread joewitt
Adding missing apostrophe for description of SplitJson


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

Branch: refs/heads/NIFI-360
Commit: 5f647aa46523ee98c8f8c7339216f852e422f9c7
Parents: 408f636
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 18:40:12 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 18:40:12 2015 -0500

--
 .../main/java/org/apache/nifi/processors/standard/SplitJson.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5f647aa4/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
index 3ca0ace..c2b520c 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
@@ -41,7 +41,7 @@ import java.util.*;
 @SupportsBatching
 @Tags({json, split, jsonpath})
 @CapabilityDescription(Splits a JSON File into multiple, separate FlowFiles 
for an array element specified by a JsonPath expression. 
-+ Each generated FlowFile is comprised of an element of the specified 
array and transferred to relationship 'split, 
++ Each generated FlowFile is comprised of an element of the specified 
array and transferred to relationship 'split,' 
 + with the original file transferred to the 'original' relationship. 
If the specified JsonPath is not found or 
 + does not evaluate to an array element, the original file is routed 
to 'failure' and no files are generated.)
 public class SplitJson extends AbstractProcessor {



[24/29] incubator-nifi git commit: Preferring the constant empty string for clarity instead of quotes.

2015-02-17 Thread joewitt
Preferring the constant empty string for clarity instead of quotes.


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

Branch: refs/heads/NIFI-360
Commit: 408f636361cbad025752978e10775651b7daddf4
Parents: a058fd0
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 17:01:06 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 17:01:06 2015 -0500

--
 .../org/apache/nifi/processors/standard/EvaluateJsonPath.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/408f6363/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index 093454d..3a64a34 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -35,6 +35,7 @@ import org.apache.nifi.processor.io.OutputStreamCallback;
 import org.apache.nifi.processors.standard.util.JsonUtils;
 import org.apache.nifi.stream.io.BufferedOutputStream;
 import org.apache.nifi.util.ObjectHolder;
+import org.apache.nifi.util.StringUtils;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -206,7 +207,7 @@ public class EvaluateJsonPath extends AbstractProcessor {
 } catch (PathNotFoundException e) {
 logger.warn(FlowFile {} could not find path {} for 
attribute key {}., new Object[]{flowFile.getId(), jsonPathExp.getPath(), 
jsonPathAttrKey}, e);
 if (destination.equals(DESTINATION_ATTRIBUTE)) {
-jsonPathResults.put(jsonPathAttrKey, );
+jsonPathResults.put(jsonPathAttrKey, 
StringUtils.EMPTY);
 continue jsonPathEvalLoop;
 } else {
 processSession.transfer(flowFile, REL_NO_MATCH);



[09/29] incubator-nifi git commit: Adding a test to verify the placement of a JSON path expression with a content destination.

2015-02-17 Thread joewitt
Adding a test to verify the placement of a JSON path expression with a content 
destination.


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

Branch: refs/heads/NIFI-360
Commit: 974617d44ee41bd5cac9f238eca43cb9f81684a6
Parents: b332849
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Mon Feb 16 18:09:22 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Mon Feb 16 18:09:22 2015 -0500

--
 .../processors/standard/TestEvaluateJsonPath.java  | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/974617d4/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
index 7174e9a..308440f 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
@@ -94,4 +94,21 @@ public class TestEvaluateJsonPath {
 final MockFlowFile out = 
testRunner.getFlowFilesForRelationship(expectedRel).get(0);
 Assert.assertEquals(Transferred flow file did not have the correct 
result, 54df94072d5dbf7dc6340cc5, out.getAttribute(jsonPathAttrKey));
 }
+
+@Test
+public void testExtractPath_destinationContent() throws Exception {
+String jsonPathAttrKey = JsonPath;
+
+final TestRunner testRunner = TestRunners.newTestRunner(new 
EvaluateJsonPath());
+testRunner.setProperty(EvaluateJsonPath.DESTINATION, 
EvaluateJsonPath.DESTINATION_CONTENT);
+testRunner.setProperty(jsonPathAttrKey, $[0]._id);
+
+testRunner.enqueue(JSON_SNIPPET);
+testRunner.run();
+
+Relationship expectedRel = EvaluateJsonPath.REL_MATCH;
+
+testRunner.assertAllFlowFilesTransferred(expectedRel, 1);
+
testRunner.getFlowFilesForRelationship(expectedRel).get(0).assertContentEquals(54df94072d5dbf7dc6340cc5);
+}
 }



[26/29] incubator-nifi git commit: Removing extraneous comment block that was replaced by method Javadoc

2015-02-17 Thread joewitt
Removing extraneous comment block that was replaced by method Javadoc


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

Branch: refs/heads/NIFI-360
Commit: c88b427e8201a1e1ba42720def252e0762e31ed9
Parents: 5f647aa
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 18:42:05 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 18:42:05 2015 -0500

--
 .../org/apache/nifi/processors/standard/util/JsonUtils.java | 5 -
 1 file changed, 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c88b427e/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
index efe89ab..6f97207 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
@@ -89,11 +89,6 @@ public class JsonUtils {
 return contextHolder.get();
 }
 
-/*
- * JSONValue#isValidJson is permissive to the degree of the Smart JSON 
definition.
- * Accordingly, a strict JSON approach is preferred in determining whether 
or not a document is valid.
- */
-
 /**
  * JSONValue#isValidJson is permissive to the degree of the Smart JSON 
definition, accordingly a strict JSON approach
  * is preferred in determining whether or not a document is valid.



[01/29] incubator-nifi git commit: Adding JSONPath as a managed dependency and including it in the standard processor pom

2015-02-17 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-360 [created] 286277123


Adding JSONPath as a managed dependency and including it in the standard 
processor pom


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

Branch: refs/heads/NIFI-360
Commit: 446fc2ef8099faff786f11c7d640232191dac2b0
Parents: b8ade5b
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Fri Feb 13 23:42:40 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Fri Feb 13 23:42:40 2015 -0500

--
 .../nifi-standard-bundle/nifi-standard-processors/pom.xml   | 4 
 nifi/pom.xml| 5 +
 2 files changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/446fc2ef/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
index a482e19..5a15cf4 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
@@ -151,6 +151,10 @@
 artifactIdactivemq-client/artifactId
 /dependency
 dependency
+groupIdcom.jayway.jsonpath/groupId
+artifactIdjson-path/artifactId
+/dependency
+dependency
 groupIdorg.apache.nifi/groupId
 artifactIdnifi-ssl-context-service/artifactId
 scopetest/scope

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/446fc2ef/nifi/pom.xml
--
diff --git a/nifi/pom.xml b/nifi/pom.xml
index 8539ae9..20f3a42 100644
--- a/nifi/pom.xml
+++ b/nifi/pom.xml
@@ -783,6 +783,11 @@
 artifactIdnifi-write-ahead-log/artifactId
 version0.0.2-incubating-SNAPSHOT/version
 /dependency
+dependency
+groupIdcom.jayway.jsonpath/groupId
+artifactIdjson-path/artifactId
+version1.2.0/version
+/dependency
 /dependencies
 /dependencyManagement
 dependencies



[20/29] incubator-nifi git commit: Adding a test case for SplitJson where the specified path cannot be found. Adjusting documentation for additional detail.

2015-02-17 Thread joewitt
Adding a test case for SplitJson where the specified path cannot be found.  
Adjusting documentation for additional detail.


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

Branch: refs/heads/NIFI-360
Commit: 7a74dd942008bf2178634746e70266f46657d4ef
Parents: 2e05dcb
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 15:50:42 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 15:50:42 2015 -0500

--
 .../nifi/processors/standard/SplitJson.java | 12 +++--
 .../processors/standard/util/JsonUtils.java | 28 +++-
 .../nifi/processors/standard/TestSplitJson.java | 11 
 3 files changed, 43 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/7a74dd94/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
index e589b48..3ca0ace 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
@@ -18,6 +18,7 @@ package org.apache.nifi.processors.standard;
 
 import com.jayway.jsonpath.DocumentContext;
 import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.PathNotFoundException;
 import org.apache.nifi.annotation.behavior.EventDriven;
 import org.apache.nifi.annotation.behavior.SideEffectFree;
 import org.apache.nifi.annotation.behavior.SupportsBatching;
@@ -105,10 +106,17 @@ public class SplitJson extends AbstractProcessor {
 
 final ListFlowFile segments = new ArrayList();
 
-Object jsonPathResult = documentContext.read(jsonPath);
+Object jsonPathResult;
+try {
+jsonPathResult = documentContext.read(jsonPath);
+} catch (PathNotFoundException e) {
+logger.warn(JsonPath {} could not be found for FlowFile {}, new 
Object[]{jsonPath.getPath(), original});
+processSession.transfer(original, REL_FAILURE);
+return;
+}
 
 if (!(jsonPathResult instanceof List)) {
-logger.error(The evaluated value {} of {} was not an array 
compatible type and cannot be split.,
+logger.error(The evaluated value {} of {} was not a JSON Array 
compatible type and cannot be split.,
 new Object[]{jsonPathResult, jsonPath.getPath()});
 processSession.transfer(original, REL_FAILURE);
 return;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/7a74dd94/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
index 0bf33dd..5fe2a56 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
@@ -89,14 +89,23 @@ public class JsonUtils {
 return contextHolder.get();
 }
 
-
+/*
+ * JSONValue#isValidJson is permissive to the degree of the Smart JSON 
definition.
+ * Accordingly, a strict JSON approach is preferred in determining whether 
or not a document is valid.
+ */
+
+/**
+ * JSONValue#isValidJson is permissive to the degree of the Smart JSON 
definition, accordingly a strict JSON approach
+ * is preferred in determining whether or not a document is valid.
+ * Performs a validation of the provided stream according to RFC 4627 as 
implemented by {@link net.minidev.json.parser.JSONParser#MODE_RFC4627}
+ *
+ * @param inputStream of content to be validated as JSON
+ * @return true, if the content is valid 

[27/29] incubator-nifi git commit: Encapsulating the rendering of a JsonPath result within JsonUtils

2015-02-17 Thread joewitt
Encapsulating the rendering of a JsonPath result within JsonUtils


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

Branch: refs/heads/NIFI-360
Commit: 9a5b6d5ba234c471df8faefb0ebf9470a68bebb5
Parents: c88b427
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 21:29:40 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 21:29:40 2015 -0500

--
 .../apache/nifi/processors/standard/EvaluateJsonPath.java | 10 +-
 .../org/apache/nifi/processors/standard/SplitJson.java|  7 +--
 .../apache/nifi/processors/standard/util/JsonUtils.java   | 10 +-
 3 files changed, 11 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a5b6d5b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index 3a64a34..d79a6de 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -215,7 +215,7 @@ public class EvaluateJsonPath extends AbstractProcessor {
 }
 }
 
-final String resultRepresentation = 
getResultRepresentation(resultHolder.get());
+final String resultRepresentation = 
JsonUtils.getResultRepresentation(resultHolder.get());
 switch (destination) {
 case DESTINATION_ATTRIBUTE:
 jsonPathResults.put(jsonPathAttrKey, 
resultRepresentation);
@@ -237,12 +237,4 @@ public class EvaluateJsonPath extends AbstractProcessor {
 }
 }
 
-private static String getResultRepresentation(Object jsonPathResult) {
-if (JsonUtils.isJsonScalar(jsonPathResult)) {
-return jsonPathResult.toString();
-}
-return JsonUtils.JSON_PROVIDER.toJson(jsonPathResult);
-}
-
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a5b6d5b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
index c2b520c..78e1b2a 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
@@ -129,12 +129,7 @@ public class SplitJson extends AbstractProcessor {
 split = processSession.write(split, new OutputStreamCallback() {
 @Override
 public void process(OutputStream out) throws IOException {
-String resultSegmentContent;
-if (JsonUtils.isJsonScalar(resultSegment)) {
-resultSegmentContent = resultSegment.toString();
-} else {
-resultSegmentContent = 
JsonUtils.JSON_PROVIDER.toJson(resultSegment);
-}
+String resultSegmentContent = 
JsonUtils.getResultRepresentation(resultSegment);
 
out.write(resultSegmentContent.getBytes(StandardCharsets.UTF_8));
 }
 });

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a5b6d5b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
 

[21/29] incubator-nifi git commit: Removing unnessecary local variable

2015-02-17 Thread joewitt
Removing unnessecary local variable


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

Branch: refs/heads/NIFI-360
Commit: 1a746212bf2e13680d71dd12dfb60df3a20784ab
Parents: 7a74dd9
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 16:04:21 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 16:04:21 2015 -0500

--
 .../org/apache/nifi/processors/standard/util/JsonUtils.java| 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1a746212/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
index 5fe2a56..efe89ab 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JsonUtils.java
@@ -104,13 +104,9 @@ public class JsonUtils {
  * @throws IOException
  */
 public static boolean isValidJson(InputStream inputStream) throws 
IOException {
-boolean isValid = false;
-
 try (InputStreamReader inputStreamReader = new 
InputStreamReader(inputStream)) {
-isValid = JSONValue.isValidJsonStrict(inputStreamReader);
+return JSONValue.isValidJsonStrict(inputStreamReader);
 }
-
-return isValid;
 }
 
 /**



[04/29] incubator-nifi git commit: Adding EvaluateJsonPath to the Processor services file

2015-02-17 Thread joewitt
Adding EvaluateJsonPath to the Processor services file


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

Branch: refs/heads/NIFI-360
Commit: e75213eead936baa7046d9c9ba5b86a4508f532a
Parents: ec669e5
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Sat Feb 14 13:35:53 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Sat Feb 14 13:35:53 2015 -0500

--
 .../resources/META-INF/services/org.apache.nifi.processor.Processor | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e75213ee/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
index 66c9697..8a1fd74 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
@@ -19,6 +19,7 @@ org.apache.nifi.processors.standard.ConvertCharacterSet
 org.apache.nifi.processors.standard.DetectDuplicate
 org.apache.nifi.processors.standard.DistributeLoad
 org.apache.nifi.processors.standard.EncryptContent
+org.apache.nifi.processors.standard.EvaluateJsonPath
 org.apache.nifi.processors.standard.EvaluateRegularExpression
 org.apache.nifi.processors.standard.EvaluateXPath
 org.apache.nifi.processors.standard.EvaluateXQuery



[23/29] incubator-nifi git commit: Adding license terms for asm dependency introduced via JsonPath - Json-Smart

2015-02-17 Thread joewitt
Adding license terms for asm dependency introduced via JsonPath - Json-Smart


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

Branch: refs/heads/NIFI-360
Commit: a058fd0460dd5ca91560b1239dd733da37cfa782
Parents: 627bd91
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 16:58:04 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 16:58:04 2015 -0500

--
 nifi/LICENSE | 28 
 1 file changed, 28 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a058fd04/nifi/LICENSE
--
diff --git a/nifi/LICENSE b/nifi/LICENSE
index 2e67c09..4d8be01 100644
--- a/nifi/LICENSE
+++ b/nifi/LICENSE
@@ -455,4 +455,32 @@ This product bundles 'json2.js' which is available in the 
'public domain'.
 This product bundles 'reset.css' which is available in the 'public domain'.
 For details see http://meyerweb.com/eric/tools/css/reset/
 
+This product bundles 'asm' which is available under an MIT style license.
+For details see http://asm.ow2.org/asmdex-license.html
 
+Copyright (c) 2012 France Télécom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file



[03/29] incubator-nifi git commit: Stubbing out validator, setting up relationships and properties.

2015-02-17 Thread joewitt
Stubbing out validator, setting up relationships and properties.


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

Branch: refs/heads/NIFI-360
Commit: ec669e5b42e58335ab511dfa8dfd52bd0848f088
Parents: 5f03fb1
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Sat Feb 14 13:26:08 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Sat Feb 14 13:26:08 2015 -0500

--
 .../processors/standard/EvaluateJSONPath.java   | 95 +---
 1 file changed, 85 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec669e5b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
index 9ad3e49..349e623 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
@@ -22,38 +22,113 @@ import 
org.apache.nifi.annotation.behavior.SupportsBatching;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.components.PropertyDescriptor;
-import org.apache.nifi.processor.AbstractProcessor;
-import org.apache.nifi.processor.ProcessContext;
-import org.apache.nifi.processor.ProcessSession;
-import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.Validator;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.*;
 import org.apache.nifi.processor.exception.ProcessException;
 
+import java.util.*;
+
 @EventDriven
 @SideEffectFree
 @SupportsBatching
-@Tags({JSON, evaluate, JSONPath})
+@Tags({JSON, evaluate, JsonPath})
 @CapabilityDescription()
-public class EvaluateJSONPath extends AbstractProcessor {
+public class EvaluateJsonPath extends AbstractProcessor {
 
 public static final String DESTINATION_ATTRIBUTE = flowfile-attribute;
 public static final String DESTINATION_CONTENT = flowfile-content;
 
 public static final PropertyDescriptor DESTINATION = new 
PropertyDescriptor.Builder()
 .name(Destination)
-.description(Indicates whether the results of the JSONPath 
evaluation are written to the FlowFile content or a FlowFile attribute; if 
using attribute, must specify the Attribute Name property. If set to 
flowfile-content, only one JSONPath may be specified, and the property name is 
ignored.)
+.description(Indicates whether the results of the JsonPath 
evaluation are written to the FlowFile content or a FlowFile attribute; if 
using attribute, must specify the Attribute Name property. If set to 
flowfile-content, only one JsonPath may be specified, and the property name is 
ignored.)
 .required(true)
 .allowableValues(DESTINATION_CONTENT, DESTINATION_ATTRIBUTE)
 .defaultValue(DESTINATION_CONTENT)
 .build();
 
-public static final Relationship REL_MATCH = new 
Relationship.Builder().name(matched).description(FlowFiles are routed to 
this relationship when the JSONPath is successfully evaluated and the FlowFile 
is modified as a result).build();
-public static final Relationship REL_NO_MATCH = new 
Relationship.Builder().name(unmatched).description(FlowFiles are routed to 
this relationship when the JSONPath does not match the content of the FlowFile 
and the Destination is set to flowfile-content).build();
-public static final Relationship REL_FAILURE = new 
Relationship.Builder().name(failure).description(FlowFiles are routed to 
this relationship when the JSONPath cannot be evaluated against the content of 
the FlowFile; for instance, if the FlowFile is not valid JSON).build();
+public static final Relationship REL_MATCH = new 
Relationship.Builder().name(matched).description(FlowFiles are routed to 
this relationship when the JsonPath is successfully evaluated and the FlowFile 
is modified as a result).build();
+public static final Relationship 

[13/29] incubator-nifi git commit: Adding tests for indefinite results with and without the usage of operators.

2015-02-17 Thread joewitt
Adding tests for indefinite results with and without the usage of operators.


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

Branch: refs/heads/NIFI-360
Commit: 7e581307b7d65da79464914b09fe8a90dd5046e9
Parents: 6897090
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Mon Feb 16 18:33:48 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Mon Feb 16 18:33:48 2015 -0500

--
 .../standard/TestEvaluateJsonPath.java  | 35 
 1 file changed, 35 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/7e581307/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
index fc125c2..bece3da 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
@@ -177,4 +177,39 @@ public class TestEvaluateJsonPath {
 testRunner.assertAllFlowFilesTransferred(expectedRel, 1);
 
testRunner.getFlowFilesForRelationship(expectedRel).get(0).assertContentEquals(54df94072d5dbf7dc6340cc5);
 }
+
+
+@Test
+public void testExtractPath_destinationAttribute_indefiniteResult() throws 
Exception {
+String jsonPathAttrKey = friends.indefinite.id.list;
+
+final TestRunner testRunner = TestRunners.newTestRunner(new 
EvaluateJsonPath());
+testRunner.setProperty(EvaluateJsonPath.DESTINATION, 
EvaluateJsonPath.DESTINATION_CONTENT);
+testRunner.setProperty(jsonPathAttrKey, $[0].friends.[*].id);
+
+testRunner.enqueue(JSON_SNIPPET);
+testRunner.run();
+
+Relationship expectedRel = EvaluateJsonPath.REL_MATCH;
+
+testRunner.assertAllFlowFilesTransferred(expectedRel, 1);
+
testRunner.getFlowFilesForRelationship(expectedRel).get(0).assertContentEquals([0,1,2]);
+}
+
+@Test
+public void 
testExtractPath_destinationAttribute_indefiniteResult_operators() throws 
Exception {
+String jsonPathAttrKey = friends.indefinite.id.list;
+
+final TestRunner testRunner = TestRunners.newTestRunner(new 
EvaluateJsonPath());
+testRunner.setProperty(EvaluateJsonPath.DESTINATION, 
EvaluateJsonPath.DESTINATION_CONTENT);
+testRunner.setProperty(jsonPathAttrKey, $[0].friends[?(@.id  
3)].id);
+
+testRunner.enqueue(JSON_SNIPPET);
+testRunner.run();
+
+Relationship expectedRel = EvaluateJsonPath.REL_MATCH;
+
+testRunner.assertAllFlowFilesTransferred(expectedRel, 1);
+
testRunner.getFlowFilesForRelationship(expectedRel).get(0).assertContentEquals([0,1,2]);
+}
 }



[22/29] incubator-nifi git commit: Adding an auto return type for EvaluateJsonPath to match the semantics of the EvaluateXPath processor.

2015-02-17 Thread joewitt
Adding an auto return type for EvaluateJsonPath to match the semantics of the 
EvaluateXPath processor.


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

Branch: refs/heads/NIFI-360
Commit: 627bd91fa719748b850b6c610a89b44be3e6f35e
Parents: 1a74621
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Tue Feb 17 16:15:33 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Tue Feb 17 16:15:33 2015 -0500

--
 .../apache/nifi/processors/standard/EvaluateJsonPath.java | 10 +++---
 .../nifi/processors/standard/TestEvaluateJsonPath.java|  1 +
 2 files changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/627bd91f/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index 8cdf1a2..093454d 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -61,6 +61,7 @@ public class EvaluateJsonPath extends AbstractProcessor {
 public static final String DESTINATION_ATTRIBUTE = flowfile-attribute;
 public static final String DESTINATION_CONTENT = flowfile-content;
 
+public static final String RETURN_TYPE_AUTO = auto-detect;
 public static final String RETURN_TYPE_JSON = json;
 public static final String RETURN_TYPE_SCALAR = scalar;
 
@@ -76,8 +77,8 @@ public class EvaluateJsonPath extends AbstractProcessor {
 .name(Return Type)
 .description(Indicates the desired return type of the JSON Path 
expressions.  Selecting 'auto-detect' will set the return type to 'json' for a 
Destination of 'flowfile-content', and 'string' for a Destination of 
'flowfile-attribute'.)
 .required(true)
-.allowableValues(RETURN_TYPE_JSON, RETURN_TYPE_SCALAR)
-.defaultValue(RETURN_TYPE_JSON)
+.allowableValues(RETURN_TYPE_AUTO, RETURN_TYPE_JSON, 
RETURN_TYPE_SCALAR)
+.defaultValue(RETURN_TYPE_AUTO)
 .build();
 
 public static final Relationship REL_MATCH = new 
Relationship.Builder().name(matched).description(FlowFiles are routed to 
this relationship when the JsonPath is successfully evaluated and the FlowFile 
is modified as a result).build();
@@ -168,7 +169,10 @@ public class EvaluateJsonPath extends AbstractProcessor {
 }
 
 final String destination = 
processContext.getProperty(DESTINATION).getValue();
-final String returnType = 
processContext.getProperty(RETURN_TYPE).getValue();
+String returnType = processContext.getProperty(RETURN_TYPE).getValue();
+if (returnType.equals(RETURN_TYPE_AUTO)) {
+returnType = destination.equals(DESTINATION_CONTENT) ? 
RETURN_TYPE_JSON : RETURN_TYPE_SCALAR;
+}
 
 flowFileLoop:
 for (FlowFile flowFile : flowFiles) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/627bd91f/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
index b7b5103..c5ff814 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
@@ -100,6 +100,7 @@ public class TestEvaluateJsonPath {
 public void testExtractPath_destinationAttributes_twoPaths() throws 
Exception {
 final TestRunner testRunner = TestRunners.newTestRunner(new 
EvaluateJsonPath());
 

[12/29] incubator-nifi git commit: Adding a test for a destination of attributes and only one JsonPath expression evaluates to a found result.

2015-02-17 Thread joewitt
Adding a test for a destination of attributes and only one JsonPath expression 
evaluates to a found result.


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

Branch: refs/heads/NIFI-360
Commit: 6897090771434fc1553b722b835c3b67e8dd14a9
Parents: d4a94c3
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Mon Feb 16 18:26:35 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Mon Feb 16 18:26:35 2015 -0500

--
 .../standard/TestEvaluateJsonPath.java  | 22 
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/68970907/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
index 6a1fbad..fc125c2 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
@@ -140,6 +140,28 @@ public class TestEvaluateJsonPath {
 }
 
 @Test
+public void testExtractPath_destinationAttributes_twoPaths_oneFound() 
throws Exception {
+final TestRunner testRunner = TestRunners.newTestRunner(new 
EvaluateJsonPath());
+testRunner.setProperty(EvaluateJsonPath.DESTINATION, 
EvaluateJsonPath.DESTINATION_ATTRIBUTE);
+
+String jsonPathIdAttrKey = evaluatejson.id;
+String jsonPathNameAttrKey = evaluatejson.name;
+
+testRunner.setProperty(jsonPathIdAttrKey, $[0]._id);
+testRunner.setProperty(jsonPathNameAttrKey, $[0].name.nonexistent);
+
+testRunner.enqueue(JSON_SNIPPET);
+testRunner.run();
+
+Relationship expectedRel = EvaluateJsonPath.REL_MATCH;
+
+testRunner.assertAllFlowFilesTransferred(expectedRel, 1);
+final MockFlowFile out = 
testRunner.getFlowFilesForRelationship(expectedRel).get(0);
+Assert.assertEquals(Transferred flow file did not have the correct 
result for id attribute, 54df94072d5dbf7dc6340cc5, 
out.getAttribute(jsonPathIdAttrKey));
+Assert.assertEquals(Transferred flow file did not have the correct 
result for name attribute, , out.getAttribute(jsonPathNameAttrKey));
+}
+
+@Test
 public void testExtractPath_destinationContent() throws Exception {
 String jsonPathAttrKey = JsonPath;
 



[02/29] incubator-nifi git commit: Creating stub for an EvaluateJSONPath processor and providing configuration akin to EvaluateXPath

2015-02-17 Thread joewitt
Creating stub for an EvaluateJSONPath processor and providing configuration 
akin to EvaluateXPath


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

Branch: refs/heads/NIFI-360
Commit: 5f03fb11d93791ea9cdde43ffb97bceaf22c0143
Parents: 446fc2e
Author: Aldrin Piri aldrinp...@gmail.com
Authored: Sat Feb 14 12:56:19 2015 -0500
Committer: Aldrin Piri aldrinp...@gmail.com
Committed: Sat Feb 14 12:56:19 2015 -0500

--
 .../processors/standard/EvaluateJSONPath.java   | 59 
 1 file changed, 59 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5f03fb11/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
--
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.java
new file mode 100644
index 000..9ad3e49
--- /dev/null
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJSONPath.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.processors.standard;
+
+import org.apache.nifi.annotation.behavior.EventDriven;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+
+@EventDriven
+@SideEffectFree
+@SupportsBatching
+@Tags({JSON, evaluate, JSONPath})
+@CapabilityDescription()
+public class EvaluateJSONPath extends AbstractProcessor {
+
+public static final String DESTINATION_ATTRIBUTE = flowfile-attribute;
+public static final String DESTINATION_CONTENT = flowfile-content;
+
+public static final PropertyDescriptor DESTINATION = new 
PropertyDescriptor.Builder()
+.name(Destination)
+.description(Indicates whether the results of the JSONPath 
evaluation are written to the FlowFile content or a FlowFile attribute; if 
using attribute, must specify the Attribute Name property. If set to 
flowfile-content, only one JSONPath may be specified, and the property name is 
ignored.)
+.required(true)
+.allowableValues(DESTINATION_CONTENT, DESTINATION_ATTRIBUTE)
+.defaultValue(DESTINATION_CONTENT)
+.build();
+
+public static final Relationship REL_MATCH = new 
Relationship.Builder().name(matched).description(FlowFiles are routed to 
this relationship when the JSONPath is successfully evaluated and the FlowFile 
is modified as a result).build();
+public static final Relationship REL_NO_MATCH = new 
Relationship.Builder().name(unmatched).description(FlowFiles are routed to 
this relationship when the JSONPath does not match the content of the FlowFile 
and the Destination is set to flowfile-content).build();
+public static final Relationship REL_FAILURE = new 
Relationship.Builder().name(failure).description(FlowFiles are routed to 
this relationship when the JSONPath cannot be evaluated against the content of 
the FlowFile; for instance, if the FlowFile is not valid JSON).build();
+
+
+@Override
+public void onTrigger(ProcessContext 

incubator-nifi git commit: NIFI-162

2015-02-12 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop 851fe298b - b37d8fb73


NIFI-162


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

Branch: refs/heads/develop
Commit: b37d8fb73302933e33db106637498579aa775b47
Parents: 851fe29
Author: joewitt joew...@apache.org
Authored: Thu Feb 12 21:46:55 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Thu Feb 12 21:46:55 2015 -0500

--
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b37d8fb7/README.md
--
diff --git a/README.md b/README.md
index 3851761..b2b054a 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
 --
 # Apache NiFi
 
-Apache NiFi is a dataflow system based on the concepts of flow-based 
programming. It is currently part of the Apache Incubator.
+Apache NiFi is an easy to use, powerful, and reliable system to process and 
distribute data. It is currently apart of the Apache Incubator.
 
 ## Table of Contents
 



[1/3] incubator-nifi git commit: NIFI-355 removed all extraneous version references

2015-02-16 Thread joewitt
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop b8ade5b12 - dde5fd51a


NIFI-355 removed all extraneous version references


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

Branch: refs/heads/develop
Commit: fa5a4f26cef8da876a9555becade0a5a20d1506e
Parents: b8ade5b
Author: joewitt joew...@apache.org
Authored: Mon Feb 16 23:55:36 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Mon Feb 16 23:55:36 2015 -0500

--
 nifi/nifi-api/pom.xml | 1 -
 nifi/nifi-assembly/pom.xml| 1 -
 nifi/nifi-commons/nifi-data-provenance-utils/pom.xml  | 1 -
 nifi/nifi-commons/nifi-expression-language/pom.xml| 1 -
 nifi/nifi-commons/nifi-flowfile-packager/pom.xml  | 1 -
 nifi/nifi-commons/nifi-logging-utils/pom.xml  | 1 -
 nifi/nifi-commons/nifi-processor-utilities/pom.xml| 1 -
 nifi/nifi-commons/nifi-properties/pom.xml | 1 -
 nifi/nifi-commons/nifi-security-utils/pom.xml | 1 -
 nifi/nifi-commons/nifi-socket-utils/pom.xml   | 1 -
 nifi/nifi-commons/nifi-web-utils/pom.xml  | 1 -
 nifi/nifi-commons/nifi-write-ahead-log/pom.xml| 1 -
 nifi/nifi-mock/pom.xml| 1 -
 .../nifi-framework-bundle/nifi-framework-nar/pom.xml  | 1 -
 .../nifi-framework/nifi-administration/pom.xml| 1 -
 .../nifi-framework/nifi-cluster-protocol/pom.xml  | 1 -
 .../nifi-framework/nifi-file-authorization-provider/pom.xml   | 1 -
 .../nifi-framework/nifi-framework-core-api/pom.xml| 1 -
 .../nifi-framework-bundle/nifi-framework/nifi-security/pom.xml| 1 -
 .../nifi-framework/nifi-site-to-site/pom.xml  | 1 -
 .../nifi-framework/nifi-user-actions/pom.xml  | 1 -
 .../nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml | 1 -
 nifi/nifi-nar-bundles/nifi-framework-bundle/pom.xml   | 1 -
 nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml  | 1 -
 nifi/nifi-nar-bundles/nifi-hadoop-bundle/pom.xml  | 1 -
 .../nifi-hadoop-libraries-nar/pom.xml | 1 -
 nifi/nifi-nar-bundles/nifi-hadoop-libraries-bundle/pom.xml| 1 -
 nifi/nifi-nar-bundles/nifi-jetty-bundle/pom.xml   | 2 --
 nifi/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-nar/pom.xml| 1 -
 nifi/nifi-nar-bundles/nifi-kafka-bundle/pom.xml   | 2 +-
 .../nifi-provenance-repository-nar/pom.xml| 1 -
 nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/pom.xml   | 1 -
 .../nifi-standard-bundle/nifi-standard-nar/pom.xml| 1 -
 nifi/nifi-nar-bundles/nifi-standard-bundle/pom.xml| 1 -
 .../nifi-distributed-cache-services-nar/pom.xml   | 1 -
 .../nifi-distributed-cache-services-bundle/pom.xml| 1 -
 .../nifi-load-distribution-service-api/pom.xml| 1 -
 .../nifi-ssl-context-bundle/nifi-ssl-context-nar/pom.xml  | 1 -
 .../nifi-standard-services/nifi-ssl-context-bundle/pom.xml| 1 -
 .../nifi-standard-services/nifi-standard-services-api-nar/pom.xml | 1 -
 nifi/nifi-nar-bundles/nifi-standard-services/pom.xml  | 1 -
 .../nifi-update-attribute-nar/pom.xml | 2 --
 nifi/nifi-nar-bundles/nifi-update-attribute-bundle/pom.xml| 3 ---
 nifi/nifi-nar-bundles/pom.xml | 3 ---
 44 files changed, 1 insertion(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fa5a4f26/nifi/nifi-api/pom.xml
--
diff --git a/nifi/nifi-api/pom.xml b/nifi/nifi-api/pom.xml
index 7789ac4..ec746a5 100644
--- a/nifi/nifi-api/pom.xml
+++ b/nifi/nifi-api/pom.xml
@@ -21,6 +21,5 @@
 version0.0.2-incubating-SNAPSHOT/version
 /parent
 artifactIdnifi-api/artifactId
-version0.0.2-incubating-SNAPSHOT/version
 packagingjar/packaging
 /project

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fa5a4f26/nifi/nifi-assembly/pom.xml
--
diff --git a/nifi/nifi-assembly/pom.xml b/nifi/nifi-assembly/pom.xml
index 617ca75..8d16d5e 100644
--- a/nifi/nifi-assembly/pom.xml
+++ b/nifi/nifi-assembly/pom.xml
@@ -21,7 +21,6 @@
 version0.0.2-incubating

[3/3] incubator-nifi git commit: Merge branch 'NIFI-356' of https://github.com/apiri/incubator-nifi into develop

2015-02-16 Thread joewitt
Merge branch 'NIFI-356' of https://github.com/apiri/incubator-nifi into develop


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

Branch: refs/heads/develop
Commit: dde5fd51a406862331c0fecc13fb1dde8d712fbe
Parents: fa5a4f2 24be4a1
Author: joewitt joew...@apache.org
Authored: Tue Feb 17 00:24:58 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Tue Feb 17 00:24:58 2015 -0500

--
 .../java/org/apache/nifi/processors/standard/EvaluateXPath.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--




[29/62] [abbrv] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-30 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/CreateUserActionTest.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/CreateUserActionTest.java
 
b/nifi/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/CreateUserActionTest.java
deleted file mode 100644
index 3d2081b..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/CreateUserActionTest.java
+++ /dev/null
@@ -1,144 +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.admin.service.action;
-
-import java.util.EnumSet;
-import java.util.Set;
-import org.apache.nifi.admin.dao.AuthorityDAO;
-import org.apache.nifi.admin.dao.DAOFactory;
-import org.apache.nifi.admin.dao.DataAccessException;
-import org.apache.nifi.admin.dao.UserDAO;
-import org.apache.nifi.authorization.Authority;
-import org.apache.nifi.user.NiFiUser;
-import org.apache.commons.lang3.StringUtils;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-/**
- * Test cases for creating a user.
- */
-public class CreateUserActionTest {
-
-private String USER_ID_2 = 2;
-private String USER_ID_3 = 3;
-
-private String USER_DN_1 = data access exception when creating user;
-private String USER_DN_3 = general create user case;
-
-private DAOFactory daoFactory;
-private UserDAO userDao;
-private AuthorityDAO authorityDao;
-
-@Before
-public void setup() throws Exception {
-// mock the user dao
-userDao = Mockito.mock(UserDAO.class);
-Mockito.doAnswer(new AnswerVoid() {
-@Override
-public Void answer(InvocationOnMock invocation) throws Throwable {
-Object[] args = invocation.getArguments();
-NiFiUser user = (NiFiUser) args[0];
-
-if (USER_DN_1.equals(user.getDn())) {
-throw new DataAccessException();
-} else if (USER_DN_3.equals(user.getDn())) {
-user.setId(USER_ID_3);
-}
-
-// do nothing
-return null;
-}
-}).when(userDao).createUser(Mockito.any(NiFiUser.class));
-
-// mock the authority dao
-authorityDao = Mockito.mock(AuthorityDAO.class);
-Mockito.doAnswer(new AnswerVoid() {
-@Override
-public Void answer(InvocationOnMock invocation) throws Throwable {
-Object[] args = invocation.getArguments();
-SetAuthority authorities = (SetAuthority) args[0];
-String id = (String) args[1];
-
-if (USER_ID_2.equals(id)) {
-throw new DataAccessException(StringUtils.EMPTY);
-}
-
-// do nothing
-return null;
-}
-
}).when(authorityDao).createAuthorities(Mockito.anySetOf(Authority.class), 
Mockito.anyString());
-
-// mock the dao factory
-daoFactory = Mockito.mock(DAOFactory.class);
-Mockito.when(daoFactory.getUserDAO()).thenReturn(userDao);
-Mockito.when(daoFactory.getAuthorityDAO()).thenReturn(authorityDao);
-}
-
-/**
- * Tests DataAccessExceptions that occur while creating user accounts.
- *
- * @throws Exception
- */
-@Test(expected = DataAccessException.class)
-public void testExceptionCreatingUser() throws Exception {
-NiFiUser user = new NiFiUser();
-user.setDn(USER_DN_1);
-
-CreateUserAction createUser = new CreateUserAction(user);
-createUser.execute(daoFactory, null);
-}
-
-/**
- * Tests DataAccessExceptions that occur while create user authorities.
- *
- * @throws Exception
- */
-@Test(expected = DataAccessException.class)

[37/62] [abbrv] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-30 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
--
diff --git 
a/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
 
b/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
deleted file mode 100644
index ae075b5..000
--- 
a/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java
+++ /dev/null
@@ -1,331 +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.stream.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-public class LeakyBucketStreamThrottler implements StreamThrottler {
-
-private final int maxBytesPerSecond;
-private final BlockingQueueRequest requestQueue = new 
LinkedBlockingQueueRequest();
-private final ScheduledExecutorService executorService;
-private final AtomicBoolean shutdown = new AtomicBoolean(false);
-
-public LeakyBucketStreamThrottler(final int maxBytesPerSecond) {
-this.maxBytesPerSecond = maxBytesPerSecond;
-
-executorService = Executors.newSingleThreadScheduledExecutor();
-final Runnable task = new Drain();
-executorService.scheduleAtFixedRate(task, 0, 1000, 
TimeUnit.MILLISECONDS);
-}
-
-@Override
-public void close() {
-this.shutdown.set(true);
-
-executorService.shutdown();
-try {
-// Should not take more than 2 seconds because we run every 
second. If it takes more than
-// 2 seconds, it is because the Runnable thread is blocking on a 
write; in this case,
-// we will just ignore it and return
-executorService.awaitTermination(2, TimeUnit.SECONDS);
-} catch (InterruptedException e) {
-}
-}
-
-@Override
-public OutputStream newThrottledOutputStream(final OutputStream toWrap) {
-return new OutputStream() {
-@Override
-public void write(final int b) throws IOException {
-write(new byte[]{(byte) b}, 0, 1);
-}
-
-@Override
-public void write(byte[] b) throws IOException {
-write(b, 0, b.length);
-}
-
-@Override
-public void write(byte[] b, int off, int len) throws IOException {
-final InputStream in = new ByteArrayInputStream(b, off, len);
-LeakyBucketStreamThrottler.this.copy(in, toWrap);
-}
-
-@Override
-public void close() throws IOException {
-toWrap.close();
-}
-
-@Override
-public void flush() throws IOException {
-toWrap.flush();
-}
-};
-}
-
-@Override
-public InputStream newThrottledInputStream(final InputStream toWrap) {
-return new InputStream() {
-final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-@Override
-public int read() throws IOException {
-final ByteArrayOutputStream baos = new 
ByteArrayOutputStream(1);
-LeakyBucketStreamThrottler.this.copy(toWrap, baos, 1L);
-if (baos.getBufferLength()  1) {
-return -1;
-}
-
-return baos.getUnderlyingBuffer()[0]  0xFF;
-}
-
-@Override
-public int read(final byte[] b) throws IOException {
-if(b.length == 0){
-return 0;
-}
-return read(b, 0, b.length);
-}
-
-@Override
-public int read(byte[] b, int off, int len) throws IOException {
-if ( len  0 ) {
- 

[32/62] [abbrv] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-30 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
--
diff --git 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
 
b/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
deleted file mode 100644
index ea7c1a1..000
--- 
a/nifi/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
+++ /dev/null
@@ -1,634 +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.admin.dao.impl;
-
-import java.nio.charset.StandardCharsets;
-import java.sql.Connection;
-import org.apache.nifi.admin.dao.UserDAO;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.sql.Types;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.UUID;
-import org.apache.nifi.admin.RepositoryUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.nifi.admin.dao.DataAccessException;
-import org.apache.nifi.authorization.Authority;
-import org.apache.nifi.user.AccountStatus;
-import org.apache.nifi.user.NiFiUser;
-
-/**
- * Responsible for loading and persisting NiFiUsers.
- */
-public class StandardUserDAO implements UserDAO {
-
-private static final String SELECT_PENDING_ACCOUNTS_COUNT = SELECT 
-+ COUNT(*) as PENDING_ACCOUNTS 
-+ FROM USER U 
-+ WHERE U.STATUS = 'PENDING';
-
-private static final String SELECT_USER_BY_DN = SELECT 
-+ U.ID, 
-+ U.DN, 
-+ U.USER_NAME, 
-+ U.USER_GROUP, 
-+ U.CREATION, 
-+ U.LAST_ACCESSED, 
-+ U.LAST_VERIFIED, 
-+ U.JUSTIFICATION, 
-+ U.STATUS, 
-+ A.ROLE 
-+ FROM USER U 
-+ LEFT JOIN AUTHORITY A  // ensures that users without 
authorities are still matched
-+ ON U.ID = A.USER_ID 
-+ WHERE U.DN = ?;
-
-private static final String SELECT_USER_BY_ID = SELECT 
-+ U.ID, 
-+ U.DN, 
-+ U.USER_NAME, 
-+ U.USER_GROUP, 
-+ U.CREATION, 
-+ U.LAST_ACCESSED, 
-+ U.LAST_VERIFIED, 
-+ U.JUSTIFICATION, 
-+ U.STATUS, 
-+ A.ROLE 
-+ FROM USER U 
-+ LEFT JOIN AUTHORITY A  // ensures that users without 
authorities are still matched
-+ ON U.ID = A.USER_ID 
-+ WHERE U.ID = ?;
-
-private static final String SELECT_USERS = SELECT 
-+ U.ID, 
-+ U.DN, 
-+ U.USER_NAME, 
-+ U.USER_GROUP, 
-+ U.CREATION, 
-+ U.LAST_ACCESSED, 
-+ U.LAST_VERIFIED, 
-+ U.JUSTIFICATION, 
-+ U.STATUS, 
-+ A.ROLE 
-+ FROM USER U 
-+ LEFT JOIN AUTHORITY A  // ensures that users without 
authorities are still matched
-+ ON U.ID = A.USER_ID 
-+ WHERE U.DN  ?;
-
-private static final String SELECT_USER_GROUPS = SELECT DISTINCT 
-+ U.USER_GROUP 
-+ FROM USER U;
-
-private static final String SELECT_USER_GROUP = SELECT 
-+ U.ID, 
-+ U.DN, 
-+ U.USER_NAME, 
-+ U.USER_GROUP, 
-+ U.CREATION, 
-+ U.LAST_ACCESSED, 
-+ U.LAST_VERIFIED, 
-+ U.JUSTIFICATION, 
-+ U.STATUS, 
-+ A.ROLE 
-+ FROM USER U 
-+ LEFT JOIN AUTHORITY A  // ensures that users without 
authorities are still matched
-+ ON U.ID = A.USER_ID 
-+ WHERE U.DN  ? AND U.USER_GROUP = ?;
-
-private static final String INSERT_USER = INSERT INTO USER (
-+ ID, DN, USER_NAME, USER_GROUP, CREATION, LAST_VERIFIED, 
JUSTIFICATION, STATUS

[41/62] [abbrv] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-30 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
--
diff --git 
a/nifi/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
 
b/nifi/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
deleted file mode 100644
index 10e348d..000
--- 
a/nifi/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
+++ /dev/null
@@ -1,876 +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.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.net.InetSocketAddress;
-import java.nio.file.InvalidPathException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public class NiFiProperties extends Properties {
-
-private static final long serialVersionUID = 2119177359005492702L;
-
-private static final Logger LOG = 
LoggerFactory.getLogger(NiFiProperties.class);
-private static NiFiProperties instance = null;
-
-// core properties
-public static final String PROPERTIES_FILE_PATH = 
nifi.properties.file.path;
-public static final String FLOW_CONFIGURATION_FILE = 
nifi.flow.configuration.file;
-public static final String FLOW_CONFIGURATION_ARCHIVE_FILE = 
nifi.flow.configuration.archive.file;
-public static final String TASK_CONFIGURATION_FILE = 
nifi.reporting.task.configuration.file;
-public static final String SERVICE_CONFIGURATION_FILE = 
nifi.controller.service.configuration.file;
-public static final String AUTHORITY_PROVIDER_CONFIGURATION_FILE = 
nifi.authority.provider.configuration.file;
-public static final String REPOSITORY_DATABASE_DIRECTORY = 
nifi.database.directory;
-public static final String RESTORE_DIRECTORY = nifi.restore.directory;
-public static final String VERSION = nifi.version;
-public static final String WRITE_DELAY_INTERVAL = 
nifi.flowservice.writedelay.interval;
-public static final String AUTO_RESUME_STATE = 
nifi.flowcontroller.autoResumeState;
-public static final String FLOW_CONTROLLER_GRACEFUL_SHUTDOWN_PERIOD = 
nifi.flowcontroller.graceful.shutdown.period;
-public static final String NAR_LIBRARY_DIRECTORY = 
nifi.nar.library.directory;
-public static final String NAR_WORKING_DIRECTORY = 
nifi.nar.working.directory;
-public static final String COMPONENT_DOCS_DIRECTORY = 
nifi.documentation.working.directory;
-public static final String SENSITIVE_PROPS_KEY = 
nifi.sensitive.props.key;
-public static final String SENSITIVE_PROPS_ALGORITHM = 
nifi.sensitive.props.algorithm;
-public static final String SENSITIVE_PROPS_PROVIDER = 
nifi.sensitive.props.provider;
-public static final String H2_URL_APPEND = nifi.h2.url.append;
-public static final String REMOTE_INPUT_PORT = 
nifi.remote.input.socket.port;
-public static final String SITE_TO_SITE_SECURE = 
nifi.remote.input.secure;
-public static final String TEMPLATE_DIRECTORY = nifi.templates.directory;
-public static final String ADMINISTRATIVE_YIELD_DURATION = 
nifi.administrative.yield.duration;
-public static final String PERSISTENT_STATE_DIRECTORY = 
nifi.persistent.state.directory;
-
-// content repository properties
-public static final String REPOSITORY_CONTENT_PREFIX = 
nifi.content.repository.directory.;
-public static final String CONTENT_REPOSITORY_IMPLEMENTATION = 
nifi.content.repository.implementation;
-public static final String MAX_APPENDABLE_CLAIM_SIZE = 
nifi.content.claim.max.appendable.size;
-public static final String MAX_FLOWFILES_PER_CLAIM = 
nifi.content.claim.max.flow.files;
-public static final String CONTENT_ARCHIVE_MAX_RETENTION_PERIOD = 
nifi.content.repository.archive.max.retention.period;
-public static final String CONTENT_ARCHIVE_MAX_USAGE_PERCENTAGE = 
nifi.content.repository.archive.max.usage.percentage;
-public static 

[36/62] [abbrv] [partial] incubator-nifi git commit: NIFI-270 Made all changes identified by adam, mark, joey to prep for a cleaner build

2015-01-30 Thread joewitt
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f6d9354b/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java
--
diff --git 
a/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java
 
b/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java
deleted file mode 100644
index 41a0557..000
--- 
a/nifi/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java
+++ /dev/null
@@ -1,623 +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.util.file;
-
-import java.io.BufferedInputStream;
-import java.io.Closeable;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Random;
-
-import org.slf4j.Logger;
-
-/**
- * A utility class containing a few useful static methods to do typical IO
- * operations.
- *
- * @author unattributed
- */
-public class FileUtils {
-
-public static final long TRANSFER_CHUNK_SIZE_BYTES = 1024 * 1024 * 8; //8 
MB chunks
-public static final long MILLIS_BETWEEN_ATTEMPTS = 50L;
-
-/**
- * Closes the given closeable quietly - no logging, no exceptions...
- *
- * @param closeable
- */
-public static void closeQuietly(final Closeable closeable) {
-if (null != closeable) {
-try {
-closeable.close();
-} catch (final IOException io) {/*IGNORE*/
-
-}
-}
-}
-
-/**
- * Releases the given lock quietly - no logging, no exception
- *
- * @param lock
- */
-public static void releaseQuietly(final FileLock lock) {
-if (null != lock) {
-try {
-lock.release();
-} catch (final IOException io) {
-/*IGNORE*/
-}
-}
-}
-
-public static void ensureDirectoryExistAndCanAccess(final File dir) throws 
IOException {
-if (dir.exists()  !dir.isDirectory()) {
-throw new IOException(dir.getAbsolutePath() +  is not a 
directory);
-} else if (!dir.exists()) {
-final boolean made = dir.mkdirs();
-if (!made) {
-throw new IOException(dir.getAbsolutePath() +  could not be 
created);
-}
-}
-if (!(dir.canRead()  dir.canWrite())) {
-throw new IOException(dir.getAbsolutePath() +  directory does not 
have read/write privilege);
-}
-}
-
-/**
- * Deletes the given file. If the given file exists but could not be 
deleted
- * this will be printed as a warning to the given logger
- *
- * @param file
- * @param logger
- * @return
- */
-public static boolean deleteFile(final File file, final Logger logger) {
-return FileUtils.deleteFile(file, logger, 1);
-}
-
-/**
- * Deletes the given file. If the given file exists but could not be 
deleted
- * this will be printed as a warning to the given logger
- *
- * @param file
- * @param logger
- * @param attempts indicates how many times an attempt to delete should be
- * made
- * @return true if given file no longer exists
- */
-public static boolean deleteFile(final File file, final Logger logger, 
final int attempts) {
-if (file == null) {
-return false;
-}
-boolean isGone = false;
-try {
-if (file.exists()) {
-final int effectiveAttempts = Math.max(1, attempts);
-for (int i = 0; i  effectiveAttempts  !isGone; i++) {
-isGone = file.delete() || !file.exists();
-if (!isGone  (effectiveAttempts - i)  1) 

[09/10] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

2015-01-30 Thread joewitt
Merge branch 'develop' of 
https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop


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

Branch: refs/heads/develop
Commit: 02b402b8c508cf0b7800ae78fef560ba645daad6
Parents: 2253ee6 bafa945
Author: joewitt joew...@apache.org
Authored: Fri Jan 30 22:49:29 2015 -0500
Committer: joewitt joew...@apache.org
Committed: Fri Jan 30 22:49:29 2015 -0500

--
 .../src/main/asciidoc/developer-guide.adoc  | 2116 +-
 1 file changed, 2098 insertions(+), 18 deletions(-)
--




<    1   2   3   4   5   6   7   8   9   >