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-26354 [hbase-connectors] Added python client for HBase thrift service #86

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

YutSean
Copy link

@YutSean YutSean commented Oct 13, 2021

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 38s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+0 🆗 pylint 0m 0s Pylint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
_ Patch Compile Tests _
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
2m 23s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/5/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #86
Optional Tests dupname shellcheck shelldocs markdownlint pylint
uname Linux d522b46fd901 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool hb_maven
Personality dev-support/jenkins/hbase-personality.sh
git revision master / 9a839b2
Max. process+thread count 42 (vs. ulimit of 12500)
modules C: . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/5/console
versions git=2.20.1 shellcheck=0.5.0
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@YutSean
Copy link
Author

YutSean commented Oct 21, 2021

Have fixed all the whitespace problem. Could someone have a look of this?

Copy link
Contributor

@busbey busbey left a comment

Choose a reason for hiding this comment

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

this needs a reference in the top level README for the project. Also needs to be hooked into the main build process or we need to make we a) include instructions for building and b) update the project release scripts to follow those instructions when a release manager goes to make RCs of the hbase-connectors repo.

Comment on lines 1 to 5

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid having another copy of the LICENSE here? the top level one is meant to cover the source in the repo. if we need a copy for e.g. inclusion in some artifact can we pull that one?

Copy link
Author

Choose a reason for hiding this comment

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

I found that in the spark or kafka submodule, there is no redundant LICENSE file. Has removed.

@@ -0,0 +1,169 @@
# Project description
Copy link
Contributor

Choose a reason for hiding this comment

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

Individual files need to have a header that points out the licensing. see here for more info:

https://apache.org/legal/src-headers.html

Copy link
Author

Choose a reason for hiding this comment

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

Solved.

long_description = f.read()

setup(
name='thbase',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd really like it if the name was less opaque. maybe hbase-thrift2 or hbase-client-thrift2?

Copy link
Author

Choose a reason for hiding this comment

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

OK, have changed to hbase-client-thrift2.


setup(
name='thbase',
version='1.3.6',
Copy link
Contributor

Choose a reason for hiding this comment

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

So far we've gone with unified releases from hbase-connectors. That is, the version here should be the same as the hbase-connectors version it is released in. ATM the in development version is 1.0.1. With this library adding we should probably bump that to 1.1 or 2.0.

Copy link
Author

Choose a reason for hiding this comment

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

Not sure what should be the version number. Just used 2.0 in the latest commit.

setup(
name='thbase',
version='1.3.6',
description='HBase thrift2 client python API. Compatible with python2.7 and python3',
Copy link
Contributor

Choose a reason for hiding this comment

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

for the module description we should use the proper trademark "Apache HBase thrift2 client ..."

Copy link
Author

Choose a reason for hiding this comment

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

Changed to a more official description in the latest commit.

classifiers=[
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 2.7",
Copy link
Contributor

Choose a reason for hiding this comment

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

how long are we looking to maintain python 2.7 support? is it still commonly needed?

Copy link
Author

Choose a reason for hiding this comment

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

There are still 2.7 users. But the 2.7 users I know, are planning to upgrade to 3.x. I think we could abandon 2.7 soon.

Comment on lines 32 to 33
author='',
author_email='',
Copy link
Contributor

Choose a reason for hiding this comment

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

these should be set to something like "Apache HBase Community" and "[email protected]"

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in the latest commit.

@YutSean
Copy link
Author

YutSean commented Oct 22, 2021

Have added the release instructions in the README file. The release needs a PMC to register a pypi project with the same name first.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 36s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+0 🆗 pylint 0m 0s Pylint was not available.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
-0 ⚠️ patch 1m 47s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
2m 31s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/6/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #86
Optional Tests dupname markdownlint pylint shellcheck shelldocs
uname Linux cf6a175699ff 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool hb_maven
Personality dev-support/jenkins/hbase-personality.sh
git revision master / 9a839b2
Max. process+thread count 42 (vs. ulimit of 12500)
modules C: . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/6/console
versions git=2.20.1 shellcheck=0.5.0
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.


class ClientBase(object):
"""
Abstract class for both thrift1 and thrift2 client. Implemented with Observer design pattern.

Choose a reason for hiding this comment

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

thrift2 only?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah. Thrift2 only. As Thrift1 will be deprecated, only build up for thrift2. But it is ok to develop another thrift1 client if needed.

@YutSean
Copy link
Author

YutSean commented Nov 1, 2021

Any other comments on this?

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 13s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+0 🆗 pylint 0m 0s Pylint was not available.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
-0 ⚠️ patch 4m 1s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
5m 21s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/7/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #86
Optional Tests dupname markdownlint pylint shellcheck shelldocs
uname Linux 53308e010a60 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool hb_maven
Personality dev-support/jenkins/hbase-personality.sh
git revision master / 9a839b2
Max. process+thread count 42 (vs. ulimit of 12500)
modules C: . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/7/console
versions git=2.20.1 shellcheck=0.5.0
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 46s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+0 🆗 pylint 0m 0s Pylint was not available.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
-0 ⚠️ patch 3m 43s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
4m 36s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/8/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #86
Optional Tests dupname markdownlint pylint shellcheck shelldocs
uname Linux 03fdd6ebeb6c 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool hb_maven
Personality dev-support/jenkins/hbase-personality.sh
git revision master / 9a839b2
Max. process+thread count 42 (vs. ulimit of 12500)
modules C: . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Connectors-PreCommit/job/PR-86/8/console
versions git=2.20.1 shellcheck=0.5.0
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 40s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 markdownlint 0m 1s markdownlint was not available.
+0 🆗 pylint 0m 1s Pylint was not available.
+0 🆗 shelldocs 0m 1s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
-0 ⚠️ patch 1m 31s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
3m 17s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-Connectors-PreCommit/job/PR-86/1/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #86
Optional Tests dupname markdownlint pylint shellcheck shelldocs
uname Linux 5aa55623307d 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 GNU/Linux
Build tool hb_maven
Personality dev-support/jenkins/hbase-personality.sh
git revision master / 2bfc5f1
Max. process+thread count 43 (vs. ulimit of 12500)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-Connectors-PreCommit/job/PR-86/1/console
versions git=2.20.1 shellcheck=0.5.0
Powered by Apache Yetus 0.12.0 https://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
Development

Successfully merging this pull request may close these issues.

4 participants