use of org.xerial.snappy.SnappyOutputStream in project voltdb by VoltDB.
the class OnDemandBinaryLogger method getStream.
private static Stuff getStream(final String name) throws IOException {
Stuff s = m_files.get(name);
if (s == null) {
File f = new VoltFile(path, name);
f.delete();
RandomAccessFile ras = new RandomAccessFile(f, "rw");
ras.seek(8);
SnappyOutputStream sos = new SnappyOutputStream(new FileOutputStream(ras.getFD()));
DataOutputStream dos = new DataOutputStream(sos);
s = new Stuff();
s.dos = dos;
s.count = ras.getChannel().map(MapMode.READ_WRITE, 0, 8);
s.count.order(ByteOrder.nativeOrder());
m_files.put(name, s);
}
return s;
}
Aggregations