Author: vkumar
Date: Tue Oct 28 03:06:43 2008
New Revision: 708498
URL: http://svn.apache.org/viewvc?rev=708498&view=rev
Log:
Moving components xdoc document to new location
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/aggregation.xml
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/aggregatestatistics-c.gif
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/batchedstatistics-c.gif
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/logrecord-c.gif
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/page-statistics.gif
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portalstatistics-c.gif
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portlet-statistics.gif
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/statistics-db.gif
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/index.xml
(with props)
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/stats.xml
(with props)
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/aggregation.xml
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/aggregation.xml?rev=708498&view=auto
==============================================================================
---
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/aggregation.xml
(added)
+++
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/aggregation.xml
Tue Oct 28 03:06:43 2008
@@ -0,0 +1,64 @@
+<?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.
+-->
+<document>
+ <properties>
+ <title>Jetspeed-2 Statistics</title>
+ <authors>
+ <person name="David Le Strat" email="[EMAIL PROTECTED]" />
+ </authors>
+ </properties>
+ <body>
+ <section name="Data Aggregation Overview">
+ <p>
+ Jetspeed-2 provides a mechanism for aggregating portal statistics
for reporting purpose.
+ </p>
+ <subsection name="Retrieving Aggregate Statistics">
+ <p>
+ The <code>PortalStatistics</code> component exposes a
<code>queryStatistics</code> method that given
+ a <code>StatisticsQueryCriteria</code> will return
<code>AggregateStatistics</code>.
+ <source>
+ AggregateStatistics queryStatistics(StatisticsQueryCriteria
criteria)</source>
+ The <code>AggregateStatistics</code> can then be used for
reporting purpose.
+ <br/>
+ <img src="images/aggregatestatistics-c.gif" border="0" />
+ </p>
+ </subsection>
+ <subsection name="Using Aggregate Statistics">
+ <p>
+ As illustrated in <a href="stats.html">viewing
statistics</a>, Jetspeed-2 provides a default reporting portlet
+ for view statistics. To query statistics, a
<code>StatisticsQueryCriteria</code> must be set. According to this
+ criteria the <code>PortalStatistics</code>
<code>queryStatistics()</code> method will return an
<code>AggregateStatistics</code>.
+ </p>
+ <source>
+ StatisticsQueryCriteria criteria =
statistics.createStatisticsQueryCriteria();
+ ...
+ criteria.setUser(user);
+ criteria.setListsize("5");
+ criteria.setSorttype("count");
+ criteria.setSortorder("desc");
+ criteria.setTimePeriod(timeperiod);
+ criteria.setQueryType(queryType);
+ AggregateStatistics stats =
statistics.getDefaultEmptyAggregateStatistics();
+ ...
+ statistics.forceFlush();
+ stats = statistics.queryStatistics(criteria);</source>
+ </subsection>
+ </section>
+ </body>
+</document>
+
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/aggregation.xml
------------------------------------------------------------------------------
svn:keywords = Id
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/aggregatestatistics-c.gif
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/aggregatestatistics-c.gif?rev=708498&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/aggregatestatistics-c.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/batchedstatistics-c.gif
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/batchedstatistics-c.gif?rev=708498&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/batchedstatistics-c.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/logrecord-c.gif
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/logrecord-c.gif?rev=708498&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/logrecord-c.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/page-statistics.gif
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/page-statistics.gif?rev=708498&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/page-statistics.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portalstatistics-c.gif
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portalstatistics-c.gif?rev=708498&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portalstatistics-c.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portlet-statistics.gif
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portlet-statistics.gif?rev=708498&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/portlet-statistics.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/statistics-db.gif
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/statistics-db.gif?rev=708498&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/images/statistics-db.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/index.xml
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/index.xml?rev=708498&view=auto
==============================================================================
---
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/index.xml
(added)
+++
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/index.xml
Tue Oct 28 03:06:43 2008
@@ -0,0 +1,122 @@
+<?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.
+-->
+<document>
+ <properties>
+ <title>Jetspeed-2 Statistics</title>
+ <authors>
+ <person name="David Le Strat" email="[EMAIL PROTECTED]" />
+ </authors>
+ </properties>
+ <body>
+ <section name="Statistics Overview">
+ <p>
+ Jetspeed-2 provides components for collecting portal data for
various application events.
+ </p>
+ <subsection name="Collecting Portal Data">
+ <p>
+ <code>PortalStatistics</code> provides APIs for collecting
portal application events. The following event types
+ are supported out of the box:
+ <ul>
+ <li>Portlet rendering statistics.</li>
+ <li>Page rendering statistics.</li>
+ <li>User access statistics.</li>
+ </ul>
+ The <code>PortalStatistics</code> implementation logs usage
data based on the
+ <a href="http://httpd.apache.org/docs/logs.html">Apache Common
Log Format (CLF)</a>
+ where each log entry is formatted in the form:
+ <source>
+ %h %l %u %t \"%r\" %>s %b</source>
+ where:
+ <ul>
+ <li><b>%h </b>- remote host</li>
+ <li><b>%l </b>- remote log name</li>
+ <li><b>%u </b>- remote user</li>
+ <li><b>%t </b>- time in common log time format</li>
+ <li><b>%r </b>- first line of HTTP request</li>
+ <li><b>%s </b>- HTTP status code</li>
+ <li><b>%b </b>- number of bytes sent ("-" if
no bytes sent).</li>
+ </ul>
+ <br/>
+ <img src="images/portalstatistics-c.gif" border="0" />
+ </p>
+ <p>
+ Statistics data is stored in 3 relational tables as illustrated
below:
+ <br/><br/>
+ <img src="images/statistics-db.gif" border="0" />
+ </p>
+ <p>
+ Each event type is mapped to a data holder that gets persisted
in the statistics tables illustrated above.
+ <img src="images/logrecord-c.gif" border="0" />
+ <br/>
+ Jetspeed-2 persists the collected data in batches through the
<code>BatchedStatistics</code> component.
+ <br/><br/>
+ <img src="images/batchedstatistics-c.gif" border="0" />
+ </p>
+ </subsection>
+ <subsection name="PortalStatistics Configuration">
+ <p>
+ The <code>PortalStatistics</code> component is configured in
<code>WEB-INF/assembly/statistics.xml</code> and
+ requires the following configuration parameters:
+ <ul>
+ <li><b>logToCLF</b>: Whether to log to a Common Log Format
file.</li>
+ <li><b>logToDatabase</b>: Whether to record the statistics in
the database.</li>
+ <li><b>maxRecordToFlush_Portlet</b>: The maximum number of
portlet events that can be in the portlet statistics FIFO before a flush
occurs.</li>
+ <li><b>maxRecordToFlush_User</b>: The maximum number of user
events that can be in the user statistics FIFO before a flush occurs.</li>
+ <li><b>maxRecordToFlush_Page</b>: The maximum number of page
events that can be in the page statistics FIFO before a flush occurs.</li>
+ <li><b>maxTimeMsToFlush_Portlet</b>: The maximum length of time
between FIFO flushes for the portlet statistics FIFO. </li>
+ <li><b>maxTimeMsToFlush_User</b>: The maximum length of time
between FIFO flushes for the user statistics FIFO. </li>
+ <li><b>maxTimeMsToFlush_Page</b>: The maximum length of time
between FIFO flushes for the page statistics FIFO. </li>
+ <li><b>jetspeedDSEntry</b>: The reference to the Jetspeed data
source.</li>
+ </ul>
+ </p>
+ <p>
+ The FIFO parameters may be adjusted depending on site specific
needs. For example, tuning the events and times down makes the system less
likely to loose events in the
+ case of a failure, and also makes the user experience viewing
the statistics more responsive to recent events. On the other hand, tuning them
higher will reduce the overhead
+ to the database. Generally newer sites with fewer users
should use smaller tuning parameters and larger more mature sites should use
larger ones.
+ </p>
+ <p>
+ A sample configuration is provided below:
+ <source>
+ <bean id="PortalStatistics"
+ class="org.apache.jetspeed.statistics.impl.PortalStatisticsImpl"
+ init-method="springInit"
+ destroy-method="springDestroy">
+ <!-- logToCLF -->
+ <constructor-arg index='0'
type="boolean"><value>false</value></constructor-arg>
+ <!-- logToDatabase -->
+ <constructor-arg index='1'
type="boolean"><value>true</value></constructor-arg>
+ <!-- maxRecordToFlush_Portal -->
+ <constructor-arg
index='2'><value>300</value></constructor-arg>
+ <!-- maxRecordToFlush_User -->
+ <constructor-arg
index='3'><value>50</value></constructor-arg>
+ <!-- maxRecordToFlush_Page -->
+ <constructor-arg
index='4'><value>100</value></constructor-arg>
+ <!-- maxTimeMsToFlush_Portal -->
+ <constructor-arg
index='5'><value>300000</value></constructor-arg>
+ <!-- maxTimeMsToFlush_User -->
+ <constructor-arg
index='6'><value>5000</value></constructor-arg>
+ <!-- maxTimeMsToFlush_Page -->
+ <constructor-arg
index='7><value>60000</value></constructor-arg>
+ <!-- jetspeedDSEntry -->
+ <constructor-arg index='8'><ref
bean="JetspeedDS"/></constructor-arg>
+ </bean></source>
+ </p>
+ </subsection>
+ </section>
+ </body>
+</document>
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/index.xml
------------------------------------------------------------------------------
svn:keywords = Id
Added:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/stats.xml
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/stats.xml?rev=708498&view=auto
==============================================================================
---
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/stats.xml
(added)
+++
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/stats.xml
Tue Oct 28 03:06:43 2008
@@ -0,0 +1,54 @@
+<?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.
+-->
+<document>
+ <properties>
+ <title>Jetspeed-2 Statistics</title>
+ <authors>
+ <person name="David Le Strat" email="[EMAIL PROTECTED]" />
+ </authors>
+ </properties>
+ <body>
+ <section name="Viewing Statistics">
+ <subsection name="Where are the Event Recorded?">
+ <p>
+ Portal statistics events collection is injected at multiple
points in the portal engine. Some examples are
+ provided below.
+ </p>
+ <p>
+ For user events, the <code>SecurityValveImpl</code> logs a user
login event in <code>getSubject(RequestContext request)</code>.
+ <source>
+ statistics.logUserLogin(request, 0);</source>
+ </p>
+ <p>
+ For portlet events, the <code>RenderingJobImpl</code> invoked
in <code>RenderingJob</code> <code>buildRenderingJob</code> logs
+ a portlet access event.
+ <source>
+ statistics.logPortletAccess(requestContext, fragment.getName(),
PortalStatistics.HTTP_OK, end - start);</source>
+ </p>
+ </subsection>
+ <subsection name="Viewing Statistics">
+ <p>
+ Jetpseed-2 provides administrative portlets that report on
portal statistics.
+ <br/><br/>
+ <img src="images/portlet-statistics.gif" border="0"/><br/>
+ <img src="images/page-statistics.gif" border="0"/>
+ </p>
+ </subsection>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Propchange:
portals/jetspeed-2/portal/trunk/xdocs/components/jetspeed-statistics/stats.xml
------------------------------------------------------------------------------
svn:keywords = Id
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]