Skip to content

Commit b555c9a

Browse files
committed
Initial commit
1 parent bef5074 commit b555c9a

File tree

4 files changed

+175
-0
lines changed

4 files changed

+175
-0
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.ipr
2+
*.iws
3+
*.iml
4+
target/*
5+
build/*
6+
*/target/*
7+
out/*
8+
dependency.txt
9+
.idea
10+
logs/*

pom.xml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>org.kairosdb</groupId>
6+
<artifactId>kafka-monitor</artifactId>
7+
<version>1.0-SNAPSHOT</version>
8+
<packaging>jar</packaging>
9+
10+
<name>kafka-monitor</name>
11+
<url>http://maven.apache.org</url>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<lib.location>/opt/kairosdb/lib</lib.location>
16+
<deb.skip>false</deb.skip>
17+
</properties>
18+
19+
<repositories>
20+
<repository>
21+
<id>kairos_staging</id>
22+
<name>Snapshot repo for Kairos</name>
23+
<url>https://oss.sonatype.org/content/repositories/orgkairosdb-1020</url>
24+
</repository>
25+
<repository>
26+
<id>sonatype-nexus-snapshots</id>
27+
<name>Sonatype Nexus Snapshots</name>
28+
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
29+
<releases>
30+
<enabled>false</enabled>
31+
</releases>
32+
<snapshots>
33+
<enabled>true</enabled>
34+
</snapshots>
35+
</repository>
36+
</repositories>
37+
38+
<dependencies>
39+
40+
<dependency>
41+
<groupId>org.kairosdb</groupId>
42+
<artifactId>kairosdb</artifactId>
43+
<version>1.2.0-1</version>
44+
<scope>provided</scope>
45+
<exclusions>
46+
<exclusion>
47+
<groupId>org.apache.httpcomponents</groupId>
48+
<artifactId>httpclient</artifactId>
49+
</exclusion>
50+
</exclusions>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>org.apache.solr</groupId>
55+
<artifactId>solr-solrj</artifactId>
56+
<version>5.0.0</version>
57+
<exclusions>
58+
<exclusion> <!--Use the one in Kairos instead, causes problem with plugin class loader -->
59+
<groupId>org.slf4j</groupId>
60+
<artifactId>slf4j-api</artifactId>
61+
</exclusion>
62+
</exclusions>
63+
</dependency>
64+
65+
66+
<dependency>
67+
<groupId>junit</groupId>
68+
<artifactId>junit</artifactId>
69+
<version>4.10</version>
70+
<scope>test</scope>
71+
</dependency>
72+
73+
74+
</dependencies>
75+
76+
77+
<build>
78+
<plugins>
79+
<plugin>
80+
<artifactId>maven-compiler-plugin</artifactId>
81+
<version>3.0</version>
82+
<configuration>
83+
<source>1.6</source>
84+
<target>1.6</target>
85+
</configuration>
86+
</plugin>
87+
<plugin>
88+
<groupId>org.apache.maven.plugins</groupId>
89+
<artifactId>maven-jar-plugin</artifactId>
90+
</plugin>
91+
92+
<plugin>
93+
<groupId>org.apache.maven.plugins</groupId>
94+
<artifactId>maven-surefire-plugin</artifactId>
95+
<version>2.16</version>
96+
</plugin>
97+
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-dependency-plugin</artifactId>
101+
<version>2.8</version>
102+
<executions>
103+
<execution>
104+
<phase>package</phase>
105+
<goals>
106+
<goal>copy-dependencies</goal>
107+
</goals>
108+
<configuration>
109+
<includeScope>runtime</includeScope>
110+
</configuration>
111+
</execution>
112+
</executions>
113+
</plugin>
114+
115+
</plugins>
116+
</build>
117+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.kairosdb.kafka.monitor;
2+
3+
import com.google.inject.AbstractModule;
4+
import com.google.inject.Singleton;
5+
6+
public class KafkaModule extends AbstractModule
7+
{
8+
9+
@Override
10+
protected void configure()
11+
{
12+
bind(OffsetListenerService.class).in(Singleton.class);
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package org.kairosdb.kafka.monitor;
2+
3+
import com.google.inject.Inject;
4+
import org.kairosdb.core.KairosDBService;
5+
import org.kairosdb.core.exception.KairosDBException;
6+
import org.kairosdb.eventbus.FilterEventBus;
7+
import org.kairosdb.eventbus.Publisher;
8+
import org.kairosdb.events.DataPointEvent;
9+
10+
import static com.google.common.base.Preconditions.checkNotNull;
11+
12+
public class OffsetListenerService implements KairosDBService
13+
{
14+
private final Publisher<DataPointEvent> m_publisher;
15+
16+
@Inject
17+
public OffsetListenerService(FilterEventBus eventBus)
18+
{
19+
m_publisher = checkNotNull(eventBus).createPublisher(DataPointEvent.class);
20+
}
21+
22+
23+
@Override
24+
public void start() throws KairosDBException
25+
{
26+
27+
}
28+
29+
@Override
30+
public void stop()
31+
{
32+
33+
}
34+
}

0 commit comments

Comments
 (0)