hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r618553 - in /hadoop/hbase/trunk: ./ build.xml src/java/org/apache/hadoop/hbase/package.html src/java/overview.html
Date Tue, 05 Feb 2008 05:44:49 GMT
Author: stack
Date: Mon Feb  4 21:44:48 2008
New Revision: 618553

URL: http://svn.apache.org/viewvc?rev=618553&view=rev
Log:
HBASE-403 Fix build after move of hbase in svn
HBASE-408 Add .classpath and .project to svn:ignore list
M .
    Add .classpath and .project to svn:ignore.
D  src/java/org/apache/hadoop/hbase/package.html
    Moved it to src/java/overview.html
A  src/java/overview.html
    Added.  Used to be package.html down in src/java/org/apache/hadoop/hbase
M build.xml
    Add javadoc title, fix up package target, add tar target.

Added:
    hadoop/hbase/trunk/src/java/overview.html
Removed:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/package.html
Modified:
    hadoop/hbase/trunk/   (props changed)
    hadoop/hbase/trunk/build.xml

Propchange: hadoop/hbase/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Feb  4 21:44:48 2008
@@ -0,0 +1,2 @@
+.project
+.classpath

Modified: hadoop/hbase/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/build.xml?rev=618553&r1=618552&r2=618553&view=diff
==============================================================================
--- hadoop/hbase/trunk/build.xml (original)
+++ hadoop/hbase/trunk/build.xml Mon Feb  4 21:44:48 2008
@@ -19,7 +19,9 @@
 
 <project name="hbase" default="jar">
   <property name="version" value="0.1.0-dev"/>
