RYA-446 Daemonifying Query Manager
diff --git a/extras/rya.streams/pom.xml b/extras/rya.streams/pom.xml
index 51c7cd8..810af54 100644
--- a/extras/rya.streams/pom.xml
+++ b/extras/rya.streams/pom.xml
@@ -39,6 +39,7 @@
<module>api</module>
<module>client</module>
<module>integration</module>
+ <module>query-manager</module>
</modules>
<profiles>
diff --git a/extras/rya.streams/query-manager/pom.xml b/extras/rya.streams/query-manager/pom.xml
new file mode 100644
index 0000000..3a13c6a
--- /dev/null
+++ b/extras/rya.streams/query-manager/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+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.
+-->
+<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">
+
+ <parent>
+ <groupId>org.apache.rya</groupId>
+ <artifactId>rya.streams.parent</artifactId>
+ <version>3.2.12-incubating-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>rya.streams.query-manager</artifactId>
+
+ <name>Apache Rya Streams Query Manager</name>
+ <description>
+ This module contains the Rya Streams Query Manager.
+ </description>
+
+ <dependencies>
+ <!-- Rya dependencies -->
+ <dependency>
+ <groupId>org.apache.rya</groupId>
+ <artifactId>rya.streams.client</artifactId>
+ </dependency>
+
+ <!-- Apache Daemon dependencies -->
+ <dependency>
+ <groupId>commons-daemon</groupId>
+ <artifactId>commons-daemon</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <mainClass>org.apache.rya.streams.querymanager.QueryManagerDaemon</mainClass>
+ </transformer>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/extras/rya.streams/query-manager/src/main/java/org/apache/rya/streams/querymanager/QueryManagerDaemon.java b/extras/rya.streams/query-manager/src/main/java/org/apache/rya/streams/querymanager/QueryManagerDaemon.java
new file mode 100644
index 0000000..2ab0ad8
--- /dev/null
+++ b/extras/rya.streams/query-manager/src/main/java/org/apache/rya/streams/querymanager/QueryManagerDaemon.java
@@ -0,0 +1,49 @@
+/*
+ * 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.rya.streams.querymanager;
+
+import org.apache.commons.daemon.Daemon;
+import org.apache.commons.daemon.DaemonContext;
+import org.apache.commons.daemon.DaemonInitException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+@DefaultAnnotation(NonNull.class)
+public class QueryManagerDaemon implements Daemon {
+ @Override
+ public void init(final DaemonContext context) throws DaemonInitException, Exception {
+ System.out.println("Initializing Query Manager Daemon.");
+ }
+
+ @Override
+ public void start() throws Exception {
+ System.out.println("Starting Query Manager Daemon.");
+ }
+
+ @Override
+ public void stop() throws Exception {
+ System.out.println("Stopping Query Manager Daemon.");
+ }
+
+ @Override
+ public void destroy() {
+ System.out.println("Query Manager Daemon Destroyed.");
+ }
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 406bf20..532324a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -404,6 +404,11 @@
</dependency>
<dependency>
<groupId>org.apache.rya</groupId>
+ <artifactId>rya.streams.client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.rya</groupId>
<artifactId>rya.streams.kafka</artifactId>
<version>${project.version}</version>
</dependency>