Package org.apache.accumulo.core.client
Class ConditionalWriterConfig
java.lang.Object
org.apache.accumulo.core.client.ConditionalWriterConfig
- Since:
- 1.6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the current classloader context set on this scannerReturns the name of the current classloader context set on this scannerintlonggetTimeout(TimeUnit timeUnit) merge(ConditionalWriterConfig other) Merge this ConditionalWriterConfig with another.setAuthorizations(Authorizations auths) A set of authorization labels that will be checked against the column visibility of each key in order to filter data.voidsetClassLoaderContext(String classLoaderContext) Sets the name of the classloader context on this scanner.setDurability(Durability durability) Sets the Durability for the mutation, if applied.setMaxWriteThreads(int maxWriteThreads) Sets the maximum number of threads to use for writing data to the tablet servers.setTimeout(long timeout, TimeUnit timeUnit) Sets the maximum amount of time an unresponsive server will be re-tried.
-
Constructor Details
-
ConditionalWriterConfig
public ConditionalWriterConfig()
-
-
Method Details
-
setAuthorizations
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
Sets the maximum amount of time an unresponsive server will be re-tried. When this timeout is exceeded, theConditionalWritershould return the mutation with an exception.
For no timeout, set to zero, orLong.MAX_VALUEwithTimeUnit.MILLISECONDS.TimeUnit.MICROSECONDSorTimeUnit.NANOSECONDSwill be truncated to the nearestTimeUnit.MILLISECONDS.
If this truncation would result in making the value zero when it was specified as non-zero, then a minimum value of oneTimeUnit.MILLISECONDSwill be used.Default:
Long.MAX_VALUE(no timeout)- Parameters:
timeout- the timeout, in the unit specified by the value oftimeUnittimeUnit- determines howtimeoutwill be interpreted- Returns:
thisto allow chaining of set methods- Throws:
IllegalArgumentException- iftimeoutis less than 0
-
setMaxWriteThreads
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:
thisto allow chaining of set methods- Throws:
IllegalArgumentException- ifmaxWriteThreadsis non-positive
-
setDurability
Sets the Durability for the mutation, if applied.Default: Durability.DEFAULT: use the table's durability configuration.
- Returns:
thisto allow chaining of set methods- Since:
- 1.7.0
-
getAuthorizations
-
getTimeout
-
getMaxWriteThreads
public int getMaxWriteThreads() -
getDurability
-
setClassLoaderContext
Sets the name of the classloader context on this scanner. See the administration chapter of the user manual for details on how to configure and use classloader contexts.- Parameters:
classLoaderContext- name of the classloader context- Throws:
NullPointerException- if context is null- Since:
- 1.8.0
-
clearClassLoaderContext
public void clearClassLoaderContext()Clears the current classloader context set on this scanner- Since:
- 1.8.0
-
getClassLoaderContext
Returns the name of the current classloader context set on this scanner- Returns:
- name of the current context
- Since:
- 1.8.0
-
merge
Merge this ConditionalWriterConfig with another. If config is set in both, preference will be given to this config.- Parameters:
other- Another ConditionalWriterConfig- Returns:
- Merged ConditionalWriterConfig
- Since:
- 2.1.0
-