private static Entry createTestEntry(TableName table, byte[] region, byte[] row, byte[] family,
    byte[] qualifier, byte[] value, long seq) {
    long time = System.nanoTime();

    final KeyValue cell = new KeyValue(row, family, qualifier, time, KeyValue.Type.Put, value);
    WALEdit edit = new WALEdit();
    edit.add(cell);
    return new Entry(new WALKeyImpl(region, table, seq, time, HConstants.DEFAULT_CLUSTER_ID), edit);
  }
@param leaveOpen index to leave un-closed. -1 to close all.
@return the writer that's still open, or null if all were closed.
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java