0

I wonder if there is any way to disable WAL (write ahead log) operations when inserting new data to a hbase table with JAVA API?

Thank you for you help :)

rafik_bougacha
  • 81
  • 2
  • 10

1 Answers1

2

In HBase 2.0.0

To skip WAL at an individual update level (for a single Put or Delete):

Put p = new Put(ROW_ID).addColumn(FAMILY, NAME, VALUE).setDurability(Durability.SKIP_WAL)

To set this setting for the entire table (so you don't have to do it each time for each update):

TableDescriptorBuilder tBuilder = TableDescriptorBuilder.newBuilder(TableName.valueOf(TABLE_ID));
tBuilder.setDurability(Durability.SKIP_WAL);
... continue building the table

Hope this helps

VS_FF
  • 2,353
  • 3
  • 16
  • 34