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())
            writer.append(entry.getKey(), entry.getValue());
          writer.closeAndOpenReader();
        }
      } catch (Throwable e) {
        if (writer != null) writer.abort();
        exception = e;
      }
    }
    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;
      }
    }