Grokbase Groups HBase dev July 2012
FAQ
Hi,

I have a question regarding spacing (code formating) on the code.

When we have an array in parameters, we have to add a space after the
type, like that:

private static byte [] binaryIncrementNeg(byte [] value, long amount) {

Same for the returned type.

But when it's in the code sometime there is no space:
final Iterator<byte[]> iterator = new Iterator<byte[]>() {

Should there be always a space before the []? What's the rules about that?

Also, I'm using Eclipse. I was able to configure the repository
correctly, but is there an "easy" way to setup the build paths, etc.?
So now, I have simply added all the libs into trunk/lib, but seems
that I'm still missing some, like org.apache.commons.lang.StringUtils,
sun.misc.Unsafe and com.google.common.annotations.VisibleForTesting. I
can search for the jars and add them manually, but I think it's
telling me that I have not configured the things correctly. I have
added branches/0.94/src/test/java and branches/0.94/src/main/java as
sources directories.

My goal is to be able to run the test classes to validate that the
code I'm proposing is working fine. I don't necessary want to run
HBase directly from Eclipse, but will still be a nice to have.

Can you please let me know how I should do to configure my local
project correctly?

Thanks,

JM

Search Discussions

  • Michael Stack at Jul 7, 2012 at 5:10 pm

    On Sat, Jul 7, 2012 at 2:54 PM, Jean-Marc Spaggiari wrote:
    I have a question regarding spacing (code formating) on the code.

    When we have an array in parameters, we have to add a space after the
    type, like that:

    private static byte [] binaryIncrementNeg(byte [] value, long amount) {

    Same for the returned type.

    But when it's in the code sometime there is no space:
    final Iterator<byte[]> iterator = new Iterator<byte[]>() {

    Should there be always a space before the []? What's the rules about that?
    I'd add one but patch will go in if you don't have it I'd say.
    Also, I'm using Eclipse. I was able to configure the repository
    correctly, but is there an "easy" way to setup the build paths, etc.?
    mvn eclipse:eclipse should do it for you. See this section:
    http://hbase.apache.org/book.html#eclipse

    Let us know if it doesn't work Jean-Marc.

    Thanks for contribs.

    St.Ack
  • Jean-Marc Spaggiari at Jul 7, 2012 at 7:26 pm
    Thanks St.Ack,

    It's now working fine. We might specify in the documentation that we
    need to refresh (F5) the files/folders to see the generated one
    (./hbase-server/target/generated-sources/java/org/apache/hadoop/hbase/avro/generated/AClusterStatus.java,
    etc.)

    JM

    2012/7/7, Stack <stack@duboce.net>:
    On Sat, Jul 7, 2012 at 2:54 PM, Jean-Marc Spaggiari
    wrote:
    I have a question regarding spacing (code formating) on the code.

    When we have an array in parameters, we have to add a space after the
    type, like that:

    private static byte [] binaryIncrementNeg(byte [] value, long amount) {

    Same for the returned type.

    But when it's in the code sometime there is no space:
    final Iterator<byte[]> iterator = new Iterator<byte[]>() {

    Should there be always a space before the []? What's the rules about
    that?
    I'd add one but patch will go in if you don't have it I'd say.
    Also, I'm using Eclipse. I was able to configure the repository
    correctly, but is there an "easy" way to setup the build paths, etc.?
    mvn eclipse:eclipse should do it for you. See this section:
    http://hbase.apache.org/book.html#eclipse

    Let us know if it doesn't work Jean-Marc.

    Thanks for contribs.

    St.Ack
  • Michael Stack at Jul 7, 2012 at 7:33 pm

    On Sat, Jul 7, 2012 at 9:26 PM, Jean-Marc Spaggiari wrote:
    Thanks St.Ack,

    It's now working fine. We might specify in the documentation that we
    need to refresh (F5) the files/folders to see the generated one
    (./hbase-server/target/generated-sources/java/org/apache/hadoop/hbase/avro/generated/AClusterStatus.java,
    etc.)
    I added the suggested note to developer doc. Will show up next time
    we push doc to hbase.org.
    Thanks,
    St.Ack

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedJul 7, '12 at 12:55p
activeJul 7, '12 at 7:33p
posts4
users2
websitehbase.apache.org

People

Translate

site design / logo © 2022 Grokbase