Hbase.thrift 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. // ----------------------------------------------------------------
  19. // Hbase.thrift
  20. //
  21. // This is a Thrift interface definition file for the Hbase service.
  22. // Target language libraries for C++, Java, Ruby, PHP, (and more) are
  23. // generated by running this file through the Thrift compiler with the
  24. // appropriate flags. The Thrift compiler binary and runtime
  25. // libraries for various languages are available
  26. // from the Apache Incubator (http://incubator.apache.org/thrift/)
  27. //
  28. // See the package.html file for information on the version of Thrift
  29. // used to generate the *.java files checked into the Hbase project.
  30. // ----------------------------------------------------------------
  31. namespace java org.apache.hadoop.hbase.thrift.generated
  32. namespace cpp apache.hadoop.hbase.thrift
  33. namespace rb Apache.Hadoop.Hbase.Thrift
  34. namespace py hbased
  35. namespace perl Hbased
  36. namespace php Hbased
  37. //
  38. // Types
  39. //
  40. // NOTE: all variables with the Text type are assumed to be correctly
  41. // formatted UTF-8 strings. This is a programming language and locale
  42. // dependent property that the client application is repsonsible for
  43. // maintaining. If strings with an invalid encoding are sent, an
  44. // IOError will be thrown.
  45. typedef binary Text
  46. typedef binary Bytes
  47. typedef i32 ScannerID
  48. /**
  49. * TCell - Used to transport a cell value (byte[]) and the timestamp it was
  50. * stored with together as a result for get and getRow methods. This promotes
  51. * the timestamp of a cell to a first-class value, making it easy to take
  52. * note of temporal data. Cell is used all the way from HStore up to HTable.
  53. */
  54. struct TCell{
  55. 1:Bytes value,
  56. 2:i64 timestamp
  57. }
  58. /**
  59. * An HColumnDescriptor contains information about a column family
  60. * such as the number of versions, compression settings, etc. It is
  61. * used as input when creating a table or adding a column.
  62. */
  63. struct ColumnDescriptor {
  64. 1:Text name,
  65. 2:i32 maxVersions = 3,
  66. 3:string compression = "NONE",
  67. 4:bool inMemory = 0,
  68. 5:string bloomFilterType = "NONE",
  69. 6:i32 bloomFilterVectorSize = 0,
  70. 7:i32 bloomFilterNbHashes = 0,
  71. 8:bool blockCacheEnabled = 0,
  72. 9:i32 timeToLive = -1
  73. }
  74. /**
  75. * A TRegionInfo contains information about an HTable region.
  76. */
  77. struct TRegionInfo {
  78. 1:Text startKey,
  79. 2:Text endKey,
  80. 3:i64 id,
  81. 4:Text name,
  82. 5:byte version,
  83. 6:Text serverName,
  84. 7:i32 port
  85. }
  86. /**
  87. * A Mutation object is used to either update or delete a column-value.
  88. */
  89. struct Mutation {
  90. 1:bool isDelete = 0,
  91. 2:Text column,
  92. 3:Text value,
  93. 4:bool writeToWAL = 1
  94. }
  95. /**
  96. * A BatchMutation object is used to apply a number of Mutations to a single row.
  97. */
  98. struct BatchMutation {
  99. 1:Text row,
  100. 2:list<Mutation> mutations
  101. }
  102. /**
  103. * For increments that are not incrementColumnValue
  104. * equivalents.
  105. */
  106. struct TIncrement {
  107. 1:Text table,
  108. 2:Text row,
  109. 3:Text column,
  110. 4:i64 ammount
  111. }
  112. /**
  113. * Holds row name and then a map of columns to cells.
  114. */
  115. struct TRowResult {
  116. 1:Text row,
  117. 2:map<Text, TCell> columns
  118. }
  119. /**
  120. * A Scan object is used to specify scanner parameters when opening a scanner.
  121. */
  122. struct TScan {
  123. 1:optional Text startRow,
  124. 2:optional Text stopRow,
  125. 3:optional i64 timestamp,
  126. 4:optional list<Text> columns,
  127. 5:optional i32 caching,
  128. 6:optional Text filterString,
  129. 7:optional i32 batchSize
  130. }
  131. //
  132. // Exceptions
  133. //
  134. /**
  135. * An IOError exception signals that an error occurred communicating
  136. * to the Hbase master or an Hbase region server. Also used to return
  137. * more general Hbase error conditions.
  138. */
  139. exception IOError {
  140. 1:string message
  141. }
  142. /**
  143. * An IllegalArgument exception indicates an illegal or invalid
  144. * argument was passed into a procedure.
  145. */
  146. exception IllegalArgument {
  147. 1:string message
  148. }
  149. /**
  150. * An AlreadyExists exceptions signals that a table with the specified
  151. * name already exists
  152. */
  153. exception AlreadyExists {
  154. 1:string message
  155. }
  156. //
  157. // Service
  158. //
  159. service Hbase {
  160. /**
  161. * Brings a table on-line (enables it)
  162. */
  163. void enableTable(
  164. /** name of the table */
  165. 1:Bytes tableName
  166. ) throws (1:IOError io)
  167. /**
  168. * Disables a table (takes it off-line) If it is being served, the master
  169. * will tell the servers to stop serving it.
  170. */
  171. void disableTable(
  172. /** name of the table */
  173. 1:Bytes tableName
  174. ) throws (1:IOError io)
  175. /**
  176. * @return true if table is on-line
  177. */
  178. bool isTableEnabled(
  179. /** name of the table to check */
  180. 1:Bytes tableName
  181. ) throws (1:IOError io)
  182. void compact(1:Bytes tableNameOrRegionName)
  183. throws (1:IOError io)
  184. void majorCompact(1:Bytes tableNameOrRegionName)
  185. throws (1:IOError io)
  186. /**
  187. * List all the userspace tables.
  188. *
  189. * @return returns a list of names
  190. */
  191. list<Text> getTableNames()
  192. throws (1:IOError io)
  193. /**
  194. * List all the column families assoicated with a table.
  195. *
  196. * @return list of column family descriptors
  197. */
  198. map<Text,ColumnDescriptor> getColumnDescriptors (
  199. /** table name */
  200. 1:Text tableName
  201. ) throws (1:IOError io)
  202. /**
  203. * List the regions associated with a table.
  204. *
  205. * @return list of region descriptors
  206. */
  207. list<TRegionInfo> getTableRegions(
  208. /** table name */
  209. 1:Text tableName)
  210. throws (1:IOError io)
  211. /**
  212. * Create a table with the specified column families. The name
  213. * field for each ColumnDescriptor must be set and must end in a
  214. * colon (:). All other fields are optional and will get default
  215. * values if not explicitly specified.
  216. *
  217. * @throws IllegalArgument if an input parameter is invalid
  218. *
  219. * @throws AlreadyExists if the table name already exists
  220. */
  221. void createTable(
  222. /** name of table to create */
  223. 1:Text tableName,
  224. /** list of column family descriptors */
  225. 2:list<ColumnDescriptor> columnFamilies
  226. ) throws (1:IOError io, 2:IllegalArgument ia, 3:AlreadyExists exist)
  227. /**
  228. * Deletes a table
  229. *
  230. * @throws IOError if table doesn't exist on server or there was some other
  231. * problem
  232. */
  233. void deleteTable(
  234. /** name of table to delete */
  235. 1:Text tableName
  236. ) throws (1:IOError io)
  237. /**
  238. * Get a single TCell for the specified table, row, and column at the
  239. * latest timestamp. Returns an empty list if no such value exists.
  240. *
  241. * @return value for specified row/column
  242. */
  243. list<TCell> get(
  244. /** name of table */
  245. 1:Text tableName,
  246. /** row key */
  247. 2:Text row,
  248. /** column name */
  249. 3:Text column,
  250. /** Get attributes */
  251. 4:map<Text, Text> attributes
  252. ) throws (1:IOError io)
  253. /**
  254. * Get the specified number of versions for the specified table,
  255. * row, and column.
  256. *
  257. * @return list of cells for specified row/column
  258. */
  259. list<TCell> getVer(
  260. /** name of table */
  261. 1:Text tableName,
  262. /** row key */
  263. 2:Text row,
  264. /** column name */
  265. 3:Text column,
  266. /** number of versions to retrieve */
  267. 4:i32 numVersions,
  268. /** Get attributes */
  269. 5:map<Text, Text> attributes
  270. ) throws (1:IOError io)
  271. /**
  272. * Get the specified number of versions for the specified table,
  273. * row, and column. Only versions less than or equal to the specified
  274. * timestamp will be returned.
  275. *
  276. * @return list of cells for specified row/column
  277. */
  278. list<TCell> getVerTs(
  279. /** name of table */
  280. 1:Text tableName,
  281. /** row key */
  282. 2:Text row,
  283. /** column name */
  284. 3:Text column,
  285. /** timestamp */
  286. 4:i64 timestamp,
  287. /** number of versions to retrieve */
  288. 5:i32 numVersions,
  289. /** Get attributes */
  290. 6:map<Text, Text> attributes
  291. ) throws (1:IOError io)
  292. /**
  293. * Get all the data for the specified table and row at the latest
  294. * timestamp. Returns an empty list if the row does not exist.
  295. *
  296. * @return TRowResult containing the row and map of columns to TCells
  297. */
  298. list<TRowResult> getRow(
  299. /** name of table */
  300. 1:Text tableName,
  301. /** row key */
  302. 2:Text row,
  303. /** Get attributes */
  304. 3:map<Text, Text> attributes
  305. ) throws (1:IOError io)
  306. /**
  307. * Get the specified columns for the specified table and row at the latest
  308. * timestamp. Returns an empty list if the row does not exist.
  309. *
  310. * @return TRowResult containing the row and map of columns to TCells
  311. */
  312. list<TRowResult> getRowWithColumns(
  313. /** name of table */
  314. 1:Text tableName,
  315. /** row key */
  316. 2:Text row,
  317. /** List of columns to return, null for all columns */
  318. 3:list<Text> columns,
  319. /** Get attributes */
  320. 4:map<Text, Text> attributes
  321. ) throws (1:IOError io)
  322. /**
  323. * Get all the data for the specified table and row at the specified
  324. * timestamp. Returns an empty list if the row does not exist.
  325. *
  326. * @return TRowResult containing the row and map of columns to TCells
  327. */
  328. list<TRowResult> getRowTs(
  329. /** name of the table */
  330. 1:Text tableName,
  331. /** row key */
  332. 2:Text row,
  333. /** timestamp */
  334. 3:i64 timestamp,
  335. /** Get attributes */
  336. 4:map<Text, Text> attributes
  337. ) throws (1:IOError io)
  338. /**
  339. * Get the specified columns for the specified table and row at the specified
  340. * timestamp. Returns an empty list if the row does not exist.
  341. *
  342. * @return TRowResult containing the row and map of columns to TCells
  343. */
  344. list<TRowResult> getRowWithColumnsTs(
  345. /** name of table */
  346. 1:Text tableName,
  347. /** row key */
  348. 2:Text row,
  349. /** List of columns to return, null for all columns */
  350. 3:list<Text> columns,
  351. 4:i64 timestamp,
  352. /** Get attributes */
  353. 5:map<Text, Text> attributes
  354. ) throws (1:IOError io)
  355. /**
  356. * Get all the data for the specified table and rows at the latest
  357. * timestamp. Returns an empty list if no rows exist.
  358. *
  359. * @return TRowResult containing the rows and map of columns to TCells
  360. */
  361. list<TRowResult> getRows(
  362. /** name of table */
  363. 1:Text tableName,
  364. /** row keys */
  365. 2:list<Text> rows
  366. /** Get attributes */
  367. 3:map<Text, Text> attributes
  368. ) throws (1:IOError io)
  369. /**
  370. * Get the specified columns for the specified table and rows at the latest
  371. * timestamp. Returns an empty list if no rows exist.
  372. *
  373. * @return TRowResult containing the rows and map of columns to TCells
  374. */
  375. list<TRowResult> getRowsWithColumns(
  376. /** name of table */
  377. 1:Text tableName,
  378. /** row keys */
  379. 2:list<Text> rows,
  380. /** List of columns to return, null for all columns */
  381. 3:list<Text> columns,
  382. /** Get attributes */
  383. 4:map<Text, Text> attributes
  384. ) throws (1:IOError io)
  385. /**
  386. * Get all the data for the specified table and rows at the specified
  387. * timestamp. Returns an empty list if no rows exist.
  388. *
  389. * @return TRowResult containing the rows and map of columns to TCells
  390. */
  391. list<TRowResult> getRowsTs(
  392. /** name of the table */
  393. 1:Text tableName,
  394. /** row keys */
  395. 2:list<Text> rows
  396. /** timestamp */
  397. 3:i64 timestamp,
  398. /** Get attributes */
  399. 4:map<Text, Text> attributes
  400. ) throws (1:IOError io)
  401. /**
  402. * Get the specified columns for the specified table and rows at the specified
  403. * timestamp. Returns an empty list if no rows exist.
  404. *
  405. * @return TRowResult containing the rows and map of columns to TCells
  406. */
  407. list<TRowResult> getRowsWithColumnsTs(
  408. /** name of table */
  409. 1:Text tableName,
  410. /** row keys */
  411. 2:list<Text> rows
  412. /** List of columns to return, null for all columns */
  413. 3:list<Text> columns,
  414. 4:i64 timestamp,
  415. /** Get attributes */
  416. 5:map<Text, Text> attributes
  417. ) throws (1:IOError io)
  418. /**
  419. * Apply a series of mutations (updates/deletes) to a row in a
  420. * single transaction. If an exception is thrown, then the
  421. * transaction is aborted. Default current timestamp is used, and
  422. * all entries will have an identical timestamp.
  423. */
  424. void mutateRow(
  425. /** name of table */
  426. 1:Text tableName,
  427. /** row key */
  428. 2:Text row,
  429. /** list of mutation commands */
  430. 3:list<Mutation> mutations,
  431. /** Mutation attributes */
  432. 4:map<Text, Text> attributes
  433. ) throws (1:IOError io, 2:IllegalArgument ia)
  434. /**
  435. * Apply a series of mutations (updates/deletes) to a row in a
  436. * single transaction. If an exception is thrown, then the
  437. * transaction is aborted. The specified timestamp is used, and
  438. * all entries will have an identical timestamp.
  439. */
  440. void mutateRowTs(
  441. /** name of table */
  442. 1:Text tableName,
  443. /** row key */
  444. 2:Text row,
  445. /** list of mutation commands */
  446. 3:list<Mutation> mutations,
  447. /** timestamp */
  448. 4:i64 timestamp,
  449. /** Mutation attributes */
  450. 5:map<Text, Text> attributes
  451. ) throws (1:IOError io, 2:IllegalArgument ia)
  452. /**
  453. * Apply a series of batches (each a series of mutations on a single row)
  454. * in a single transaction. If an exception is thrown, then the
  455. * transaction is aborted. Default current timestamp is used, and
  456. * all entries will have an identical timestamp.
  457. */
  458. void mutateRows(
  459. /** name of table */
  460. 1:Text tableName,
  461. /** list of row batches */
  462. 2:list<BatchMutation> rowBatches,
  463. /** Mutation attributes */
  464. 3:map<Text, Text> attributes
  465. ) throws (1:IOError io, 2:IllegalArgument ia)
  466. /**
  467. * Apply a series of batches (each a series of mutations on a single row)
  468. * in a single transaction. If an exception is thrown, then the
  469. * transaction is aborted. The specified timestamp is used, and
  470. * all entries will have an identical timestamp.
  471. */
  472. void mutateRowsTs(
  473. /** name of table */
  474. 1:Text tableName,
  475. /** list of row batches */
  476. 2:list<BatchMutation> rowBatches,
  477. /** timestamp */
  478. 3:i64 timestamp,
  479. /** Mutation attributes */
  480. 4:map<Text, Text> attributes
  481. ) throws (1:IOError io, 2:IllegalArgument ia)
  482. /**
  483. * Atomically increment the column value specified. Returns the next value post increment.
  484. */
  485. i64 atomicIncrement(
  486. /** name of table */
  487. 1:Text tableName,
  488. /** row to increment */
  489. 2:Text row,
  490. /** name of column */
  491. 3:Text column,
  492. /** amount to increment by */
  493. 4:i64 value
  494. ) throws (1:IOError io, 2:IllegalArgument ia)
  495. /**
  496. * Delete all cells that match the passed row and column.
  497. */
  498. void deleteAll(
  499. /** name of table */
  500. 1:Text tableName,
  501. /** Row to update */
  502. 2:Text row,
  503. /** name of column whose value is to be deleted */
  504. 3:Text column,
  505. /** Delete attributes */
  506. 4:map<Text, Text> attributes
  507. ) throws (1:IOError io)
  508. /**
  509. * Delete all cells that match the passed row and column and whose
  510. * timestamp is equal-to or older than the passed timestamp.
  511. */
  512. void deleteAllTs(
  513. /** name of table */
  514. 1:Text tableName,
  515. /** Row to update */
  516. 2:Text row,
  517. /** name of column whose value is to be deleted */
  518. 3:Text column,
  519. /** timestamp */
  520. 4:i64 timestamp,
  521. /** Delete attributes */
  522. 5:map<Text, Text> attributes
  523. ) throws (1:IOError io)
  524. /**
  525. * Completely delete the row's cells.
  526. */
  527. void deleteAllRow(
  528. /** name of table */
  529. 1:Text tableName,
  530. /** key of the row to be completely deleted. */
  531. 2:Text row,
  532. /** Delete attributes */
  533. 3:map<Text, Text> attributes
  534. ) throws (1:IOError io)
  535. /**
  536. * Increment a cell by the ammount.
  537. * Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true.
  538. * False is the default. Turn to true if you need the extra performance and can accept some
  539. * data loss if a thrift server dies with increments still in the queue.
  540. */
  541. void increment(
  542. /** The single increment to apply */
  543. 1:TIncrement increment
  544. ) throws (1:IOError io)
  545. void incrementRows(
  546. /** The list of increments */
  547. 1:list<TIncrement> increments
  548. ) throws (1:IOError io)
  549. /**
  550. * Completely delete the row's cells marked with a timestamp
  551. * equal-to or older than the passed timestamp.
  552. */
  553. void deleteAllRowTs(
  554. /** name of table */
  555. 1:Text tableName,
  556. /** key of the row to be completely deleted. */
  557. 2:Text row,
  558. /** timestamp */
  559. 3:i64 timestamp,
  560. /** Delete attributes */
  561. 4:map<Text, Text> attributes
  562. ) throws (1:IOError io)
  563. /**
  564. * Get a scanner on the current table, using the Scan instance
  565. * for the scan parameters.
  566. */
  567. ScannerID scannerOpenWithScan(
  568. /** name of table */
  569. 1:Text tableName,
  570. /** Scan instance */
  571. 2:TScan scan,
  572. /** Scan attributes */
  573. 3:map<Text, Text> attributes
  574. ) throws (1:IOError io)
  575. /**
  576. * Get a scanner on the current table starting at the specified row and
  577. * ending at the last row in the table. Return the specified columns.
  578. *
  579. * @return scanner id to be used with other scanner procedures
  580. */
  581. ScannerID scannerOpen(
  582. /** name of table */
  583. 1:Text tableName,
  584. /**
  585. * Starting row in table to scan.
  586. * Send "" (empty string) to start at the first row.
  587. */
  588. 2:Text startRow,
  589. /**
  590. * columns to scan. If column name is a column family, all
  591. * columns of the specified column family are returned. It's also possible
  592. * to pass a regex in the column qualifier.
  593. */
  594. 3:list<Text> columns,
  595. /** Scan attributes */
  596. 4:map<Text, Text> attributes
  597. ) throws (1:IOError io)
  598. /**
  599. * Get a scanner on the current table starting and stopping at the
  600. * specified rows. ending at the last row in the table. Return the
  601. * specified columns.
  602. *
  603. * @return scanner id to be used with other scanner procedures
  604. */
  605. ScannerID scannerOpenWithStop(
  606. /** name of table */
  607. 1:Text tableName,
  608. /**
  609. * Starting row in table to scan.
  610. * Send "" (empty string) to start at the first row.
  611. */
  612. 2:Text startRow,
  613. /**
  614. * row to stop scanning on. This row is *not* included in the
  615. * scanner's results
  616. */
  617. 3:Text stopRow,
  618. /**
  619. * columns to scan. If column name is a column family, all
  620. * columns of the specified column family are returned. It's also possible
  621. * to pass a regex in the column qualifier.
  622. */
  623. 4:list<Text> columns,
  624. /** Scan attributes */
  625. 5:map<Text, Text> attributes
  626. ) throws (1:IOError io)
  627. /**
  628. * Open a scanner for a given prefix. That is all rows will have the specified
  629. * prefix. No other rows will be returned.
  630. *
  631. * @return scanner id to use with other scanner calls
  632. */
  633. ScannerID scannerOpenWithPrefix(
  634. /** name of table */
  635. 1:Text tableName,
  636. /** the prefix (and thus start row) of the keys you want */
  637. 2:Text startAndPrefix,
  638. /** the columns you want returned */
  639. 3:list<Text> columns,
  640. /** Scan attributes */
  641. 4:map<Text, Text> attributes
  642. ) throws (1:IOError io)
  643. /**
  644. * Get a scanner on the current table starting at the specified row and
  645. * ending at the last row in the table. Return the specified columns.
  646. * Only values with the specified timestamp are returned.
  647. *
  648. * @return scanner id to be used with other scanner procedures
  649. */
  650. ScannerID scannerOpenTs(
  651. /** name of table */
  652. 1:Text tableName,
  653. /**
  654. * Starting row in table to scan.
  655. * Send "" (empty string) to start at the first row.
  656. */
  657. 2:Text startRow,
  658. /**
  659. * columns to scan. If column name is a column family, all
  660. * columns of the specified column family are returned. It's also possible
  661. * to pass a regex in the column qualifier.
  662. */
  663. 3:list<Text> columns,
  664. /** timestamp */
  665. 4:i64 timestamp,
  666. /** Scan attributes */
  667. 5:map<Text, Text> attributes
  668. ) throws (1:IOError io)
  669. /**
  670. * Get a scanner on the current table starting and stopping at the
  671. * specified rows. ending at the last row in the table. Return the
  672. * specified columns. Only values with the specified timestamp are
  673. * returned.
  674. *
  675. * @return scanner id to be used with other scanner procedures
  676. */
  677. ScannerID scannerOpenWithStopTs(
  678. /** name of table */
  679. 1:Text tableName,
  680. /**
  681. * Starting row in table to scan.
  682. * Send "" (empty string) to start at the first row.
  683. */
  684. 2:Text startRow,
  685. /**
  686. * row to stop scanning on. This row is *not* included in the
  687. * scanner's results
  688. */
  689. 3:Text stopRow,
  690. /**
  691. * columns to scan. If column name is a column family, all
  692. * columns of the specified column family are returned. It's also possible
  693. * to pass a regex in the column qualifier.
  694. */
  695. 4:list<Text> columns,
  696. /** timestamp */
  697. 5:i64 timestamp,
  698. /** Scan attributes */
  699. 6:map<Text, Text> attributes
  700. ) throws (1:IOError io)
  701. /**
  702. * Returns the scanner's current row value and advances to the next
  703. * row in the table. When there are no more rows in the table, or a key
  704. * greater-than-or-equal-to the scanner's specified stopRow is reached,
  705. * an empty list is returned.
  706. *
  707. * @return a TRowResult containing the current row and a map of the columns to TCells.
  708. *
  709. * @throws IllegalArgument if ScannerID is invalid
  710. *
  711. * @throws NotFound when the scanner reaches the end
  712. */
  713. list<TRowResult> scannerGet(
  714. /** id of a scanner returned by scannerOpen */
  715. 1:ScannerID id
  716. ) throws (1:IOError io, 2:IllegalArgument ia)
  717. /**
  718. * Returns, starting at the scanner's current row value nbRows worth of
  719. * rows and advances to the next row in the table. When there are no more
  720. * rows in the table, or a key greater-than-or-equal-to the scanner's
  721. * specified stopRow is reached, an empty list is returned.
  722. *
  723. * @return a TRowResult containing the current row and a map of the columns to TCells.
  724. *
  725. * @throws IllegalArgument if ScannerID is invalid
  726. *
  727. * @throws NotFound when the scanner reaches the end
  728. */
  729. list<TRowResult> scannerGetList(
  730. /** id of a scanner returned by scannerOpen */
  731. 1:ScannerID id,
  732. /** number of results to return */
  733. 2:i32 nbRows
  734. ) throws (1:IOError io, 2:IllegalArgument ia)
  735. /**
  736. * Closes the server-state associated with an open scanner.
  737. *
  738. * @throws IllegalArgument if ScannerID is invalid
  739. */
  740. void scannerClose(
  741. /** id of a scanner returned by scannerOpen */
  742. 1:ScannerID id
  743. ) throws (1:IOError io, 2:IllegalArgument ia)
  744. /**
  745. * Get the row just before the specified one.
  746. *
  747. * @return value for specified row/column
  748. */
  749. list<TCell> getRowOrBefore(
  750. /** name of table */
  751. 1:Text tableName,
  752. /** row key */
  753. 2:Text row,
  754. /** column name */
  755. 3:Text family
  756. ) throws (1:IOError io)
  757. /**
  758. * Get the regininfo for the specified row. It scans
  759. * the metatable to find region's start and end keys.
  760. *
  761. * @return value for specified row/column
  762. */
  763. TRegionInfo getRegionInfo(
  764. /** row key */
  765. 1:Text row,
  766. ) throws (1:IOError io)
  767. }