@NotThreadSafe public class SerializableConfiguration extends java.lang.Object implements java.io.Externalizable
Configuration
s to be serialized using Java's standard
serialization mechanisms.
SerializableConfiguration is not thread safe. For example, serialized configuration could be
corrupted if writeExternal(java.io.ObjectOutput)
and readExternal(java.io.ObjectInput)
are run at the same time, or the Configuration
is
changed outside during writeExternal.
Constructor and Description |
---|
SerializableConfiguration() |
SerializableConfiguration(Configuration conf) |
Modifier and Type | Method and Description |
---|---|
static SerializableConfiguration |
fromMap(java.util.Map<java.lang.String,java.lang.String> entries)
Returns a new configuration instance using provided flags.
|
Configuration |
get() |
static Configuration |
newConfiguration(@Nullable SerializableConfiguration conf)
Returns new populated
Configuration object. |
static Job |
newJob(@Nullable SerializableConfiguration conf)
Returns new configured
Job object. |
void |
readExternal(java.io.ObjectInput in) |
void |
writeExternal(java.io.ObjectOutput out) |
public SerializableConfiguration()
public SerializableConfiguration(Configuration conf)
public Configuration get()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public static Job newJob(@Nullable SerializableConfiguration conf) throws java.io.IOException
Job
object.java.io.IOException
public static SerializableConfiguration fromMap(java.util.Map<java.lang.String,java.lang.String> entries)
public static Configuration newConfiguration(@Nullable SerializableConfiguration conf)
Configuration
object.