Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 112558 - Avoid XML->CommonBaseEvent-XML when parsing raw CommonBaseEvents for remote log import scenario
Summary: Avoid XML->CommonBaseEvent-XML when parsing raw CommonBaseEvents for remote l...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP.monitoring (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Dave Smith CLA
QA Contact:
URL:
Whiteboard: closed460
Keywords:
Depends on: 117068
Blocks:
  Show dependency tree
 
Reported: 2005-10-13 17:16 EDT by Marius Slavescu CLA
Modified: 2010-06-03 15:09 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Slavescu CLA 2005-10-13 17:16:52 EDT
In
/org.eclipse.hyades.logging.parsers/config/XML/CommonBaseEvent/v1.0.1/regex.adapter
the SerializedCBEFormatter class is set as formatter, this class will do the
parsing of raw XML CommonBaseEvent and then the ouputer will convert it back to
the same XML as the input.

In the case when no filtering or extra massagin is required we should avoid this
time and memory consuming process and basically pass to the logger whater we get
from the formatter or even better from the log file directly (or sensor).
Comment 1 Dave Smith CLA 2005-10-14 10:50:30 EDT
This fix involves replacing SerializedCBEFormatter with an extension of the 
LogImport outputter to output the CBE XML strings returned by the extractor.  
This outputter needs to do some validation on the XML strings to verify that 
they represent valid CBE's, before writing them to the logging agent.
Comment 2 Marius Slavescu CLA 2005-10-14 11:52:22 EDT
Is the validation enabled by default?
Comment 3 Dave Smith CLA 2005-10-18 00:17:35 EDT
Targetting this to i3 but not sure it can be contained in 4.1.
Comment 4 Harm Sluiman CLA 2005-10-18 06:58:59 EDT
As much as I would like to see these kind of improvements in 4.1 I do not think 
we can afford the change in stability or extra testing this will imply in the 
few weeks left in 4.1.
I suggest you target 4.2 and do it first thing ;-)
Comment 5 Dave Smith CLA 2005-10-18 10:41:14 EDT
I agree with Harm's comment.  Deferring this to 4.2 and making it a P1.
Comment 6 Dave Smith CLA 2005-11-25 09:53:50 EST
Here are the changes required:

GLA Runtime
- create new outputters that take String objects as input or modify the existing outputters to accept String objects as well as CBE objects.  The scope will determine what outputters need to be changed.  If log import scenario only then only one outputter needs to be created or modified.
- change the adapter files for CommonBaseEvent XML log files to have only the sensor, extractor and outputter configured.  The extractor outputs CBE XML Strings and the outputter just forwards them on to the destination.

For Log Import Scenario:
Local Import:  
org.eclipse.hyades.log.ui.internal.wizards.LocalLogParserLoader.trace() method needs to be changed to accept Strings as well as CBE objects

Remote Import:
org.eclipse.hyades.logging.parsers.RemoteLogParserLoader.main() needs to be changed to instantiate a different/new logger which will accept String objects or CBE objects in its trace() method.

Also, in the Log Import with Filter case,  the Log Import Wizard code needs to reconfigure the adapter with the old components that generate the CBE, as well as add the filter blade.

Depending on the scope of this defect, there may be a hit to the documentation.

Note, the Log Import Wizard change to the LocalLogParserLoader will not be required if Feature 117068/117062 is implemented
Comment 7 Dave Smith CLA 2005-11-25 15:48:09 EST
This defect will be used to improve the remote import of CommonBaseEvent XML files only.  The Log Import Wizard can be changed in the "no filter" case to change the adapter to contain the SingleOSFileSensor and the new/modified outputter to send lines read from the log file to the client. This Log Import Wizard change can be done as part of 117068.

The local import case will be fixed under feature 117068 which will avoid using the GLA altogether.  
Comment 8 Dave Smith CLA 2006-04-02 01:21:56 EST
Committed changes to TPTP Head CVS.

The changes included the following:

1) Add new outputter class called org.eclipse.hyades.logging.parsers.adapter.outputters.CBEXMLLogImportOutputter to process String objects that represent CommonBaseEvents in XML format.

2) Add new logger called org.eclipse.hyades.logging.parsers.importer.ImportCBELogger to be used for remote log import.  This logger accepts both String objects and CommonBaseEvent objects and writes them to the logging Agent.  org.eclipse.hyades.logging.parsers.importer.RemoteLogParserLoader was changed to always use ImportCBELogger as the logger GLA uses to write the log events to.

3) Minor changes to the following files:
org.eclipse.hyades.logging.parsers.MonitoringParser
org.eclipse.hyades.logging.parsers.SetConfig
org.eclipse.hyades.logging.parsers.adapter.outputters.LogImportOutputter
org.eclipse.hyades.logging.parsers.internal.adapter.formatters.LocalLogImportCBEFormatter
org.eclipse.hyades.logging.parsers/plugin.xml 

Note, the regex.adapter for CommonBaseEvent XML log file parser was not changed to use the new outputter.  This will be done when the local log import scenario is handled by bugzilla 117068.
Comment 9 Paul Slauenwhite CLA 2009-06-30 09:36:12 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.