You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Nihal Jain (JIRA)" <ji...@apache.org> on 2018/04/25 11:43:00 UTC
[jira] [Comment Edited] (HBASE-20485) Copy constructor of Scan
doesn't copy the readType and replicaId
[ https://issues.apache.org/jira/browse/HBASE-20485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16452093#comment-16452093 ]
Nihal Jain edited comment on HBASE-20485 at 4/25/18 11:42 AM:
--------------------------------------------------------------
[~chia7712] Seems like we already have an API for this in package [org.apache.commons.lang3.builder.EqualsBuilder|https://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/builder/EqualsBuilder.html]
It also has an option to exclude fields, if any.
{{Appending the following statement at the end of *testScanCopyConstructor()* in above patch. Any new field added in scan but not handled in copy constructor will make the test fail.}}
{code:java}
assertTrue("Make sure copy constructor adds all fields in copied object",
EqualsBuilder.reflectionEquals(scan, scanCopy));
{code}
[~mdrob] This will only be in test, so won't be an issue.
was (Author: nihaljain.cs):
[~chia7712] Seems like we already have an API for this in package org.apache.commons.lang3.builder.EqualsBuilder.
It also has an option to exclude field, if any.
{{Appending the following statement at the end of *testScanCopyConstructor()* in above patch.}}
{code:java}
assertTrue("Make sure copy constructor adds all fields in copied object",
EqualsBuilder.reflectionEquals(scan, scanCopy));
{code}
[~mdrob] This will only be in test, so won't be an issue.
> Copy constructor of Scan doesn't copy the readType and replicaId
> ----------------------------------------------------------------
>
> Key: HBASE-20485
> URL: https://issues.apache.org/jira/browse/HBASE-20485
> Project: HBase
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Nihal Jain
> Priority: Minor
> Labels: beginner, beginners
> Fix For: 3.0.0
>
> Attachments: HBASE-20485.master.001.patch
>
>
> The field was introduced by HBASE-17045.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)