Comments (3)
Your request sounds reasonable. However I think the common case is the one where you do want a separator for legibility reasons, so having a table_prefix_separator doesn't look that bad to me. Additionally, it wouldn't break existing code. (Although I doubt that there is much stable production code using HappyBase, since it's still a really young project.)
If the separator is part of the prefix, users end up with ugly strings like "foo_" in their code in the common case. HappyBase was designed to hide ugly code (Thrift!) after all!
from happybase.
Cheers for fixing this! I still think Connection(table_prefix="cleese_")
reads better than Connection(table_prefix="cleese", table_prefix_separator="_")
, but guess that's personal taste :)
from happybase.
Your example is not realistic, since the table_prefix_separator argument is optional. Your example would rather look like this:
c = Connection(table_prefix="cleese")
…which I think is rather clean. Only if you want a different separator, the code would become a bit more verbose.
Btw, I don't see why one would not want an underscore separator between the prefix and the table name itself. Having an underscore in the name makes the web status reports for master and region nodes easier to read, and also the output of commands like list
in the HBase shell. If one is forced to work with existing tables, things may be different, but friendly code should make the common case easy, and the uncommon case possible. Anyway, I agree with PEP20 that beautiful is better than ugly. :)
Note that the HBase storage model does not penalise long table table names, in contrast to long column names. Column names (both family and qualifier) are written to disk for each KeyValue
instance, whereas the table names are only used as directory names and contained in keys in some of the metadata tables.
from happybase.
Related Issues (20)
- Fix simple typo: specifed, -> specified,
- How does happyhbase fuzzy query rowkey HOT 3
- Support Pre-Split when create table ?
- HBase remotely connecting to python project HOT 7
- Support gevent?
- suppot count table rows? HOT 1
- org.apache.hadoop.hbase.NamespaceNotFoundException: HOT 4
- [feature] Support reconnect host when connectionpool raise error HOT 2
- thriftpy2.protocol.exc.TProtocolException: Bad protocol id in the message: 72 HOT 4
- happybase 1.2.0 supports hbase 2.2.5 ? HOT 1
- How can I do a query for specific columns by regex-statement HOT 2
- TTransportException: TTransportException(type=4, message='TSocket read 0 bytes') HOT 4
- TypeError: __str__ returned non-string (type bytes) hbase HOT 6
- import happybase error HOT 1
- Does it support snapshot management? HOT 1
- Is there a way to update / modify TTL (time to leave) on already created table ? HOT 1
- Hbase compatibility
- Table Put - How Do We Assign And Use A Variable For the 'Row Key' HOT 8
- compact_table major no work
- 使用happybase创建连接池并扫描整张表一段时间以后报错 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from happybase.