index.html 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <html>
  2. <h1>HBase Browser</h1>
  3. <p>We'll take a look at the new <a href="http://gethue.tumblr.com/post/59071544309/the-web-ui-for-hbase-hbase-browser">HBase Browser App</a>
  4. added in Hue 2.5 and improved significantly since.</p>
  5. <p>Prerequisites before using the app:</p>
  6. <p>1. Have HBase and Thrift Service 1 initiated (Thrift can be configured)</p>
  7. <p>2. Configure your list of HBase Clusters in
  8. <a href="https://github.com/cloudera/hue/blob/master/desktop/conf.dist/hue.ini#L467">hue.ini</a>
  9. to point to your Thrift IP/Port</p>
  10. <h2>SmartView</h2>
  11. <p>The smartview is the view that you land on when you first enter a table.
  12. On the left hand side are the row keys and hovering over a row reveals a
  13. list of controls on the right. Click a row to select it, and once
  14. selected you can perform batch operations, sort columns, or do any
  15. amount of standard database operations. To explore a row, simple scroll
  16. to the right. By scrolling, the row should continue to lazily-load cells
  17. until the end.</p>
  18. <h3>Adding Data</h3>
  19. <p>To initially populate the table, you can insert a new row or bulk upload
  20. CSV/TSV/etc. type data into your table.</p>
  21. <p>On the right hand side of a row is a '+' sign that lets you insert
  22. columns into your
  23. row</p>
  24. <h3>Mutating Data</h3>
  25. <p>To edit a cell, simply click to edit inline.</p>
  26. <p>If you need more control or data about your cell, click “Full Editor” to
  27. edit.</p>
  28. <p>In the full editor, you can view cell history or upload binary data to
  29. the cell. Binary data of certain MIME Types are detected, meaning you
  30. can view and edit images, PDFs, JSON, XML, and other types directly in
  31. your browser!</p>
  32. <p>Hovering over a cell also reveals some more controls (such as the delete
  33. button or the timestamp). Click the title to select a few and do batch
  34. operations:</p>
  35. <p>If you need some sample data to get started and explore, check out this
  36. howto create <a href="http://gethue.tumblr.com/post/58181985680/hadoop-tutorial-how-to-create-example-tables-in-hbase">HBase table
  37. tutorial</a>.</p>
  38. <h3>Smart Searchbar</h3>
  39. <p>The "Smart Searchbar" is a sophisticated tool that helps you zero-in on
  40. your data. The smart search supports a number of operations. The most
  41. basic ones include finding and scanning row keys. Here I am selecting
  42. two row keys with:</p>
  43. <pre><code>domain.100, domain.200
  44. </code></pre>
  45. <p>Submitting this query gives me the two rows I was looking for. If I want
  46. to fetch rows after one of these, I have to do a scan. This is as easy
  47. as writing a '+' followed by the number of rows you want to fetch.</p>
  48. <pre><code>domain.100, domain.200 +5
  49. </code></pre>
  50. <p>Fetches domain.100 and domain.200 followed by the next 5 rows. If you're
  51. ever confused about your results, you can look down below and the query
  52. bar and also click in to edit your query.</p>
  53. <p>The Smart Search also supports column filtering. On any row, I can
  54. specify the specific columns or families I want to retrieve. With:</p>
  55. <pre><code>domain.100[column_family:]
  56. </code></pre>
  57. <p>I can select a bare family, or mix columns from different families like
  58. so:</p>
  59. <pre><code>domain.100[family1:, family2:, family3:column_a]
  60. </code></pre>
  61. <p>Doing this will restrict my results from one row key to the columns I
  62. specified. If you want to restrict column families only, the same effect
  63. can be achieved with the filters on the right. Just click to toggle a
  64. filter.</p>
  65. <p>Finally, let's try some more complex column filters. I can query for
  66. bare columns:</p>
  67. <pre><code>domain.100[column_a]
  68. </code></pre>
  69. <p>This will multiply my query over all column families. I can also do
  70. prefixes and scans:</p>
  71. <p>domain.100[family: prefix* +3]</p>
  72. <p>This will fetch me all columns that start with prefix* limited to 3
  73. results. Finally, I can filter on range:</p>
  74. <pre><code>domain.100[family: column1 to column100]
  75. </code></pre>
  76. <p>This will fetch me all columns in 'family:' that are lexicographically
  77. &gt;= column1 but &lt;= column100. The first column ('column1') must be a
  78. valid column, but the second can just be any string for comparison.</p>
  79. <p>The Smart Search also supports prefix filtering on rows. To select a
  80. prefixed row, simply type the row key followed by a star *. The prefix
  81. should be highlighted like any other searchbar keyword. A prefix scan is
  82. performed exactly like a regular scan, but with a prefixed row.</p>
  83. <pre><code>domain.10* +10
  84. </code></pre>
  85. <p>Finally, as a new feature, you can also take full advantage of the
  86. <a href="denied:about:blank">HBase filtering</a>language, by typing your filter
  87. string between curly braces. HBase Browser autocompletes your filters
  88. for you so you don't have to look them up every time. You can apply
  89. filters to rows or scans.</p>
  90. <pre><code>domain.1000 {ColumnPrefixFilter('100-') AND ColumnCountGetFilter(3)}
  91. </code></pre>
  92. <p>This doc only covers a few basic features of the Smart Search. You can
  93. take advantage of the full querying language by referring to the help
  94. menu when using the app. These include column prefix, bare columns,
  95. column range, etc. Remember that if you ever need help with the
  96. searchbar, you can use the help menu that pops up while typing, which
  97. will suggest next steps to complete your query.</p>
  98. </html>