org.apache.hadoop.hbase.client
Class Query

java.lang.Object
  extended by org.apache.hadoop.hbase.client.Operation
      extended by org.apache.hadoop.hbase.client.OperationWithAttributes
          extended by org.apache.hadoop.hbase.client.Query
All Implemented Interfaces:
Attributes
Direct Known Subclasses:
Get, Scan

@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract class Query
extends OperationWithAttributes


Field Summary
protected  Filter filter
           
 
Fields inherited from class org.apache.hadoop.hbase.client.OperationWithAttributes
ID_ATRIBUTE
 
Constructor Summary
Query()
           
 
Method Summary
 byte[] getACL()
           
 boolean getACLStrategy()
          Deprecated. No effect
 Authorizations getAuthorizations()
           
 Filter getFilter()
           
 IsolationLevel getIsolationLevel()
           
 void setACL(Map<String,Permission> perms)
           
 void setACL(String user, Permission perms)
           
 void setACLStrategy(boolean cellFirstStrategy)
          Deprecated. No effect
 void setAuthorizations(Authorizations authorizations)
          Sets the authorizations to be used by this Query
 Query setFilter(Filter filter)
          Apply the specified server-side filter when performing the Query.
 void setIsolationLevel(IsolationLevel level)
          Set the isolation level for this query.
 
Methods inherited from class org.apache.hadoop.hbase.client.OperationWithAttributes
getAttribute, getAttributeSize, getAttributesMap, getId, setAttribute, setId
 
Methods inherited from class org.apache.hadoop.hbase.client.Operation
getFingerprint, toJSON, toJSON, toMap, toMap, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filter

protected Filter filter
Constructor Detail

Query

public Query()
Method Detail

getFilter

public Filter getFilter()
Returns:
Filter

setFilter

public Query setFilter(Filter filter)
Apply the specified server-side filter when performing the Query. Only Filter.filterKeyValue(Cell) is called AFTER all tests for ttl, column match, deletes and max versions have been run.

Parameters:
filter - filter to run on the server
Returns:
this for invocation chaining

setAuthorizations

@InterfaceStability.Unstable
public void setAuthorizations(Authorizations authorizations)
Sets the authorizations to be used by this Query

Parameters:
authorizations -

getAuthorizations

@InterfaceStability.Unstable
public Authorizations getAuthorizations()
                                 throws DeserializationException
Returns:
The authorizations this Query is associated with.
Throws:
DeserializationException

getACL

@InterfaceStability.Unstable
public byte[] getACL()
Returns:
The serialized ACL for this operation, or null if none

setACL

@InterfaceStability.Unstable
public void setACL(String user,
                                               Permission perms)
Parameters:
user - User short name
perms - Permissions for the user

setACL

@InterfaceStability.Unstable
public void setACL(Map<String,Permission> perms)
Parameters:
perms - A map of permissions for a user or users

getACLStrategy

@Deprecated
public boolean getACLStrategy()
Deprecated. No effect


setACLStrategy

@Deprecated
public void setACLStrategy(boolean cellFirstStrategy)
Deprecated. No effect


setIsolationLevel

public void setIsolationLevel(IsolationLevel level)
Set the isolation level for this query. If the isolation level is set to READ_UNCOMMITTED, then this query will return data from committed and uncommitted transactions. If the isolation level is set to READ_COMMITTED, then this query will return data from committed transactions only. If a isolation level is not explicitly set on a Query, then it is assumed to be READ_COMMITTED.

Parameters:
level - IsolationLevel for this query

getIsolationLevel

public IsolationLevel getIsolationLevel()
Returns:
The isolation level of this scan. If no isolation level was set for this scan object, then it returns READ_COMMITTED.


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.