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
Configurations 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 SerializableConfigurationReturns a new configuration instance using provided flags.org.apache.hadoop.conf.Configurationget()static org.apache.hadoop.conf.ConfigurationReturns new populatedConfigurationobject.static org.apache.hadoop.mapreduce.JobReturns new configuredJobobject.voidvoid
-
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:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
newJob
public static org.apache.hadoop.mapreduce.Job newJob(@Nullable SerializableConfiguration conf) throws IOException Returns new configuredJobobject.- 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 populatedConfigurationobject.
-