-  <property name="final.name" value="${name}-${version}"/>
+  <property name="Name" value="HBase"/>
+  <property name="final.name" value="hbase-${version}"/>
+  <property name="year" value="2008"/>
  
   <!-- Load all the default properties, and any the user wants    -->
   <!-- to contribute (without having to type -D or edit this file -->
@@ -33,6 +35,7 @@
 
   <property name="lib.dir" value="${basedir}/lib"/>
   <property name="conf.dir" value="${basedir}/conf"/>
+  <property name="docs.dir" value="${basedir}/docs"/>
 
   <property name="test.output" value="no"/>
   <property name="test.timeout" value="900000"/>
@@ -45,18 +48,23 @@
   <property name="build.classes" location="${build.dir}/classes"/>
   <property name="build.test" location="${build.dir}/test"/>
   <property name="build.examples" location="${build.dir}/examples"/>
+  <property name="build.docs" value="${build.dir}/docs"/>
+  <property name="build.javadoc" value="${build.docs}/api"/>
+  <property name="build.encoding" value="ISO-8859-1"/>
 
   <property name="test.build.dir" value="${build.dir}/test"/>
   <property name="test.log.dir" value="${test.build.dir}/logs"/>
   <property name="test.junit.output.format" value="plain"/>
 
+  <property name="dist.dir" value="${build.dir}/${final.name}"/>
+
   <property name="javac.deprecation" value="off"/>
   <property name="javac.debug" value="on"/>
 
-  <property name="javadoc.link"
-    value="http://java.sun.com/j2se/1.5.0/docs/api/"/>
+  <property name="javadoc.link.java"
+    value="http://java.sun.com/j2se/1.5/docs/api/"/>
+  <property name="javadoc.packages" value="org.apache.hadoop.hbase.*"/>
 
-  <property name="build.encoding" value="ISO-8859-1"/>
 
   <!--We need to have the hadoop jars ride in front of the hbase classes or we
     get the below exceptions:
@@ -139,51 +147,132 @@
 	
   <!-- Override jar target to specify main class -->
   <target name="jar" depends="compile">
-    <jar jarfile="${build.dir}/hbase-${version}.jar"
+    <jar jarfile="${build.dir}/${final.name}.jar"
         basedir="${build.classes}" >
       <fileset file="${basedir}/conf/hbase-default.xml"/>
       <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"> 
-  <!--TODO!!!-->
-    <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">
+  <!-- ================================================================== -->
+  <!-- Package                                                            -->
+  <!-- ================================================================== -->
+  <target name="package" depends="jar,javadoc,compile-test" 
+      description="Build distribution"> 
+    <mkdir dir="${dist.dir}"/>
+    <copy todir="${dist.dir}" includeEmptyDirs="false" flatten="true">
       <fileset dir="${build.dir}">
-        <include name="hbase-${version}.jar" />
+        <include name="${final.name}.jar" />
+        <include name="${final.name}-test.jar" />
       </fileset>
     </copy>
-    <mkdir dir="${hbase.dist.dir}/webapps"/>
-    <copy todir="${hbase.dist.dir}/webapps">
+    <mkdir dir="${dist.dir}/webapps"/>
+    <copy todir="${dist.dir}/webapps">
       <fileset dir="${build.webapps}" />
     </copy>
-    <mkdir dir="${hbase.dist.dir}/lib"/>
-    <copy todir="${hbase.dist.dir}/lib">
+    <mkdir dir="${dist.dir}/lib"/>
+    <copy todir="${dist.dir}/lib">
       <fileset dir="${build.lib}" />
     </copy>
-    <mkdir dir="${hbase.dist.dir}/conf" />
-    <copy todir="${hbase.dist.dir}/conf">
+    <mkdir dir="${dist.dir}/conf" />
+    <copy todir="${dist.dir}/conf">
       <fileset dir="${build.conf}" />
     </copy>
-    <mkdir dir="${hbase.dist.dir}/bin" />
-    <copy todir="${hbase.dist.dir}/bin">
+    <mkdir dir="${dist.dir}/bin" />
+    <copy todir="${dist.dir}/bin">
       <fileset dir="${build.bin}" />
     </copy>
     <chmod perm="ugo+x" type="file">
-      <fileset dir="${hbase.dist.dir}/bin" />
+      <fileset dir="${dist.dir}/bin" />
     </chmod>
+    <!--Uncomment when we have a docs dir
+    <mkdir dir="${dist.dir}/docs" />
+    <copy todir="${dist.dir}/docs">
+      <fileset dir="${docs.dir}" />
+      <fileset dir="${build.docs}"/>
+    </copy>
+    -->
+    <copy todir="${dist.dir}">
+      <fileset dir=".">
+        <include name="*.txt" />
+      </fileset>
+    </copy>
+    <mkdir dir="${dist.dir}/src" />
+    <copy todir="${dist.dir}/src" includeEmptyDirs="true">
+      <fileset dir="src" excludes="**/*.template **/docs/build/**/*"/>
+    </copy>
   </target>
 
   <!-- ================================================================== -->
+  <!-- Make release tarball                                               -->
+  <!-- ================================================================== -->
+  <macrodef name="macro_tar" description="Worker Macro for tar">
+    <attribute name="param.destfile"/>
+    <element name="param.listofitems"/>
+    <sequential>
+      <tar compression="gzip" longfile="gnu"
+      destfile="@{param.destfile}">
+      <param.listofitems/>
+      </tar>
+    </sequential>
+  </macrodef>
+  <target name="tar" depends="package" description="Make release tarball">
+    <macro_tar param.destfile="${build.dir}/${final.name}.tar.gz">
+      <param.listofitems>
+        <tarfileset dir="${build.dir}" mode="664">
+          <exclude name="${final.name}/bin/*" />
+          <include name="${final.name}/**" />
+        </tarfileset>
+        <tarfileset dir="${build.dir}" mode="755">
+          <include name="${final.name}/bin/*" />
+        </tarfileset>
+      </param.listofitems>
+    </macro_tar>
+  </target>
+
+  <target name="binary" depends="package" description="Make tarball without source and
documentation">
+    <macro_tar param.destfile="${build.dir}/${final.name}-bin.tar.gz">
+      <param.listofitems>
+        <tarfileset dir="${build.dir}" mode="664">
+          <exclude name="${final.name}/bin/*" />
+          <exclude name="${final.name}/src/**" />
+          <exclude name="${final.name}/docs/**" />
+          <include name="${final.name}/**" />
+        </tarfileset>
+        <tarfileset dir="${build.dir}" mode="755">
+          <include name="${final.name}/bin/*" />
+        </tarfileset>
+      </param.listofitems>
+    </macro_tar>
+  </target>
+
+  <!-- ================================================================== -->
+  <!-- Javadoc                                                            -->
+  <!-- ================================================================== -->
+  <target name="javadoc" description="Generate javadoc">
+    <mkdir dir="${build.javadoc}"/>
+    <javadoc
+      overview="${src.dir}/overview.html"
+      packagenames="org.apache.hadoop.hbase.*"
+      destdir="${build.javadoc}"
+      author="true"
+      version="true"
+      use="true"
+      windowtitle="${Name} ${version} API"
+      doctitle="${Name} ${version} API"
+      bottom="Copyright &amp;copy; ${year} The Apache Software Foundation"
+      >
+    	<packageset dir="${src.dir}"/>
+        <link href="${javadoc.link.java}"/>
+        <classpath >
+          <path refid="classpath" />
+          <pathelement path="${java.class.path}"/>
+        </classpath>
+    	<group title="${Name}" packages="org.apache.hadoop.hbase.*"/>
+    </javadoc>
+  </target>	
+
+  <!-- ================================================================== -->
   <!-- Run unit tests                                                     -->
   <!-- ================================================================== -->
   <path id="test.classpath">
@@ -203,7 +292,7 @@
        debug="${javac.debug}"> 
     <classpath refid="test.classpath"/> 
     </javac>
-    <jar jarfile="${build.dir}/hbase-${version}-test.jar" >
+    <jar jarfile="${build.dir}/${final.name}-test.jar" >
       <fileset dir="${build.test}" includes="org/**" />
       <fileset dir="${build.classes}" />
       <fileset dir="${src.test}" includes="**/*.properties" />

Added: hadoop/hbase/trunk/src/java/overview.html
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/overview.html?rev=618553&view=auto
==============================================================================
--- hadoop/hbase/trunk/src/java/overview.html (added)
+++ hadoop/hbase/trunk/src/java/overview.html Mon Feb  4 21:44:48 2008
@@ -0,0 +1,148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+
+<!--
+   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.
+-->
+
+<head>
+    <title>HBase</title>
+</head>
+<body bgcolor="white">
+HBase is the <a href="http://lucene.apache.org/hadoop">Hadoop</a> simple database.
+
+<h2><a name="requirements">Requirements</a></h2>
+<ul>
+<li>Java 1.5.x, preferably from <a href="http://www.java.com/en/download/">Sun</a>.</li>
+<li>Hbase runs on top of <a href="http://lucene.apache.org/hadoop">Hadoop</a>.
 Hadoop has its own set of
+<a href="http://lucene.apache.org/hadoop/api/overview-summary.html#overview_description">
+requirements and instructions</a>.  Make sure to set 
+<code>JAVA_HOME</code> to the root of your Java installation when configuring
Hadoop.
+</li>
+</ul>
+
+<h2><a name="getting_started" >Getting Started</a></h2>
+<p>
+What follows presumes you are installing hbase for the first time. If upgrading your
+hbase instance, see <a href="#upgrading">Upgrading</a>.
+</p>
+<p>
+Start by defining the following directory variables for your convenience:
+</p>
+<p>
+<ul>
+<li><code>${HADOOP_HOME}</code>: The root directory of your Hadoop installation.</li>
+<li><code>${HBASE_HOME}</code>: The Hbase root, located at 
+<code>${HADOOP_HOME}/src/contrib/hbase</code>.</li>
+</ul>
+</p>
+<p>
+If you are running a standalone operation, proceed to <a href=#runandconfirm>Running

+and Confirming Your Installation</a>.  If you are running a distributed operation,
continue below.
+</p>
+
+<h2><a name="distributed" >Distributed Operation</a></h2>
+<p>
+Make sure you have followed
+<a href="http://lucene.apache.org/hadoop/api/overview-summary.html#overview_description">
+Hadoop's instructions</a> for running a distributed operation.  
+Configuring Hbase for a distributed operation requires modification of the following two

+files: <code>${HBASE_HOME}/conf/hbase-site.xml</code> and 
+<code>${HBASE_HOME}/conf/regionservers</code>.  
+</p>
+<p>
+<code>hbase-site.xml</code> allows the user to override the properties defined
in 
+<code>${HBASE_HOME}/conf/hbase-default.xml</code> (<code>hbase-default.xml</code>
itself 
+should never be modified).  At a minimum the <code>hbase.master</code> property
should be redefined 
+in <code>hbase-site.xml</code> to define the <code>host:port</code>
pair on which to run the 
+HMaster (<a href="http://wiki.apache.org/lucene-hadoop/Hbase/HbaseArchitecture">read
about the 
+Hbase master, regionservers, etc</a>):
+</p>
+<pre>
+&lt;configuration&gt;
+
+  &lt;property&gt;
+    &lt;name&gt;hbase.master&lt;/name&gt;
+    &lt;value&gt;[YOUR_HOST]:[PORT]&lt;/value&gt;
+    &lt;description&gt;The host and port that the Hbase master runs at.
+    &lt;/description&gt;
+  &lt;/property&gt;
+
+&lt;/configuration&gt;
+</pre>
+<p>
+The <code>regionserver</code> file lists all the hosts running HRegionServers,
one 
+host per line  (This file is synonymous to the slaves file at 
+<code>${HADOOP_HOME}/conf/slaves</code>).
+</p>
+<h3><a name="additional" >Additional Notes on Distributed Operation</a></h3>
+<ul>
+<li>Hadoop and Hbase must be set up on each host you plan to use.</li>
+<li>Additional (optional) Hbase-specific variables such as HBASE_HEAPSIZE and HBASE_CLASSPATH

+can be set in <code>${HBASE_HOME}/conf/hbase-env.sh</code>.</li>
+</ul>
+
+<h2><a name="runandconfirm">Running and Confirming Your Installation</a></h2>
+<p>If you are running in standalone, non-distributed mode, hbase by default uses
+the local filesystem.</p>
+<p>If you are running a distributed cluster you will need to start the Hadoop DFS daemons

+before starting Hbase and stop the daemons after Hbase has shut down.  Start and 
+stop the Hadoop DFS daemons as per the Hadoop 
+<a href="http://lucene.apache.org/hadoop/api/overview-summary.html">instructions</a>.
Hbase
+does not normally use the mapreduce daemons.  These do not need to be started.</p>
+
+<p>Start Hbase with the following command:
+</p>
+<pre>
+${HBASE_HOME}/bin/start-hbase.sh
+</pre>
+<p>
+Once Hbase has started, enter <code>${HBASE_HOME}/bin/hbase shell</code> to obtain
a 
+shell against Hbase from which you can execute Hbase commands.  In the Hbase shell, type

+<code>help;</code> to see a list of supported commands.  Note that all commands
in the Hbase 
+shell must end with <code>;</code>.  Test your installation by creating, viewing,
and dropping 
+a table, as per the help instructions.  Be patient with the <code>create</code>
and 
+<code>drop</code> operations as they may each take 10 seconds or more.  To stop
hbase, exit the 
+Hbase shell and enter:
+</p>
+<pre>
+${HBASE_HOME}/bin/stop-hbase.sh
+</pre>
+<p>
+If you are running a distributed operation, be sure to wait until Hbase has shut down completely

+before stopping the Hadoop daemons.
+</p>
+<p>
+The default location for logs is <code>${HADOOP_HOME}/logs</code>.
+</p>
+<p>Hbase also puts up a UI listing vital attributes.  By default its deployed on the
master host
+at port 60010.</p>
+
+<h2><a name="upgrading" >Upgrading</a></h2>
+<p>After installing the new hbase, before starting your cluster, run the
+<code>${HBASE_DIR}/bin/hbase migrate</code> migration script. It will make any
+adjustments to the filesystem data under <code>hbase.rootdir</code> necessary
to run
+the hbase version.
+</p>
+
+<h2><a name="related" >Related Documentation</a></h2>
+<ul>
+  <li><a href="http://wiki.apache.org/lucene-hadoop/Hbase">Hbase Home Page</a>
+  <li><a href="http://wiki.apache.org/lucene-hadoop/Hbase/HbaseArchitecture">Hbase
Architecture</a>
+</ul>
+
+</body>
+</html>



Mime
View raw message