You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2013/07/31 10:37:50 UTC

[jira] [Commented] (HBASE-8224) Add '-hadoop1' or '-hadoop2' to our version string

    [ https://issues.apache.org/jira/browse/HBASE-8224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13725026#comment-13725026 ] 

stack commented on HBASE-8224:
------------------------------

So our poms in repo, even if local repo, include the compat.module variable. It is not being interpolated.  Here is a build of hbase against hadoop2 profile:

{code}
durruti:hbase stack$ grep -r 'compat.module' .
./hbase/0.95.2-SNAPSHOT/hbase-0.95.2-SNAPSHOT.pom:        <artifactId>${compat.module}</artifactId>
./hbase/0.95.2-SNAPSHOT/hbase-0.95.2-SNAPSHOT.pom:        <artifactId>${compat.module}</artifactId>
./hbase/0.95.2-SNAPSHOT/hbase-0.95.2-SNAPSHOT.pom:        <compat.module>hbase-hadoop1-compat</compat.module>
./hbase/0.95.2-SNAPSHOT/hbase-0.95.2-SNAPSHOT.pom:        <!-- Need to set this for the Hadoop 1 compat module -->
./hbase/0.95.2-SNAPSHOT/hbase-0.95.2-SNAPSHOT.pom:        <compat.module>hbase-hadoop1-compat</compat.module>
./hbase/0.95.2-SNAPSHOT/hbase-0.95.2-SNAPSHOT.pom:        <compat.module>hbase-hadoop2-compat</compat.module>
./hbase-assembly/0.95.2-SNAPSHOT/hbase-assembly-0.95.2-SNAPSHOT.pom:        <artifactId>${compat.module}</artifactId>
./hbase-assembly/0.95.2-SNAPSHOT/hbase-assembly-0.95.2-SNAPSHOT.pom:        <artifactId>${compat.module}</artifactId>
./hbase-it/0.95.2-SNAPSHOT/hbase-it-0.95.2-SNAPSHOT.pom:          <artifactId>${compat.module}</artifactId>
./hbase-it/0.95.2-SNAPSHOT/hbase-it-0.95.2-SNAPSHOT.pom:          <artifactId>${compat.module}</artifactId>
./hbase-prefix-tree/0.95.2-SNAPSHOT/hbase-prefix-tree-0.95.2-SNAPSHOT.pom:      <artifactId>${compat.module}</artifactId>
./hbase-server/0.95.2-SNAPSHOT/hbase-server-0.95.2-SNAPSHOT.pom:      <artifactId>${compat.module}</artifactId>
./hbase-server/0.95.2-SNAPSHOT/hbase-server-0.95.2-SNAPSHOT.pom:      <artifactId>${compat.module}</artifactId>
{code}

I've been playing w/ replacing the above variable and then building w/ new poms. Here is my little script:

{code}
$ hadoop=hadoop2; for i in `find . -name pom.xml`; do echo $i; fn="pom.xml.${hadoop}"; sed "s/\${compat.module}/hbase-${hadoop}-compat/;s/relativePath>\.\./..\/relativePatch>$fn/;s/\(module>[^<]*\)/\1\/$fn/"  $i > $i.${hadoop}; done
{code}

This puts a file beside the original pom.xml named pom.xml.hadoop2.  This file has a couple of substitutions done on original pom (I tried to put it into target dir so I did not mod the original srcs but mvn wants the modules under it -- and then child modules want to ref the parent -- I suppose I could make this work w/ more hackery).

Now building I do this:

mvn clean install -DskipTests -Dhadoop.profile=2.0 -f pom.xml.hadoop2

And repo seems better.

My downstream project is failing still though it now no longer has hadoop1 on refernces or fail because it wants hadoop1 dependency.

It is failing here:

{code}
  4 -------------------------------------------------------------------------------
  3 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.67 sec <<< FAILURE!
  2 testSpinUpMiniHBaseCluster(org.hbase.downstreamer.TestHBaseMiniCluster)  Time elapsed: 0.631 sec  <<< ERROR!
  1 java.lang.UnsupportedOperationException: Not implemented by the DistributedFileSystem FileSystem implementation
...
{code}

... which uusually means I was compiled against wrong version....  Looking.
                
> Add '-hadoop1' or '-hadoop2' to our version string
> --------------------------------------------------
>
>                 Key: HBASE-8224
>                 URL: https://issues.apache.org/jira/browse/HBASE-8224
>             Project: HBase
>          Issue Type: Task
>            Reporter: stack
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.95.2
>
>         Attachments: 8224-adding.classifiers.txt, hbase-8224-proto1.patch
>
>
> So we can publish both the hadoop1 and the hadoop2 jars to a maven repository, and so we can publish two packages, one for hadoop1 and one for hadoop2, given how maven works, our only alternative (to the best of my knowledge and after consulting others) is by amending the version string to include hadoop1 or hadoop2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira