org.apache.accumulo.core.client
Class ConditionalWriterConfig

java.lang.Object
  extended by org.apache.accumulo.core.client.ConditionalWriterConfig

public class ConditionalWriterConfig
extends Object

Since:
1.6.0

Constructor Summary
ConditionalWriterConfig()
           
 
Method Summary
 Authorizations getAuthorizations()
           
 int getMaxWriteThreads()
           
 long getTimeout(TimeUnit timeUnit)
           
 ConditionalWriterConfig setAuthorizations(Authorizations auths)
          A set of authorization labels that will be checked against the column visibility of each key in order to filter data.
 ConditionalWriterConfig setMaxWriteThreads(int maxWriteThreads)
          Sets the maximum number of threads to use for writing data to the tablet servers.
 ConditionalWriterConfig setTimeout(long timeout, TimeUnit timeUnit)
          Sets the maximum amount of time an unresponsive server will be re-tried.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalWriterConfig

public ConditionalWriterConfig()
Method Detail

setAuthorizations

public ConditionalWriterConfig setAuthorizations(Authorizations auths)
A set of authorization labels that will be checked against the column visibility of each key in order to filter data. The authorizations passed in must be a subset of the accumulo user's set of authorizations. If the accumulo user has authorizations (A1, A2) and authorizations (A2, A3) are passed, then an exception will be thrown.

Any condition that is not visible with this set of authorizations will fail.


setTimeout

public ConditionalWriterConfig setTimeout(long timeout,
                                          TimeUnit timeUnit)
Sets the maximum amount of time an unresponsive server will be re-tried. When this timeout is exceeded, the ConditionalWriter should return the mutation with an exception.
For no timeout, set to zero, or Long.MAX_VALUE with TimeUnit.MILLISECONDS.

TimeUnit.MICROSECONDS or TimeUnit.NANOSECONDS will be truncated to the nearest TimeUnit.MILLISECONDS.
If this truncation would result in making the value zero when it was specified as non-zero, then a minimum value of one TimeUnit.MILLISECONDS will be used.

Default: Long.MAX_VALUE (no timeout)

Parameters:
timeout - the timeout, in the unit specified by the value of timeUnit
timeUnit - determines how timeout will be interpreted
Returns:
this to allow chaining of set methods
Throws:
IllegalArgumentException - if timeout is less than 0

setMaxWriteThreads

public ConditionalWriterConfig setMaxWriteThreads(int maxWriteThreads)
Sets the maximum number of threads to use for writing data to the tablet servers.

Default: 3

Parameters:
maxWriteThreads - the maximum threads to use
Returns:
this to allow chaining of set methods
Throws:
IllegalArgumentException - if maxWriteThreads is non-positive

getAuthorizations

public Authorizations getAuthorizations()

getTimeout

public long getTimeout(TimeUnit timeUnit)

getMaxWriteThreads

public int getMaxWriteThreads()


Copyright © 2015 Apache Accumulo Project. All rights reserved.