Forces a flush of any un-committed in memory data including left over compactions. For instance, any data point not persisted will be sent to HBase. @return A Deferred that will be called once all the un-committed data has been successfully and durably stored. The value of the deferred
()
| 1609 | * recoverable by retrying, some are not. |
| 1610 | */ |
| 1611 | public Deferred<Object> flush() throws HBaseException { |
| 1612 | final class HClientFlush implements Callback<Object, ArrayList<Object>> { |
| 1613 | public Object call(final ArrayList<Object> args) { |
| 1614 | return client.flush(); |
| 1615 | } |
| 1616 | public String toString() { |
| 1617 | return "flush HBase client"; |
| 1618 | } |
| 1619 | } |
| 1620 | |
| 1621 | return config.enable_compactions() && compactionq != null |
| 1622 | ? compactionq.flush().addCallback(new HClientFlush()) |
| 1623 | : client.flush(); |
| 1624 | } |
| 1625 | |
| 1626 | /** |
| 1627 | * Gracefully shuts down this TSD instance. |