Skip to content

Commit

Permalink
[SMALLFIX] Make YARN uber jar separate
Browse files Browse the repository at this point in the history
  • Loading branch information
apc999 committed May 31, 2017
1 parent 0f6fdd7 commit 3d6ed38
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 139 deletions.
131 changes: 0 additions & 131 deletions assembly/integration/pom.xml

This file was deleted.

1 change: 0 additions & 1 deletion assembly/pom.xml
Expand Up @@ -24,7 +24,6 @@

<modules>
<module>client</module>
<module>integration</module>
<module>server</module>
</modules>

Expand Down
24 changes: 24 additions & 0 deletions assembly/server/pom.xml
Expand Up @@ -99,6 +99,30 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>mesos</id>
<dependencies>
<dependency>
<groupId>org.alluxio</groupId>
<artifactId>alluxio-integration-mesos</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>

<profile>
<id>developer</id>
<dependencies>
<dependency>
<groupId>org.alluxio</groupId>
<artifactId>alluxio-integration-mesos</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion integration/yarn/bin/alluxio-yarn.sh
Expand Up @@ -60,7 +60,7 @@ tar -C $ALLUXIO_HOME -zcf $ALLUXIO_TARFILE \
integration/yarn/bin/alluxio-worker-yarn.sh \
integration/yarn/bin/alluxio-application-master.sh \

JAR_LOCAL=${ALLUXIO_HOME}/assembly/integration/target/alluxio-assembly-integration-${VERSION}-jar-with-dependencies.jar
JAR_LOCAL=${ALLUXIO_HOME}/integration/yarn/target/alluxio-integration-yarn-${VERSION}-jar-with-dependencies.jar

echo "Uploading files to HDFS to distribute alluxio runtime"

Expand Down
46 changes: 46 additions & 0 deletions integration/yarn/pom.xml
Expand Up @@ -34,6 +34,14 @@

<dependencies>
<!-- External dependencies -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
Expand All @@ -49,6 +57,12 @@
<groupId>org.alluxio</groupId>
<artifactId>alluxio-core-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.alluxio</groupId>
<artifactId>alluxio-core-protobuf</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Internal test dependencies -->
Expand Down Expand Up @@ -86,6 +100,38 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>uber-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}-jar-with-dependencies</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>LICENSE</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
11 changes: 5 additions & 6 deletions integration/yarn/src/main/java/alluxio/yarn/Client.java
Expand Up @@ -26,8 +26,6 @@
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.io.DataOutputBuffer;
import org.apache.hadoop.security.Credentials;
import org.apache.hadoop.security.UserGroupInformation;
Expand All @@ -53,6 +51,8 @@
import org.apache.hadoop.yarn.util.Apps;
import org.apache.hadoop.yarn.util.ConverterUtils;
import org.apache.hadoop.yarn.util.Records;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand All @@ -72,8 +72,7 @@
* </p>
* {@code
* $ yarn jar \
* alluxio-assembly-integration-<ALLUXIO-VERSION>-jar-with-dependencies.jar \
* alluxio.yarn.Client \
* alluxio-integration-yarn-<ALLUXIO-VERSION>-jar-with-dependencies.jar alluxio.yarn.Client \
* -num_workers NumAlluxioWorkers \
* -master_address MasterAddress \
* -resource_path ResourcePath
Expand All @@ -84,13 +83,13 @@
* </p>
* {@code
* $ yarn jar \
* alluxio-assembly-integration-<ALLUXIO-VERSION>-SNAPSHOT-jar-with-dependencies.jar \
* alluxio-integration-yarn-<ALLUXIO-VERSION>-jar-with-dependencies.jar \
* alluxio.yarn.Client -help
* }
*/
@NotThreadSafe
public final class Client {
private static final Log LOG = LogFactory.getLog(Client.class);
private static final Logger LOG = LoggerFactory.getLogger(Client.class);

/** Yarn client to talk to resource manager. */
private YarnClient mYarnClient;
Expand Down

0 comments on commit 3d6ed38

Please sign in to comment.