You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2019/06/18 16:39:50 UTC
[impala] 05/05: IMPALA-8599: Create a Maven module for query event
hook API
This is an automated email from the ASF dual-hosted git repository.
tarmstrong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit ab5ee0b7857c6ad19f244dc308210f2809436684
Author: Fredy Wijaya <fw...@cloudera.com>
AuthorDate: Fri Jun 14 11:59:02 2019 -0700
IMPALA-8599: Create a Maven module for query event hook API
This patch moves the query event event hook API into a separate Maven
module so that it can be easily consumed by other projects, such as
Atlas.
Testing:
- Ran make fe
Change-Id: I84c422d83c19b75c3d1d7a772b971f4f7704d44c
Reviewed-on: http://gerrit.cloudera.org:8080/13653
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
CMakeLists.txt | 1 +
fe/CMakeLists.txt | 3 +-
fe/pom.xml | 6 +++
impala-parent/pom.xml | 1 +
{fe => query-event-hook-api}/CMakeLists.txt | 5 +-
query-event-hook-api/pom.xml | 62 ++++++++++++++++++++++
.../apache/impala/hooks/QueryCompleteContext.java | 0
.../org/apache/impala/hooks/QueryEventHook.java | 0
8 files changed, 74 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69454b9..6d72430 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -410,6 +410,7 @@ add_subdirectory(shaded-deps)
add_subdirectory(fe)
add_subdirectory(impala-parent)
add_subdirectory(ext-data-source)
+add_subdirectory(query-event-hook-api)
# Build target for all generated files which most backend code depends on
add_custom_target(gen-deps ALL DEPENDS thrift-deps proto-deps fb-deps)
diff --git a/fe/CMakeLists.txt b/fe/CMakeLists.txt
index bd85290..06ea20c 100644
--- a/fe/CMakeLists.txt
+++ b/fe/CMakeLists.txt
@@ -16,6 +16,7 @@
# under the License.
add_custom_target(fe ALL DEPENDS
- shaded-deps thrift-deps fb-deps yarn-extras function-registry ext-data-source impala-parent
+ shaded-deps thrift-deps fb-deps yarn-extras function-registry ext-data-source
+ query-event-hook-api impala-parent
COMMAND ${CMAKE_SOURCE_DIR}/bin/mvn-quiet.sh -B install -DskipTests
)
diff --git a/fe/pom.xml b/fe/pom.xml
index a96d8bc..e647b2b 100644
--- a/fe/pom.xml
+++ b/fe/pom.xml
@@ -45,6 +45,12 @@ under the License.
<dependency>
<groupId>org.apache.impala</groupId>
+ <artifactId>query-event-hook-api</artifactId>
+ <version>${impala.query.event.hook.api.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.impala</groupId>
<artifactId>impala-data-source-api</artifactId>
<version>${impala.extdatasrc.api.version}</version>
</dependency>
diff --git a/impala-parent/pom.xml b/impala-parent/pom.xml
index 72a4586..f2e1226 100644
--- a/impala-parent/pom.xml
+++ b/impala-parent/pom.xml
@@ -42,6 +42,7 @@ under the License.
<kite.version>${env.IMPALA_KITE_VERSION}</kite.version>
<thrift.version>0.9.3</thrift.version>
<impala.extdatasrc.api.version>1.0-SNAPSHOT</impala.extdatasrc.api.version>
+ <impala.query.event.hook.api.version>1.0-SNAPSHOT</impala.query.event.hook.api.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kudu.version>${env.IMPALA_KUDU_JAVA_VERSION}</kudu.version>
<commons-io.version>2.6</commons-io.version>
diff --git a/fe/CMakeLists.txt b/query-event-hook-api/CMakeLists.txt
similarity index 80%
copy from fe/CMakeLists.txt
copy to query-event-hook-api/CMakeLists.txt
index bd85290..700e614 100644
--- a/fe/CMakeLists.txt
+++ b/query-event-hook-api/CMakeLists.txt
@@ -15,7 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-add_custom_target(fe ALL DEPENDS
- shaded-deps thrift-deps fb-deps yarn-extras function-registry ext-data-source impala-parent
- COMMAND ${CMAKE_SOURCE_DIR}/bin/mvn-quiet.sh -B install -DskipTests
+add_custom_target(query-event-hook-api ALL DEPENDS gen-deps impala-parent
+ COMMAND $ENV{IMPALA_HOME}/bin/mvn-quiet.sh -B install -DskipTests
)
diff --git a/query-event-hook-api/pom.xml b/query-event-hook-api/pom.xml
new file mode 100644
index 0000000..8466e0b
--- /dev/null
+++ b/query-event-hook-api/pom.xml
@@ -0,0 +1,62 @@
+<?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/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.apache.impala</groupId>
+ <artifactId>impala-parent</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>../impala-parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.impala</groupId>
+ <artifactId>query-event-hook-api</artifactId>
+ <name>Apache Impala Query Event Hook API</name>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <url>.</url>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.3</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/fe/src/main/java/org/apache/impala/hooks/QueryCompleteContext.java b/query-event-hook-api/src/main/java/org/apache/impala/hooks/QueryCompleteContext.java
similarity index 100%
rename from fe/src/main/java/org/apache/impala/hooks/QueryCompleteContext.java
rename to query-event-hook-api/src/main/java/org/apache/impala/hooks/QueryCompleteContext.java
diff --git a/fe/src/main/java/org/apache/impala/hooks/QueryEventHook.java b/query-event-hook-api/src/main/java/org/apache/impala/hooks/QueryEventHook.java
similarity index 100%
rename from fe/src/main/java/org/apache/impala/hooks/QueryEventHook.java
rename to query-event-hook-api/src/main/java/org/apache/impala/hooks/QueryEventHook.java