2014-07-04 14:11:02 +00:00
|
|
|
# Created by: Dmitry Sivachenko <demon@FreeBSD.org>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-12-20 18:32:12 +00:00
|
|
|
# Please do not submit untested updates. Be sure to start hadoop in
|
2015-02-16 07:46:56 +00:00
|
|
|
# distributed mode and to run few map/reduce. Be sure there are no exception
|
|
|
|
# in any of it's log files. This version was tested under the load and
|
2014-12-20 18:32:12 +00:00
|
|
|
# no problems encountered so far. Thanks.
|
2014-07-04 14:11:02 +00:00
|
|
|
PORTNAME= hadoop
|
2015-09-01 13:51:28 +00:00
|
|
|
PORTVERSION= 2.7.1
|
2015-11-18 13:20:34 +00:00
|
|
|
PORTREVISION= 1
|
2014-07-04 14:11:02 +00:00
|
|
|
CATEGORIES= devel java
|
2015-05-14 10:15:04 +00:00
|
|
|
MASTER_SITES= APACHE/${PORTNAME}/common/stable \
|
2015-03-07 12:58:59 +00:00
|
|
|
LOCAL/demon/:maven \
|
2014-07-07 12:52:14 +00:00
|
|
|
http://archive.apache.org/dist/tomcat/tomcat-6/v${TOMCAT_VERSION}/bin/:tomcat \
|
|
|
|
http://dist.codehaus.org/jetty/jetty-6.1.14/:jetty
|
2014-07-04 14:11:02 +00:00
|
|
|
PKGNAMESUFFIX= 2
|
2015-05-14 10:15:04 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
|
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} FreeBSD-hadoop2-${PORTVERSION}-maven-repository.tar.gz:maven apache-tomcat-${TOMCAT_VERSION}.tar.gz:tomcat jetty-6.1.14.zip:jetty
|
2014-07-04 14:11:02 +00:00
|
|
|
DIST_SUBDIR= hadoop
|
2015-05-14 10:15:04 +00:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} FreeBSD-hadoop2-${PORTVERSION}-maven-repository.tar.gz jetty-6.1.14.zip
|
2014-07-04 14:11:02 +00:00
|
|
|
|
|
|
|
MAINTAINER= demon@FreeBSD.org
|
|
|
|
COMMENT= Apache Map/Reduce framework
|
|
|
|
|
|
|
|
LICENSE= APACHE20
|
|
|
|
|
2014-07-06 09:33:41 +00:00
|
|
|
BUILD_DEPENDS= ${LOCALBASE}/share/java/maven3/bin/mvn:${PORTSDIR}/devel/maven3 \
|
2014-07-04 14:11:02 +00:00
|
|
|
cmake:${PORTSDIR}/devel/cmake \
|
2014-10-04 21:53:35 +00:00
|
|
|
${LOCALBASE}/protobuf25/bin/protoc:${PORTSDIR}/devel/protobuf25
|
2014-10-27 11:45:44 +00:00
|
|
|
LIB_DEPENDS= libsnappy.so:${PORTSDIR}/archivers/snappy
|
2015-01-05 22:49:41 +00:00
|
|
|
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \
|
|
|
|
ssid:${PORTSDIR}/sysutils/ssid
|
2014-07-04 14:11:02 +00:00
|
|
|
|
2015-01-05 22:50:28 +00:00
|
|
|
CONFLICTS_INSTALL= hadoop-1*
|
2014-07-04 14:11:02 +00:00
|
|
|
|
2015-04-14 08:10:47 +00:00
|
|
|
USES= cpe shebangfix
|
|
|
|
CPE_VENDOR= apache
|
2014-07-04 14:11:02 +00:00
|
|
|
USE_JAVA= yes
|
2015-09-08 09:16:36 +00:00
|
|
|
JAVA_VERSION= 1.7
|
2014-07-04 14:11:02 +00:00
|
|
|
USE_LDCONFIG= yes
|
2015-09-01 13:51:28 +00:00
|
|
|
SHEBANG_FILES= hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/sbin/httpfs.sh hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/httpfs-config.sh hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh hadoop-common-project/hadoop-kms/src/main/sbin/kms.sh hadoop-common-project/hadoop-kms/src/main/libexec/kms-config.sh hadoop-common-project/hadoop-kms/src/main/conf/kms-env.sh hadoop-tools/hadoop-sls/src/main/bin/rumen2sls.sh hadoop-tools/hadoop-sls/src/main/bin/slsrun.sh
|
2015-11-19 09:27:33 +00:00
|
|
|
MAKE_ENV+= JAVA_HOME=${JAVA_HOME} HADOOP_PROTOC_PATH=${LOCALBASE}/protobuf25/bin/protoc
|
2014-07-04 14:11:02 +00:00
|
|
|
|
2015-03-31 15:38:44 +00:00
|
|
|
OPTIONS_DEFINE= EXAMPLES
|
|
|
|
OPTIONS_DEFAULT= EXAMPLES
|
|
|
|
|
2015-03-05 14:22:53 +00:00
|
|
|
TOMCAT_VERSION= 6.0.41
|
2014-07-04 14:11:02 +00:00
|
|
|
HADOOP_DIST= ${WRKSRC}/hadoop-dist/target/hadoop-${PORTVERSION}
|
|
|
|
|
2014-07-07 12:55:41 +00:00
|
|
|
HADOOP_LOGDIR= /var/log/hadoop
|
|
|
|
HADOOP_RUNDIR= /var/run/hadoop
|
2014-07-04 14:11:02 +00:00
|
|
|
|
2014-07-07 12:55:41 +00:00
|
|
|
HDFS_USER= hdfs
|
|
|
|
MAPRED_USER= mapred
|
|
|
|
HADOOP_GROUP= hadoop
|
|
|
|
USERS= ${HDFS_USER} ${MAPRED_USER}
|
|
|
|
GROUPS= ${HADOOP_GROUP}
|
2014-07-04 14:11:02 +00:00
|
|
|
|
|
|
|
SUB_FILES= hadoop-layout.sh
|
2015-11-18 13:20:34 +00:00
|
|
|
USE_RC_SUBR= historyserver nodemanager resourcemanager webappproxyserver datanode namenode secondarynamenode journalnode zkfc
|
2014-07-04 14:11:02 +00:00
|
|
|
|
|
|
|
PLIST_SUB= PORTVERSION="${PORTVERSION}" \
|
|
|
|
HADOOP_LOGDIR="${HADOOP_LOGDIR}" \
|
|
|
|
HADOOP_RUNDIR="${HADOOP_RUNDIR}" \
|
|
|
|
HDFS_USER="${HDFS_USER}" \
|
|
|
|
MAPRED_USER="${MAPRED_USER}" \
|
2014-08-18 16:43:24 +00:00
|
|
|
HADOOP_GROUP="${HADOOP_GROUP}"
|
2014-07-04 14:11:02 +00:00
|
|
|
SUB_LIST= HDFS_USER="${HDFS_USER}" \
|
|
|
|
MAPRED_USER="${MAPRED_USER}" \
|
|
|
|
HADOOP_GROUP="${HADOOP_GROUP}" \
|
|
|
|
JAVA_HOME="${JAVA_HOME}" \
|
|
|
|
HADOOP_LOGDIR="${HADOOP_LOGDIR}" \
|
|
|
|
HADOOP_RUNDIR="${HADOOP_RUNDIR}"
|
|
|
|
|
|
|
|
post-patch:
|
2015-09-01 13:51:28 +00:00
|
|
|
${REINPLACE_CMD} -e "s#/bin/bash#${LOCALBASE}/bin/bash#" ${WRKSRC}/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java ${WRKSRC}/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java ${WRKSRC}/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java ${WRKSRC}/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java ${WRKSRC}/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
|
2014-07-04 14:11:02 +00:00
|
|
|
|
|
|
|
do-build:
|
2014-07-06 09:33:41 +00:00
|
|
|
${MKDIR} ${WRKSRC}/hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads
|
|
|
|
${CP} ${DISTDIR}/${DIST_SUBDIR}/apache-tomcat-${TOMCAT_VERSION}.tar.gz ${WRKSRC}/hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads/
|
2015-03-05 14:22:53 +00:00
|
|
|
${MKDIR} ${WRKSRC}/hadoop-common-project/hadoop-kms/downloads
|
|
|
|
${CP} ${DISTDIR}/${DIST_SUBDIR}/apache-tomcat-${TOMCAT_VERSION}.tar.gz ${WRKSRC}/hadoop-common-project/hadoop-kms/downloads/
|
2015-09-03 15:10:31 +00:00
|
|
|
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${LOCALBASE}/share/java/maven3/bin/mvn -Dmaven.repo.local=${WRKDIR}/m2 --offline package -Pdist,native -DskipTests -Drequire.snappy -Dsnappy.prefix=${LOCALBASE} -Drequire.openssl
|
2014-07-04 14:11:02 +00:00
|
|
|
|
|
|
|
post-build:
|
|
|
|
${RM} ${HADOOP_DIST}/etc/hadoop/*.cmd
|
2014-07-07 12:55:41 +00:00
|
|
|
${MV} ${HADOOP_DIST}/bin/rcc ${HADOOP_DIST}/bin/hadoop-rcc
|
2014-07-07 12:52:14 +00:00
|
|
|
# With jetty-6.1.26 tasktracker's threads hung with the following error:
|
|
|
|
# org.mortbay.io.nio.SelectorManager$SelectSet@abdcc1c JVM BUG(s) - injecting delay 59 times
|
|
|
|
# See https://issues.apache.org/jira/browse/MAPREDUCE-2386
|
|
|
|
.for dir in share/hadoop/common/lib share/hadoop/hdfs/lib share/hadoop/yarn/lib share/hadoop/tools/lib
|
|
|
|
${RM} ${HADOOP_DIST}/${dir}/jetty-util-6.1.26.jar ${HADOOP_DIST}/${dir}/jetty-6.1.26.jar
|
|
|
|
${CP} ${WRKDIR}/jetty-6.1.14/lib/jetty-6.1.14.jar ${WRKDIR}/jetty-6.1.14/lib/jetty-util-6.1.14.jar ${HADOOP_DIST}/${dir}/
|
|
|
|
.endfor
|
2015-03-05 14:22:53 +00:00
|
|
|
.for dir in share/hadoop/httpfs/tomcat/webapps/webhdfs/WEB-INF/lib share/hadoop/kms/tomcat/webapps/kms/WEB-INF/lib
|
|
|
|
${RM} ${HADOOP_DIST}/${dir}/jetty-util-6.1.26.jar
|
|
|
|
${CP} ${WRKDIR}/jetty-6.1.14/lib/jetty-util-6.1.14.jar ${HADOOP_DIST}/${dir}/
|
|
|
|
.endfor
|
2014-07-04 14:11:02 +00:00
|
|
|
|
|
|
|
do-install:
|
2014-07-07 12:55:41 +00:00
|
|
|
cd ${HADOOP_DIST}/bin && ${INSTALL_SCRIPT} hadoop hdfs mapred hadoop-rcc yarn ${STAGEDIR}${PREFIX}/bin/
|
2014-07-04 14:11:02 +00:00
|
|
|
cd ${HADOOP_DIST} && ${COPYTREE_BIN} "libexec sbin" ${STAGEDIR}${PREFIX}/ "! -name *.cmd"
|
|
|
|
cd ${HADOOP_DIST}/include && ${INSTALL_DATA} *h ${STAGEDIR}${PREFIX}/include/
|
|
|
|
cd ${HADOOP_DIST}/lib/native && ${INSTALL_DATA} *.a ${STAGEDIR}${PREFIX}/lib/
|
|
|
|
cd ${HADOOP_DIST}/lib/native && ${INSTALL_DATA} libhadoop.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libhadoop.so.1
|
|
|
|
cd ${HADOOP_DIST}/lib/native && ${INSTALL_DATA} libhdfs.so.0.0.0 ${STAGEDIR}${PREFIX}/lib/libhdfs.so.0
|
|
|
|
${LN} -sf libhdfs.so.0 ${STAGEDIR}${PREFIX}/lib/libhdfs.so
|
|
|
|
${LN} -sf libhadoop.so.1 ${STAGEDIR}${PREFIX}/lib/libhadoop.so
|
|
|
|
cd ${HADOOP_DIST}/share/hadoop && ${COPYTREE_SHARE} "*" ${STAGEDIR}${DATADIR}/ "! -name *-sources.jar -and ! -name sources"
|
|
|
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/conf
|
|
|
|
cd ${HADOOP_DIST}/etc/hadoop && ${COPYTREE_SHARE} "*" ${STAGEDIR}${EXAMPLESDIR}/conf/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/hadoop-hdfs-project/hadoop-hdfs/target/classes/hdfs-default.xml ${WRKSRC}/hadoop-hdfs-project/hadoop-hdfs-httpfs/target/classes/httpfs-default.xml ${WRKSRC}/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/target/classes/yarn-default.xml ${WRKSRC}/hadoop-common-project/hadoop-common/target/classes/core-default.xml ${WRKSRC}/hadoop-tools/hadoop-distcp/target/classes/distcp-default.xml ${WRKSRC}/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/target/classes/mapred-default.xml ${STAGEDIR}/${EXAMPLESDIR}/
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/hadoop-layout.sh ${STAGEDIR}${PREFIX}/libexec/
|
|
|
|
${MKDIR} ${STAGEDIR}${ETCDIR}
|
|
|
|
${MKDIR} ${STAGEDIR}${HADOOP_LOGDIR}
|
|
|
|
${MKDIR} ${STAGEDIR}${HADOOP_RUNDIR}
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|