Repository: bigtop Updated Branches: refs/heads/master 4cc64586f -> c33343d93
BIGTOP-1920. Include YCSB in Bigtop Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/c33343d9 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/c33343d9 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/c33343d9 Branch: refs/heads/master Commit: c33343d930f5c9a648c789eca1b1ff06d490ceae Parents: 4cc6458 Author: YoungWoo Kim <yw...@apache.org> Authored: Wed Jul 8 16:37:58 2015 +0900 Committer: YoungWoo Kim <yw...@apache.org> Committed: Thu Jul 30 14:31:43 2015 +0900 ---------------------------------------------------------------------- .../src/common/ycsb/do-component-build | 27 +++++++ bigtop-packages/src/common/ycsb/install_ycsb.sh | 79 ++++++++++++++++++++ .../src/common/ycsb/patch0-0.1.4-hbase98.diff | 39 ++++++++++ bigtop-packages/src/deb/ycsb/changelog | 1 + bigtop-packages/src/deb/ycsb/compat | 1 + bigtop-packages/src/deb/ycsb/control | 30 ++++++++ bigtop-packages/src/deb/ycsb/copyright | 15 ++++ bigtop-packages/src/deb/ycsb/rules | 35 +++++++++ bigtop-packages/src/deb/ycsb/source/format | 1 + bigtop-packages/src/deb/ycsb/ycsb.install | 1 + bigtop-packages/src/rpm/ycsb/BUILD/.gitignore | 0 bigtop-packages/src/rpm/ycsb/RPMS/.gitignore | 0 bigtop-packages/src/rpm/ycsb/SOURCES/.gitignore | 0 bigtop-packages/src/rpm/ycsb/SPECS/ycsb.spec | 58 ++++++++++++++ bigtop-packages/src/rpm/ycsb/SRPMS/.gitignore | 0 bigtop.mk | 13 ++++ 16 files changed, 300 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/common/ycsb/do-component-build ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/common/ycsb/do-component-build b/bigtop-packages/src/common/ycsb/do-component-build new file mode 100644 index 0000000..f13545e --- /dev/null +++ b/bigtop-packages/src/common/ycsb/do-component-build @@ -0,0 +1,27 @@ +#!/bin/bash +# 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. + +set -ex + +. `dirname $0`/bigtop.bom + +mvn clean package -DskipTests -Dhbase.version=$HBASE_VERSION-hadoop2 "$@" + +rm -rf build/dist +mkdir -p build/dist +tar -C build/dist --strip-components=1 -xzf distribution/target/ycsb-$YCSB_VERSION.tar.gz + + http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/common/ycsb/install_ycsb.sh ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/common/ycsb/install_ycsb.sh b/bigtop-packages/src/common/ycsb/install_ycsb.sh new file mode 100755 index 0000000..acf54fa --- /dev/null +++ b/bigtop-packages/src/common/ycsb/install_ycsb.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +# 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. + +set -e + +usage() { + echo " +usage: $0 <options> + Required not-so-options: + --build-dir=DIR path to pig dist.dir + --prefix=PREFIX path to install into + + Optional options: + --lib-dir=DIR path to install pig home [/usr/lib/pig] + --build-dir=DIR path to pig dist dir + ... [ see source for more similar options ] + " + exit 1 +} + +OPTS=$(getopt \ + -n $0 \ + -o '' \ + -l 'prefix:' \ + -l 'lib-dir:' \ + -l 'build-dir:' -- "$@") + +if [ $? != 0 ] ; then + usage +fi + +eval set -- "$OPTS" +while true ; do + case "$1" in + --prefix) + PREFIX=$2 ; shift 2 + ;; + --build-dir) + BUILD_DIR=$2 ; shift 2 + ;; + --lib-dir) + LIB_DIR=$2 ; shift 2 + ;; + --) + shift ; break + ;; + *) + echo "Unknown option: $1" + usage + exit 1 + ;; + esac +done + +for var in PREFIX BUILD_DIR ; do + if [ -z "$(eval "echo \$$var")" ]; then + echo Missing param: $var + usage + fi +done + +LIB_DIR=${LIB_DIR:-/usr/lib/ycsb} + +install -d -m 0755 $PREFIX/$LIB_DIR +(cd ${BUILD_DIR} && tar -cf - .)|(cd $PREFIX/${LIB_DIR} && tar -xf -) http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/common/ycsb/patch0-0.1.4-hbase98.diff ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/common/ycsb/patch0-0.1.4-hbase98.diff b/bigtop-packages/src/common/ycsb/patch0-0.1.4-hbase98.diff new file mode 100644 index 0000000..bd73a53 --- /dev/null +++ b/bigtop-packages/src/common/ycsb/patch0-0.1.4-hbase98.diff @@ -0,0 +1,39 @@ +diff --git a/hbase/pom.xml b/hbase/pom.xml +index 55d243c..bcfe015 100644 +--- a/hbase/pom.xml ++++ b/hbase/pom.xml +@@ -11,10 +11,20 @@ + <name>HBase DB Binding</name> + + <dependencies> +- <dependency> ++ <!-- <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase</artifactId> + <version>${hbase.version}</version> ++ </dependency> --> ++ <dependency> ++ <groupId>org.apache.hbase</groupId> ++ <artifactId>hbase-client</artifactId> ++ <version>${hbase.version}</version> ++ </dependency> ++ <dependency> ++ <groupId>org.apache.hbase</groupId> ++ <artifactId>hbase-common</artifactId> ++ <version>${hbase.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> +diff --git a/pom.xml b/pom.xml +index bc181f5..f85055a 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -63,7 +63,7 @@ + <module>gemfire</module> + <module>infinispan</module> + <module>jdbc</module> +- <module>mapkeeper</module> ++ <!-- <module>mapkeeper</module> --> + <module>mongodb</module> + <!--module>nosqldb</module--> + <module>redis</module> http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/deb/ycsb/changelog ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/deb/ycsb/changelog b/bigtop-packages/src/deb/ycsb/changelog new file mode 100644 index 0000000..547ed02 --- /dev/null +++ b/bigtop-packages/src/deb/ycsb/changelog @@ -0,0 +1 @@ +--- This is auto-generated http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/deb/ycsb/compat ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/deb/ycsb/compat b/bigtop-packages/src/deb/ycsb/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/bigtop-packages/src/deb/ycsb/compat @@ -0,0 +1 @@ +9 http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/deb/ycsb/control ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/deb/ycsb/control b/bigtop-packages/src/deb/ycsb/control new file mode 100644 index 0000000..eea0644 --- /dev/null +++ b/bigtop-packages/src/deb/ycsb/control @@ -0,0 +1,30 @@ +# 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. + +Source: ycsb +Section: misc +Priority: extra +Maintainer: Bigtop <d...@bigtop.apache.org> +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 +Homepage: http://labs.yahoo.com/news/yahoo-cloud-serving-benchmark + +Package: ycsb +Architecture: all +Depends: python +Description: The Yahoo! Cloud Serving Benchmark (YCSB) is an open-source + specification and program suite for evaluating retrieval and + maintenance capabilities of computer programs. It is often used to + compare relative performance of NoSQL database management systems. http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/deb/ycsb/copyright ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/deb/ycsb/copyright b/bigtop-packages/src/deb/ycsb/copyright new file mode 100644 index 0000000..10b2110 --- /dev/null +++ b/bigtop-packages/src/deb/ycsb/copyright @@ -0,0 +1,15 @@ +Format: http://dep.debian.net/deps/dep5 +Source: https://github.com/brianfrankcooper/YCSB +Upstream-Name: YCSB + +Files: * +Copyright: Yahoo +License: Apache-2.0 + +Files debian/* +Copyright: Yahoo +License: Apache-2.0 + +License: Apache-2.0 + On Debian systems, the complete text of the Apache 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/deb/ycsb/rules ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/deb/ycsb/rules b/bigtop-packages/src/deb/ycsb/rules new file mode 100755 index 0000000..ad0e173 --- /dev/null +++ b/bigtop-packages/src/deb/ycsb/rules @@ -0,0 +1,35 @@ +#!/usr/bin/make -f +# +# 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. +# +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +%: + dh $@ + +override_dh_auto_build: + bash debian/do-component-build + +override_dh_auto_install: + sh -x debian/install_ycsb.sh \ + --build-dir=build/dist \ + --prefix=debian/tmp http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/deb/ycsb/source/format ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/deb/ycsb/source/format b/bigtop-packages/src/deb/ycsb/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/bigtop-packages/src/deb/ycsb/source/format @@ -0,0 +1 @@ +3.0 (quilt) http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/deb/ycsb/ycsb.install ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/deb/ycsb/ycsb.install b/bigtop-packages/src/deb/ycsb/ycsb.install new file mode 100644 index 0000000..9cd9b22 --- /dev/null +++ b/bigtop-packages/src/deb/ycsb/ycsb.install @@ -0,0 +1 @@ +/usr/lib/ycsb http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/rpm/ycsb/BUILD/.gitignore ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/rpm/ycsb/BUILD/.gitignore b/bigtop-packages/src/rpm/ycsb/BUILD/.gitignore new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/rpm/ycsb/RPMS/.gitignore ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/rpm/ycsb/RPMS/.gitignore b/bigtop-packages/src/rpm/ycsb/RPMS/.gitignore new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/rpm/ycsb/SOURCES/.gitignore ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/rpm/ycsb/SOURCES/.gitignore b/bigtop-packages/src/rpm/ycsb/SOURCES/.gitignore new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/rpm/ycsb/SPECS/ycsb.spec ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/rpm/ycsb/SPECS/ycsb.spec b/bigtop-packages/src/rpm/ycsb/SPECS/ycsb.spec new file mode 100644 index 0000000..6c43437 --- /dev/null +++ b/bigtop-packages/src/rpm/ycsb/SPECS/ycsb.spec @@ -0,0 +1,58 @@ +# 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. + +%define ycsb_name ycsb +%define lib_ycsb /usr/lib/ycsb + +# disable repacking jars +%define __os_install_post %{nil} + +Name: ycsb +Version: %{ycsb_version} +Release: %{ycsb_release} +Summary: Yahoo Cloud Serving Benchmark +URL: http://labs.yahoo.com/news/yahoo-cloud-serving-benchmark +Group: Development/Libraries +BuildArch: noarch +Buildroot: %(mktemp -ud %{_tmppath}/%{ycsb_name}-%{version}-%{release}-XXXXXX) +License: ASL 2.0 +Source0: %{ycsb_name}-%{ycsb_base_version}.tar.gz +Source1: do-component-build +Source2: install_%{ycsb_name}.sh +Source3: bigtop.bom +#BIGTOP_PATCH_FILES +Requires: python + +%description +The Yahoo! Cloud Serving Benchmark (YCSB) is an open-source +specification and program suite for evaluating retrieval and maintenance +capabilities of computer programs. It is often used to compare relative +performance of NoSQL database management systems. + +%prep +%setup -n YCSB-%{ycsb_base_version} + +#BIGTOP_PATCH_COMMANDS + +%build +bash $RPM_SOURCE_DIR/do-component-build + +%install +%__rm -rf $RPM_BUILD_ROOT +sh $RPM_SOURCE_DIR/install_ycsb.sh --build-dir=build/dist --prefix=$RPM_BUILD_ROOT + +%files +%defattr(-,root,root,755) +%{lib_ycsb} http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop-packages/src/rpm/ycsb/SRPMS/.gitignore ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/rpm/ycsb/SRPMS/.gitignore b/bigtop-packages/src/rpm/ycsb/SRPMS/.gitignore new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/bigtop/blob/c33343d9/bigtop.mk ---------------------------------------------------------------------- diff --git a/bigtop.mk b/bigtop.mk index 2fa104e..880acfa 100644 --- a/bigtop.mk +++ b/bigtop.mk @@ -361,3 +361,16 @@ KAFKA_DOWNLOAD_PATH=/kafka/$(KAFKA_BASE_VERSION) KAFKA_SITE=$(APACHE_MIRROR)$(KAFKA_DOWNLOAD_PATH) KAFKA_ARCHIVE=$(APACHE_ARCHIVE)$(KAFKA_DOWNLOAD_PATH) $(eval $(call PACKAGE,kafka,KAFKA)) + +# YCSB +YCSB_NAME=YCSB +YCSB_RELNOTES_NAME=Yahoo! Cloud Serving Benchmark +YCSB_PKG_NAME=ycsb +YCSB_BASE_VERSION=0.1.4 +YCSB_PKG_VERSION=0.1.4 +YCSB_RELEASE_VERSION=1 +YCSB_TARBALL_DST=ycsb-$(YCSB_BASE_VERSION).tar.gz +YCSB_TARBALL_SRC=$(YCSB_BASE_VERSION).tar.gz +YCSB_SITE=https://github.com/brianfrankcooper/YCSB/archive +YCSB_ARCHIVE=$(YCSB_SITE) +$(eval $(call PACKAGE,ycsb,YCSB))