You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by ps...@apache.org on 2007/08/09 00:25:04 UTC
svn commit: r564035 - in /labs/pinpoint/trunk: ./
pinpoint-core/src/main/java/org/apache/logging/pinpoint/analyser/
pinpoint-core/src/main/java/org/apache/logging/pinpoint/converter/
pinpoint-service/ pinpoint-service/src/main/java/org/apache/logging/p...
Author: psmith
Date: Wed Aug 8 15:25:02 2007
New Revision: 564035
URL: http://svn.apache.org/viewvc?view=rev&rev=564035
Log:
Added commons-daemon support for the service, although I haven't tried running it as a true linux service is yet.
Added some more TODO's.
Modified:
labs/pinpoint/trunk/TODO.txt
labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/analyser/FastStandardAnalyzer.java
labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/converter/PinpointAppender.java
labs/pinpoint/trunk/pinpoint-service/pom.xml
labs/pinpoint/trunk/pinpoint-service/src/main/java/org/apache/logging/pinpoint/service/Service.java
Modified: labs/pinpoint/trunk/TODO.txt
URL: http://svn.apache.org/viewvc/labs/pinpoint/trunk/TODO.txt?view=diff&rev=564035&r1=564034&r2=564035
==============================================================================
--- labs/pinpoint/trunk/TODO.txt (original)
+++ labs/pinpoint/trunk/TODO.txt Wed Aug 8 15:25:02 2007
@@ -2,7 +2,9 @@
* All POM's currently have their own copy of the properties that indicate which verion of jars are used. This is because of the maven-eclipse plugin. However I have not tested whether the latest stable dev version of the plugin works better.
-* Pinpoint-sevice module - provide basic services that allow standard log4j components to publish logs to a pinpoint instance.
+Pinpoint-sevice
+* Document how to use it in Daemon or non-daemon mode
+* Document how to configure it for JMX-enabling
pinpoint-cli
@@ -10,5 +12,9 @@
* add support for customizing layout of presented events
* deal with long lists more effectively
+pinpoint-web
+* Consider how to layout the screen properly (see Tref)
+
pinpoint-graphs
+* create the module for a start!
* Be able to generate a 'timeline' graph similar to Fisheye that shows volume of events based on time of a seach result. This will require setting up a registration setup to register HitCollectors (or equivalent) to scan the returning results to build up that model.
Modified: labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/analyser/FastStandardAnalyzer.java
URL: http://svn.apache.org/viewvc/labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/analyser/FastStandardAnalyzer.java?view=diff&rev=564035&r1=564034&r2=564035
==============================================================================
--- labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/analyser/FastStandardAnalyzer.java (original)
+++ labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/analyser/FastStandardAnalyzer.java Wed Aug 8 15:25:02 2007
@@ -1,20 +1,13 @@
/**
- 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.
-
-**/
+ * 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.
+ */
package org.apache.logging.pinpoint.analyser;
import java.io.File;
@@ -28,18 +21,18 @@
import org.apache.lucene.analysis.StopFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.WordlistLoader;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.analysis.standard.StandardFilter;
-
/**
* A rewrite of the Lucene {@link StandardAnalyzer} that uses a much faster lexer for tokenization.
- *
- * This code based on work done by Oliver Hutchison at Aconex
+ * This code based on work done by Oliver Hutchison at Aconex TODO This can be replaced with the new
+ * JFlexAnalyser available in the Lucene contrib area (for Lucene 2.3)
*/
public class FastStandardAnalyzer extends Analyzer {
private final Set stopSet;
-
+
/**
* An array containing some common English words that are usually not useful for searching.
*/
Modified: labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/converter/PinpointAppender.java
URL: http://svn.apache.org/viewvc/labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/converter/PinpointAppender.java?view=diff&rev=564035&r1=564034&r2=564035
==============================================================================
--- labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/converter/PinpointAppender.java (original)
+++ labs/pinpoint/trunk/pinpoint-core/src/main/java/org/apache/logging/pinpoint/converter/PinpointAppender.java Wed Aug 8 15:25:02 2007
@@ -51,6 +51,9 @@
@Override
protected void append(LoggingEvent event) {
+
+ // TODO this is going to be a huge bottleneck and needs to use some sort of background
+ // threading/JMS to process these
PinpointContext ctx = this.selector.selectFor(event);
try {
PinpointContextContainer container = contextMap.get(ctx);
Modified: labs/pinpoint/trunk/pinpoint-service/pom.xml
URL: http://svn.apache.org/viewvc/labs/pinpoint/trunk/pinpoint-service/pom.xml?view=diff&rev=564035&r1=564034&r2=564035
==============================================================================
--- labs/pinpoint/trunk/pinpoint-service/pom.xml (original)
+++ labs/pinpoint/trunk/pinpoint-service/pom.xml Wed Aug 8 15:25:02 2007
@@ -52,6 +52,11 @@
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-daemon</groupId>
+ <artifactId>commons-daemon</artifactId>
+ <version>1.0.1</version>
+ </dependency>
</dependencies>
<properties>
<log4j.receivers.version>1.1-SNAPSHOT</log4j.receivers.version>
Modified: labs/pinpoint/trunk/pinpoint-service/src/main/java/org/apache/logging/pinpoint/service/Service.java
URL: http://svn.apache.org/viewvc/labs/pinpoint/trunk/pinpoint-service/src/main/java/org/apache/logging/pinpoint/service/Service.java?view=diff&rev=564035&r1=564034&r2=564035
==============================================================================
--- labs/pinpoint/trunk/pinpoint-service/src/main/java/org/apache/logging/pinpoint/service/Service.java (original)
+++ labs/pinpoint/trunk/pinpoint-service/src/main/java/org/apache/logging/pinpoint/service/Service.java Wed Aug 8 15:25:02 2007
@@ -8,33 +8,60 @@
*/
package org.apache.logging.pinpoint.service;
+import org.apache.commons.daemon.Daemon;
+import org.apache.commons.daemon.DaemonContext;
import org.apache.log4j.BasicConfigurator;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-public class Service {
+public class Service implements Daemon {
+
+ private String[] configs = null;
+ private ClassPathXmlApplicationContext ctx;
/**
* @param args
*/
public static void main(String[] args) throws Exception {
+ Service service = new Service();
+ service.configure(args);
+
+ service.start();
+
+ synchronized (service) {
+ service.wait();
+ }
+
+ }
+
+ private void configure(String[] args) {
String basePackage = Service.class.getPackage().getName().replace('.', '/');
String config = "default-receiver-config.xml";
System.setProperty("log4j.debug", "true");
BasicConfigurator.resetConfiguration();
BasicConfigurator.configure();
- String configs[] = new String[] { basePackage + "/" + "logger-repository.xml",
+ this.configs = new String[] { basePackage + "/" + "logger-repository.xml",
basePackage + "/" + "pinpoint-context.xml", basePackage + "/" + config,
};
- ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(configs);
+ }
- // ctx.refresh();
+ public void destroy() {
+ ctx.destroy();
- synchronized (Service.class) {
- Service.class.wait();
- }
+ }
+
+ public void init(DaemonContext context) throws Exception {
+ configure(context.getArguments());
+
+ }
+
+ public void start() throws Exception {
+ ctx = new ClassPathXmlApplicationContext(configs);
+ }
+ public void stop() throws Exception {
+ ctx.stop();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org