Class SummarizerConfiguration
java.lang.Object
org.apache.accumulo.core.client.summary.SummarizerConfiguration
This class encapsulates the configuration needed to instantiate a
Summarizer
. It also
provides methods and documentation for setting the table properties that configure a Summarizer.- Since:
- 2.0.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder
(Class<? extends Summarizer> clazz) Call this method to initiate a chain of fluent method calls to a create an immutableSummarizerConfiguration
boolean
Compares the classname and options to determine equality.static Collection<SummarizerConfiguration>
fromTableProperties
(Iterable<Map.Entry<String, String>> props) static Collection<SummarizerConfiguration>
fromTableProperties
(Map<String, String> props) Decodes table properties with the prefixtable.summarizer
intoSummarizerConfiguration
objects.The propertyId is used when creating table properties for a summarizer.int
hashCode()
Hashes the classname and options to create a hashcode.toString()
Converts this configuration to Accumulo per table properties.toTableProperties
(Collection<SummarizerConfiguration> configurations) Encodes each configuration in the same way astoTableProperties()
.toTableProperties
(SummarizerConfiguration... configurations) Encodes each configuration in the same way astoTableProperties()
.
-
Method Details
-
getClassName
- Returns:
- the name of a class that implements @link
Summarizer
.
-
getOptions
- Returns:
- custom options for a {link @Summarizer}
-
getPropertyId
The propertyId is used when creating table properties for a summarizer. It's not used for equality or hashCode for this class. -
toString
-
equals
Compares the classname and options to determine equality. -
hashCode
public int hashCode()Hashes the classname and options to create a hashcode. -
toTableProperties
Converts this configuration to Accumulo per table properties. The returned map has the following key values. The<configId>
below is fromgetPropertyId()
. The<optionKey>
and<optionValue>
below are derived from the key values ofgetOptions()
.table.summarizer.<configId>=<classname> table.summarizer.<configId>.opt.<optionKey1>=<optionValue1> table.summarizer.<configId>.opt.<optionKey2>=<optionValue2> . . . table.summarizer.<configId>.opt.<optionKeyN>=<optionValueN>
-
toTableProperties
Encodes each configuration in the same way astoTableProperties()
.- Throws:
IllegalArgumentException
- when there are duplicate values forgetPropertyId()
-
toTableProperties
public static Map<String,String> toTableProperties(Collection<SummarizerConfiguration> configurations) Encodes each configuration in the same way astoTableProperties()
.- Throws:
IllegalArgumentException
- when there are duplicate values forgetPropertyId()
-
fromTableProperties
Decodes table properties with the prefixtable.summarizer
intoSummarizerConfiguration
objects. Table properties with prefixes other thantable.summarizer
are ignored. -
fromTableProperties
public static Collection<SummarizerConfiguration> fromTableProperties(Iterable<Map.Entry<String, String>> props) - See Also:
-
builder
Call this method to initiate a chain of fluent method calls to a create an immutableSummarizerConfiguration
- Parameters:
className
- The fully qualified name of a class that implementsSummarizer
.
-
builder
- See Also:
-