Skip to content
igorcher edited this page Apr 22, 2013 · 34 revisions

Overview

The h-rider is an hbase UI browser that provides an easier way to view or manipulate the data saved in the - HBase™ - distributed database that supports structured data storage for large tables.

Features

  • Connect to multiple hbase clusters

  • Tables manipulation

    • Add/Remove/Truncate/View table.
    • Copy/Paste table on the same cluster or between clusters.
    • Import/Export table from/to the file.
    • Update table/column family metadata.

    Note: the copy/paste operation is performed by coping row by row so coping large tables can take a lot of time.

  • Rows manipulation

    • Add/Remove/Edit/View rows
    • Copy/Paste rows between tables from same or different clusters.
    • Open rows in the external viewer such as Excel.
  • Pagination

  • Data types:

    • String
    • BinaryString
    • Integer
    • Long
    • Float
    • Double
    • Boolean
    • Short
    • DateAsString
    • DateAsLong
    • Json
    • Xml
    • Custom
  • Scan

Connect to the hbase cluster

  1. Double click on the jar file. The following window will popup:

    Connect to cluster

  2. Write the host name or IP address of the ZooKeeper node and click 'Connect'. Make sure the default port is correct for your environment.

Note: If your machine can connect to the hbase cluster only by using IP address you need to add mapping of all cluster nodes to your hosts file, otherwise the tool will fail to connect to the hbase administration.

Functionality

Window

The application supports the following functionality:

  • Connect to a cluster - click on the link to open a connection dialog.

  • Filter tables - write any word or a regular expression in the text box on the right side of the 'Tables' label to filter the tables. Note: wrap your filter with ~() symbols to reverse it.

  • Filter columns - write any word or a regular expression in the text box on the right side of the 'Columns' label to filter the columns. Note: wrap your filter with ~() symbols to reverse it.

  • Tables management toolbar

    • Refresh - click on this button to reload a list of tables.

    • Add table - click on this button to add a new table to the cluster. The 'Create table' dialog will be shown:

      Add table dialog

      Provide a table name, column family and then click 'OK'. You can change default values for both table and column family metadata.

      Add column family

    • Delete table - click on this button to delete selected tables from the cluster.

    • Truncate table - click on this button to truncate selected tables.

    • Copy table - click on this button to copy selected table to the clipboard.

    • Paste table - click on this button to paste table from the clipboard.

    • Export table - click on this button to export table to the file.

      Export table dialog

      Provide a path to the file, a delimiter to be used to separate the columns and click 'Export' to export the whole table to the file or click 'Export with Query' to export only part of the table that meets the requirement defined by the query.

    Note: in case the table contains millions of rows the whole process will take time and probably you need to consider to perform the export with the built-in hbase scripts

    • Import table - click on this button to import table from the file.

      Import table dialog

      Provide a table name, a path to the file that contains the data, a delimiter to be used to separate the data into the columns, the column types to be used to convert the data and then click 'Import' to import the data to the table.

    Note: in case the file contains millions of rows the whole process will take time and probably you need to consider to perform the import with the built-in hbase scripts

    • Table metadata - click on this button to see/update table metadata.

      Table metadata dialog

  • Columns management toolbar

    • Select rows - click on this button to check all columns. Only checked columns will be populated with the data.
    • Unselect rows - click on this button to uncheck all columns except the 'key'.
  • Custom Types

    • Add - click on this button to add new type converter.

    • Edit - click on this button to edit currently selected type converter.

    • Delete - click on this button to delete currently selected type converter.

      Type converter dialog

      Provide meaningful name for the type converter and implement two methods: byte[] to String, String to byte[].

  • Data population

    • Jump - click on this button to jump to a specific row number. Note: the current implementation is straight forward; the simple count is performed until the required row number is achieved.

    • Populate rows - click on this button to populate the rows with the checked columns.

    • Scan rows - click on this button to perform a scan on the selected table. The 'Search' dialog will be open:

      Search dialog

      Scan options:

      • Start key - the key to start the scan from.
      • End key - the key to stop the scan on.
      • Start date - the start date of the date range to use.
      • End date - the end date of the date range to use.
      • Query - to scan for a specific word in the specified column
        • Supported comparison types:
          • Contains
          • Starts with
          • Ends with
          • Less
          • Less or equal
          • Equal
          • Not equal
          • Greater or equal
          • Greater
          • Is null
          • Is not null

      Note: it is important to select the correct type for the keys (if they are not empty) and the word in order for the scan to succeed. The default type is 'String'.

  • Pagination

    • Batch size - provide the size of the batch. The default is 100 rows.
    • Prev - click on this button to populate previously loaded batch of rows.
    • Next - click on this button to populate next batch of rows.
  • Rows management toolbar

    • Open rows - click on this button to open the rows in the external viewer such as Excel.
    • Add row - click on this button to add a new row. The 'Add new row' dialog will be shown:

    Add row dialog

    • Delete row - click on this button to delete selected rows.
    • Copy row - click on this button to copy selected rows to the clipboard.
    • Paste row - click on this button to paste rows from the clipboard.
    • Save row - click on this button to save the changes to the hbase table. Note: it is important to select correct data type for the updated columns before the changes are saved into the hbase table otherwise the application that uses the data will probalby fail to load it.
  • Data Types

    All data in the hbase is saved as a byte array. In order to represent the data correctly the actual data type must be chosen.

    Column Types

    • Special data types

      All special data types only support data saved in the hbase as a 'String' converted to a byte array.

      • DateTime - the DateTime format used by default is ‘yyyy-MM-dd HH:mm:ss.SSS’. To replace the default format the following property ‘global.dateFormat=YOUR_DATE_FORMAT’ should be added to the ‘global.properties’ file.

      Date editor

      • Json - is primarily used for presentation purpose.

      Json editor

      • Xml - is primarily used for presentation purpose.

      Xml editor

Clone this wiki locally