Author: stack Date: Mon Nov 26 16:23:37 2007 New Revision: 598469 URL: http://svn.apache.org/viewvc?rev=598469&view=rev Log: HADOOP-2196 Fix how hbase sits in hadoop 'package' product
Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt lucene/hadoop/trunk/src/contrib/hbase/bin/hbase-config.sh lucene/hadoop/trunk/src/contrib/hbase/build.xml Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=598469&r1=598468&r2=598469&view=diff ============================================================================== --- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original) +++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Mon Nov 26 16:23:37 2007 @@ -33,6 +33,7 @@ HADOOP-2040 Hudson hangs AFTER test has finished HADOOP-2274 Excess synchronization introduced by HADOOP-2139 negatively impacts performance + HADOOP-2196 Fix how hbase sits in hadoop 'package' product IMPROVEMENTS HADOOP-2401 Add convenience put method that takes writable Modified: lucene/hadoop/trunk/src/contrib/hbase/bin/hbase-config.sh URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/bin/hbase-config.sh?rev=598469&r1=598468&r2=598469&view=diff ============================================================================== --- lucene/hadoop/trunk/src/contrib/hbase/bin/hbase-config.sh (original) +++ lucene/hadoop/trunk/src/contrib/hbase/bin/hbase-config.sh Mon Nov 26 16:23:37 2007 @@ -80,7 +80,18 @@ done # If no hadoop home specified, then we assume its above this directory. -HADOOP_HOME="${HADOOP_HOME:-$HBASE_HOME/../../../}" +# Can be in one of two places. If we've been packaged, then it'll be +# two levels above us. If we are running from src at src/contrib/hbase +# or from the build directory at build/contrib/hbase, then its three +# levels up. Look for the hadoop script. +if [ "$HADOOP_HOME" = "" ]; then + if [ -f "$HBASE_HOME/../../bin/hadoop" ]; then + HADOOP_HOME="$HBASE_HOME/../../" + else + HADOOP_HOME="$HBASE_HOME/../../../" + fi +fi + # Allow alternate hadoop conf dir location. HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_HOME/conf}" # Allow alternate hbase conf dir location. Modified: lucene/hadoop/trunk/src/contrib/hbase/build.xml URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/build.xml?rev=598469&r1=598468&r2=598469&view=diff ============================================================================== --- lucene/hadoop/trunk/src/contrib/hbase/build.xml (original) +++ lucene/hadoop/trunk/src/contrib/hbase/build.xml Mon Nov 26 16:23:37 2007 @@ -19,10 +19,6 @@ * limitations under the License. */ --> -<!-- -Before you can run these subtargets directly, you need -to call at top-level: ant deploy-contrib compile-core-test ---> <project name="hbase" default="jar"> <import file="../build-contrib.xml"/> @@ -103,6 +99,43 @@ <zipfileset dir="${build.webapps}" prefix="webapps"/> </jar> </target> + + <!--Manage our own packaging... install our dependencies, + bin, etc.--> + <target name="package" depends="jar" unless="skip.contrib"> + <condition property="dist.dir" value="distribution"> + <not> + <isset property="dist.dir" /> + </not> + </condition> + <property name="hbase.dist.dir" value="${dist.dir}/contrib/${name}"/> + <mkdir dir="${hbase.dist.dir}"/> + <copy todir="${hbase.dist.dir}" includeEmptyDirs="false" flatten="true"> + <fileset dir="${build.dir}"> + <include name="hadoop-${version}-${name}.jar" /> + </fileset> + </copy> + <mkdir dir="${hbase.dist.dir}/webapps"/> + <copy todir="${hbase.dist.dir}/webapps"> + <fileset dir="${build.webapps}" /> + </copy> + <mkdir dir="${hbase.dist.dir}/lib"/> + <copy todir="${hbase.dist.dir}/lib"> + <fileset dir="${build.lib}" /> + </copy> + <mkdir dir="${hbase.dist.dir}/conf" /> + <copy todir="${hbase.dist.dir}/conf"> + <fileset dir="${build.conf}" /> + </copy> + <mkdir dir="${hbase.dist.dir}/bin" /> + <copy todir="${hbase.dist.dir}/bin"> + <fileset dir="${build.bin}" /> + </copy> + <chmod perm="ugo+x" type="file"> + <fileset dir="${hbase.dist.dir}/bin" /> + </chmod> + </target> + <!-- Override compile-test target so can generate a hbase test jar that has test and hbase classes.