Class PersistedOptionValue
java.lang.Object
org.apache.drill.exec.server.options.PersistedOptionValue
This represents a persisted OptionValue. Decoupling the OptionValue from what
is persisted will prevent us from accidentally breaking backward compatibility in the future
when the OptionValue changes. Additionally when we do change the format of stored options we
will not have to change much code since this is already designed with backward compatibility in mind.
This class is also forward compatible with the Drill Option storage format in Drill 1.11 and earlier.
Contract:
Only PersistedOptionValues created from an OptionValue should be persisted.
And OptionValues should only be created from PersistedOptionValues that are
retrieved from a store.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis deserializer only fetches the relevant information we care about from a store, which is the value of an option. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis constant cannot be changed for backward and forward compatibility reasons.static final StringThis is present for forward compatability with Drill 1.11 and earlier -
Constructor Summary
ConstructorsConstructorDescriptionPersistedOptionValue(String value) PersistedOptionValue(OptionValue.Kind kind, String name, Long num_val, String string_val, Boolean bool_val, Double float_val) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis is present for forward compatibility.This is present for forward compatibility.getKind()This is present for forward compatibility.getName()This is present for forward compatibility.This is present for forward compatibility.This is present for forward compatibility.getType()This is present for forward compatibility.getValue()This is ignored for forward compatibility.inthashCode()toOptionValue(OptionDefinition optionDefinition, OptionValue.OptionScope optionScope) toString()
-
Field Details
-
SYSTEM_TYPE
This is present for forward compatability with Drill 1.11 and earlier- See Also:
-
JSON_TYPE
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
JSON_KIND
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
JSON_NAME
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
JSON_NUM_VAL
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
JSON_STRING_VAL
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
JSON_BOOL_VAL
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
JSON_FLOAT_VAL
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
JSON_INTEGER_VAL
This constant cannot be changed for backward and forward compatibility reasons.- See Also:
-
-
Constructor Details
-
PersistedOptionValue
-
PersistedOptionValue
-
-
Method Details
-
getValue
This is ignored for forward compatibility. -
getType
This is present for forward compatibility. -
getKind
This is present for forward compatibility. -
getName
This is present for forward compatibility. -
getNumVal
This is present for forward compatibility. -
getStringVal
This is present for forward compatibility. -
getBoolVal
This is present for forward compatibility. -
getFloatVal
This is present for forward compatibility. -
toOptionValue
public OptionValue toOptionValue(OptionDefinition optionDefinition, OptionValue.OptionScope optionScope) -
equals
-
hashCode
public int hashCode() -
toString
-