You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(927) |
Apr
(419) |
May
(352) |
Jun
(431) |
Jul
(463) |
Aug
(345) |
Sep
(304) |
Oct
(596) |
Nov
(466) |
Dec
(414) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(348) |
Feb
(313) |
Mar
(665) |
Apr
(688) |
May
(434) |
Jun
(311) |
Jul
(540) |
Aug
(554) |
Sep
(467) |
Oct
(341) |
Nov
(365) |
Dec
(272) |
2009 |
Jan
(386) |
Feb
(293) |
Mar
(279) |
Apr
(239) |
May
(229) |
Jun
(199) |
Jul
(186) |
Aug
(111) |
Sep
(196) |
Oct
(146) |
Nov
(116) |
Dec
(140) |
2010 |
Jan
(170) |
Feb
(159) |
Mar
(151) |
Apr
(161) |
May
(90) |
Jun
(56) |
Jul
(28) |
Aug
(22) |
Sep
(5) |
Oct
|
Nov
(23) |
Dec
(12) |
2011 |
Jan
(8) |
Feb
(8) |
Mar
(22) |
Apr
(24) |
May
(4) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sc...@hy...> - 2010-01-20 02:26:17
|
Author: scottmf Date: 2010-01-19 18:26:07 -0800 (Tue, 19 Jan 2010) New Revision: 14203 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14203 Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java Log: [HHQ-3676] got rid of query in loop, using ehcache instead Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-20 02:20:55 UTC (rev 14202) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-20 02:26:07 UTC (rev 14203) @@ -2446,15 +2446,16 @@ private PageList getResourcesCurrentHealth(AuthzSubject subject, PageList resources) throws AppdefEntityNotFoundException, PermissionException { - StopWatch watch = new StopWatch(); + final ServerManagerLocal sMan = getServerManager(); + final boolean debug = _log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); PageList summaries = new PageList(); - watch.markTimeBegin("getAvailMeasurements"); + if (debug) watch.markTimeBegin("getAvailMeasurements"); final Map measCache = getMetricManager().getAvailMeasurements(resources); - watch.markTimeEnd("getAvailMeasurements"); - watch.markTimeBegin("getLastAvail"); - final Map availCache = getAvailManager().getLastAvail( - resources, measCache); - watch.markTimeEnd("getLastAvail"); + if (debug) watch.markTimeEnd("getAvailMeasurements"); + if (debug) watch.markTimeBegin("getLastAvail"); + final Map availCache = getAvailManager().getLastAvail(resources, measCache); + if (debug) watch.markTimeEnd("getLastAvail"); for (Iterator it = resources.iterator(); it.hasNext(); ) { try { Object o = it.next(); @@ -2479,34 +2480,26 @@ HashSet categories = new HashSet(4); switch (aeid.getType()) { case AppdefEntityConstants.APPDEF_TYPE_SERVER : - try { - List platforms = - rv.getAssociatedPlatforms(PageControl.PAGE_ALL); - if (platforms != null && platforms.size() > 0) { - parent = (AppdefResourceValue) platforms.get(0); - } - } catch (PermissionException e) { - // Can't get the parent, leave parent = null - } - // Fall through to set the monitorable and metrics + if (debug) watch.markTimeBegin("getPlatform"); + Server server = sMan.findServerById(rv.getID().getId()); + parent = server.getPlatform().getAppdefResourceValue(); + if (debug) watch.markTimeEnd("getPlatform"); case AppdefEntityConstants.APPDEF_TYPE_PLATFORM: case AppdefEntityConstants.APPDEF_TYPE_SERVICE : categories.add(MeasurementConstants.CAT_AVAILABILITY); // XXX scottmf need to review this, perf is bad and metric // is not very useful //categories.add(MeasurementConstants.CAT_THROUGHPUT); - watch.markTimeBegin( - "setResourceDisplaySummaryValueForCategory"); + if (debug) watch.markTimeBegin("setResourceDisplaySummaryValueForCategory"); setResourceDisplaySummaryValueForCategory( subject, aeid, summary, categories, measCache, availCache); - watch.markTimeEnd("setResourceDisplaySummaryValueForCategory"); - + if (debug) watch.markTimeEnd("setResourceDisplaySummaryValueForCategory"); summary.setMonitorable(Boolean.TRUE); break; case AppdefEntityConstants.APPDEF_TYPE_GROUP: case AppdefEntityConstants.APPDEF_TYPE_APPLICATION: - watch.markTimeBegin("Group Type"); + if (debug) watch.markTimeBegin("Group Type"); summary.setMonitorable(Boolean.TRUE); // Set the availability now double avail = getAvailability( @@ -2520,22 +2513,22 @@ } catch (MeasurementNotFoundException e) { // No availability metric, don't set it } - watch.markTimeEnd("Group Type"); + if (debug) watch.markTimeEnd("Group Type"); break; default: throw new InvalidAppdefTypeException( "entity type is not monitorable, id type: " + aeid.getType()); } + if (debug) watch.markTimeBegin("setResourceDisplaySummary"); setResourceDisplaySummary(summary, rv, parent); + if (debug) watch.markTimeEnd("setResourceDisplaySummary"); summaries.add(summary); } catch (AppdefEntityNotFoundException e) { _log.debug(e.getMessage(), e); } } - if (_log.isDebugEnabled()) { - _log.debug("getResourcesCurrentHealth: " + watch); - } + if (debug) _log.debug("getResourcesCurrentHealth: " + watch); summaries.setTotalSize(resources.getTotalSize()); return summaries; } @@ -2911,7 +2904,13 @@ PageList servers = rv.getAssociatedServers(pc); // Return a paged list of current health - return getResourcesCurrentHealth(subject, servers); + final StopWatch watch = new StopWatch(); + final boolean debug = _log.isDebugEnabled(); + if (debug) watch.markTimeBegin("getResourcesCurrentHealth"); + PageList rtn = getResourcesCurrentHealth(subject, servers); + if (debug) watch.markTimeEnd("getResourcesCurrentHealth"); + if (debug) _log.debug(watch); + return rtn; } /** |
From: <sc...@hy...> - 2010-01-20 02:21:05
|
Author: scottmf Date: 2010-01-19 18:20:55 -0800 (Tue, 19 Jan 2010) New Revision: 14202 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14202 Modified: trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java Log: [HHQ-3676] got rid of query in loop, using ehcache instead Modified: trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-19 20:04:09 UTC (rev 14201) +++ trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-20 02:20:55 UTC (rev 14202) @@ -2446,15 +2446,16 @@ private PageList getResourcesCurrentHealth(AuthzSubject subject, PageList resources) throws AppdefEntityNotFoundException, PermissionException { - StopWatch watch = new StopWatch(); + final ServerManagerLocal sMan = getServerManager(); + final boolean debug = _log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); PageList summaries = new PageList(); - watch.markTimeBegin("getAvailMeasurements"); + if (debug) watch.markTimeBegin("getAvailMeasurements"); final Map measCache = getMetricManager().getAvailMeasurements(resources); - watch.markTimeEnd("getAvailMeasurements"); - watch.markTimeBegin("getLastAvail"); - final Map availCache = getAvailManager().getLastAvail( - resources, measCache); - watch.markTimeEnd("getLastAvail"); + if (debug) watch.markTimeEnd("getAvailMeasurements"); + if (debug) watch.markTimeBegin("getLastAvail"); + final Map availCache = getAvailManager().getLastAvail(resources, measCache); + if (debug) watch.markTimeEnd("getLastAvail"); for (Iterator it = resources.iterator(); it.hasNext(); ) { try { Object o = it.next(); @@ -2479,34 +2480,26 @@ HashSet categories = new HashSet(4); switch (aeid.getType()) { case AppdefEntityConstants.APPDEF_TYPE_SERVER : - try { - List platforms = - rv.getAssociatedPlatforms(PageControl.PAGE_ALL); - if (platforms != null && platforms.size() > 0) { - parent = (AppdefResourceValue) platforms.get(0); - } - } catch (PermissionException e) { - // Can't get the parent, leave parent = null - } - // Fall through to set the monitorable and metrics + if (debug) watch.markTimeBegin("getPlatform"); + Server server = sMan.findServerById(rv.getID().getId()); + parent = server.getPlatform().getAppdefResourceValue(); + if (debug) watch.markTimeEnd("getPlatform"); case AppdefEntityConstants.APPDEF_TYPE_PLATFORM: case AppdefEntityConstants.APPDEF_TYPE_SERVICE : categories.add(MeasurementConstants.CAT_AVAILABILITY); // XXX scottmf need to review this, perf is bad and metric // is not very useful //categories.add(MeasurementConstants.CAT_THROUGHPUT); - watch.markTimeBegin( - "setResourceDisplaySummaryValueForCategory"); + if (debug) watch.markTimeBegin("setResourceDisplaySummaryValueForCategory"); setResourceDisplaySummaryValueForCategory( subject, aeid, summary, categories, measCache, availCache); - watch.markTimeEnd("setResourceDisplaySummaryValueForCategory"); - + if (debug) watch.markTimeEnd("setResourceDisplaySummaryValueForCategory"); summary.setMonitorable(Boolean.TRUE); break; case AppdefEntityConstants.APPDEF_TYPE_GROUP: case AppdefEntityConstants.APPDEF_TYPE_APPLICATION: - watch.markTimeBegin("Group Type"); + if (debug) watch.markTimeBegin("Group Type"); summary.setMonitorable(Boolean.TRUE); // Set the availability now double avail = getAvailability( @@ -2520,22 +2513,22 @@ } catch (MeasurementNotFoundException e) { // No availability metric, don't set it } - watch.markTimeEnd("Group Type"); + if (debug) watch.markTimeEnd("Group Type"); break; default: throw new InvalidAppdefTypeException( "entity type is not monitorable, id type: " + aeid.getType()); } + if (debug) watch.markTimeBegin("setResourceDisplaySummary"); setResourceDisplaySummary(summary, rv, parent); + if (debug) watch.markTimeEnd("setResourceDisplaySummary"); summaries.add(summary); } catch (AppdefEntityNotFoundException e) { _log.debug(e.getMessage(), e); } } - if (_log.isDebugEnabled()) { - _log.debug("getResourcesCurrentHealth: " + watch); - } + if (debug) _log.debug("getResourcesCurrentHealth: " + watch); summaries.setTotalSize(resources.getTotalSize()); return summaries; } @@ -2911,7 +2904,13 @@ PageList servers = rv.getAssociatedServers(pc); // Return a paged list of current health - return getResourcesCurrentHealth(subject, servers); + final StopWatch watch = new StopWatch(); + final boolean debug = _log.isDebugEnabled(); + if (debug) watch.markTimeBegin("getResourcesCurrentHealth"); + PageList rtn = getResourcesCurrentHealth(subject, servers); + if (debug) watch.markTimeEnd("getResourcesCurrentHealth"); + if (debug) _log.debug(watch); + return rtn; } /** |
From: <bo...@hy...> - 2010-01-19 20:04:17
|
Author: bob Date: 2010-01-19 12:04:09 -0800 (Tue, 19 Jan 2010) New Revision: 14201 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14201 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: Update patch version to 4.2.0.4 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-19 19:34:34 UTC (rev 14200) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-19 20:04:09 UTC (rev 14201) @@ -1,3 +1,3 @@ #Mon Jan 18 21:08:52 PST 2010 -version=4.2.0.3 +version=4.2.0.4 build=1275 |
From: <do...@hy...> - 2010-01-19 19:34:44
|
Author: dougm Date: 2010-01-19 11:34:34 -0800 (Tue, 19 Jan 2010) New Revision: 14200 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14200 Modified: trunk/plugins/iis/src/org/hyperic/hq/plugin/iis/IisMetaBase.java Log: [HHQ-3677] specify UTF-8 encoding when parsing appcmd output Modified: trunk/plugins/iis/src/org/hyperic/hq/plugin/iis/IisMetaBase.java =================================================================== --- trunk/plugins/iis/src/org/hyperic/hq/plugin/iis/IisMetaBase.java 2010-01-19 09:25:47 UTC (rev 14199) +++ trunk/plugins/iis/src/org/hyperic/hq/plugin/iis/IisMetaBase.java 2010-01-19 19:34:34 UTC (rev 14200) @@ -161,7 +161,7 @@ DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document config = - db.parse(new ByteArrayInputStream(output.toByteArray())); + db.parse(new ByteArrayInputStream(output.toString().getBytes("UTF-8"))); NodeList sites = XPathAPI.selectNodeList(config, "//sites/site"); |
From: <bo...@hy...> - 2010-01-19 09:25:55
|
Author: bob Date: 2010-01-19 01:25:47 -0800 (Tue, 19 Jan 2010) New Revision: 14199 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14199 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1324 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-01-19 05:40:43 UTC (rev 14198) +++ trunk/etc/version.properties 2010-01-19 09:25:47 UTC (rev 14199) @@ -1,3 +1,3 @@ -#Mon Jan 18 00:28:20 PST 2010 +#Tue Jan 19 00:30:41 PST 2010 version=4.3.0 -build=1323 +build=1324 |
From: <bo...@hy...> - 2010-01-19 05:40:51
|
Author: bob Date: 2010-01-18 21:40:43 -0800 (Mon, 18 Jan 2010) New Revision: 14198 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14198 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: Release 4.2.0.3 build #1275 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-19 01:25:52 UTC (rev 14197) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-19 05:40:43 UTC (rev 14198) @@ -1,3 +1,3 @@ -#Fri Jan 15 15:18:49 PST 2010 +#Mon Jan 18 21:08:52 PST 2010 version=4.2.0.3 -build=1274 +build=1275 |
From: <sc...@hy...> - 2010-01-19 01:25:59
|
Author: scottmf Date: 2010-01-18 17:25:52 -0800 (Mon, 18 Jan 2010) New Revision: 14197 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14197 Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/dao/HibernateDAO.java branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java Log: [HHQ-3676] batched up a query which finds designated metrics per resource Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-19 01:25:15 UTC (rev 14196) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-19 01:25:52 UTC (rev 14197) @@ -1204,29 +1204,28 @@ MeasurementTemplate tmpl, long begin, long end, long interval, boolean returnNulls, PageControl pc) - throws SessionNotFoundException, SessionTimeoutException, - AppdefEntityNotFoundException, - PermissionException, MeasurementNotFoundException { - + throws SessionNotFoundException, SessionTimeoutException, + AppdefEntityNotFoundException, PermissionException, + MeasurementNotFoundException { final AuthzSubject subject = manager.getSubject(sessionId); - + final boolean debug = _log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); List measurements; - if (aid.isApplication() && tmpl.isAvailability()) { // Special case for application availability _log.debug("BEGIN findMeasurementData()"); - AppdefEntityValue aeval = new AppdefEntityValue(aid, subject); - // Get the flattened list of services + if (debug) watch.markTimeBegin("getFlattenedServiceIds"); AppdefEntityID[] serviceIds = aeval.getFlattenedServiceIds(); - + if (debug) watch.markTimeEnd("getFlattenedServiceIds"); + if (debug) watch.markTimeBegin("findDesignatedMeasurements"); Map midMap = getMetricManager() .findDesignatedMeasurements(subject, serviceIds, MeasurementConstants.CAT_AVAILABILITY); + if (debug) watch.markTimeEnd("findDesignatedMeasurements"); measurements = new ArrayList(midMap.values()); - } - else { + } else { measurements = getMeasurementsForResource(subject, aid, tmpl); if (measurements == null || measurements.size() == 0) { throw new MeasurementNotFoundException( @@ -1234,10 +1233,13 @@ tmpl.getId()); } } - - return getDataMan().getHistoricalData(measurements, begin, end, - interval, tmpl.getCollectionType(), - returnNulls, pc); + if (debug) watch.markTimeBegin("getHistoricalData"); + PageList rtn = getDataMan().getHistoricalData( + measurements, begin, end, interval, tmpl.getCollectionType(), + returnNulls, pc); + if (debug) watch.markTimeEnd("getHistoricalData"); + if (debug) _log.debug(watch); + return rtn; } /** @@ -3006,30 +3008,27 @@ PermissionException { StopWatch watch = new StopWatch(); final boolean debug = _log.isDebugEnabled(); - if (debug) _log.debug("BEGIN getAvailability()"); + if (debug) _log.debug("BEGIN getAvailability() id=" + id); try { if (id.isGroup()) { return getGroupAvailability( subject, id.getId(), measCache, availCache); - } - else if (id.isApplication()) { + } else if (id.isApplication()) { AppdefEntityValue appVal = new AppdefEntityValue(id, subject); if (debug) watch.markTimeBegin("getFlattenedServiceIds"); AppdefEntityID[] services = appVal.getFlattenedServiceIds(); if (debug) watch.markTimeEnd("getFlattenedServiceIds"); - if (debug) watch.markTimeBegin("getAggregateAvailability"); double rtn = getAggregateAvailability( subject, services, measCache, availCache); if (debug) watch.markTimeEnd("getAggregateAvailability"); return rtn; } - AppdefEntityID[] ids = new AppdefEntityID[] { id }; return getAvailability( subject, ids, getMidMap(ids, measCache), availCache)[0]; } finally { - if (debug) _log.debug("END getAvailability() -- " + watch); + if (debug) _log.debug("END getAvailability() id=" + id + " -- " + watch); } } Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/dao/HibernateDAO.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/dao/HibernateDAO.java 2010-01-19 01:25:15 UTC (rev 14196) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/dao/HibernateDAO.java 2010-01-19 01:25:52 UTC (rev 14197) @@ -49,7 +49,7 @@ public abstract class HibernateDAO { private Class _persistentClass; private DAOFactory _daoFactory; - protected static final int BATCH_SIZE = 500; + protected static final int BATCH_SIZE = 1000; protected HibernateDAO(Class persistentClass, DAOFactory f) { _persistentClass = persistentClass; Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java 2010-01-19 01:25:15 UTC (rev 14196) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java 2010-01-19 01:25:52 UTC (rev 14197) @@ -329,23 +329,37 @@ .uniqueResult(); } - List findDesignatedByResourceForCategory(Resource resource, String cat) - { - String sql = - "select m from Measurement m " + - "join m.template t " + - "join t.category c " + - "where m.resource = ? and " + - "t.designate = true and " + - "c.name = ? " + - "order by t.name"; + /** + * @param resources {@link List} of {@link Resource}s + * @return {@link List} of {@link Measurement}s + */ + List findDesignatedByResourcesForCategory(List resources, String cat) { + String sql = new StringBuilder(512) + .append("select m from Measurement m ") + .append("join m.template t ") + .append("join t.category c ") + .append("where m.resource in (:rids) and ") + .append("t.designate = true and ") + .append("c.name = :cat") + .toString(); + int size = resources.size(); + List rtn = new ArrayList(size*5); + for (int i=0; i<size; i+=BATCH_SIZE) { + int end = Math.min(size, i+BATCH_SIZE); + rtn.addAll(getSession().createQuery(sql) + .setParameterList("rids", resources.subList(i, end)) + .setParameter("cat", cat) + .list()); + } + return rtn; + } - return getSession().createQuery(sql) - .setParameter(0, resource) - .setParameter(1, cat) - .setCacheable(true) - .setCacheRegion("Measurement.findDesignatedByResourceForCategory") - .list(); + /** + * @return {@link List} of {@link Measurement}s + */ + List findDesignatedByResourceForCategory(Resource resource, String cat) { + return findDesignatedByResourcesForCategory( + Collections.singletonList(resource), cat); } List findDesignatedByResource(Resource resource) { Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2010-01-19 01:25:15 UTC (rev 14196) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2010-01-19 01:25:52 UTC (rev 14197) @@ -746,33 +746,22 @@ public Map findDesignatedMeasurements(AuthzSubject subject, AppdefEntityID[] ids, String cat) throws MeasurementNotFoundException { - - Map midMap = new HashMap(); - if (ids.length == 0) - return midMap; - - for (int i = 0; i < ids.length; i++) { + if (ids.length == 0) { + return Collections.EMPTY_MAP; + } + Map midMap = new HashMap(ids.length); + ResourceManagerLocal rMan = ResourceManagerEJBImpl.getOne(); + ArrayList resources = new ArrayList(ids.length); + for (int i=0; i<ids.length; i++) { AppdefEntityID id = ids[i]; - try { - List metrics = getMeasurementDAO(). - findDesignatedByResourceForCategory(getResource(id), - cat); - - if (metrics.size() == 0) { - throw new FinderException("No metrics found"); - } - - Measurement m = (Measurement) metrics.get(0); - midMap.put(id, m); - } catch (FinderException e) { - // Throw an exception if we're only looking for one - // measurement - if (ids.length == 1) { - throw new MeasurementNotFoundException(cat + " metric for " + - id + " not found"); - } - } + resources.add(rMan.findResource(id)); } + MeasurementDAO dao = getMeasurementDAO(); + List list = dao.findDesignatedByResourcesForCategory(resources, cat); + for (Iterator it=list.iterator(); it.hasNext(); ) { + Measurement m = (Measurement) it.next(); + midMap.put(new AppdefEntityID(m.getResource()), m); + } return midMap; } |
From: <sc...@hy...> - 2010-01-19 01:25:23
|
Author: scottmf Date: 2010-01-18 17:25:15 -0800 (Mon, 18 Jan 2010) New Revision: 14196 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14196 Modified: trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java trunk/src/org/hyperic/hq/dao/HibernateDAO.java trunk/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java Log: [HHQ-3676] batched up a query which finds designated metrics per resource Modified: trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-19 01:05:35 UTC (rev 14195) +++ trunk/src/org/hyperic/hq/bizapp/server/session/MeasurementBossEJBImpl.java 2010-01-19 01:25:15 UTC (rev 14196) @@ -1204,29 +1204,28 @@ MeasurementTemplate tmpl, long begin, long end, long interval, boolean returnNulls, PageControl pc) - throws SessionNotFoundException, SessionTimeoutException, - AppdefEntityNotFoundException, - PermissionException, MeasurementNotFoundException { - + throws SessionNotFoundException, SessionTimeoutException, + AppdefEntityNotFoundException, PermissionException, + MeasurementNotFoundException { final AuthzSubject subject = manager.getSubject(sessionId); - + final boolean debug = _log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); List measurements; - if (aid.isApplication() && tmpl.isAvailability()) { // Special case for application availability _log.debug("BEGIN findMeasurementData()"); - AppdefEntityValue aeval = new AppdefEntityValue(aid, subject); - // Get the flattened list of services + if (debug) watch.markTimeBegin("getFlattenedServiceIds"); AppdefEntityID[] serviceIds = aeval.getFlattenedServiceIds(); - + if (debug) watch.markTimeEnd("getFlattenedServiceIds"); + if (debug) watch.markTimeBegin("findDesignatedMeasurements"); Map midMap = getMetricManager() .findDesignatedMeasurements(subject, serviceIds, MeasurementConstants.CAT_AVAILABILITY); + if (debug) watch.markTimeEnd("findDesignatedMeasurements"); measurements = new ArrayList(midMap.values()); - } - else { + } else { measurements = getMeasurementsForResource(subject, aid, tmpl); if (measurements == null || measurements.size() == 0) { throw new MeasurementNotFoundException( @@ -1234,10 +1233,13 @@ tmpl.getId()); } } - - return getDataMan().getHistoricalData(measurements, begin, end, - interval, tmpl.getCollectionType(), - returnNulls, pc); + if (debug) watch.markTimeBegin("getHistoricalData"); + PageList rtn = getDataMan().getHistoricalData( + measurements, begin, end, interval, tmpl.getCollectionType(), + returnNulls, pc); + if (debug) watch.markTimeEnd("getHistoricalData"); + if (debug) _log.debug(watch); + return rtn; } /** @@ -3006,30 +3008,27 @@ PermissionException { StopWatch watch = new StopWatch(); final boolean debug = _log.isDebugEnabled(); - if (debug) _log.debug("BEGIN getAvailability()"); + if (debug) _log.debug("BEGIN getAvailability() id=" + id); try { if (id.isGroup()) { return getGroupAvailability( subject, id.getId(), measCache, availCache); - } - else if (id.isApplication()) { + } else if (id.isApplication()) { AppdefEntityValue appVal = new AppdefEntityValue(id, subject); if (debug) watch.markTimeBegin("getFlattenedServiceIds"); AppdefEntityID[] services = appVal.getFlattenedServiceIds(); if (debug) watch.markTimeEnd("getFlattenedServiceIds"); - if (debug) watch.markTimeBegin("getAggregateAvailability"); double rtn = getAggregateAvailability( subject, services, measCache, availCache); if (debug) watch.markTimeEnd("getAggregateAvailability"); return rtn; } - AppdefEntityID[] ids = new AppdefEntityID[] { id }; return getAvailability( subject, ids, getMidMap(ids, measCache), availCache)[0]; } finally { - if (debug) _log.debug("END getAvailability() -- " + watch); + if (debug) _log.debug("END getAvailability() id=" + id + " -- " + watch); } } Modified: trunk/src/org/hyperic/hq/dao/HibernateDAO.java =================================================================== --- trunk/src/org/hyperic/hq/dao/HibernateDAO.java 2010-01-19 01:05:35 UTC (rev 14195) +++ trunk/src/org/hyperic/hq/dao/HibernateDAO.java 2010-01-19 01:25:15 UTC (rev 14196) @@ -49,7 +49,7 @@ public abstract class HibernateDAO { private Class _persistentClass; private DAOFactory _daoFactory; - protected static final int BATCH_SIZE = 500; + protected static final int BATCH_SIZE = 1000; protected HibernateDAO(Class persistentClass, DAOFactory f) { _persistentClass = persistentClass; Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java 2010-01-19 01:05:35 UTC (rev 14195) +++ trunk/src/org/hyperic/hq/measurement/server/session/MeasurementDAO.java 2010-01-19 01:25:15 UTC (rev 14196) @@ -329,23 +329,37 @@ .uniqueResult(); } - List findDesignatedByResourceForCategory(Resource resource, String cat) - { - String sql = - "select m from Measurement m " + - "join m.template t " + - "join t.category c " + - "where m.resource = ? and " + - "t.designate = true and " + - "c.name = ? " + - "order by t.name"; + /** + * @param resources {@link List} of {@link Resource}s + * @return {@link List} of {@link Measurement}s + */ + List findDesignatedByResourcesForCategory(List resources, String cat) { + String sql = new StringBuilder(512) + .append("select m from Measurement m ") + .append("join m.template t ") + .append("join t.category c ") + .append("where m.resource in (:rids) and ") + .append("t.designate = true and ") + .append("c.name = :cat") + .toString(); + int size = resources.size(); + List rtn = new ArrayList(size*5); + for (int i=0; i<size; i+=BATCH_SIZE) { + int end = Math.min(size, i+BATCH_SIZE); + rtn.addAll(getSession().createQuery(sql) + .setParameterList("rids", resources.subList(i, end)) + .setParameter("cat", cat) + .list()); + } + return rtn; + } - return getSession().createQuery(sql) - .setParameter(0, resource) - .setParameter(1, cat) - .setCacheable(true) - .setCacheRegion("Measurement.findDesignatedByResourceForCategory") - .list(); + /** + * @return {@link List} of {@link Measurement}s + */ + List findDesignatedByResourceForCategory(Resource resource, String cat) { + return findDesignatedByResourcesForCategory( + Collections.singletonList(resource), cat); } List findDesignatedByResource(Resource resource) { Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2010-01-19 01:05:35 UTC (rev 14195) +++ trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2010-01-19 01:25:15 UTC (rev 14196) @@ -748,33 +748,22 @@ public Map findDesignatedMeasurements(AuthzSubject subject, AppdefEntityID[] ids, String cat) throws MeasurementNotFoundException { - - Map midMap = new HashMap(); - if (ids.length == 0) - return midMap; - - for (int i = 0; i < ids.length; i++) { + if (ids.length == 0) { + return Collections.EMPTY_MAP; + } + Map midMap = new HashMap(ids.length); + ResourceManagerLocal rMan = ResourceManagerEJBImpl.getOne(); + ArrayList resources = new ArrayList(ids.length); + for (int i=0; i<ids.length; i++) { AppdefEntityID id = ids[i]; - try { - List metrics = getMeasurementDAO(). - findDesignatedByResourceForCategory(getResource(id), - cat); - - if (metrics.size() == 0) { - throw new FinderException("No metrics found"); - } - - Measurement m = (Measurement) metrics.get(0); - midMap.put(id, m); - } catch (FinderException e) { - // Throw an exception if we're only looking for one - // measurement - if (ids.length == 1) { - throw new MeasurementNotFoundException(cat + " metric for " + - id + " not found"); - } - } + resources.add(rMan.findResource(id)); } + MeasurementDAO dao = getMeasurementDAO(); + List list = dao.findDesignatedByResourcesForCategory(resources, cat); + for (Iterator it=list.iterator(); it.hasNext(); ) { + Measurement m = (Measurement) it.next(); + midMap.put(new AppdefEntityID(m.getResource()), m); + } return midMap; } |
From: <sc...@hy...> - 2010-01-19 01:05:47
|
Author: scottmf Date: 2010-01-18 17:05:35 -0800 (Mon, 18 Jan 2010) New Revision: 14195 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14195 Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java Log: [HHQ-3667] rewrote findByApplication_order queries so that the application does most of the work by avoiding unneccessary db joins. Added timings. Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java 2010-01-19 01:02:12 UTC (rev 14194) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java 2010-01-19 01:05:35 UTC (rev 14195) @@ -1,6 +1,7 @@ package org.hyperic.hq.appdef.server.session; import java.util.Collection; +import java.util.Comparator; import java.util.Iterator; import java.util.List; @@ -11,11 +12,14 @@ import org.hyperic.hq.appdef.AppSvcDependency; import org.hyperic.hq.appdef.ServiceCluster; import org.hyperic.hq.appdef.shared.ServiceManagerLocal; +import org.hyperic.hq.authz.server.session.Resource; import org.hyperic.hq.authz.server.session.ResourceGroup; import org.hyperic.hq.authz.server.session.ResourceGroupDAO; import org.hyperic.hq.authz.shared.AuthzConstants; import org.hyperic.hq.dao.HibernateDAO; +import edu.emory.mathcs.backport.java.util.Collections; + /* * NOTE: This copyright does *not* cover user programs that use HQ * program services by normal system calls through the application @@ -152,42 +156,57 @@ return create(aClusterPK, a); } - public List findByApplication_orderName(Integer id) - { - // TODO: fix this query after authz conversion - String sql= - "select distinct a from " + - "AppService a, Resource r, ResourceType t " + - "where a.application.id=:appid and (" + - "r.resourceType.id=t.id AND t.name=:groupType "+ - "AND a.resourceGroup.id IN (" + - "SELECT id FROM ResourceGroup g where g.id = r.instanceId)"+ - " OR " + - "(r.instanceId=a.service.id and " + - "r.resourceType.id=t.id AND t.name=:serviceType))) " + - "order by r.name"; - return getSession().createQuery(sql) - .setInteger("appid", id.intValue()) - .setString("groupType", groupResType) - .setString("serviceType", serviceResType) - .list(); + public List findByApplication_orderName(Integer id) { + List list = findByApplication(id); + Comparator c = new Comparator() { + private String name = null; + public int compare(Object arg0, Object arg1) { + AppService app0 = (AppService) arg0; + AppService app1 = (AppService) arg1; + return getName(app0).compareTo(getName(app1)); + } + private String getName(AppService app) { + if (name != null) { + return name; + } + Resource res = (app.isIsGroup()) ? + app.getResourceGroup().getResource() : + app.getService().getResource(); + name = (res == null || res.isInAsyncDeleteState()) ? + "" : res.getName(); + return name; + } + }; + Collections.sort(list, c); + return list; } - public List findByApplication_orderType(Integer id, boolean asc) + public List findByApplication_orderType(Integer id, final boolean asc) { - String sql="select distinct a from AppService a " + - " join fetch a.serviceType st " + - "where a.application.id=? " + - "order by st.name " + (asc ? "asc" : "desc"); - return getSession().createQuery(sql) - .setInteger(0, id.intValue()) - .list(); + List list = findByApplication(id); + Comparator c = new Comparator() { + private String type = null; + public int compare(Object arg0, Object arg1) { + AppService app0 = (AppService) arg0; + AppService app1 = (AppService) arg1; + return (asc) ? getType(app0).compareTo(getType(app1)) : + getType(app1).compareTo(getType(app0)); + } + private String getType(AppService app) { + if (type != null) { + return type; + } + type = app.getServiceType().getName(); + return type; + } + }; + Collections.sort(list, c); + return list; } - public Collection findByApplication(Integer id) + public List findByApplication(Integer id) { - String sql="select distinct a from AppService a " + - "where a.application.id=?"; + String sql="select a from AppService a where a.application.id=?"; return getSession().createQuery(sql) .setInteger(0, id.intValue()) .list(); Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java 2010-01-19 01:02:12 UTC (rev 14194) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java 2010-01-19 01:05:35 UTC (rev 14195) @@ -58,6 +58,7 @@ import org.hyperic.hq.appdef.shared.ServiceManagerUtil; import org.hyperic.hq.appdef.AppService; import org.hyperic.hq.appdef.ConfigResponseDB; +import org.hyperic.hq.appdef.ServiceCluster; import org.hyperic.hq.authz.server.session.AuthzSubject; import org.hyperic.hq.authz.server.session.AuthzSubjectManagerEJBImpl; import org.hyperic.hq.authz.server.session.Resource; @@ -79,6 +80,7 @@ import org.hyperic.util.pager.PageList; import org.hyperic.util.pager.Pager; import org.hyperic.util.pager.SortAttribute; +import org.hyperic.util.timer.StopWatch; import org.hyperic.dao.DAOFactory; import org.hibernate.ObjectNotFoundException; import org.hyperic.hq.appdef.server.session.Platform; @@ -1145,20 +1147,30 @@ throw new ApplicationNotFoundException(appId, e); } + final StopWatch watch = new StopWatch(); + final boolean debug = log.isDebugEnabled(); Collection svcCollection = new ArrayList(); + if (debug) watch.markTimeBegin("getAppServices"); Collection appSvcCollection = appLocal.getAppServices(); + if (debug) watch.markTimeEnd("getAppServices"); Iterator it = appSvcCollection.iterator(); while (it != null && it.hasNext()) { AppService appService = (AppService) it.next(); if (appService.isIsGroup()) { - svcCollection.addAll(getServiceCluster( - appService.getResourceGroup()).getServices()); + if (debug) watch.markTimeBegin("getServiceCluster"); + ServiceCluster cluster = + getServiceCluster(appService.getResourceGroup()); + if (debug) watch.markTimeEnd("getServiceCluster"); + if (debug) watch.markTimeBegin("getServices"); + svcCollection.addAll(cluster.getServices()); + if (debug) watch.markTimeEnd("getServices"); } else { svcCollection.add(appService.getService()); } } + if (debug) log.debug(watch); return filterAndPage(svcCollection, subject, typeId, pc); } @@ -1200,10 +1212,14 @@ throws ServiceNotFoundException, PermissionException, ApplicationNotFoundException { - List serviceInventory = - getUnflattenedServiceInventoryByApplication( - subject, appId, PageControl.PAGE_ALL); + final boolean debug = log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); + if (debug) watch.markTimeBegin("getUnflattenedServiceInventoryByApplication"); + List serviceInventory = getUnflattenedServiceInventoryByApplication( + subject, appId, PageControl.PAGE_ALL); + if (debug) watch.markTimeEnd("getUnflattenedServiceInventoryByApplication"); + List servicePKs = new ArrayList(); // flattening: open up all of the groups (if any) and get their services as well try { @@ -1223,12 +1239,13 @@ // any authz resource filtering on the group members happens // inside the group subsystem try { + if (debug) watch.markTimeBegin("getCompatGroupMembers"); List memberIds = GroupUtil.getCompatGroupMembers( subject, groupId, null, PageControl.PAGE_ALL); - for (Iterator memberIter = memberIds.iterator(); - memberIter.hasNext(); ) { + if (debug) watch.markTimeEnd("getCompatGroupMembers"); + for (Iterator it=memberIds.iterator(); it.hasNext(); ) { AppdefEntityID memberEntId = - (AppdefEntityID) memberIter.next(); + (AppdefEntityID) it.next(); servicePKs.add(memberEntId.getId()); } } catch (PermissionException e) { @@ -1245,18 +1262,16 @@ throw new ServiceNotFoundException("could not return all services", e); } - - return (Integer[]) servicePKs.toArray( - new Integer[servicePKs.size()]); + if (debug) log.debug(watch); + return (Integer[]) servicePKs.toArray(new Integer[servicePKs.size()]); } private List getUnflattenedServiceInventoryByApplication( AuthzSubject subject, Integer appId, PageControl pc) - throws ApplicationNotFoundException, ServiceNotFoundException { - - AppServiceDAO appServLocHome; - List appServiceCollection; - + throws ApplicationNotFoundException, ServiceNotFoundException { + final boolean debug = log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); + try { getApplicationDAO().findById(appId); } catch (ObjectNotFoundException e) { @@ -1266,19 +1281,22 @@ pc = PageControl.initDefaults(pc, SortAttribute.SERVICE_NAME); - appServLocHome = new AppServiceDAO(DAOFactory.getDAOFactory()); + AppServiceDAO appServDAO = new AppServiceDAO(DAOFactory.getDAOFactory()); + Collection appServices = null; switch (pc.getSortattribute()) { case SortAttribute.SERVICE_NAME : case SortAttribute.RESOURCE_NAME : case SortAttribute.NAME : // TODO: Not actually sorting - appServiceCollection = - appServLocHome.findByApplication_orderName(appId); + if (debug) watch.markTimeBegin("findByApplication_orderName"); + appServices = appServDAO.findByApplication_orderName(appId); + if (debug) watch.markTimeEnd("findByApplication_orderName"); break; case SortAttribute.SERVICE_TYPE : - appServiceCollection = - appServLocHome.findByApplication_orderType(appId, - pc.isAscending()); + if (debug) watch.markTimeBegin("findByApplication_orderType"); + appServices = appServDAO.findByApplication_orderType( + appId, pc.isAscending()); + if (debug) watch.markTimeEnd("findByApplication_orderType"); break; default : throw new IllegalArgumentException( @@ -1292,17 +1310,20 @@ // to authz in batches to find out which ones we are // allowed to return. - AppService appService; - Iterator i = appServiceCollection.iterator(); - List services = new ArrayList(); - while (i.hasNext()) { - appService = (AppService) i.next(); + List services = new ArrayList(appServices.size()); + for (Iterator it=appServices.iterator(); it.hasNext(); ) { + AppService appService = (AppService) it.next(); if (appService.isIsGroup()) { + if (debug) watch.markTimeBegin("appService.getResourceGroup"); services.add(appService.getResourceGroup()); + if (debug) watch.markTimeEnd("appService.getResourceGroup"); } else { + if (debug) watch.markTimeBegin("appService.getService"); services.add(appService.getService()); + if (debug) watch.markTimeEnd("appService.getService"); } } + if (debug) log.debug(watch); return services; } |
From: <sc...@hy...> - 2010-01-19 01:02:20
|
Author: scottmf Date: 2010-01-18 17:02:12 -0800 (Mon, 18 Jan 2010) New Revision: 14194 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14194 Modified: trunk/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java trunk/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java Log: [HHQ-3667] rewrote findByApplication_order queries so that the application does most of the work by avoiding unneccessary db joins. Added timings. Modified: trunk/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java 2010-01-18 09:23:13 UTC (rev 14193) +++ trunk/src/org/hyperic/hq/appdef/server/session/AppServiceDAO.java 2010-01-19 01:02:12 UTC (rev 14194) @@ -1,6 +1,7 @@ package org.hyperic.hq.appdef.server.session; import java.util.Collection; +import java.util.Comparator; import java.util.Iterator; import java.util.List; @@ -11,11 +12,14 @@ import org.hyperic.hq.appdef.AppSvcDependency; import org.hyperic.hq.appdef.ServiceCluster; import org.hyperic.hq.appdef.shared.ServiceManagerLocal; +import org.hyperic.hq.authz.server.session.Resource; import org.hyperic.hq.authz.server.session.ResourceGroup; import org.hyperic.hq.authz.server.session.ResourceGroupDAO; import org.hyperic.hq.authz.shared.AuthzConstants; import org.hyperic.hq.dao.HibernateDAO; +import edu.emory.mathcs.backport.java.util.Collections; + /* * NOTE: This copyright does *not* cover user programs that use HQ * program services by normal system calls through the application @@ -152,42 +156,57 @@ return create(aClusterPK, a); } - public List findByApplication_orderName(Integer id) - { - // TODO: fix this query after authz conversion - String sql= - "select distinct a from " + - "AppService a, Resource r, ResourceType t " + - "where a.application.id=:appid and (" + - "r.resourceType.id=t.id AND t.name=:groupType "+ - "AND a.resourceGroup.id IN (" + - "SELECT id FROM ResourceGroup g where g.id = r.instanceId)"+ - " OR " + - "(r.instanceId=a.service.id and " + - "r.resourceType.id=t.id AND t.name=:serviceType))) " + - "order by r.name"; - return getSession().createQuery(sql) - .setInteger("appid", id.intValue()) - .setString("groupType", groupResType) - .setString("serviceType", serviceResType) - .list(); + public List findByApplication_orderName(Integer id) { + List list = findByApplication(id); + Comparator c = new Comparator() { + private String name = null; + public int compare(Object arg0, Object arg1) { + AppService app0 = (AppService) arg0; + AppService app1 = (AppService) arg1; + return getName(app0).compareTo(getName(app1)); + } + private String getName(AppService app) { + if (name != null) { + return name; + } + Resource res = (app.isIsGroup()) ? + app.getResourceGroup().getResource() : + app.getService().getResource(); + name = (res == null || res.isInAsyncDeleteState()) ? + "" : res.getName(); + return name; + } + }; + Collections.sort(list, c); + return list; } - public List findByApplication_orderType(Integer id, boolean asc) + public List findByApplication_orderType(Integer id, final boolean asc) { - String sql="select distinct a from AppService a " + - " join fetch a.serviceType st " + - "where a.application.id=? " + - "order by st.name " + (asc ? "asc" : "desc"); - return getSession().createQuery(sql) - .setInteger(0, id.intValue()) - .list(); + List list = findByApplication(id); + Comparator c = new Comparator() { + private String type = null; + public int compare(Object arg0, Object arg1) { + AppService app0 = (AppService) arg0; + AppService app1 = (AppService) arg1; + return (asc) ? getType(app0).compareTo(getType(app1)) : + getType(app1).compareTo(getType(app0)); + } + private String getType(AppService app) { + if (type != null) { + return type; + } + type = app.getServiceType().getName(); + return type; + } + }; + Collections.sort(list, c); + return list; } - public Collection findByApplication(Integer id) + public List findByApplication(Integer id) { - String sql="select distinct a from AppService a " + - "where a.application.id=?"; + String sql="select a from AppService a where a.application.id=?"; return getSession().createQuery(sql) .setInteger(0, id.intValue()) .list(); Modified: trunk/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java 2010-01-18 09:23:13 UTC (rev 14193) +++ trunk/src/org/hyperic/hq/appdef/server/session/ServiceManagerEJBImpl.java 2010-01-19 01:02:12 UTC (rev 14194) @@ -58,6 +58,7 @@ import org.hyperic.hq.appdef.shared.ServiceManagerUtil; import org.hyperic.hq.appdef.AppService; import org.hyperic.hq.appdef.ConfigResponseDB; +import org.hyperic.hq.appdef.ServiceCluster; import org.hyperic.hq.authz.server.session.AuthzSubject; import org.hyperic.hq.authz.server.session.AuthzSubjectManagerEJBImpl; import org.hyperic.hq.authz.server.session.Resource; @@ -79,6 +80,7 @@ import org.hyperic.util.pager.PageList; import org.hyperic.util.pager.Pager; import org.hyperic.util.pager.SortAttribute; +import org.hyperic.util.timer.StopWatch; import org.hyperic.dao.DAOFactory; import org.hibernate.ObjectNotFoundException; import org.hyperic.hq.appdef.server.session.Platform; @@ -1145,20 +1147,30 @@ throw new ApplicationNotFoundException(appId, e); } + final StopWatch watch = new StopWatch(); + final boolean debug = log.isDebugEnabled(); Collection svcCollection = new ArrayList(); + if (debug) watch.markTimeBegin("getAppServices"); Collection appSvcCollection = appLocal.getAppServices(); + if (debug) watch.markTimeEnd("getAppServices"); Iterator it = appSvcCollection.iterator(); while (it != null && it.hasNext()) { AppService appService = (AppService) it.next(); if (appService.isIsGroup()) { - svcCollection.addAll(getServiceCluster( - appService.getResourceGroup()).getServices()); + if (debug) watch.markTimeBegin("getServiceCluster"); + ServiceCluster cluster = + getServiceCluster(appService.getResourceGroup()); + if (debug) watch.markTimeEnd("getServiceCluster"); + if (debug) watch.markTimeBegin("getServices"); + svcCollection.addAll(cluster.getServices()); + if (debug) watch.markTimeEnd("getServices"); } else { svcCollection.add(appService.getService()); } } + if (debug) log.debug(watch); return filterAndPage(svcCollection, subject, typeId, pc); } @@ -1200,10 +1212,14 @@ throws ServiceNotFoundException, PermissionException, ApplicationNotFoundException { - List serviceInventory = - getUnflattenedServiceInventoryByApplication( - subject, appId, PageControl.PAGE_ALL); + final boolean debug = log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); + if (debug) watch.markTimeBegin("getUnflattenedServiceInventoryByApplication"); + List serviceInventory = getUnflattenedServiceInventoryByApplication( + subject, appId, PageControl.PAGE_ALL); + if (debug) watch.markTimeEnd("getUnflattenedServiceInventoryByApplication"); + List servicePKs = new ArrayList(); // flattening: open up all of the groups (if any) and get their services as well try { @@ -1223,12 +1239,13 @@ // any authz resource filtering on the group members happens // inside the group subsystem try { + if (debug) watch.markTimeBegin("getCompatGroupMembers"); List memberIds = GroupUtil.getCompatGroupMembers( subject, groupId, null, PageControl.PAGE_ALL); - for (Iterator memberIter = memberIds.iterator(); - memberIter.hasNext(); ) { + if (debug) watch.markTimeEnd("getCompatGroupMembers"); + for (Iterator it=memberIds.iterator(); it.hasNext(); ) { AppdefEntityID memberEntId = - (AppdefEntityID) memberIter.next(); + (AppdefEntityID) it.next(); servicePKs.add(memberEntId.getId()); } } catch (PermissionException e) { @@ -1245,18 +1262,16 @@ throw new ServiceNotFoundException("could not return all services", e); } - - return (Integer[]) servicePKs.toArray( - new Integer[servicePKs.size()]); + if (debug) log.debug(watch); + return (Integer[]) servicePKs.toArray(new Integer[servicePKs.size()]); } private List getUnflattenedServiceInventoryByApplication( AuthzSubject subject, Integer appId, PageControl pc) - throws ApplicationNotFoundException, ServiceNotFoundException { - - AppServiceDAO appServLocHome; - List appServiceCollection; - + throws ApplicationNotFoundException, ServiceNotFoundException { + final boolean debug = log.isDebugEnabled(); + final StopWatch watch = new StopWatch(); + try { getApplicationDAO().findById(appId); } catch (ObjectNotFoundException e) { @@ -1266,19 +1281,22 @@ pc = PageControl.initDefaults(pc, SortAttribute.SERVICE_NAME); - appServLocHome = new AppServiceDAO(DAOFactory.getDAOFactory()); + AppServiceDAO appServDAO = new AppServiceDAO(DAOFactory.getDAOFactory()); + Collection appServices = null; switch (pc.getSortattribute()) { case SortAttribute.SERVICE_NAME : case SortAttribute.RESOURCE_NAME : case SortAttribute.NAME : // TODO: Not actually sorting - appServiceCollection = - appServLocHome.findByApplication_orderName(appId); + if (debug) watch.markTimeBegin("findByApplication_orderName"); + appServices = appServDAO.findByApplication_orderName(appId); + if (debug) watch.markTimeEnd("findByApplication_orderName"); break; case SortAttribute.SERVICE_TYPE : - appServiceCollection = - appServLocHome.findByApplication_orderType(appId, - pc.isAscending()); + if (debug) watch.markTimeBegin("findByApplication_orderType"); + appServices = appServDAO.findByApplication_orderType( + appId, pc.isAscending()); + if (debug) watch.markTimeEnd("findByApplication_orderType"); break; default : throw new IllegalArgumentException( @@ -1292,17 +1310,20 @@ // to authz in batches to find out which ones we are // allowed to return. - AppService appService; - Iterator i = appServiceCollection.iterator(); - List services = new ArrayList(); - while (i.hasNext()) { - appService = (AppService) i.next(); + List services = new ArrayList(appServices.size()); + for (Iterator it=appServices.iterator(); it.hasNext(); ) { + AppService appService = (AppService) it.next(); if (appService.isIsGroup()) { + if (debug) watch.markTimeBegin("appService.getResourceGroup"); services.add(appService.getResourceGroup()); + if (debug) watch.markTimeEnd("appService.getResourceGroup"); } else { + if (debug) watch.markTimeBegin("appService.getService"); services.add(appService.getService()); + if (debug) watch.markTimeEnd("appService.getService"); } } + if (debug) log.debug(watch); return services; } |
From: <bo...@hy...> - 2010-01-18 09:23:23
|
Author: bob Date: 2010-01-18 01:23:13 -0800 (Mon, 18 Jan 2010) New Revision: 14193 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14193 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1323 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-01-17 09:23:10 UTC (rev 14192) +++ trunk/etc/version.properties 2010-01-18 09:23:13 UTC (rev 14193) @@ -1,3 +1,3 @@ -#Sun Jan 17 00:26:38 PST 2010 +#Mon Jan 18 00:28:20 PST 2010 version=4.3.0 -build=1322 +build=1323 |
From: Zsolt K. <sig...@hy...> - 2010-01-17 17:06:37
|
Hello, I built sigar for FreeBSD 7.2 i386. Most of the tests runs fine, but two of them failed: TestCpu.testCreate: .... at org.hyperic.sigar.test.TestCpu.checkCpu(TestCpu.java:56) ... TestSwap.testCreate: ... at org.hyperic.sigar.test.SigarTestCase.assertGtEqZeroTrace(SigarTestCase.java:152) ... What problems can it cause for sigar's use on my OS and does someone has solution for these errors? Thanks! Zsolt |
From: <bo...@hy...> - 2010-01-17 09:23:19
|
Author: bob Date: 2010-01-17 01:23:10 -0800 (Sun, 17 Jan 2010) New Revision: 14192 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14192 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1322 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-01-16 09:21:38 UTC (rev 14191) +++ trunk/etc/version.properties 2010-01-17 09:23:10 UTC (rev 14192) @@ -1,3 +1,3 @@ -#Sat Jan 16 00:24:18 PST 2010 +#Sun Jan 17 00:26:38 PST 2010 version=4.3.0 -build=1321 +build=1322 |
From: <bo...@hy...> - 2010-01-16 09:21:46
|
Author: bob Date: 2010-01-16 01:21:38 -0800 (Sat, 16 Jan 2010) New Revision: 14191 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14191 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1321 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-01-16 00:01:17 UTC (rev 14190) +++ trunk/etc/version.properties 2010-01-16 09:21:38 UTC (rev 14191) @@ -1,3 +1,3 @@ -#Fri Jan 15 00:25:12 PST 2010 +#Sat Jan 16 00:24:18 PST 2010 version=4.3.0 -build=1320 +build=1321 |
From: <bo...@hy...> - 2010-01-16 00:01:26
|
Author: bob Date: 2010-01-15 16:01:17 -0800 (Fri, 15 Jan 2010) New Revision: 14190 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14190 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: Release 4.2.0.3 build #1274 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-15 22:47:04 UTC (rev 14189) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-16 00:01:17 UTC (rev 14190) @@ -1,3 +1,3 @@ -#Thu Jan 14 11:41:26 PST 2010 +#Fri Jan 15 15:18:49 PST 2010 version=4.2.0.3 -build=1273 +build=1274 |
From: <sc...@hy...> - 2010-01-15 22:47:12
|
Author: scottmf Date: 2010-01-15 14:47:04 -0800 (Fri, 15 Jan 2010) New Revision: 14189 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14189 Modified: branches/HQ_4_2_0_PATCH/installer/data/db-upgrade.xml Log: [HHQ-3604] need to add fail=false due to schema inconsistencies in the entry point Modified: branches/HQ_4_2_0_PATCH/installer/data/db-upgrade.xml =================================================================== --- branches/HQ_4_2_0_PATCH/installer/data/db-upgrade.xml 2010-01-15 22:46:44 UTC (rev 14188) +++ branches/HQ_4_2_0_PATCH/installer/data/db-upgrade.xml 2010-01-15 22:47:04 UTC (rev 14189) @@ -9748,22 +9748,22 @@ <schemaSpec version="3.142.1"> <schema-directSQL> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="postgresql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="postgresql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC1AA4E259 </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="postgresql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="postgresql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC9C76C3BB </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="oracle"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="oracle" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC1AA4E259 </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="oracle"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="oracle" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC9C76C3BB </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="mysql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="mysql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop foreign key FK423FA3CC1AA4E259 </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="mysql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="mysql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop foreign key FK423FA3CC9C76C3BB </statement> </schema-directSQL> |
From: <sc...@hy...> - 2010-01-15 22:46:53
|
Author: scottmf Date: 2010-01-15 14:46:44 -0800 (Fri, 15 Jan 2010) New Revision: 14188 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14188 Modified: trunk/installer/data/db-upgrade.xml Log: [HHQ-3604] need to add fail=false due to schema inconsistencies in the entry point Modified: trunk/installer/data/db-upgrade.xml =================================================================== --- trunk/installer/data/db-upgrade.xml 2010-01-15 22:44:09 UTC (rev 14187) +++ trunk/installer/data/db-upgrade.xml 2010-01-15 22:46:44 UTC (rev 14188) @@ -9748,22 +9748,22 @@ <schemaSpec version="3.142.1"> <schema-directSQL> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="postgresql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="postgresql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC1AA4E259 </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="postgresql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="postgresql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC9C76C3BB </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="oracle"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="oracle" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC1AA4E259 </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="oracle"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="oracle" fail="false"> alter table EAM_ALERT_ACTION_LOG drop constraint FK423FA3CC9C76C3BB </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="mysql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ALERT" targetDB="mysql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop foreign key FK423FA3CC1AA4E259 </statement> - <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="mysql"> + <statement desc="Dropping EAM_ALERT_ACTION_LOG constraint to EAM_ACTION" targetDB="mysql" fail="false"> alter table EAM_ALERT_ACTION_LOG drop foreign key FK423FA3CC9C76C3BB </statement> </schema-directSQL> |
From: <tr...@hy...> - 2010-01-15 22:44:19
|
Author: trader Date: 2010-01-15 14:44:09 -0800 (Fri, 15 Jan 2010) New Revision: 14187 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14187 Modified: branches/HQ_4_2_0_PATCH/web/resource/group/inventory/ListResources.jsp Log: HHQ-3623 Make Monitor tab default; rushed checkin based off of patch attached to bug; review forthcoming Modified: branches/HQ_4_2_0_PATCH/web/resource/group/inventory/ListResources.jsp =================================================================== --- branches/HQ_4_2_0_PATCH/web/resource/group/inventory/ListResources.jsp 2010-01-15 22:31:32 UTC (rev 14186) +++ branches/HQ_4_2_0_PATCH/web/resource/group/inventory/ListResources.jsp 2010-01-15 22:44:09 UTC (rev 14187) @@ -106,7 +106,7 @@ </display:column> <display:column width="18%" property="name" sort="true" sortAttr="5" defaultSort="true" title="common.header.Name" - href="/resource/${resourceItem.entityId.typeName}/Inventory.do?mode=view&rid=${resourceItem.id}&type=${resourceItem.entityId.type}"/> + href="/resource/${resourceItem.entityId.typeName}/monitor/Visibility.do?mode=currentHealth&eid=${resourceItem.entityId.type}:${resourceItem.id}"/> <display:column width="18%" property="appdefResourceTypeValue.name" title="resource.group.inventory.TypeTH" /> <display:column width="44%" property="description" title="common.header.Description" /> <display:column property="id" title="resource.common.monitor.visibility.AvailabilityTH" width="10%" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox" valign="middle"> |
From: <tr...@hy...> - 2010-01-15 22:31:42
|
Author: trader Date: 2010-01-15 14:31:32 -0800 (Fri, 15 Jan 2010) New Revision: 14186 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14186 Modified: trunk/web/resource/group/inventory/ListResources.jsp Log: HHQ-3623, based of patch file posted on the bug by David. Review forthcoming. Rushed checkin due to patch schedule. Modified: trunk/web/resource/group/inventory/ListResources.jsp =================================================================== --- trunk/web/resource/group/inventory/ListResources.jsp 2010-01-15 09:16:55 UTC (rev 14185) +++ trunk/web/resource/group/inventory/ListResources.jsp 2010-01-15 22:31:32 UTC (rev 14186) @@ -107,7 +107,7 @@ </display:column> <display:column width="18%" property="name" sort="true" sortAttr="5" defaultSort="true" title="common.header.Name" - href="/resource/${resourceItem.entityId.typeName}/Inventory.do?mode=view&rid=${resourceItem.id}&type=${resourceItem.entityId.type}"/> + href="/resource/${resourceItem.entityId.typeName}/monitor/Visibility.do?mode=currentHealth&eid=${resourceItem.entityId.type}:${resourceItem.id}"/> <display:column width="18%" property="appdefResourceTypeValue.name" title="resource.group.inventory.TypeTH" /> <display:column width="44%" property="description" title="common.header.Description" /> <display:column property="id" title="resource.common.monitor.visibility.AvailabilityTH" width="10%" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox" valign="middle"> |
From: <bo...@hy...> - 2010-01-15 09:17:06
|
Author: bob Date: 2010-01-15 01:16:55 -0800 (Fri, 15 Jan 2010) New Revision: 14185 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14185 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1320 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-01-14 20:15:10 UTC (rev 14184) +++ trunk/etc/version.properties 2010-01-15 09:16:55 UTC (rev 14185) @@ -1,3 +1,3 @@ -#Thu Jan 14 00:25:37 PST 2010 +#Fri Jan 15 00:25:12 PST 2010 version=4.3.0 -build=1319 +build=1320 |
From: <no...@gi...> - 2010-01-15 02:37:07
|
Branch: refs/heads/evolution Home: http://github.com/hyperic/hqapi Commit: d2e33ebcf2e3f57637c48b10adaf8a9b267631f2 http://github.com/hyperic/hqapi/commit/d2e33ebcf2e3f57637c48b10adaf8a9b267631f2 Author: Jennifer Hickey <jen...@sp...> Date: 2010-01-14 (Thu, 14 Jan 2010) Changed paths: M build.xml Log Message: ----------- HE-372 |
From: <bo...@hy...> - 2010-01-14 20:15:19
|
Author: bob Date: 2010-01-14 12:15:10 -0800 (Thu, 14 Jan 2010) New Revision: 14184 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14184 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: Release 4.2.0.3 build #1273 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-14 18:18:28 UTC (rev 14183) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2010-01-14 20:15:10 UTC (rev 14184) @@ -1,3 +1,3 @@ -#Wed Jan 13 13:16:06 PST 2010 +#Thu Jan 14 11:41:26 PST 2010 version=4.2.0.3 -build=1272 +build=1273 |
From: <sc...@hy...> - 2010-01-14 18:18:36
|
Author: scottmf Date: 2010-01-14 10:18:28 -0800 (Thu, 14 Jan 2010) New Revision: 14183 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14183 Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java Log: [HHQ-3667] removed an error in the code. No need to add anything to the measCache if the resource already exists Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java 2010-01-14 18:17:48 UTC (rev 14182) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java 2010-01-14 18:18:28 UTC (rev 14183) @@ -608,9 +608,9 @@ List measids = (List) measCache.get(m.getResource().getId()); if (measids == null) { measids = new ArrayList(); + measids.add(m); + measCache.put(m.getResource(), measids); } - measids.add(m); - measCache.put(m.getResource(), m); } midsToGet.add(m.getId()); } |
From: <sc...@hy...> - 2010-01-14 18:17:57
|
Author: scottmf Date: 2010-01-14 10:17:48 -0800 (Thu, 14 Jan 2010) New Revision: 14182 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14182 Modified: trunk/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java Log: [HHQ-3667] removed an error in the code. No need to add anything to the measCache if the resource already exists Modified: trunk/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java 2010-01-14 09:16:06 UTC (rev 14181) +++ trunk/src/org/hyperic/hq/measurement/server/session/AvailabilityManagerEJBImpl.java 2010-01-14 18:17:48 UTC (rev 14182) @@ -609,9 +609,9 @@ List measids = (List) measCache.get(m.getResource().getId()); if (measids == null) { measids = new ArrayList(); + measids.add(m); + measCache.put(m.getResource(), measids); } - measids.add(m); - measCache.put(m.getResource(), m); } midsToGet.add(m.getId()); } |
From: <bo...@hy...> - 2010-01-14 09:16:18
|
Author: bob Date: 2010-01-14 01:16:06 -0800 (Thu, 14 Jan 2010) New Revision: 14181 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14181 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1319 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-01-14 01:43:24 UTC (rev 14180) +++ trunk/etc/version.properties 2010-01-14 09:16:06 UTC (rev 14181) @@ -1,3 +1,3 @@ -#Wed Jan 13 00:28:37 PST 2010 +#Thu Jan 14 00:25:37 PST 2010 version=4.3.0 -build=1318 +build=1319 |