org.apache.accumulo.core.data
Class Condition

java.lang.Object
  extended by org.apache.accumulo.core.data.Condition

public class Condition
extends Object

Conditions that must be met on a particular column in a row.

Since:
1.6.0

Constructor Summary
Condition(byte[] cf, byte[] cq)
           
Condition(ByteSequence cf, ByteSequence cq)
           
Condition(CharSequence cf, CharSequence cq)
           
Condition(org.apache.hadoop.io.Text cf, org.apache.hadoop.io.Text cq)
           
 
Method Summary
 boolean equals(Object o)
           
 ByteSequence getFamily()
           
 IteratorSetting[] getIterators()
           
 ByteSequence getQualifier()
           
 Long getTimestamp()
           
 ByteSequence getValue()
           
 ByteSequence getVisibility()
           
 int hashCode()
           
 Condition setIterators(IteratorSetting... iterators)
          Set iterators to use when reading the columns value.
 Condition setTimestamp(long ts)
          Sets the version for the column to check.
 Condition setValue(byte[] value)
          This method sets the expected value of a column.
 Condition setValue(ByteSequence value)
          see setValue(byte[])
 Condition setValue(CharSequence value)
          see setValue(byte[])
 Condition setValue(org.apache.hadoop.io.Text value)
          see setValue(byte[])
 Condition setVisibility(ColumnVisibility cv)
          Sets the visibility for the column to check.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Condition

public Condition(CharSequence cf,
                 CharSequence cq)

Condition

public Condition(byte[] cf,
                 byte[] cq)

Condition

public Condition(org.apache.hadoop.io.Text cf,
                 org.apache.hadoop.io.Text cq)

Condition

public Condition(ByteSequence cf,
                 ByteSequence cq)
Method Detail

getFamily

public ByteSequence getFamily()

getQualifier

public ByteSequence getQualifier()

setTimestamp

public Condition setTimestamp(long ts)
Sets the version for the column to check. If this is not set then the latest column will be checked, unless iterators do something different.

Returns:
returns this

getTimestamp

public Long getTimestamp()

setValue

public Condition setValue(CharSequence value)
see setValue(byte[])

Returns:
returns this

setValue

public Condition setValue(byte[] value)
This method sets the expected value of a column. Inorder for the condition to pass the column must exist and have this value. If a value is not set, then the column must be absent for the condition to pass.

Returns:
returns this

setValue

public Condition setValue(org.apache.hadoop.io.Text value)
see setValue(byte[])

Returns:
returns this

setValue

public Condition setValue(ByteSequence value)
see setValue(byte[])

Returns:
returns this

getValue

public ByteSequence getValue()

setVisibility

public Condition setVisibility(ColumnVisibility cv)
Sets the visibility for the column to check. If not set it defaults to empty visibility.

Returns:
returns this

getVisibility

public ByteSequence getVisibility()

setIterators

public Condition setIterators(IteratorSetting... iterators)
Set iterators to use when reading the columns value. These iterators will be applied in addition to the iterators configured for the table. Using iterators its possible to test other conditions, besides equality and absence, like less than. On the server side the iterators will be seeked using a range that covers only the family, qualifier, and visibility (if the timestamp is set then it will be used to narrow the range). Value equality will be tested using the first entry returned by the iterator stack.

Returns:
returns this

getIterators

public IteratorSetting[] getIterators()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2015 Apache Accumulo Project. All rights reserved.