btw, I'm running maven 3.0.3, which may impact dependency resolution
compared to 2.x
mvn -v
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
On 15/06/11 17:30, Eric Charles wrote:
Hi Lars,
Trying the hbase-book project on github, Ioan and I were missing the
famous hadoop-core-0.20-append-r1044525 dependency.
I have added the Ryan's repo on people.apache.org and now it builds fine.
Although hbase 0.91-SNAPSHOT [1] defines hadoop as dependency and
http://people.apache.org/~rawson/repo as repository, the dependency is
not resolved which is confirmed by mvn dependency:tree result:
INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @
hbase-book-ch03 ---
[INFO] com.larsgeorge:hbase-book-ch03:jar:1.0
[INFO] +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- log4j:log4j:jar:1.2.16:compile
[INFO] +- org.apache.hadoop:hadoop-core:jar:0.20-append-r1044525:compile
[INFO] +- org.apache.zookeeper:zookeeper:jar:3.3.2:compile
[INFO] +- org.apache.hbase:hbase:jar:0.91.0-SNAPSHOT:compile
[INFO] | +-
com.github.stephenc.high-scale-lib:high-scale-lib:jar:1.1.1:compile
[INFO] | +- org.apache.thrift:libthrift:jar:0.6.1:compile
[INFO] | | +- junit:junit:jar:4.4:compile
[INFO] | | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | | \- org.apache.httpcomponents:httpclient:jar:4.0.1:compile
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO] | \- org.jamon:jamon-runtime:jar:2.3.1:compile
[INFO] \- com.google.collections:google-collections:jar:1.0:compile
Maven voodoo linked to snaphshots I suppose.
You can see the fix on
https://github.com/echarles/hbase-book/commits/master.
Just tell me if you like me to Pull Request via github, or maybe you
have another solution?
Tks,
- Eric
[1]
https://repository.apache.org/content/groups/snapshots/org/apache/hbase/hbase/0.90.1-SNAPSHOT/hbase-0.90.1-20110215.213202-4.pom
On 14/06/11 10:18, Eric Charles wrote:
Yep, tks for the pointer.
- Eric
On 14/06/11 10:16, Lars George wrote:
Hi Eric,
Agreed. I put the run scripts into each chapter's "bin" directory, for
example:
https://github.com/larsgeorge/hbase-book/blob/master/ch03/bin/run.sh
Does that help?
Lars
On Tue, Jun 14, 2011 at 10:05 AM, Eric Charles
<[email protected]>wrote:
Hi Lars,
A base unit test class which setups the embedded HBase cluster with
HBaseTestingUtility, ant the chapter tests being gathered in a JUnit
Suite
is an option (you can tell maven to only run the *IntegrationTest
class for
example, user would invoke "mvn test" for all tests or "mvn test
-Dtest=Chapter1IntegrationTest").
The approach you take (main with separate cluster) has some
advantage: you
can see afterwards the result of your actions in the cluster via the
HBase
console, it also "validate" the reader can install HBase.
After rethinking about it, I think the current approach is best :)
Btw, I can find the start-hush.sh to launch the cluster, but not the
script
that run the examples.
Tks,
- Eric
On 14/06/11 08:57, Lars George wrote:
Hi Eric,
Sorry for the late reply. More inline...
I've given your hbase-book link on github [1] to Ioan (GSoC2011, see
previous mail I just sent) to help him dig into the HBase API.
Great! Let me know if you find issues along the way.
I've also checked-out your repo to learn more, the basic stuff, and
the
less basic such as coprocessors...
Great work! Tanks a bunch :) - Tks also to Patrick Angeles, I saw
him in
the commit log.
I had also prepared some HBase samples for Ioan on [2] where I use
the
HBaseTestingUtility that allows to run the code without the need
for a
real
separate cluster. If I understand well, I need to run a separate
local
cluster to run the hbase-book code?
Yes, the book helps you in a Quick Start section to start a local,
stand-alone setup. After that the examples can be run against it.
Btw, companion-code to books (o'reilly, manning...) use some main
classes,
I would better have some test classes (junit). just my 2-cent...
I was thinking about how to structure this too, but am not sure what
the
usual approach is. I used Maven and added a small script that helps
to run
the examples. It simply sets up the classpath and runs the given
example
code. This seems real easy for the reader to follow along. We will
see how
this goes I think.
Cheers,
Lars
Tks,
- Eric
[1] https://github.com/larsgeorge/hbase-book/
[2] https://github.com/echarles/t4f-hbase