public void run() { SSTableWriter writer = null; try { while (true) { Buffer b = writeQueue.take(); if (b == SENTINEL) return; writer = getWriter(); for (Map.Entry<DecoratedKey, ColumnFamily> entry : b.entrySet()) { if (entry.getValue().getColumnCount() > 0) writer.append(entry.getKey(), entry.getValue()); else if (!entry.getKey().equals(b.getFirstInsertedKey())) throw new AssertionError("Empty partition"); } writer.close(); } } catch (Throwable e) { JVMStabilityInspector.inspectThrowable(e); if (writer != null) writer.abort(); exception = e; } } }
public void run() { while (true) { try { Buffer b = writeQueue.take(); if (b == SENTINEL) return; try (SSTableTxnWriter writer = createWriter()) { for (Map.Entry<DecoratedKey, PartitionUpdate> entry : b.entrySet()) writer.append(entry.getValue().unfilteredIterator()); writer.finish(false); } } catch (Throwable e) { JVMStabilityInspector.inspectThrowable(e); // Keep only the first exception if (exception == null) exception = e; } } } }
public void run() { while (true) { try { Buffer b = writeQueue.take(); if (b == SENTINEL) return; try (SSTableTxnWriter writer = createWriter()) { for (Map.Entry<DecoratedKey, PartitionUpdate> entry : b.entrySet()) writer.append(entry.getValue().unfilteredIterator()); writer.finish(false); } } catch (Throwable e) { JVMStabilityInspector.inspectThrowable(e); // Keep only the first exception if (exception == null) exception = e; } } } }
public void run() { while (true) { try { Buffer b = writeQueue.take(); if (b == SENTINEL) return; try (SSTableTxnWriter writer = createWriter()) { for (Map.Entry<DecoratedKey, PartitionUpdate> entry : b.entrySet()) writer.append(entry.getValue().unfilteredIterator()); writer.finish(false); } } catch (Throwable e) { JVMStabilityInspector.inspectThrowable(e); // Keep only the first exception if (exception == null) exception = e; } } } }