From 192539460a446e02d6c38ca5a1f8041e82e68c4f Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 14 Jul 2011 22:47:31 +0000 Subject: [PATCH] HBASE-4098 developer.xml - adding repo info, how to set up eclipse, common maven commands git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1146914 13f79535-47bb-0310-9956-ffa450edef68 --- src/docbkx/developer.xml | 89 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 3 deletions(-) diff --git a/src/docbkx/developer.xml b/src/docbkx/developer.xml index b4662cab29f..cb724ccece6 100644 --- a/src/docbkx/developer.xml +++ b/src/docbkx/developer.xml @@ -9,17 +9,100 @@ xmlns:db="http://docbook.org/ns/docbook"> Developing HBase This chapter will be of interest only to those developing HBase (i.e., as opposed to using it). + See the HBase wiki How To Contribute +
+ HBase Repositories +
+ SVN + +svn co http://svn.apache.org/repos/asf/hbase/trunk hbase-core-trunk + +
+
+ Git + +git clone git://git.apache.org/hbase.git + +
+
IDEs
Eclipse - See HBASE-3678 Add Eclipse-based Apache Formatter to HBase Wiki +
+ Code Formatting + See HBASE-3678 Add Eclipse-based Apache Formatter to HBase Wiki for an Eclipse formatter to help ensure your code conforms to HBase'y coding conventsion. - The issue includes instructions for loading the attached formatter. - + The issue includes instructions for loading the attached formatter. +
+
+ Subversive Plugin + Download and install the Subversive plugin. + Set up an SVN Repository target from , then check out the code. +
+
+ HBase Project Setup + To set up your Eclipse environment for HBase, close Eclipse and execute... + +mvn eclipse:eclipse + + ... from your local HBase project directory in your workspace to generate a new .project file. Then reopen Eclipse. +
+
+ Maven Plugin + Download and install the Maven plugin. For example, Help -> Install New Software -> (search for Maven Plugin) +
+
+ Maven Classpath Variable + The M2_REPO classpath variable needs to be set up for the project. This needs to be set to + your local Maven repository, which is usually ~/.m2/repository + If this classpath variable is not configured, you will see compile errors in Eclipse like this... + +Description Resource Path Location Type +The project cannot be built until build path errors are resolved hbase Unknown Java Problem +Unbound classpath variable: 'M2_REPO/asm/asm/3.1/asm-3.1.jar' in project 'hbase' hbase Build path Build Path Problem +Unbound classpath variable: 'M2_REPO/com/github/stephenc/high-scale-lib/high-scale-lib/1.1.1/high-scale-lib-1.1.1.jar' in project 'hbase' hbase Build path Build Path Problem +Unbound classpath variable: 'M2_REPO/com/google/guava/guava/r09/guava-r09.jar' in project 'hbase' hbase Build path Build Path Problem +Unbound classpath variable: 'M2_REPO/com/google/protobuf/protobuf-java/2.3.0/protobuf-java-2.3.0.jar' in project 'hbase' hbase Build path Build Path Problem Unbound classpath variable: + +
+
+ Eclipse Known Issues + Eclipse will currently complain about Bytes.java. It is not possible to turn these errors off. + +Description Resource Path Location Type +Access restriction: The method arrayBaseOffset(Class) from the type Unsafe is not accessible due to restriction on required library /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar Bytes.java /hbase/src/main/java/org/apache/hadoop/hbase/util line 1061 Java Problem +Access restriction: The method arrayIndexScale(Class) from the type Unsafe is not accessible due to restriction on required library /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar Bytes.java /hbase/src/main/java/org/apache/hadoop/hbase/util line 1064 Java Problem +Access restriction: The method getLong(Object, long) from the type Unsafe is not accessible due to restriction on required library /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar Bytes.java /hbase/src/main/java/org/apache/hadoop/hbase/util line 1111 Java Problem + +
+
+ Maven Build Commands + All commands executed from the local HBase project directory. + +
+ Compile + +mvn compile + +
+
+ Run all Unit Tests + +mvn test + +
+
+ Run a Single Unit Test + +mvn test -Dtest=TestXYZ + +
+ +
Unit Tests In HBase we use JUnit 4.