Advanced
Тема интерфейса

Using the Import Tool to Import SequenceFile Data to an HBase Cluster

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.

Note

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

  1. Prepare a server where a CloudTable HBase client is installed. For details about how to install a client, see Connecting to a Common HBase Cluster Using HBase Shell.
  2. Upload the SequenceFile file directory to the server where the HBase 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