S - Return type on the build() call.B - type of builder itself.@InterfaceAudience.Public
@InterfaceStability.Unstable
public interface FSBuilder<S,B extends FSBuilder<S,B>>
HADOOP-16202 expanded the opt() and must() arguments with
operator overloading, but HADOOP-18724 identified mapping problems:
passing a long value in to opt() could end up invoking
opt(string, double), which could then trigger parse failures.
To fix this without forcing existing code to break/be recompiled.
optLong(String, long)
optLong(String, long)
opt(String, long), opt(String, float) and
opt(String, double) invoke optLong(String, long).
must() methods.
opt(String, String)
or must(String, String) as appropriate.| Modifier and Type | Method and Description |
|---|---|
S |
build()
Instantiate the object which was being built.
|
default B |
must(String key,
boolean value)
Set mandatory boolean option.
|
default B |
must(String key,
double value)
Deprecated.
|
default B |
must(String key,
float value)
Deprecated.
use
mustDouble(String, double) to set floating point. |
default B |
must(String key,
int value)
Set mandatory int option.
|
default B |
must(String key,
long value)
Deprecated.
|
B |
must(String key,
String... values)
Set a string array as mandatory option.
|
B |
must(String key,
String value)
Set mandatory option to the Builder.
|
default B |
mustDouble(String key,
double value)
Set mandatory double parameter for the Builder.
|
default B |
mustLong(String key,
long value)
Set mandatory long parameter for the Builder.
|
default B |
opt(String key,
boolean value)
Set optional boolean parameter for the Builder.
|
default B |
opt(String key,
double value)
Deprecated.
|
default B |
opt(String key,
float value)
Deprecated.
|
default B |
opt(String key,
int value)
Set optional int parameter for the Builder.
|
default B |
opt(String key,
long value)
Deprecated.
use
optLong(String, long) where possible. |
B |
opt(String key,
String... values)
Set an array of string values as optional parameter for the Builder.
|
B |
opt(String key,
String value)
Set optional Builder parameter.
|
default B |
optDouble(String key,
double value)
Set optional double parameter for the Builder.
|
default B |
optLong(String key,
long value)
Set optional long parameter for the Builder.
|
B opt(@Nonnull String key, @Nonnull String value)
key - key.value - value.default B opt(@Nonnull String key, boolean value)
key - key.value - value.opt(String, String)default B opt(@Nonnull String key, int value)
key - key.value - value.opt(String, String)@Deprecated default B opt(@Nonnull String key, float value)
optDouble(String, double)optLong(String, long) -all
decimal precision is lost.key - key.value - value.opt(String, String)default B opt(@Nonnull String key, long value)
optLong(String, long) where possible.key - key.value - value.@Deprecated default B opt(@Nonnull String key, double value)
optDouble(String, double)optLong(String, long) -all
decimal precision is lost.key - key.value - value.opt(String, String)B opt(@Nonnull String key, @Nonnull String... values)
key - key.values - values.opt(String, String)default B optLong(@Nonnull String key, long value)
key - key.value - value.opt(String, String)default B optDouble(@Nonnull String key, double value)
key - key.value - value.opt(String, String)B must(@Nonnull String key, @Nonnull String value)
build() throws IllegalArgumentException.key - key.value - value.default B must(@Nonnull String key, boolean value)
key - key.value - value.must(String, String)default B must(@Nonnull String key, int value)
key - key.value - value.must(String, String)@Deprecated default B must(@Nonnull String key, float value)
mustDouble(String, double) to set floating point.mustLong(String, long) -all
decimal precision is lost.key - key.value - value.@Deprecated default B must(@Nonnull String key, long value)
key - key.value - value.must(String, String)@Deprecated default B must(@Nonnull String key, double value)
key - key.value - value.must(String, String)B must(@Nonnull String key, @Nonnull String... values)
key - key.values - values.must(String, String)default B mustLong(@Nonnull String key, long value)
key - key.value - value.opt(String, String)default B mustDouble(@Nonnull String key, double value)
key - key.value - value.opt(String, String)S build() throws IllegalArgumentException, UnsupportedOperationException, IOException
IllegalArgumentException - if the parameters are not valid.UnsupportedOperationException - if the filesystem does not support
the specific operation.IOException - on filesystem IO errors.Copyright © 2024 Apache Software Foundation. All rights reserved.