Package org.apache.beam.sdk.io.hadoop
Class SerializableConfiguration
java.lang.Object
org.apache.beam.sdk.io.hadoop.SerializableConfiguration
- All Implemented Interfaces:
Externalizable
,Serializable
A wrapper to allow Hadoop
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SerializableConfiguration
Returns a new configuration instance using provided flags.org.apache.hadoop.conf.Configuration
get()
static org.apache.hadoop.conf.Configuration
Returns new populatedConfiguration
object.static org.apache.hadoop.mapreduce.Job
Returns new configuredJob
object.void
void
-
Constructor Details
-
SerializableConfiguration
public SerializableConfiguration() -
SerializableConfiguration
public SerializableConfiguration(org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
get
public org.apache.hadoop.conf.Configuration get() -
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
newJob
public static org.apache.hadoop.mapreduce.Job newJob(@Nullable SerializableConfiguration conf) throws IOException Returns new configuredJob
object.- Throws:
IOException
-
fromMap
Returns a new configuration instance using provided flags. -
newConfiguration
public static org.apache.hadoop.conf.Configuration newConfiguration(@Nullable SerializableConfiguration conf) Returns new populatedConfiguration
object.
-