perfsonar-dev - perfsonar: r4139 - in trunk/perfsonar_base/src/main/java/org/perfsonar: base/util base/util/iptrie service/base/registration
Subject: perfsonar development work
List archive
perfsonar: r4139 - in trunk/perfsonar_base/src/main/java/org/perfsonar: base/util base/util/iptrie service/base/registration
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4139 - in trunk/perfsonar_base/src/main/java/org/perfsonar: base/util base/util/iptrie service/base/registration
- Date: Tue, 8 Jul 2008 07:07:25 -0400
Author: mac
Date: 2008-07-08 07:07:25 -0400 (Tue, 08 Jul 2008)
New Revision: 4139
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/Constants.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/HelperClass.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IPAddress.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IPAddressConvertor.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/InvalidIPAddressException.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IpTrie.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IpTrieNode.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/StringBufferUtilities.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/SummarizeIpAddrs.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/Trie.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/TrieNode.java
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
Log:
Incorporation Martin's summarization code and using it in
LSSumamryServiceContent.
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/Constants.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/Constants.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/HelperClass.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/HelperClass.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IPAddress.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IPAddress.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IPAddressConvertor.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IPAddressConvertor.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/InvalidIPAddressException.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/InvalidIPAddressException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IpTrie.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IpTrie.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IpTrieNode.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/IpTrieNode.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/StringBufferUtilities.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/StringBufferUtilities.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/SummarizeIpAddrs.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/SummarizeIpAddrs.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/Trie.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/Trie.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/TrieNode.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/iptrie/TrieNode.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
2008-07-08 09:30:31 UTC (rev 4138)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
2008-07-08 11:07:25 UTC (rev 4139)
@@ -12,6 +12,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.base.util.iptrie.SummarizeIpAddrs;
import org.perfsonar.service.base.storage.xmldb.XmlDbStorageManager;
import org.perfsonar.service.base.storage.xmldb.exist.ExistDbFactory;
import
org.perfsonar.service.base.storage.xmldb.exist.ExistDbGenericStorageManager;
@@ -207,8 +208,9 @@
for (ServiceSummary s :summaries.values()) {
//summarize IPs
- //...
-
+ logger.debug("Summarize domains");
+ s.ipAddresses = summarizeIPAddresses(s.ipAddresses);
+
//summarize domains
logger.debug("Summarize domains");
s.domains = summarizeDomains(s.domains);
@@ -333,7 +335,30 @@
return list;
}
+
/**
+ * Do IPs summarization. Returns new, summarized set of data
+ * Input data is not changed.
+ * @param data
+ * @return
+ */
+ private HashSet<String> summarizeIPAddresses(HashSet<String>
ipAddresses) {
+
+ HashSet<String> result;
+
+ try {
+ result = SummarizeIpAddrs.getSummary(ipAddresses);
+ } catch (Exception ex) {
+ logger.error("LSSummaryServiceContent: IP summarization failed.
" +
+ "Exception: "+ex+" : "+ex.getMessage());
+ result = ipAddresses;
+ }
+ return result;
+
+ }
+
+
+ /**
* Do domains summarization. Returns new, summarized set of data
* Input data is not changed.
* @param data
- perfsonar: r4139 - in trunk/perfsonar_base/src/main/java/org/perfsonar: base/util base/util/iptrie service/base/registration, svnlog, 07/08/2008
Archive powered by MHonArc 2.6.16.