Updated on 2024-04-29 GMT+08:00

Using the Import Tool to Importing Data

Use the Import tool to import the SequenceFile data file of HBase to HBase of CloudTable. The Import tool is a tool contained in the installation package of the client tool.

The SequenceFile file is a data file exported from HBase by the Export tool.

  1. Prepare a server where a CloudTable client is installed. For details about how to install a client, see Using HBase Shell to Access a Cluster.
  2. Upload the SequenceFile file directory to the server where the CloudTable client is located. Assume that the directory is /tmp/sequencefile.
  3. The Import tool must be executed on the shell interface of the operating system of the client host. Go to the HBase directory on the client host and run the Import tool. The command format of the Import tool is as follows:

    ./bin/hbase org.apache.hadoop.hbase.mapreduce.Import <TableName> <InputPath>

    TableName: Name of the table to which data is to be imported

    InputPath: Directory of the SequenceFile file In the local file system, the directory must start with file://.

    Example:

    ./bin/hbase org.apache.hadoop.hbase.mapreduce.Import t1 file:///tmp/sequencefile