コード例 #1
0
ファイル: TableSplit.java プロジェクト: hypertable/hypertable
  /**
   * Returns the details about this instance as a string.
   *
   * @return The values of this instance as a string.
   * @see java.lang.Object#toString()
   */
  public String toString() {
    String start_str = new String();
    String end_str = new String();

    if (m_startrow != null) start_str = Serialization.toStringBinary(m_startrow);

    if (m_endrow != null) end_str = Serialization.toStringBinary(m_endrow);

    return m_hostname + ":" + start_str + "," + end_str;
  }
コード例 #2
0
ファイル: TableSplit.java プロジェクト: hypertable/hypertable
 /* XXX add equals for columns */
 public boolean equal(TableSplit split) {
   return Serialization.equals(m_tablename, split.m_tablename)
       && m_startrow.compareTo(split.getStartRow()) == 0
       && m_endrow.compareTo(split.getEndRow()) == 0
       && m_hostname.equals(split.m_hostname);
 }
コード例 #3
0
ファイル: TableSplit.java プロジェクト: hypertable/hypertable
 /**
  * Writes the field values to the output.
  *
  * @param out The output to write to.
  * @throws IOException When writing the values to the output fails.
  */
 public void write(DataOutput out) throws IOException {
   Serialization.writeByteArray(out, m_tablename);
   Serialization.writeByteBuffer(out, m_startrow);
   Serialization.writeByteBuffer(out, m_endrow);
   Serialization.writeByteArray(out, Serialization.toBytes(m_hostname));
 }
コード例 #4
0
ファイル: TableSplit.java プロジェクト: hypertable/hypertable
 /**
  * Reads the values of each field.
  *
  * @param in The input to read from.
  * @throws IOException When reading the input fails.
  */
 public void readFields(DataInput in) throws IOException {
   m_tablename = Serialization.readByteArray(in);
   m_startrow = ByteBuffer.wrap(Serialization.readByteArray(in));
   m_endrow = ByteBuffer.wrap(Serialization.readByteArray(in));
   m_hostname = Serialization.toString(Serialization.readByteArray(in));
 }
コード例 #5
0
ファイル: Row.java プロジェクト: hypertable/hypertable
 /**
  * Compares this row against the given one.
  *
  * @param row The split to compare to.
  * @return The result of the comparison.
  * @see java.lang.Comparable#compareTo(java.lang.Object)
  */
 public int compareTo(Row row) {
   return Serialization.compareTo(mRowKey, row.mRowKey);
 }
コード例 #6
0
ファイル: Row.java プロジェクト: hypertable/hypertable
 /**
  * Writes the field values to the output.
  *
  * @param out The output to write to.
  * @throws IOException When writing the values to the output fails.
  */
 public void write(final DataOutput out) throws IOException {
   Serialization.writeByteArray(out, mRowKey);
   assert mSerializedCells.arrayOffset() == 0;
   Serialization.writeByteArray(out, mSerializedCells.array());
 }
コード例 #7
0
ファイル: Row.java プロジェクト: hypertable/hypertable
 /**
  * Reads the values of each field.
  *
  * @param in The input to read from.
  * @throws IOException When reading the input fails.
  */
 public void readFields(final DataInput in) throws IOException {
   mRowKey = Serialization.readByteArray(in);
   mSerializedCells = ByteBuffer.wrap(Serialization.readByteArray(in));
   mSerializedCells.mark();
   mReader.reset(mSerializedCells);
 }