private void write(TachyonFS tachyonClient) throws IOException {
RawTable rawTable = tachyonClient.getRawTable(mTablePath);
LOG.debug("Writing data...");
for (int column = 0; column < COLS; column ++) {
RawColumn rawColumn = rawTable.getRawColumn(column);
if (!rawColumn.createPartition(0)) {
throw new IOException("Failed to create partition in table " + mTablePath
+ " under column " + column);
}
ByteBuffer buf = ByteBuffer.allocate(80);
buf.order(ByteOrder.nativeOrder());
for (int k = 0; k < mDataLength; k ++) {
buf.putInt(k);
}
buf.flip();
TachyonFile tFile = rawColumn.getPartition(0);
OutStream os = tFile.getOutStream(mWriteType);
os.write(buf.array());
os.close();
}
}