HBASE-10346 Add Documentation for stateless scanner ADDENDUM (Vandana Ayyalasomayajula)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1559269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ndimiduk 2014-01-17 22:19:02 +00:00
parent 9f949e12e7
commit 697c0fec38
1 changed files with 67 additions and 51 deletions

View File

@ -1192,8 +1192,9 @@ Content-Length: 0<br>
GET /&lt;table&gt;/&lt;optional_row_prefix&gt;*?&lt;scan_parameters&gt;
</pre>
<p align="justify">
The current scanner API expects clients to restart scans if there is a REST server failure in the midst. The stateless
does not store any state related to scan operation and all the parameters are specified as query parameters.
The current scanner API expects clients to restart scans if there is a REST server failure in the
midst. The stateless does not store any state related to scan operation and all the parameters
are specified as query parameters.
<p>
<p>
The following are the scan parameters
@ -1201,7 +1202,8 @@ Content-Length: 0<br>
<li>startrow - The start row for the scan.</li>
<li>endrow - The end row for the scan.</li>
<li>columns - The columns to scan.</li>
<li>starttime, endtime - To only retrieve columns within a specific range of version timestamps,both start and end time must be specified.</li>
<li>starttime, endtime - To only retrieve columns within a specific range of version timestamps,
both start and end time must be specified.</li>
<li>maxversions - To limit the number of versions of each column to be returned.</li>
<li>batchsize - To limit the maximum number of values returned for each call to next().</li>
<li>limit - The number of rows to return in the scan operation.</li>
@ -1211,13 +1213,17 @@ Content-Length: 0<br>
More on start row, end row and limit parameters.
<ol>
<li>If start row, end row and limit not specified, then the whole table will be scanned.</li>
<li>If start row and limit (say N) is specified, then the scan operation will return N rows from the start row specified.</li>
<li>If only limit parameter is specified, then the scan operation will return N rows from the start of the table.</li>
<li>If limit and end row are specified, then the scan operation will return N rows from start of table till the end row. If the end
row is reached before N rows ( say M and M &lt; N ), then M rows will be returned to the user.</li>
<li>If start row, end row and limit (say N ) are specified and N &lt; number of rows between start row and end row, then N rows from
start row will be returned to the user. If N &gt; (number of rows between start row and end row (say M), then M number of rows
will be returned to the user.</li>
<li>If start row and limit (say N) is specified, then the scan operation will return N rows from
the start row specified.</li>
<li>If only limit parameter is specified, then the scan operation will return N rows from the
start of the table.</li>
<li>If limit and end row are specified, then the scan operation will return N rows from start
of table till the end row. If the end row is reached before N rows ( say M and M &lt; N ),
then M rows will be returned to the user.</li>
<li>If start row, end row and limit (say N ) are specified and N &lt; number of rows between
start row and end row, then N rows from start row will be returned to the user. If N &gt;
(number of rows between start row and end row (say M), then M number of rows will be returned
to the user.</li>
</ol>
<p>
<p><b>Examples</b><p>
@ -1244,12 +1250,12 @@ curl -H "Accept: application/json" https://localhost:8080/ExampleScanner/*
</pre>
<p>
<tt>
{"Row":[{"key":"dGVzdHJvdzE=","Cell":[{"column":"YTox","timestamp":1389900769772,"$":"dGVzdHZhbHVlLWEx"},<br>
{"column":"Yjox","timestamp":1389900780536,"$":"dGVzdHZhbHVlLWIx"}]},{"key":"dGVzdHJvdzI=","Cell":[{"column":<br>
"YTox","timestamp":1389900823877,"$":"dGVzdHZhbHVlLWEy"}{"column":"Yjox",<br>
"timestamp":1389900818233,"$":"dGVzdHZhbHVlLWIy"}]},{"key":"dGVzdHJvdzM=","Cell":[{"column":"YTox",<br>
"timestamp":1389900847336,"$":"dGVzdHZhbHVlLWEz"},{"column":"Yjox","timestamp":1389900856845,"$":"dGVzdHZhbHVlLWIz"}]}]}<br>
<br>
{"Row":[{"key":"dGVzdHJvdzE=","Cell":[{"column":"YTox","timestamp":1389900769772,<br>
"$":"dGVzdHZhbHVlLWEx"},{"column":"Yjox","timestamp":1389900780536,"$":"dGVzdHZhbHVlLWIx"}]},<br>
{"key":"dGVzdHJvdzI=","Cell":[{"column":"YTox","timestamp":1389900823877,"$":"dGVzdHZhbHVlLWEy"}<br>
{"column":"Yjox","timestamp":1389900818233,"$":"dGVzdHZhbHVlLWIy"}]},{"key":"dGVzdHJvdzM=",<br>
"Cell":[{"column":"YTox","timestamp":1389900847336,"$":"dGVzdHZhbHVlLWEz"},{"column":"Yjox",<br>
"timestamp":1389900856845,"$":"dGVzdHZhbHVlLWIz"}]}]}<br>
</tt>
<p>
</li>
@ -1261,13 +1267,14 @@ curl -H "Content-Type: text/xml" https://localhost:8080/ExampleScanner/*
</pre>
<p>
<tt>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;Row key="dGVzdHJvdzE="&gt;<br>
&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900823877"&gt;dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900818233"&gt;dGVzdHZhbHVlLWIy&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900847336"&gt;dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900856845"&gt;dGVzdHZhbHVlLWIz&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;<br>
Row key="dGVzdHJvdzE="&gt;&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;<br>
/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;<br>
/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;Cell column="YTox" timestamp="1389900823877"&gt;<br>
dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900818233"&gt;dGVzdHZhbHVlLWIy&lt;<br>
/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;Cell column="YTox" timestamp="1389900847336<br>
"&gt;dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900856845"&gt;<br>
dGVzdHZhbHVlLWIz&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
</tt>
<p>
</li>
@ -1294,9 +1301,10 @@ curl -H "Content-Type: text/xml" https://localhost:8080/ExampleScanner/*?limit=1
</pre>
<p>
<tt>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;Row key="dGVzdHJvdzE="&gt;<br>
&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row>&lt;/CellSet&gt;<br>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;<br>
Row key="dGVzdHJvdzE="&gt;&lt;Cell column="YTox" timestamp="1389900769772"&gt;<br>
dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900780536"&gt;<br>
dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row>&lt;/CellSet&gt;<br>
</tt>
<p>
</li>
@ -1308,10 +1316,12 @@ curl -H "Content-Type: text/xml" https://localhost:8080/ExampleScanner/*?columns
</pre>
<p>
<tt>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;Row key="dGVzdHJvdzE="&gt;<br>
&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900823877"&gt;dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900847336"&gt;dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;<br>
Row key="dGVzdHJvdzE="&gt;&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;<br>
/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;Cell column="YTox" timestamp=<br>
"1389900823877"&gt;dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900847336"&gt;dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;<br>
/Row&gt;&lt;/CellSet&gt;<br>
</tt>
<p>
</li>
@ -1323,13 +1333,15 @@ curl -H "Content-Type: text/xml" https://localhost:8080/ExampleScanner/*?columns
</pre>
<p>
<tt>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;Row key="dGVzdHJvdzE="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900823877"&gt;dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900818233"&gt;dGVzdHZhbHVlLWIy&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900847336"&gt;dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900856845"&gt;dGVzdHZhbHVlLWIz&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;<br>
Row key="dGVzdHJvdzE="&gt;&lt;Cell column="YTox" timestamp="1389900769772"&gt;<br>
dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900780536"&gt;<br>
dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900823877"&gt;dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;<br>
Cell column="Yjox"timestamp="1389900818233"&gt;dGVzdHZhbHVlLWIy&lt;/Cell&gt;&lt;<br>
/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;Cell column="YTox" timestamp="1389900847336"&gt;<br>
dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900856845"&gt;<br>
dGVzdHZhbHVlLWIz&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
</tt>
<p>
</li>
@ -1341,10 +1353,11 @@ curl -H "Content-Type: text/xml" https://localhost:8080/ExampleScanner/*?startro
</pre>
<p>
<tt>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;Row key="dGVzdHJvdzE="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900823877"&gt;dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;<br>
Row key="dGVzdHJvdzE="&gt;&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;<br>
/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;<br>
/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;Cell column="YTox" timestamp="1389900823877"&gt;<br>
dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900818233"&gt;dGVzdHZhbHVlLWIy&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
</tt>
<p>
@ -1357,9 +1370,10 @@ curl -H "Content-Type: text/xml" https://localhost:8080/ExampleScanner/*?startti
</pre>
<p>
<tt>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;Row key="dGVzdHJvdzE="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;<br>
Row key="dGVzdHJvdzE="&gt;&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;<br>
/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;<br>
/Row&gt;&lt;/CellSet&gt;<br>
</tt>
<p>
</li>
@ -1371,13 +1385,15 @@ curl -H "Content-Type: text/xml" https://localhost:8080/ExampleScanner/test*
</pre>
<p>
<tt>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;Row key="dGVzdHJvdzE="&gt;<br>
&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900823877"&gt;dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900818233"&gt;dGVzdHZhbHVlLWIy&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900847336"&gt;dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;Cell column="Yjox"<br>
timestamp="1389900856845"&gt;dGVzdHZhbHVlLWIz&lt;/Cell&gt;&lt;/Row&gt;&lt;/CellSet&gt;<br>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;CellSet&gt;&lt;<br>
Row key="dGVzdHJvdzE="&gt;&lt;Cell column="YTox" timestamp="1389900769772"&gt;dGVzdHZhbHVlLWEx&lt;<br>
/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900780536"&gt;dGVzdHZhbHVlLWIx&lt;/Cell&gt;&lt;<br>
/Row&gt;&lt;Row key="dGVzdHJvdzI="&gt;&lt;Cell column="YTox" timestamp="1389900823877"&gt;<br>
dGVzdHZhbHVlLWEy&lt;/Cell&gt;&lt;Cell column="Yjox"timestamp="1389900818233"&gt;<br>
dGVzdHZhbHVlLWIy&lt;/Cell&gt;&lt;/Row&gt;&lt;Row key="dGVzdHJvdzM="&gt;&lt;<br>
Cell column="YTox" timestamp="1389900847336"&gt;dGVzdHZhbHVlLWEz&lt;/Cell&gt;&lt;<br>
Cell column="Yjox"timestamp="1389900856845"&gt;dGVzdHZhbHVlLWIz&lt;/Cell&gt;&lt;<br>
/Row&gt;&lt;/CellSet&gt;<br>
</tt>
<p>
</li>