You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

370 lines
8.4 KiB

  1. // Copyright 2016 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // DO NOT EDIT. THIS IS AUTOMATICALLY GENERATED.
  15. // Run "go generate" to regenerate.
  16. //go:generate go run cbt.go -o cbtdoc.go doc
  17. /*
  18. Cbt is a tool for doing basic interactions with Cloud Bigtable. To learn how to
  19. install the cbt tool, see the
  20. [cbt overview](https://cloud.google.com/bigtable/docs/go/cbt-overview).
  21. Usage:
  22. cbt [options] command [arguments]
  23. The commands are:
  24. count Count rows in a table
  25. createinstance Create an instance with an initial cluster
  26. createcluster Create a cluster in the configured instance (replication alpha)
  27. createfamily Create a column family
  28. createtable Create a table
  29. updatecluster Update a cluster in the configured instance
  30. deleteinstance Deletes an instance
  31. deletecluster Deletes a cluster from the configured instance (replication alpha)
  32. deletecolumn Delete all cells in a column
  33. deletefamily Delete a column family
  34. deleterow Delete a row
  35. deletetable Delete a table
  36. doc Print godoc-suitable documentation for cbt
  37. help Print help text
  38. listinstances List instances in a project
  39. listclusters List instances in an instance
  40. lookup Read from a single row
  41. ls List tables and column families
  42. mddoc Print documentation for cbt in Markdown format
  43. read Read rows
  44. set Set value of a cell
  45. setgcpolicy Set the GC policy for a column family
  46. waitforreplication Blocks until all the completed writes have been replicated to all the clusters (replication alpha)
  47. createtablefromsnapshot Create a table from a snapshot (snapshots alpha)
  48. createsnapshot Create a snapshot from a source table (snapshots alpha)
  49. listsnapshots List snapshots in a cluster (snapshots alpha)
  50. getsnapshot Get snapshot info (snapshots alpha)
  51. deletesnapshot Delete snapshot in a cluster (snapshots alpha)
  52. version Print the current cbt version
  53. Use "cbt help <command>" for more information about a command.
  54. The options are:
  55. -project string
  56. project ID, if unset uses gcloud configured project
  57. -instance string
  58. Cloud Bigtable instance
  59. -creds string
  60. if set, use application credentials in this file
  61. Alpha features are not currently available to most Cloud Bigtable customers. The
  62. features might be changed in backward-incompatible ways and are not recommended
  63. for production use. They are not subject to any SLA or deprecation policy.
  64. For convenience, values of the -project, -instance, -creds,
  65. -admin-endpoint and -data-endpoint flags may be specified in
  66. ~/.cbtrc in this format:
  67. project = my-project-123
  68. instance = my-instance
  69. creds = path-to-account-key.json
  70. admin-endpoint = hostname:port
  71. data-endpoint = hostname:port
  72. All values are optional, and all will be overridden by flags.
  73. Count rows in a table
  74. Usage:
  75. cbt count <table>
  76. Create an instance with an initial cluster
  77. Usage:
  78. cbt createinstance <instance-id> <display-name> <cluster-id> <zone> <num-nodes> <storage type>
  79. instance-id Permanent, unique id for the instance
  80. display-name Description of the instance
  81. cluster-id Permanent, unique id for the cluster in the instance
  82. zone The zone in which to create the cluster
  83. num-nodes The number of nodes to create
  84. storage-type SSD or HDD
  85. Create a cluster in the configured instance (replication alpha)
  86. Usage:
  87. cbt createcluster <cluster-id> <zone> <num-nodes> <storage type>
  88. cluster-id Permanent, unique id for the cluster in the instance
  89. zone The zone in which to create the cluster
  90. num-nodes The number of nodes to create
  91. storage-type SSD or HDD
  92. Create a column family
  93. Usage:
  94. cbt createfamily <table> <family>
  95. Create a table
  96. Usage:
  97. cbt createtable <table> [families=family[:(maxage=<d> | maxversions=<n>)],...] [splits=split,...]
  98. families: Column families and their associated GC policies. See "setgcpolicy".
  99. Example: families=family1:maxage=1w,family2:maxversions=1
  100. splits: Row key to be used to initially split the table
  101. Update a cluster in the configured instance
  102. Usage:
  103. cbt updatecluster <cluster-id> [num-nodes=num-nodes]
  104. cluster-id Permanent, unique id for the cluster in the instance
  105. num-nodes The number of nodes to update to
  106. Deletes an instance
  107. Usage:
  108. cbt deleteinstance <instance>
  109. Deletes a cluster from the configured instance (replication alpha)
  110. Usage:
  111. cbt deletecluster <cluster>
  112. Delete all cells in a column
  113. Usage:
  114. cbt deletecolumn <table> <row> <family> <column> [app-profile=<app profile id>]
  115. app-profile=<app profile id> The app profile id to use for the request (replication alpha)
  116. Delete a column family
  117. Usage:
  118. cbt deletefamily <table> <family>
  119. Delete a row
  120. Usage:
  121. cbt deleterow <table> <row> [app-profile=<app profile id>]
  122. app-profile=<app profile id> The app profile id to use for the request (replication alpha)
  123. Delete a table
  124. Usage:
  125. cbt deletetable <table>
  126. Print godoc-suitable documentation for cbt
  127. Usage:
  128. cbt doc
  129. Print help text
  130. Usage:
  131. cbt help [command]
  132. List instances in a project
  133. Usage:
  134. cbt listinstances
  135. List instances in an instance
  136. Usage:
  137. cbt listclusters
  138. Read from a single row
  139. Usage:
  140. cbt lookup <table> <row> [cells-per-column=<n>] [app-profile=<app profile id>]
  141. cells-per-column=<n> Read only this many cells per column
  142. app-profile=<app profile id> The app profile id to use for the request (replication alpha)
  143. List tables and column families
  144. Usage:
  145. cbt ls List tables
  146. cbt ls <table> List column families in <table>
  147. Print documentation for cbt in Markdown format
  148. Usage:
  149. cbt mddoc
  150. Read rows
  151. Usage:
  152. cbt read <table> [start=<row>] [end=<row>] [prefix=<prefix>] [regex=<regex>] [count=<n>] [cells-per-column=<n>] [app-profile=<app profile id>]
  153. start=<row> Start reading at this row
  154. end=<row> Stop reading before this row
  155. prefix=<prefix> Read rows with this prefix
  156. regex=<regex> Read rows with keys matching this regex
  157. count=<n> Read only this many rows
  158. cells-per-column=<n> Read only this many cells per column
  159. app-profile=<app profile id> The app profile id to use for the request (replication alpha)
  160. Set value of a cell
  161. Usage:
  162. cbt set <table> <row> [app-profile=<app profile id>] family:column=val[@ts] ...
  163. app-profile=<app profile id> The app profile id to use for the request (replication alpha)
  164. family:column=val[@ts] may be repeated to set multiple cells.
  165. ts is an optional integer timestamp.
  166. If it cannot be parsed, the `@ts` part will be
  167. interpreted as part of the value.
  168. Set the GC policy for a column family
  169. Usage:
  170. cbt setgcpolicy <table> <family> ( maxage=<d> | maxversions=<n> )
  171. maxage=<d> Maximum timestamp age to preserve (e.g. "1h", "4d")
  172. maxversions=<n> Maximum number of versions to preserve
  173. Blocks until all the completed writes have been replicated to all the clusters (replication alpha)
  174. Usage:
  175. cbt waitforreplication <table>
  176. Create a table from a snapshot (snapshots alpha)
  177. Usage:
  178. cbt createtablefromsnapshot <table> <cluster> <snapshot>
  179. table The name of the table to create
  180. cluster The cluster where the snapshot is located
  181. snapshot The snapshot to restore
  182. Create a snapshot from a source table (snapshots alpha)
  183. Usage:
  184. cbt createsnapshot <cluster> <snapshot> <table> [ttl=<d>]
  185. [ttl=<d>] Lifespan of the snapshot (e.g. "1h", "4d")
  186. List snapshots in a cluster (snapshots alpha)
  187. Usage:
  188. cbt listsnapshots [<cluster>]
  189. Get snapshot info (snapshots alpha)
  190. Usage:
  191. cbt getsnapshot <cluster> <snapshot>
  192. Delete snapshot in a cluster (snapshots alpha)
  193. Usage:
  194. cbt deletesnapshot <cluster> <snapshot>
  195. Print the current cbt version
  196. Usage:
  197. cbt version
  198. */
  199. package main