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

Download the driver_with_deps jar from google storage. #128

Merged
merged 1 commit into from
Feb 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions bigtable-grpc-interface/download_and_install_driver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# download_and_install_driver.sh
# Download a version of driver_with_deps.jar and install it in maven

REMOTE_DIRECTORY=$1
FILE=$2
TMP_DIR=$3
GROUP=$4
ARTIFACT_ID=$5
VERSION=$6
REPO_PATH=$7

mkdir -p ${TMP_DIR}
echo "mkdir -p ${TMP_DIR}"

echo "gsutil cp ${REMOTE_DIRECTORY}/${FILE} ${TMP_DIR}"
gsutil cp ${REMOTE_DIRECTORY}/${FILE} ${TMP_DIR}

echo "mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file \
-Dfile=${TMP_DIR}/${FILE} \
-DgroupId=${GROUP} \
-DartifactId=${ARTIFACT_ID} \
-Dversion=${VERSION} \
-Dpackaging=jar \
-DlocalRepositoryPath=${REPO_PATH}"

mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file \
-Dfile=${TMP_DIR}/${FILE} \
-DgroupId=${GROUP} \
-DartifactId=${ARTIFACT_ID} \
-Dversion=${VERSION} \
-Dpackaging=jar \
-DlocalRepositoryPath=${REPO_PATH}

56 changes: 56 additions & 0 deletions bigtable-grpc-interface/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>bigtable-client</groupId>
<artifactId>bigtable-client</artifactId>
<version>0.1.2-SNAPSHOT</version>
</parent>

<artifactId>bigtable-grpc-interface</artifactId>
<packaging>jar</packaging>

<properties>
<!-- As soon as stubby is public, this goes away -->
<stubby.driver.remote.directory>gs://anviltop-builds/data</stubby.driver.remote.directory>
<stubby.driver.file>driver_deploy.jar</stubby.driver.file>
<bigtable.grpc.repo.fullpath>${project.basedir}/../${bigtable.grpc.repo.dir}</bigtable.grpc.repo.fullpath>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>1.3.2</version>
<executions>
<execution>
<id>install-grpc-client</id>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${project.basedir}/download_and_install_driver.sh</executable>
<arguments>
<argument>${stubby.driver.remote.directory}</argument>
<argument>${stubby.driver.file}</argument>
<argument>${project.basedir}/tmp</argument>
<argument>${stubby.driver.group}</argument>
<argument>${stubby.driver.artifact}</argument>
<argument>${stubby.driver.version}</argument>
<argument>${bigtable.grpc.repo.fullpath}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
13 changes: 5 additions & 8 deletions bigtable-hbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>bigtable-client</groupId>
<artifactId>bigtable-grpc-interface</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
Expand Down Expand Up @@ -327,10 +332,6 @@
<artifactSet>
<includes>
<include>${stubby.driver.group}:*</include>
<include>com.google.api-client:*</include>
<include>com.google.http-client:*</include>
<include>com.google.oauth-client:*</include>
<include>com.fasterxml.jackson.core:*</include>
</includes>
</artifactSet>
<relocations>
Expand All @@ -354,10 +355,6 @@
<pattern>io.netty</pattern>
<shadedPattern>com.google.bigtable.repackaged.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.api</pattern>
<shadedPattern>com.google.bigtable.repackaged.com.google.api</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
Expand Down
34 changes: 3 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
<packaging>pom</packaging>

<modules>
<module>bigtable-grpc-interface</module>
<module>bigtable-hbase</module>
</modules>

<properties>
<!-- As soon as stubby is public, this goes away -->
<stubby.driver.path>/google/data/ro/teams/cloud-bigtable/driver_mpm/test/driver_deploy.jar</stubby.driver.path>
<stubby.driver.group>com.google.bigtable.hbase</stubby.driver.group>
<stubby.driver.artifact>bigtable-grpc-interface</stubby.driver.artifact>
<stubby.driver.version>0.4-SNAPSHOT</stubby.driver.version>
<bigtable.grpc.repo.dir>bigtable-grpc-repo</bigtable.grpc.repo.dir>

<hbase.version>1.0.0</hbase.version>
<hadoop.version>2.4.1</hadoop.version>
<compat.module>hbase-hadoop2-compat</compat.module>
Expand All @@ -31,8 +33,6 @@
<google.bigtable.admin.endpoint.host>test-table-admin-bigtable.googleapis.com</google.bigtable.admin.endpoint.host>
<google.bigtable.endpoint.host>test-bigtable.googleapis.com</google.bigtable.endpoint.host>
<google.bigtable.call.report.directory>target/call_reports</google.bigtable.call.report.directory>
<bigtable.grpc.repo.dir>bigtable-grpc-repo</bigtable.grpc.repo.dir>
<bigtable.grpc.repo.fullpath>${project.basedir}/${bigtable.grpc.repo.dir}</bigtable.grpc.repo.fullpath>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -286,33 +286,5 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>1.3.2</version>
<executions>
<execution>
<id>install-grpc-client</id>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>mvn</executable>
<arguments>
<argument>org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file</argument>
<argument>-Dfile=${stubby.driver.path}</argument>
<argument>-DgroupId=${stubby.driver.group}</argument>
<argument>-DartifactId=${stubby.driver.artifact}</argument>
<argument>-Dversion=${stubby.driver.version}</argument>
<argument>-Dpackaging=jar</argument>
<argument>-DlocalRepositoryPath=${bigtable.grpc.repo.fullpath}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>