Skip to content

HBASE-16002 Made constructors of DataType subclasses public - #157

Merged
HorizonNet merged 1 commit into
apache:masterfrom
ultratendency:HBASE-16002
Jun 24, 2019
Merged

HBASE-16002 Made constructors of DataType subclasses public#157
HorizonNet merged 1 commit into
apache:masterfrom
ultratendency:HBASE-16002

Conversation

@HorizonNet

Copy link
Copy Markdown
Contributor

No description provided.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
0reexec46Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
-0test4tests0The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1mvninstall298master passed
+1compile22master passed
+1checkstyle22master passed
+1shadedjars284branch has no errors when building our shaded downstream artifacts.
+1findbugs40master passed
+1javadoc21master passed
_ Patch Compile Tests _
+1mvninstall251the patch passed
+1compile22the patch passed
+1javac22the patch passed
+1checkstyle22the patch passed
+1whitespace0The patch has no whitespace issues.
+1shadedjars272patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck546Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs49the patch passed
+1javadoc19the patch passed
_ Other Tests _
+1unit163hbase-common in the patch passed.
+1asflicense12The patch does not generate ASF License warnings.
2162
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/1/artifact/out/Dockerfile
GITHUB PR#157
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 3ad0d54eeed9 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 20f72f5
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/1/testReport/
Max. process+thread count288 (vs. ulimit of 10000)
modulesC: hbase-common U: hbase-common
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/1/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

public static final OrderedBlob DESCENDING = new OrderedBlob(Order.DESCENDING);

protected OrderedBlob(Order order) {
public OrderedBlob(Order order) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is intentional? User can use the above ASCENDING and DESCENDING directly?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would guess so. @ndimiduk probably can answer this question better.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that's precisely it. See my last comment on JIRA. The original design of this part of the API was to try to prevent callers from needless allocations. That couldn't be done uniformly, though, as some of these implementations require explicit construction parameters. I myself filed a ticket wondering why I had left some constructors private. I believe the uniformity of public constructors across all concrete types is more consistent that having static constants in most, but not all, places.

This is definitely a subjective area of the API design and I'd love to get other opinions :)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it consistent, how about making the constructors public for consistency reasons and deprecate the static constants (and remove them in another release) to make it more consistent?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think deprecating the static constants is appropriate, then I have no objection. There's always a balance between minimizing our supported surface area and downstream convenience. I've not followed things very closely as of late, but it seems we're on a pretty strong kick to deprecate/drop old interfaces.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should discuss this on the dev list. @Apache9 Is your question answered? What do you think? Should we leave it as is or should we deprecate the static constants?

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
0reexec24Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
-0test4tests0The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1mvninstall255master passed
+1compile21master passed
+1checkstyle23master passed
+1shadedjars267branch has no errors when building our shaded downstream artifacts.
+1findbugs39master passed
+1javadoc20master passed
_ Patch Compile Tests _
+1mvninstall241the patch passed
+1compile21the patch passed
+1javac21the patch passed
+1checkstyle23the patch passed
+1whitespace0The patch has no whitespace issues.
+1shadedjars264patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck497Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs48the patch passed
+1javadoc18the patch passed
_ Other Tests _
+1unit167hbase-common in the patch passed.
+1asflicense12The patch does not generate ASF License warnings.
2013
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/2/artifact/out/Dockerfile
GITHUB PR#157
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux a51222788c2c 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / f30d6c9
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/2/testReport/
Max. process+thread count372 (vs. ulimit of 10000)
modulesC: hbase-common U: hbase-common
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/2/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@saintstack

Copy link
Copy Markdown
Contributor

IMO make all constructors public (and deprecate the static defines). Its consistent. If a problem w/ too many new objects, can review then.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
0reexec87Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
-0test4tests0The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1mvninstall340master passed
+1compile20master passed
+1checkstyle27master passed
+1shadedjars266branch has no errors when building our shaded downstream artifacts.
+1findbugs53master passed
+1javadoc24master passed
_ Patch Compile Tests _
+1mvninstall254the patch passed
+1compile21the patch passed
+1javac21the patch passed
+1checkstyle22the patch passed
+1whitespace0The patch has no whitespace issues.
+1shadedjars270patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck800Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs48the patch passed
+1javadoc18the patch passed
_ Other Tests _
+1unit161hbase-common in the patch passed.
+1asflicense11The patch does not generate ASF License warnings.
2736
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/3/artifact/out/Dockerfile
GITHUB PR#157
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 3cdb7af68e6c 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / ada772a
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/3/testReport/
Max. process+thread count291 (vs. ulimit of 10000)
modulesC: hbase-common U: hbase-common
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/3/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@HorizonNet

Copy link
Copy Markdown
ContributorAuthor

Updated the PR to deprecate the static defines and the default constructors (for consistency). Because I was already on it, I added some test cases for the types.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec176Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 16 new or modified test files.
_ master Compile Tests _
+1mvninstall247master passed
+1compile19master passed
+1checkstyle21master passed
+1shadedjars254branch has no errors when building our shaded downstream artifacts.
+1findbugs40master passed
+1javadoc18master passed
_ Patch Compile Tests _
+1mvninstall241the patch passed
+1compile20the patch passed
+1javac20the patch passed
-1checkstyle22hbase-common: The patch generated 2 new + 21 unchanged - 5 fixed = 23 total (was 26)
+1whitespace0The patch has no whitespace issues.
+1shadedjars261patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck706Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs46the patch passed
+1javadoc19the patch passed
_ Other Tests _
+1unit166hbase-common in the patch passed.
+1asflicense11The patch does not generate ASF License warnings.
2565
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/4/artifact/out/Dockerfile
GITHUB PR#157
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 96d0d20c8aea 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / ed30909
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/4/artifact/out/diff-checkstyle-hbase-common.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/4/testReport/
Max. process+thread count291 (vs. ulimit of 10000)
modulesC: hbase-common U: hbase-common
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/4/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
0reexec43Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 16 new or modified test files.
_ master Compile Tests _
+1mvninstall241master passed
+1compile21master passed
+1checkstyle22master passed
+1shadedjars249branch has no errors when building our shaded downstream artifacts.
+1findbugs35master passed
+1javadoc18master passed
_ Patch Compile Tests _
+1mvninstall231the patch passed
+1compile20the patch passed
+1javac20the patch passed
+1checkstyle22hbase-common: The patch generated 0 new + 21 unchanged - 5 fixed = 21 total (was 26)
+1whitespace0The patch has no whitespace issues.
+1shadedjars260patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck749Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs44the patch passed
+1javadoc18the patch passed
_ Other Tests _
+1unit163hbase-common in the patch passed.
+1asflicense10The patch does not generate ASF License warnings.
2446
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/5/artifact/out/Dockerfile
GITHUB PR#157
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 6020b29e6aea 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / ed30909
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/5/testReport/
Max. process+thread count328 (vs. ulimit of 10000)
modulesC: hbase-common U: hbase-common
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/5/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@HorizonNet@Apache-HBase@saintstack@ndimiduk@Apache9