Class Column

java.lang.Object
org.apache.accumulo.core.data.Column
All Implemented Interfaces:
Comparable<Column>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<Column>

public class Column extends Object implements org.apache.hadoop.io.WritableComparable<Column>
A column, specified by family, qualifier, and visibility.
  • Field Details

    • columnFamily

      public byte[] columnFamily
    • columnQualifier

      public byte[] columnQualifier
    • columnVisibility

      public byte[] columnVisibility
  • Constructor Details

    • Column

      public Column()
      Creates a new blank column.
    • Column

      public Column(byte[] columnFamily, byte[] columnQualifier, byte[] columnVisibility)
      Creates a new column.
      Parameters:
      columnFamily - family
      columnQualifier - qualifier
      columnVisibility - visibility
    • Column

      public Column(org.apache.accumulo.core.data.thrift.TColumn tcol)
      Creates a new column.
      Parameters:
      tcol - Thrift column
  • Method Details

    • compareTo

      public int compareTo(Column that)
      Compares this column to another. Column families are compared first, then qualifiers, then visibilities.
      Specified by:
      compareTo in interface Comparable<Column>
      Parameters:
      that - column to compare
      Returns:
      comparison result
    • readFields

      public void readFields(DataInput in) throws IOException
      Specified by:
      readFields in interface org.apache.hadoop.io.Writable
      Throws:
      IOException
    • write

      public void write(DataOutput out) throws IOException
      Specified by:
      write in interface org.apache.hadoop.io.Writable
      Throws:
      IOException
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(Column that)
      Checks if this column equals another.
      Parameters:
      that - column to compare
      Returns:
      true if this column equals that, false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getColumnFamily

      public byte[] getColumnFamily()
      Gets the column family. Not a defensive copy.
      Returns:
      family
    • getColumnQualifier

      public byte[] getColumnQualifier()
      Gets the column qualifier. Not a defensive copy.
      Returns:
      qualifier
    • getColumnVisibility

      public byte[] getColumnVisibility()
      Gets the column visibility. Not a defensive copy.
      Returns:
      visibility
    • toString

      public String toString()
      Gets a string representation of this column. The family, qualifier, and visibility are interpreted as strings using the UTF-8 encoding; nulls are interpreted as empty strings.
      Overrides:
      toString in class Object
      Returns:
      string form of column
    • toThrift

      public org.apache.accumulo.core.data.thrift.TColumn toThrift()
      Converts this column to Thrift.
      Returns:
      Thrift column