Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-16002 Made constructors of DataType subclasses public #157

Merged
merged 1 commit into from Jun 24, 2019

Conversation

HorizonNet
Copy link
Contributor

No description provided.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 46 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The 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 _
+1 mvninstall 298 master passed
+1 compile 22 master passed
+1 checkstyle 22 master passed
+1 shadedjars 284 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 40 master passed
+1 javadoc 21 master passed
_ Patch Compile Tests _
+1 mvninstall 251 the patch passed
+1 compile 22 the patch passed
+1 javac 22 the patch passed
+1 checkstyle 22 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 272 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 546 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 49 the patch passed
+1 javadoc 19 the patch passed
_ Other Tests _
+1 unit 163 hbase-common in the patch passed.
+1 asflicense 12 The patch does not generate ASF License warnings.
2162
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 3ad0d54eeed9 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 20f72f5
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/1/testReport/
Max. process+thread count 288 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@@ -32,7 +32,7 @@
public static final OrderedBlob ASCENDING = new OrderedBlob(Order.ASCENDING);
public static final OrderedBlob DESCENDING = new OrderedBlob(Order.DESCENDING);

protected OrderedBlob(Order order) {
public OrderedBlob(Order order) {
Copy link
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
Contributor Author

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
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
Contributor Author

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
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
Contributor Author

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

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 24 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The 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 _
+1 mvninstall 255 master passed
+1 compile 21 master passed
+1 checkstyle 23 master passed
+1 shadedjars 267 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 39 master passed
+1 javadoc 20 master passed
_ Patch Compile Tests _
+1 mvninstall 241 the patch passed
+1 compile 21 the patch passed
+1 javac 21 the patch passed
+1 checkstyle 23 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 264 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 497 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 48 the patch passed
+1 javadoc 18 the patch passed
_ Other Tests _
+1 unit 167 hbase-common in the patch passed.
+1 asflicense 12 The patch does not generate ASF License warnings.
2013
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux a51222788c2c 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / f30d6c9
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/2/testReport/
Max. process+thread count 372 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@saintstack
Copy link
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

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 87 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The 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 _
+1 mvninstall 340 master passed
+1 compile 20 master passed
+1 checkstyle 27 master passed
+1 shadedjars 266 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 53 master passed
+1 javadoc 24 master passed
_ Patch Compile Tests _
+1 mvninstall 254 the patch passed
+1 compile 21 the patch passed
+1 javac 21 the patch passed
+1 checkstyle 22 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 270 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 800 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 48 the patch passed
+1 javadoc 18 the patch passed
_ Other Tests _
+1 unit 161 hbase-common in the patch passed.
+1 asflicense 11 The patch does not generate ASF License warnings.
2736
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 3cdb7af68e6c 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / ada772a
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/3/testReport/
Max. process+thread count 291 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/3/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@HorizonNet
Copy link
Contributor Author

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

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 176 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 16 new or modified test files.
_ master Compile Tests _
+1 mvninstall 247 master passed
+1 compile 19 master passed
+1 checkstyle 21 master passed
+1 shadedjars 254 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 40 master passed
+1 javadoc 18 master passed
_ Patch Compile Tests _
+1 mvninstall 241 the patch passed
+1 compile 20 the patch passed
+1 javac 20 the patch passed
-1 checkstyle 22 hbase-common: The patch generated 2 new + 21 unchanged - 5 fixed = 23 total (was 26)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 261 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 706 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 46 the patch passed
+1 javadoc 19 the patch passed
_ Other Tests _
+1 unit 166 hbase-common in the patch passed.
+1 asflicense 11 The patch does not generate ASF License warnings.
2565
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 96d0d20c8aea 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / ed30909
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/4/artifact/out/diff-checkstyle-hbase-common.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/4/testReport/
Max. process+thread count 291 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/4/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 43 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 16 new or modified test files.
_ master Compile Tests _
+1 mvninstall 241 master passed
+1 compile 21 master passed
+1 checkstyle 22 master passed
+1 shadedjars 249 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 35 master passed
+1 javadoc 18 master passed
_ Patch Compile Tests _
+1 mvninstall 231 the patch passed
+1 compile 20 the patch passed
+1 javac 20 the patch passed
+1 checkstyle 22 hbase-common: The patch generated 0 new + 21 unchanged - 5 fixed = 21 total (was 26)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 260 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 749 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 44 the patch passed
+1 javadoc 18 the patch passed
_ Other Tests _
+1 unit 163 hbase-common in the patch passed.
+1 asflicense 10 The patch does not generate ASF License warnings.
2446
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 6020b29e6aea 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / ed30909
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/5/testReport/
Max. process+thread count 328 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-157/5/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants