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 PersistedOptionValue
s created from an OptionValue
should be persisted.
And OptionValue
s should only be created from PersistedOptionValue
s that are
retrieved from a store.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This deserializer only fetches the relevant information we care about from a store, which is the value of an option. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This constant cannot be changed for backward and forward compatibility reasons.static final String
This is present for forward compatability with Drill 1.11 and earlier -
Constructor Summary
ConstructorDescriptionPersistedOptionValue
(String value) PersistedOptionValue
(OptionValue.Kind kind, String name, Long num_val, String string_val, Boolean bool_val, Double float_val) -
Method Summary
Modifier and TypeMethodDescriptionboolean
This 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.int
hashCode()
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
-