Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added hive support #9

Open
wants to merge 15 commits into
base: bcbssc
Choose a base branch
from
4 changes: 2 additions & 2 deletions atlas-ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM nginx:1.17.1
FROM nginx:1.21.1
MAINTAINER [email protected]

RUN apt-get -q update && DEBIAN_FRONTEND=noninteractive apt-get -yq install unzip

COPY target/atlasui.zip atlasui.zip
RUN rm -f /usr/share/nginx/html/index.html \
&& unzip -qq atlasui.zip -d /usr/share/nginx/html && rm -f atlasui.zip
COPY config-local.js /usr/share/nginx/html/js
COPY config-local.js /usr/share/nginx/html/js
4 changes: 2 additions & 2 deletions atlas-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<version>2.7.3-SNAPSHOT</version>

<properties>
<frontendBranch>bcbssc</frontendBranch>
<frontendBranch>issue-1168-hive-adding-support</frontendBranch>
<dockerfile.version>1.4.10</dockerfile.version>
</properties>

Expand Down Expand Up @@ -147,4 +147,4 @@
</plugins>
</build>

</project>
</project>
5 changes: 4 additions & 1 deletion execution-engine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM odysseusinc/r-env:1.0.7
FROM odysseusinc/r-env:1.0.12
MAINTAINER [email protected]

RUN mkdir /usr/share/execution-engine && mkdir /netezza
ARG JAR_FILE
ADD target/${JAR_FILE} /usr/share/execution-engine/execution-engine.jar
ARG NETEZZA_JDBC
ADD ${NETEZZA_JDBC} /netezza/nzjdbc.jar
ARG HIVE_JDBC
# hive-jdbc-standalone contains all necessary dependencies inside it for running queries through hive such as hive-jdbc, hive-common, libthrift, zookeeper, etc.
COPY ${HIVE_JDBC}/hive-jdbc-standalone.jar /hive/hive-jdbc-standalone.jar

ENTRYPOINT ["java", "-jar", "/usr/share/execution-engine/execution-engine.jar"]
20 changes: 19 additions & 1 deletion execution-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

<properties>
<java.version>1.8</java.version>
<arachne.version>1.15.0-SNAPSHOT</arachne.version>
<arachne.version>1.16.0-SNAPSHOT</arachne.version>
<netezza.driver.path>src/drivers/README.md</netezza.driver.path>
<hive.driver.path>src/drivers/hive</hive.driver.path>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -388,6 +389,22 @@
</plugins>
</build>
</profile>
<profile>
<id>hive</id>
<dependencies>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>3.1.0</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
</profiles>

<build>
Expand Down Expand Up @@ -415,6 +432,7 @@
<buildArgs>
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
<NETEZZA_JDBC>${netezza.driver.path}</NETEZZA_JDBC>
<HIVE_JDBC>${hive.driver.path}</HIVE_JDBC>
</buildArgs>
<skip>${dockerfile.skip}</skip>
</configuration>
Expand Down
9 changes: 8 additions & 1 deletion execution-engine/src/drivers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@ with -Dnetezza.driver.path, e.g.

```bash
mvn -Dnetezza.driver.path=src/drivers/nzjdbc.jar clean package
```
```

To include Hive driver download it, place here and point to it
with -Dhive.driver.path, e.g.

```bash
mvn -Dhive.driver.path=src/drivers/hive-jdbc-standalone.jar clean package
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
}
)
/**
* Note: When using default profile it's required to externalize properties needed to be overriden defaults
* Note: When using default profile it's required to externalize properties needed to be overridden defaults
* inherited from execution-engine dependency. At least <b>server.port</b> and <b>server.ssl.enabled</b>
* should be overriden directly by command line arguments or with additional config location.
* This is beacause spring determines properties loading order and external properties has prevalence over
* should be overridden directly by command line arguments or with additional config location.
* This is because spring determines properties loading order and external properties has prevalence over
* default application properties.
* Not a problem when running in docker container since docker externalize properties with environment variables.
*/
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<module>execution-engine</module>
<module>proxy-svr</module>
<module>service-discovery-svr</module>
<module>webapi</module>
<!--module>webapi</module-->
<module>atlas-ui</module>
</modules>

Expand All @@ -40,4 +40,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
2 changes: 1 addition & 1 deletion webapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM odysseusinc/r-env:1.0.7
FROM odysseusinc/r-env:1.0.12
MAINTAINER [email protected]

RUN mkdir /usr/share/webapi
Expand Down
20 changes: 19 additions & 1 deletion webapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<dependency>
<groupId>org.ohdsi</groupId>
<artifactId>WebAPI</artifactId>
<version>2.7.3</version>
<version>2.7.3-SNAPSHOT</version>
<classifier>classes</classifier>
</dependency>
<dependency>
Expand Down Expand Up @@ -158,5 +158,23 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>webapi-hive</id>
<dependencies>
<dependency>
<!-- it's not possible to use hive-jdbc-standalone.jar in conjunction with spring-boot-maven-plugin because currently Spring Boot doesn't support Zip64 archives
(see comments here: https://github.com/spring-projects/spring-boot/issues/9861) so we use org.apache.hive:hive-jdbc:3.1.0 -->
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>3.1.0</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
</profiles>
</project>