You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Matteo Bertozzi (JIRA)" <ji...@apache.org> on 2016/08/08 12:41:20 UTC
[jira] [Comment Edited] (HBASE-16360) TableMapReduceUtil
addHBaseDependencyJars has the wrong class name for PrefixTreeCodec
[ https://issues.apache.org/jira/browse/HBASE-16360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411743#comment-15411743 ]
Matteo Bertozzi edited comment on HBASE-16360 at 8/8/16 12:41 PM:
------------------------------------------------------------------
the patch is ok, in case we keep it like this it will be nice to have a test. maybe mock the addDependencyJarsForClasses() methods to check the arguments.
but I was looking at the comment above and I can't figure out where is the circular dependency.
{code}
// PrefixTreeCodec is part of the hbase-prefix-tree module. If not included in MR jobs jar
// dependencies, MR jobs that write encoded hfiles will fail.
// We used reflection here so to prevent a circular module dependency.
// TODO - if we extract the MR into a module, make it depend on hbase-prefix-tree
{code}
from the pom.xml of the prefix-tree module I don't see hbase-server. but I can see prefix-tree module in the hbase-server/pom.xml. the TableMapReduceUtil is in hbase-server.. so in theory we don't have any circular dependency.
we can just probably drop all that try/catch block with the Class.forName() and just simply use org.apache.hadoop.hbase.codec.prefixtree.PrefixTreeCodec as we do for the others.
what do you think [~jimpu]?
was (Author: mbertozzi):
the patch is ok, but I was looking at the comment above and I can't figure out where is the circular dependency.
{code}
// PrefixTreeCodec is part of the hbase-prefix-tree module. If not included in MR jobs jar
// dependencies, MR jobs that write encoded hfiles will fail.
// We used reflection here so to prevent a circular module dependency.
// TODO - if we extract the MR into a module, make it depend on hbase-prefix-tree
{code}
from the pom.xml of the prefix-tree module I don't see hbase-server. but I can see prefix-tree module in the hbase-server/pom.xml. the TableMapReduceUtil is in hbase-server.. so in theory we don't have any circular dependency.
we can just probably drop all that try/catch block with the Class.forName() and just simply use org.apache.hadoop.hbase.codec.prefixtree.PrefixTreeCodec as we do for the others.
what do you think [~jimpu]?
> TableMapReduceUtil addHBaseDependencyJars has the wrong class name for PrefixTreeCodec
> --------------------------------------------------------------------------------------
>
> Key: HBASE-16360
> URL: https://issues.apache.org/jira/browse/HBASE-16360
> Project: HBase
> Issue Type: Bug
> Components: mapreduce
> Affects Versions: 2.0.0, 1.3.0, 1.0.3, 1.4.0, 1.2.2
> Reporter: Matteo Bertozzi
> Assignee: Jing Pu Chen
> Priority: Minor
> Labels: noob
> Fix For: 2.0.0, 1.3.0, 1.0.3, 1.4.0, 1.2.2
>
> Attachments: HBASE-16360-v0.patch
>
>
> HBASE-15152 included the prefix tree module as dependency to TableMapReduceUtil. but the hardcoded string of the class name is wrong.
> {code}
> Class.forName("org.apache.hadoop.hbase.code.prefixtree.PrefixTreeCodec");
> {code}
> should be ".codec." instead of ".code."
> {code}
> Class.forName("org.apache.hadoop.hbase.codec.prefixtree.PrefixTreeCodec");
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)