dhermes / gcloud-python-bigtable

Early Attempt at Supporting Google Cloud Bigtable (an extension to gcloud-python)
http://gcloud-python-bigtable.readthedocs.org/en/latest/
Apache License 2.0
3 stars 3 forks source link

Why do we need to specify admin in the Client? #5

Open jgeewax opened 9 years ago

jgeewax commented 9 years ago

Referring to ... https://github.com/dhermes/gcloud-python-bigtable/blob/master/docs/client-intro.rst#admin-api-access

Isn't there a cleaner way of not needing the ask the user ahead of time? or maybe it would make more sense to have a sub-class client? (AdminClient()?)

dhermes commented 9 years ago

Here is my take: Creating/Deleting/Updating clusters and tables is an infrequent and expensive thing and doing it by accident could be very bad.

This is somewhat "confirmed" by the BT folks we've interacted with saying "ignore the cluster admin API, create via the cloud console".

This way, users at least need to actively decide to use them.

Making a subclass accomplishes this same thing (at no gain, actually for me it's a bit of a loss since there is now a do-nothing subclass).

If the user tries to use a client without admin=True for interacting with clusters/tables, then they will get a helpful-ish error message.

dhermes commented 9 years ago

/cc @tseaver