Skip to content

Commit

Permalink
Benchmarks mstress:
Browse files Browse the repository at this point in the history
* Replace ant and ivy build with maven.
* Add mstress tarball to top level make.
* Build mstress tarball only if maven is available (same as java build), and hadoop version 2.10.1 is in QFSHADOOP_VERSIONS.
* Add new options, and rework options parsing in javabuild.sh in order to support mstress jar build.
* For now only build mstress for Hadoop version 2.10.1.
  • Loading branch information
mikeov committed Jul 1, 2024
1 parent c9033e0 commit 5b3eaf4
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 242 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ run-cmake: dir

.PHONY: build
build: run-cmake
cd build/${BUILD_TYPE} && $(MAKE) ${MAKE_OPTIONS} install
cd build/${BUILD_TYPE} && $(MAKE) ${MAKE_OPTIONS} \
`echo ${QFSHADOOP_VERSIONS} | grep 2.10.1 >/dev/null 2>&1 && \
mvn --version >/dev/null 2>&1 && echo mstress-tarball` \
install

.PHONY: java
java: build
Expand Down Expand Up @@ -125,6 +128,9 @@ tarball: hadoop-jars python
if ls -1 ${BUILD_TYPE}/${QFS_PYTHON_WHEEL_DIR}/qfs*.whl > /dev/null 2>&1; then \
cp ${BUILD_TYPE}/${QFS_PYTHON_WHEEL_DIR}/qfs*.whl \
"tmpreldir/$$tarname/lib/"; fi && \
if ls -1 ${BUILD_TYPE}/benchmarks/mstress.tgz > /dev/null 2>&1; then \
cp ${BUILD_TYPE}/benchmarks/mstress.tgz \
"tmpreldir/$$tarname/benchmarks/"; fi && \
tar cvfz "$$tarname".tgz -C ./tmpreldir "$$tarname" && \
rm -rf tmpreldir

Expand Down
10 changes: 8 additions & 2 deletions benchmarks/mstress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ ENDIF (USE_STATIC_LIB_LINKAGE)

add_custom_command (
OUTPUT mstress.jar
COMMAND ant -f ${CMAKE_CURRENT_SOURCE_DIR}/build.xml
DEPENDS MStress_Client.java
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/../../src/java/javabuild.sh
-d ${CMAKE_CURRENT_SOURCE_DIR}
-v ${CMAKE_CURRENT_SOURCE_DIR}/../../src/cc/common/buildversgit.sh
--
-DbuildDirectory=${CMAKE_CURRENT_BINARY_DIR}
-Dhadoop.release.version=2.10.1
package
DEPENDS src/main/java/com/quantcast/qfs/mstress/MStress_Client.java pom.xml
COMMENT The HDFS mstress client bundled as a jar.
VERBATIM
)
Expand Down
122 changes: 0 additions & 122 deletions benchmarks/mstress/build.xml

This file was deleted.

43 changes: 0 additions & 43 deletions benchmarks/mstress/ivy.xml

This file was deleted.

34 changes: 0 additions & 34 deletions benchmarks/mstress/ivysettings.xml

This file was deleted.

88 changes: 88 additions & 0 deletions benchmarks/mstress/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!--
Author: Mike Ovsiannikov
Copyright 2024 Quantcast Corporation. All rights reserved.
This file is part of Quantcast File System (QFS).
Licensed 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">

<modelVersion>4.0.0</modelVersion>
<groupId>com.quantcast.qfs</groupId>
<artifactId>mstress</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<name>mstress</name>
<url>http://quantcast.github.com/qfs/benchmarks/mstress</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<buildDirectory>${project.basedir}/../../build/java/mstress</buildDirectory>
<hadoop.release.version>2.10.1</hadoop.release.version>
<qfs.release.version>00000000</qfs.release.version>
<qfs.source.revision>0</qfs.source.revision>
</properties>

<build>
<directory>${buildDirectory}</directory>
<!-- <finalName>mstress-${qfs.release.version}</finalName> -->
<finalName>mstress</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<index>true</index>
<manifestEntries>
<Implementation-Title>QFS Mstress</Implementation-Title>
<Implementation-Version>${qfs.release.version}-${qfs.source.revision}</Implementation-Version>
<Implementation-Vendor>Quantcast Corp.</Implementation-Vendor>
</manifestEntries>
<manifest>
<!-- <addClasspath>true</addClasspath> -->
<mainClass>MStress_Client</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.release.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>${hadoop.release.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

</project>
File renamed without changes.
Loading

0 comments on commit 5b3eaf4

Please sign in to comment.