[33/50] [abbrv] incubator-nifi git commit: NIFI-545: Code cleanup
NIFI-545: Code cleanup Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/979671ca Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/979671ca Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/979671ca Branch: refs/heads/NIFI-680 Commit: 979671ca9719aca6789f213529991fc99d86979d Parents: b22a126 Author: Mark Payne marka...@hotmail.com Authored: Mon Jun 22 09:21:44 2015 -0400 Committer: Mark Payne marka...@hotmail.com Committed: Mon Jun 22 15:58:08 2015 -0400 -- .../nifi/cluster/flow/impl/DataFlowDaoImpl.java | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/979671ca/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java index c0395a4..335c0ef 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java @@ -188,7 +188,7 @@ public class DataFlowDaoImpl implements DataFlowDao { return; } -if ((primaryEntry == null restoreEntry != null) || (primaryEntry != null restoreEntry == null)) { +if (primaryEntry == null restoreEntry != null || primaryEntry != null restoreEntry == null) { throw new IllegalStateException(String.format(Primary file '%s' is different than restore file '%s', primaryFile.getAbsoluteFile(), restoreFile.getAbsolutePath())); } @@ -352,7 +352,7 @@ public class DataFlowDaoImpl implements DataFlowDao { final File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { -return (name.equals(FLOW_PACKAGE) || name.endsWith(STALE_EXT) || name.endsWith(UNKNOWN_EXT)); +return name.equals(FLOW_PACKAGE) || name.endsWith(STALE_EXT) || name.endsWith(UNKNOWN_EXT); } }); @@ -515,19 +515,10 @@ public class DataFlowDaoImpl implements DataFlowDao { final StandardDataFlow dataFlow = new StandardDataFlow(flowBytes, templateBytes, snippetBytes); dataFlow.setAutoStartProcessors(autoStart); -return new ClusterDataFlow(dataFlow, (clusterMetadata == null) ? null : clusterMetadata.getPrimaryNodeId(), controllerServiceBytes, reportingTaskBytes); +return new ClusterDataFlow(dataFlow, clusterMetadata == null ? null : clusterMetadata.getPrimaryNodeId(), controllerServiceBytes, reportingTaskBytes); } private void writeDataFlow(final File file, final ClusterDataFlow clusterDataFlow) throws IOException, JAXBException { - -// get the data flow -DataFlow dataFlow = clusterDataFlow.getDataFlow(); - -// if no dataflow, then write a new dataflow -if (dataFlow == null) { -dataFlow = new StandardDataFlow(new byte[0], new byte[0], new byte[0]); -} - // setup the cluster metadata final ClusterMetadata clusterMetadata = new ClusterMetadata(); clusterMetadata.setPrimaryNodeId(clusterDataFlow.getPrimaryNodeId());
[19/35] incubator-nifi git commit: NIFI-545: Code cleanup
NIFI-545: Code cleanup Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/979671ca Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/979671ca Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/979671ca Branch: refs/heads/NIFI-632 Commit: 979671ca9719aca6789f213529991fc99d86979d Parents: b22a126 Author: Mark Payne marka...@hotmail.com Authored: Mon Jun 22 09:21:44 2015 -0400 Committer: Mark Payne marka...@hotmail.com Committed: Mon Jun 22 15:58:08 2015 -0400 -- .../nifi/cluster/flow/impl/DataFlowDaoImpl.java | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/979671ca/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java index c0395a4..335c0ef 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java @@ -188,7 +188,7 @@ public class DataFlowDaoImpl implements DataFlowDao { return; } -if ((primaryEntry == null restoreEntry != null) || (primaryEntry != null restoreEntry == null)) { +if (primaryEntry == null restoreEntry != null || primaryEntry != null restoreEntry == null) { throw new IllegalStateException(String.format(Primary file '%s' is different than restore file '%s', primaryFile.getAbsoluteFile(), restoreFile.getAbsolutePath())); } @@ -352,7 +352,7 @@ public class DataFlowDaoImpl implements DataFlowDao { final File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { -return (name.equals(FLOW_PACKAGE) || name.endsWith(STALE_EXT) || name.endsWith(UNKNOWN_EXT)); +return name.equals(FLOW_PACKAGE) || name.endsWith(STALE_EXT) || name.endsWith(UNKNOWN_EXT); } }); @@ -515,19 +515,10 @@ public class DataFlowDaoImpl implements DataFlowDao { final StandardDataFlow dataFlow = new StandardDataFlow(flowBytes, templateBytes, snippetBytes); dataFlow.setAutoStartProcessors(autoStart); -return new ClusterDataFlow(dataFlow, (clusterMetadata == null) ? null : clusterMetadata.getPrimaryNodeId(), controllerServiceBytes, reportingTaskBytes); +return new ClusterDataFlow(dataFlow, clusterMetadata == null ? null : clusterMetadata.getPrimaryNodeId(), controllerServiceBytes, reportingTaskBytes); } private void writeDataFlow(final File file, final ClusterDataFlow clusterDataFlow) throws IOException, JAXBException { - -// get the data flow -DataFlow dataFlow = clusterDataFlow.getDataFlow(); - -// if no dataflow, then write a new dataflow -if (dataFlow == null) { -dataFlow = new StandardDataFlow(new byte[0], new byte[0], new byte[0]); -} - // setup the cluster metadata final ClusterMetadata clusterMetadata = new ClusterMetadata(); clusterMetadata.setPrimaryNodeId(clusterDataFlow.getPrimaryNodeId());
incubator-nifi git commit: NIFI-545: Code cleanup
Repository: incubator-nifi Updated Branches: refs/heads/develop b22a1261c - 979671ca9 NIFI-545: Code cleanup Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/979671ca Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/979671ca Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/979671ca Branch: refs/heads/develop Commit: 979671ca9719aca6789f213529991fc99d86979d Parents: b22a126 Author: Mark Payne marka...@hotmail.com Authored: Mon Jun 22 09:21:44 2015 -0400 Committer: Mark Payne marka...@hotmail.com Committed: Mon Jun 22 15:58:08 2015 -0400 -- .../nifi/cluster/flow/impl/DataFlowDaoImpl.java | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/979671ca/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java index c0395a4..335c0ef 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java @@ -188,7 +188,7 @@ public class DataFlowDaoImpl implements DataFlowDao { return; } -if ((primaryEntry == null restoreEntry != null) || (primaryEntry != null restoreEntry == null)) { +if (primaryEntry == null restoreEntry != null || primaryEntry != null restoreEntry == null) { throw new IllegalStateException(String.format(Primary file '%s' is different than restore file '%s', primaryFile.getAbsoluteFile(), restoreFile.getAbsolutePath())); } @@ -352,7 +352,7 @@ public class DataFlowDaoImpl implements DataFlowDao { final File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { -return (name.equals(FLOW_PACKAGE) || name.endsWith(STALE_EXT) || name.endsWith(UNKNOWN_EXT)); +return name.equals(FLOW_PACKAGE) || name.endsWith(STALE_EXT) || name.endsWith(UNKNOWN_EXT); } }); @@ -515,19 +515,10 @@ public class DataFlowDaoImpl implements DataFlowDao { final StandardDataFlow dataFlow = new StandardDataFlow(flowBytes, templateBytes, snippetBytes); dataFlow.setAutoStartProcessors(autoStart); -return new ClusterDataFlow(dataFlow, (clusterMetadata == null) ? null : clusterMetadata.getPrimaryNodeId(), controllerServiceBytes, reportingTaskBytes); +return new ClusterDataFlow(dataFlow, clusterMetadata == null ? null : clusterMetadata.getPrimaryNodeId(), controllerServiceBytes, reportingTaskBytes); } private void writeDataFlow(final File file, final ClusterDataFlow clusterDataFlow) throws IOException, JAXBException { - -// get the data flow -DataFlow dataFlow = clusterDataFlow.getDataFlow(); - -// if no dataflow, then write a new dataflow -if (dataFlow == null) { -dataFlow = new StandardDataFlow(new byte[0], new byte[0], new byte[0]); -} - // setup the cluster metadata final ClusterMetadata clusterMetadata = new ClusterMetadata(); clusterMetadata.setPrimaryNodeId(clusterDataFlow.getPrimaryNodeId());