public static class XmlSink.Bound<T> extends FileBasedSink<T>
FileBasedSink that writes objects as XML elements.FileBasedSink.FileBasedWriteOperation<T>, FileBasedSink.FileBasedWriter<T>, FileBasedSink.FileResultSink.WriteOperation<T,WriteT>, Sink.Writer<T,WriteT>baseOutputFilename, extension, fileNamingTemplate| Modifier and Type | Method and Description |
|---|---|
XmlSink.XmlWriteOperation<T> |
createWriteOperation(PipelineOptions options)
Creates an
XmlSink.XmlWriteOperation. |
<T> XmlSink.Bound<T> |
ofRecordClass(Class<T> classToBind)
Returns an XmlSink that writes objects of the class specified as XML elements.
|
XmlSink.Bound<T> |
toFilenamePrefix(String baseOutputFilename)
Returns an XmlSink that writes to files with the given prefix.
|
void |
validate(PipelineOptions options)
Validates that the root element, class to bind to a JAXB context, and filenamePrefix have
been set and that the class can be bound in a JAXB context.
|
XmlSink.Bound<T> |
withRootElement(String rootElementName)
Returns an XmlSink that writes XML files with an enclosing root element of the
supplied name.
|
public <T> XmlSink.Bound<T> ofRecordClass(Class<T> classToBind)
The specified class must be able to be used to create a JAXB context.
public XmlSink.Bound<T> toFilenamePrefix(String baseOutputFilename)
Output files will have the name {filenamePrefix}-0000i-of-0000n.xml where n is the number of output bundles that the Dataflow service divides the output into.
public XmlSink.Bound<T> withRootElement(String rootElementName)
public void validate(PipelineOptions options)
validate in class FileBasedSink<T>public XmlSink.XmlWriteOperation<T> createWriteOperation(PipelineOptions options)
XmlSink.XmlWriteOperation.createWriteOperation in class FileBasedSink<T>