You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2008/02/04 23:30:09 UTC

svn commit: r618471 - in /hadoop/hbase/trunk: build.xml src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java

Author: stack
Date: Mon Feb  4 14:30:08 2008
New Revision: 618471

URL: http://svn.apache.org/viewvc?rev=618471&view=rev
Log:
HBASE-403 Fix build after move of hbase in svn
Make tests actually succeed
M  src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
  Throw exception w/ better message when we can't find conf files.
M  build.xml
    (lib.dir, conf.dir): Add defines.  Add conf to CLASSPATH

Modified:
    hadoop/hbase/trunk/build.xml
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java

Modified: hadoop/hbase/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/build.xml?rev=618471&r1=618470&r2=618471&view=diff
==============================================================================
--- hadoop/hbase/trunk/build.xml (original)
+++ hadoop/hbase/trunk/build.xml Mon Feb  4 14:30:08 2008
@@ -28,6 +28,9 @@
   <property name="src.examples" location="${basedir}/src/examples"/>
   <property name="src.webapps" location="${basedir}/src/webapps"/>
 
+  <property name="lib.dir" value="${basedir}/lib"/>
+  <property name="conf.dir" value="${basedir}/conf"/>
+
   <property name="test.output" value="no"/>
   <property name="test.timeout" value="900000"/>
 
@@ -44,6 +47,7 @@
   <property name="test.log.dir" value="${test.build.dir}/logs"/>
   <property name="test.junit.output.format" value="plain"/>
 
+
   <!-- all jars together -->
   <property name="javac.deprecation" value="off"/>
   <property name="javac.debug" value="on"/>
@@ -61,7 +65,8 @@
     <fileset refid="lib.jars"/>
       <fileset dir="${basedir}/lib/jetty-ext/">
         <include name="*jar" />
-      </fileset>
+    </fileset>
+    <pathelement location="${conf.dir}"/>
   </path>
 
   <target name="init">
@@ -195,7 +200,7 @@
        debug="${javac.debug}"> 
     <classpath refid="test.classpath"/> 
     </javac>
-    <jar jarfile="${build.dir}/hadoop-${version}-${name}-test.jar" >
+    <jar jarfile="${build.dir}/hbase-${version}-test.jar" >
       <fileset dir="${build.test}" includes="org/**" />
       <fileset dir="${build.classes}" />
       <fileset dir="${src.test}" includes="**/*.properties" />

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java?rev=618471&r1=618470&r2=618471&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java Mon Feb  4 14:30:08 2008
@@ -274,6 +274,9 @@
     }
     // Need to rewrite address in Configuration if not done already.
     String address = c.get(MASTER_ADDRESS);
+    if (address == null) {
+      throw new NullPointerException("Address is null for " + MASTER_ADDRESS);
+    }
     String port = address.startsWith(LOCAL_COLON)?
       address.substring(LOCAL_COLON.length()):
       Integer.toString(DEFAULT_MASTER_PORT);