Package tachyon.client.table

Examples of tachyon.client.table.RawColumn


    for (int k = -mMetadataLength; k < 0; k ++) {
      pass = pass && (metadata.getInt() == k);
    }

    for (int column = 0; column < COLS; column ++) {
      RawColumn rawColumn = rawTable.getRawColumn(column);
      TachyonFile tFile = rawColumn.getPartition(0);

      TachyonByteBuffer buf = tFile.readByteBuffer(0);
      if (buf == null) {
        tFile.recache();
        buf = tFile.readByteBuffer(0);
View Full Code Here


  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();
    }
  }
View Full Code Here

TOP

Related Classes of tachyon.client.table.RawColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.