Package org.apache.beam.sdk.io.hadoop
Class SerializableConfiguration
- java.lang.Object
-
- org.apache.beam.sdk.io.hadoop.SerializableConfiguration
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
@NotThreadSafe public class SerializableConfiguration extends java.lang.Object implements java.io.ExternalizableA wrapper to allow HadoopConfigurations 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)andreadExternal(java.io.ObjectInput)are run at the same time, or theConfigurationis changed outside during writeExternal.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SerializableConfiguration()SerializableConfiguration(org.apache.hadoop.conf.Configuration conf)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SerializableConfigurationfromMap(java.util.Map<java.lang.String,java.lang.String> entries)Returns a new configuration instance using provided flags.org.apache.hadoop.conf.Configurationget()static org.apache.hadoop.conf.ConfigurationnewConfiguration(@Nullable SerializableConfiguration conf)Returns new populatedConfigurationobject.static org.apache.hadoop.mapreduce.JobnewJob(@Nullable SerializableConfiguration conf)Returns new configuredJobobject.voidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
get
public org.apache.hadoop.conf.Configuration get()
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
newJob
public static org.apache.hadoop.mapreduce.Job newJob(@Nullable SerializableConfiguration conf) throws java.io.IOException
Returns new configuredJobobject.- Throws:
java.io.IOException
-
fromMap
public static SerializableConfiguration fromMap(java.util.Map<java.lang.String,java.lang.String> entries)
Returns a new configuration instance using provided flags.
-
newConfiguration
public static org.apache.hadoop.conf.Configuration newConfiguration(@Nullable SerializableConfiguration conf)
Returns new populatedConfigurationobject.
-
-