perfsonar-dev - perfsonar: r2567 - in branches/new-structure/trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4 conf/axis-1.4/WEB-INF conf/axis-1.4/WEB-INF/classes conf/wsdd doc src src/main src/main/java src/main/java/org/perfsonar/service/mesurementArchive/flowsa src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders
Subject: perfsonar development work
List archive
perfsonar: r2567 - in branches/new-structure/trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4 conf/axis-1.4/WEB-INF conf/axis-1.4/WEB-INF/classes conf/wsdd doc src src/main src/main/java src/main/java/org/perfsonar/service/mesurementArchive/flowsa src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2567 - in branches/new-structure/trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4 conf/axis-1.4/WEB-INF conf/axis-1.4/WEB-INF/classes conf/wsdd doc src src/main src/main/java src/main/java/org/perfsonar/service/mesurementArchive/flowsa src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders
- Date: Tue, 24 Jul 2007 08:54:03 -0400
Author: michael.bischoff
Date: 2007-07-24 08:54:03 -0400 (Tue, 24 Jul 2007)
New Revision: 2567
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/EchoHeaders.jws
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/SOAPMonitorApplet.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/classes/
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/classes/i18n.properties
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/server-config.wsdd
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/users.lst
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/web.xml
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/fingerprint.jsp
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/happyaxis.jsp
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/i18nLib.jsp
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/index.html
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/index.jsp
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/components.properties
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/eventType-map.xml
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/eventType-rules.xml
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/objects.config
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/service.properties
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/wsdd/
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/wsdd/service-deploy.wsdd
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/wsdd/service-undeploy.wsdd
branches/new-structure/trunk/surfnet_java-flowsa-ma/pom.xml
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/EventType.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/NMWGInterfaceBaseChaining.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/package-info.java
Removed:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/ActionType.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/.classpath
branches/new-structure/trunk/surfnet_java-flowsa-ma/.project
branches/new-structure/trunk/surfnet_java-flowsa-ma/doc/README.txt
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/FlowsaMAServiceEngine.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/AggegrationRule.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Filter.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Flow.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpControll.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReader.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReaderFactory.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpQuery.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/QueryException.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/RawFlowsQuery.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Statistics.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/StatisticsQuery.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopData.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopQuery.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/SimpleFilter.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/package-info.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderFactory.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderImpl.java
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/package-info.java
Log:
maven 2 added
java doc cleanup
inserted TODO's
small fixes
Modified: branches/new-structure/trunk/surfnet_java-flowsa-ma/.classpath
===================================================================
--- branches/new-structure/trunk/surfnet_java-flowsa-ma/.classpath
2007-07-24 11:50:27 UTC (rev 2566)
+++ branches/new-structure/trunk/surfnet_java-flowsa-ma/.classpath
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/nmwg"/>
- <classpathentry combineaccessrules="false" kind="src"
path="/perfSONAR base"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: branches/new-structure/trunk/surfnet_java-flowsa-ma/.project
===================================================================
--- branches/new-structure/trunk/surfnet_java-flowsa-ma/.project
2007-07-24 11:50:27 UTC (rev 2566)
+++ branches/new-structure/trunk/surfnet_java-flowsa-ma/.project
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,17 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>flowsa-ma</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>flowsa-ma</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/EchoHeaders.jws
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/SOAPMonitorApplet.java
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/classes/i18n.properties
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/server-config.wsdd
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/users.lst
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/web.xml
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/fingerprint.jsp
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/happyaxis.jsp
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/i18nLib.jsp
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/index.html
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/axis-1.4/index.jsp
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/components.properties
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/eventType-map.xml
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/eventType-rules.xml
Added: branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/objects.config
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/service.properties
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/wsdd/service-deploy.wsdd
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/conf/wsdd/service-undeploy.wsdd
Modified: branches/new-structure/trunk/surfnet_java-flowsa-ma/doc/README.txt
===================================================================
--- branches/new-structure/trunk/surfnet_java-flowsa-ma/doc/README.txt
2007-07-24 11:50:27 UTC (rev 2566)
+++ branches/new-structure/trunk/surfnet_java-flowsa-ma/doc/README.txt
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,7 +1,4 @@
-
-see
-
+please see:
http://wiki.perfsonar.net/jra1-wiki/index.php/Flow_Selection_and_Aggregation_MA
-
for up to date information about the service.
Added: branches/new-structure/trunk/surfnet_java-flowsa-ma/pom.xml
Copied: branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org
(from rev 2566, branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org)
Deleted:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/ActionType.java
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/EventType.java
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/FlowsaMAServiceEngine.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/FlowsaMAServiceEngine.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/FlowsaMAServiceEngine.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -11,6 +11,7 @@
import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.engine.ActionType;
import org.perfsonar.service.base.engine.ServiceEngine;
import org.perfsonar.service.mesurementArchive.flowsa.nfdump.Flow;
import org.perfsonar.service.mesurementArchive.flowsa.nfdump.NfdumpControll;
@@ -21,20 +22,23 @@
import org.perfsonar.service.mesurementArchive.flowsa.nfdump.TopQuery;
import
org.perfsonar.service.mesurementArchive.flowsa.nfdump.filters.SimpleFilter;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
/**
* Flow Selection and Aggregation Measurement Archive Service Engine
* implementation.
*
- * (shortend to FlowSAMAServiceEngine for sanity reasons.)
+ * (shortend to FlowsaMAServiceEngine for sanity reasons.)
*
* @see ServiceEngine
* @author Michael Bischoff
+ * @version $id$
*/
public class FlowsaMAServiceEngine implements ServiceEngine {
private final static String SERVICE_TYPE =
"service.MeasurementArchive.flowType";
+
+ private static final int DEFAULT_MAX_RESULTS = 1000;
+ private static final int DEFAULT_TIMEOUT_VALUE = 10;
+ private static final File DEFAULT_EXECUTABLE_FILE = new
File("/usr/local/bin/nfdump");
private final LoggerComponent logger;
private final ConfigurationComponent configuration;
@@ -68,10 +72,12 @@
}
File nfdumpExecutable = getExecutableFrom(configuration);
+ int maxResults = getMaxResultsFrom(configuration);
+ int timeoutValue = getTimeoutValueFrom(configuration);
String readerFactoryClassName = null;
try {
- this.nfdump = new
NfdumpControll(nfdumpExecutable,readerFactoryClassName,1000,10);
+ this.nfdump = new
NfdumpControll(nfdumpExecutable,readerFactoryClassName,maxResults,timeoutValue);
} catch(IllegalArgumentException e) {
throw new PerfSONARException(
"error.common.no_configuration",
@@ -80,7 +86,7 @@
}
}
- public String getType() {
+ public String getType() {
return SERVICE_TYPE;
}
@@ -95,19 +101,26 @@
public Message takeAction(final String actionType, Message request)
throws PerfSONARException {
logger.debug("FlowsaMAServiceEngine.takeAction: Received a request
of type - " + actionType);
- try {
- return processAction(actionType, request);
- } catch (InterruptedException e) {
- throw new
PerfSONARException("error.ma.fetching.interrupted","Fetching was
interrupted",e);
- } catch (ExecutionException e) {
- throw new PerfSONARException("error.ma.fetching","Exception
while fetching data",e);
- } catch (TimeoutException e) {
- throw new
PerfSONARException("error.ma.fetching.timeout","Fetching took too long");
- }
+ if(ActionType.GET_DATA.equalsIgnoreCase(actionType)) {
+ try {
+ return processDataRequest(actionType, request);
+ } catch (InterruptedException e) {
+ throw new
PerfSONARException("error.ma.fetching.interrupted","Fetching was
interrupted",e);
+ } catch (ExecutionException e) {
+ throw new
PerfSONARException("error.ma.fetching","Exception while fetching data",e);
+ } catch (TimeoutException e) {
+ throw new
PerfSONARException("error.ma.fetching.timeout","Fetching took too long");
+ }
+ }
+
+ throw new PerfSONARException(
+ "error.common.action_not_supported",
+ "ActionType " + actionType + " not supported."
+ );
}
- private Message processAction(final String actionType, Message request)
throws PerfSONARException, InterruptedException, ExecutionException,
TimeoutException {
- ActionType type = ActionType.get(actionType);
+ private Message processDataRequest(final String actionType, Message
request) throws PerfSONARException, InterruptedException, ExecutionException,
TimeoutException {
+ EventType type = EventType.get(actionType);
switch (type) {
case RAW_FLOW_REQUEST:
return handleRawFlowRequest(request);
@@ -120,12 +133,12 @@
if(type!=null) {
throw new PerfSONARException(
"error.common.action_not_implemented",
- "Action is not yet implemented"
+ "EventType is not yet implemented"
);
}
throw new PerfSONARException(
"error.common.action_not_supported",
- "Request type " + actionType + " not understood."
+ "EventType " + actionType + " not understood."
);
}
}
@@ -152,15 +165,15 @@
protected RawFlowsQuery createFlowQueryFrom(Message request) {
RawFlowsQuery query = new RawFlowsQuery();
query.setFilter(new SimpleFilter(""));
- throw new NotImplementedException();
+ throw new UnsupportedOperationException("not implemented");
}
protected StatisticsQuery createStatisticsQueryFrom(Message request) {
// TODO create query
- throw new NotImplementedException();
+ throw new UnsupportedOperationException("not implemented");
}
protected TopQuery createTopQueryFrom(Message request) {
// TODO create query
- throw new NotImplementedException();
+ throw new UnsupportedOperationException("not implemented");
}
private File getExecutableFrom(ConfigurationComponent source) {
@@ -170,9 +183,38 @@
fileLocation = source.getProperty("");
} catch (PerfSONARException e) {
logger.debug("No configuration found: using standard location
for nfDump");
- return new File("/usr/local/bin/nfdump");
+ return DEFAULT_EXECUTABLE_FILE;
}
return new File(fileLocation);
}
+ private int getTimeoutValueFrom(ConfigurationComponent source) {
+ int timeoutValue = 0;
+ try {
+ //TODO
+ timeoutValue = Integer.parseInt(source.getProperty(""));
+ } catch (PerfSONARException e) {
+ logger.debug("No configuration found: using standard MaxResult
for nfDump");
+ return DEFAULT_TIMEOUT_VALUE;
+ } catch (NumberFormatException e) {
+ logger.debug("Couldn't parse from configuration: using standard
MaxResult for nfDump");
+ return DEFAULT_TIMEOUT_VALUE;
+ }
+ return timeoutValue;
+ }
+
+ private int getMaxResultsFrom(ConfigurationComponent source) {
+ int maxResults = 0;
+ try {
+ //TODO
+ maxResults = Integer.parseInt(source.getProperty(""));
+ } catch (PerfSONARException e) {
+ logger.debug("No configuration found: using standard MaxResult
for nfDump");
+ return DEFAULT_MAX_RESULTS;
+ } catch (NumberFormatException e) {
+ logger.debug("Couldn't parse from configuration: using standard
MaxResult for nfDump");
+ return DEFAULT_MAX_RESULTS;
+ }
+ return maxResults;
+ }
}
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/NMWGInterfaceBaseChaining.java
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/AggegrationRule.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/AggegrationRule.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/AggegrationRule.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,5 +1,11 @@
package org.perfsonar.service.mesurementArchive.flowsa.nfdump;
+/**
+ * An interface for aggegration rules
+ *
+ * @author Michael Bischoff
+ * @version $id$
+ */
public interface AggegrationRule {
/**
* method for retrieving the expression belonging to this
aggegrationRule.
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Filter.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Filter.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Filter.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -4,6 +4,7 @@
* Abstract representation of a filter for nfdump
*
* @author Michael Bischoff
+ * @version $id$
*/
public interface Filter {
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Flow.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Flow.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Flow.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,9 +1,10 @@
package org.perfsonar.service.mesurementArchive.flowsa.nfdump;
/**
- * Data object for a Flow Record
+ * Data object(bean) for a Flow Record
*
* @author Michael Bischoff
+ * @version $id$
*/
public class Flow {
/** Address family PF_INET or PF_INET6 */
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpControll.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpControll.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpControll.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -17,12 +17,11 @@
import
org.perfsonar.service.mesurementArchive.flowsa.nfdump.outputreaders.Nfdump152OutputReaderFactory;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
/**
* Core of the nfdump wrapper.
*
* @author Michael Bischoff
+ * @version $id$
*/
public class NfdumpControll {
@@ -159,7 +158,8 @@
Callable<TopData> task = new
NfdumpTask<TopData>(commands,readerFactory) {
@Override
public TopData call(NfdumpOutputReader reader) throws Exception {
- throw new NotImplementedException();//reader.readTopData();
+ // TODO implements task for Topdata
+ throw new UnsupportedOperationException("not
implemented");//reader.readTopData();
}
};
return submit(task);
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReader.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReader.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReader.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -3,13 +3,24 @@
import java.io.IOException;
/**
- * Interface for Nfdump output readers
+ * Interface for Nfdump output readers this reader reads the outputstream of
a
+ * nfdump application. please see
{@link
NfdumpControll} for imput flags and
+ * createCommandXXX for what is specificly passed onto nfdump. Given the case
+ * that the flags will change over differend versions of nfdump
createCommandXXX
+ * methods should be externalised to a serparate class and that class should
be
+ * served by NfdumpReaderFactory (Refactored: droppign the output prefix, see
+ *
{@link
NfdumpOutputReaderFactory}) and that Factory should serve two
+ * classes: output readers and commandLineExpressionCreator (or simply
+ * commandCreator) Considering the maturity of nfdump it's unlikely to change
+ * soon therefor a simpler solution is currently used.
*
- * @author michael
- *
+ * @author Michael Bischoff
+ * @version $id$
*/
-public interface NfdumpOutputReader {
- public Flow readRecord() throws IOException;
- public Statistics readStatistics() throws IOException;
- public TopData readTopData() throws IOException;
+public interface NfdumpOutputReader {
+ public Flow readRecord() throws IOException;
+
+ public Statistics readStatistics() throws IOException;
+
+ public TopData readTopData() throws IOException;
}
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReaderFactory.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReaderFactory.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpOutputReaderFactory.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -2,10 +2,23 @@
import java.io.InputStream;
-
-
+/**
+ * Factories that create
{@link
NfdumpOutputReader}'s should
+ * implement this interface
+ *
+ * @author Michael Bischoff
+ * @version $id$
+ */
public interface NfdumpOutputReaderFactory {
+ /**
+ * creates a
{@link
NfdumpOutputReader} for the specified stream
+ * the reader should be bounded to the lifecycle of the stream, eg for
+ * every stream there is a single new Reader
+ *
+ * @param stream
+ * @return NfdumpOutputReader for the stream
+ */
NfdumpOutputReader create(InputStream stream);
}
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpQuery.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpQuery.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/NfdumpQuery.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -6,7 +6,8 @@
/**
* A abstract representation of a query for nfdump
*
- * @author michael
+ * @author Michael Bischoff
+ * @version $id$
*/
public abstract class NfdumpQuery {
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/QueryException.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/QueryException.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/QueryException.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -2,7 +2,10 @@
/**
* Exeption that occours wenn something goes wrong with a query
+ * example: query returned too many results.
+ *
* @author Michael Bischoff
+ * @version $id$
*/
public class QueryException extends Exception {
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/RawFlowsQuery.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/RawFlowsQuery.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/RawFlowsQuery.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -4,9 +4,10 @@
import java.util.Date;
/**
- * A abstract representation of a query for nfdump
+ * Rawflows implementation of a
{@link
NfdumpQuery}
*
* @author Michael Bischoff
+ * @version $id$
*/
public class RawFlowsQuery extends NfdumpQuery {
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Statistics.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Statistics.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/Statistics.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,5 +1,11 @@
package org.perfsonar.service.mesurementArchive.flowsa.nfdump;
+/**
+ * A data object/ java bean that holds statistics data
+ *
+ * @author Michael Bischoff
+ * @version $id$
+ */
public class Statistics {
-
+ //TODO implement bean
}
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/StatisticsQuery.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/StatisticsQuery.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/StatisticsQuery.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,5 +1,11 @@
package org.perfsonar.service.mesurementArchive.flowsa.nfdump;
+/**
+ * An implementation of
{@link
NfdumpQuery} for Statistics
+ *
+ * @author Michael Bischoff
+ * @version $id$
+ */
public class StatisticsQuery extends NfdumpQuery {
-
+ //TODO implement Query
}
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopData.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopData.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopData.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,5 +1,11 @@
package org.perfsonar.service.mesurementArchive.flowsa.nfdump;
+/**
+ * A data object / java bean for Top data.
+ *
+ * @author Michael Bischoff
+ * @version $id$
+ */
public class TopData {
private String dateFirstSeen;
private String protocol;
@@ -10,4 +16,5 @@
private String packetsPerSecond;
private String bytesPerSecond;
private String bytesPerPacket;
+ //TODO finish bean
}
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopQuery.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopQuery.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/TopQuery.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,5 +1,12 @@
package org.perfsonar.service.mesurementArchive.flowsa.nfdump;
+/**
+ * A implementation of
{@link
NfdumpQuery} for Top data
+ *
+ * @author Michael Bischoff
+ * @version $id$
+ *
+ */
public class TopQuery extends NfdumpQuery {
-
+ // TODO implement query
}
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/SimpleFilter.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/SimpleFilter.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/SimpleFilter.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -7,6 +7,7 @@
*
* takes a static expression as a string in the constuctor
* @author Michael Bischoff
+ * @version $id$
*/
public class SimpleFilter implements Filter {
private final String expression;
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/package-info.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/package-info.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters/package-info.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,4 +1,6 @@
/**
+ * $Id$
* Package that hosts filter Implementations
+ * @author Michael Bischoff
*/
package org.perfsonar.service.mesurementArchive.flowsa.nfdump.filters;
\ No newline at end of file
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderFactory.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderFactory.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderFactory.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -13,6 +13,7 @@
* singleton implementation
*
* @author Michael Bischoff
+ * @version $id$
*/
public class Nfdump152OutputReaderFactory implements
NfdumpOutputReaderFactory {
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderImpl.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderImpl.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/Nfdump152OutputReaderImpl.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -50,18 +50,17 @@
return null;
}
- public Statistics readStatistics() {
-// Statistics statistics = new Statistics();
-// statistics.
- return null;
+ public Statistics readStatistics() throws IOException {
+ // TODO implement
+ throw new IOException("Cannot read nfdump output: Number of Lines
did not match");
}
- public TopData readTopData() throws IOException {
- TopData data = new TopData();
- return null;
+ public TopData readTopData() throws IOException {
+ // TODO implement
+ throw new IOException("Cannot read nfdump output: Number of Lines
did not match");
}
- private Flow parseRecord(String line) throws IOException {
+ private Flow parseRecord(String line) throws IOException {
String[] values = line.split("\\|", 25);
if (values.length != 24) {
@@ -87,9 +86,8 @@
record.setTcpFlag(values[20]);
record.setTypeOfService(values[21]);
record.setPackets(values[22]);
- record.setBytes(values[23]);
-
+ record.setBytes(values[23]);
return record;
}
-
+
}
Modified:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/package-info.java
===================================================================
---
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/package-info.java
2007-07-24 11:50:27 UTC (rev 2566)
+++
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders/package-info.java
2007-07-24 12:54:03 UTC (rev 2567)
@@ -1,6 +1,8 @@
/**
+ * $Id$
* Package that hosts OutputReader Implementations
* @see
org.perfsonar.service.mesurementArchive.flowsa.nfdump.NfdumpOutputReaderFactory
* @see
org.perfsonar.service.mesurementArchive.flowsa.nfdump.NfdumpOutputReader
+ * @author Michael Bischoff
*/
package org.perfsonar.service.mesurementArchive.flowsa.nfdump.outputreaders;
\ No newline at end of file
Added:
branches/new-structure/trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/mesurementArchive/flowsa/package-info.java
- perfsonar: r2567 - in branches/new-structure/trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4 conf/axis-1.4/WEB-INF conf/axis-1.4/WEB-INF/classes conf/wsdd doc src src/main src/main/java src/main/java/org/perfsonar/service/mesurementArchive/flowsa src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/filters src/main/java/org/perfsonar/service/mesurementArchive/flowsa/nfdump/outputreaders, svnlog, 07/24/2007
Archive powered by MHonArc 2.6.16.