Setting the bulkload Flag on Tables

Use a maprcli command or MCS to set the bulkload flag on tables. For MapR-DB binary tables, you can also set this flag with the HBase shell.

When you create a MapR-DB table that you want to perform a full bulk load on, you must set the bulkload flag to true on that table. Attempting a full bulk load on a table that does not have the bulkload attribute set to true results in an incremental bulk load being performed instead.

After you perform a full bulk load on a table, you cannot perform a full bulk load on it again.

maprcli command
Set the -bulkload parameter of the table create command to true.
After the bulk load, set the bulkload flag to false by using the table edit command. Alternatively, set this flag to false by using MCS or (if the table is a MapR-DB binary table) the HBase shell.
MCS
  1. Select MapR Tables under MapR-FS in the navigation pane.
  2. Click New Table.
  3. Select the Bulkload check box.

    Figure: Where to set the bulkload flag when creating a table

After the bulk load, unselect this check box.
  1. Open the table.
  2. Click Edit Table Permissions. The Edit Table Permissions window opens. You can set the flag to false in this window.

    Figure: The Edit Table Permissions button

HBase shell (for MapR-DB binary tables only)
In the create command, specify the value of the BULKLOAD parameter as true, as in the following example:
create '/a0','f1', BULKLOAD => 'true'
Note: If you want to pre-split a table, separate the BULKLOAD parameter from the SPLITS parameter, as in this example:
 hbase> create '/t1', 'f1', {SPLITS => ['10', '20', '30']}, {BULKLOAD => 'true'} 
After the bulk load, use the alter command to set the BULKLOAD parameter to false, as in this example:
hbase shell> alter '/user/juser/mytable', 'f2', BULKLOAD => 'false' (hbase shell)