public abstract static class XmlIO.Write<T> extends PTransform<PCollection<T>,PDone>
XmlIO.write().name| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
PDone |
expand(PCollection<T> input) |
void |
populateDisplayData(DisplayData.Builder builder) |
XmlIO.Write<T> |
to(String filenamePrefix)
Writes to files with the given path prefix.
|
XmlIO.Write<T> |
withCharset(Charset charset)
Sets the charset used to write the file.
|
XmlIO.Write<T> |
withRecordClass(Class<T> recordClass)
Writes objects of the given class mapped to XML elements using JAXB.
|
XmlIO.Write<T> |
withRootElement(String rootElement)
Sets the enclosing root element for the generated XML files.
|
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString, validatepublic XmlIO.Write<T> to(String filenamePrefix)
Output files will have the name {filenamePrefix}-0000i-of-0000n.xml where n is the number of output bundles.
public XmlIO.Write<T> withRecordClass(Class<T> recordClass)
The specified class must be able to be used to create a JAXB context.
public XmlIO.Write<T> withRootElement(String rootElement)
public XmlIO.Write<T> withCharset(Charset charset)
public PDone expand(PCollection<T> input)
expand in class PTransform<PCollection<T>,PDone>public void populateDisplayData(DisplayData.Builder builder)
populateDisplayData in interface HasDisplayDatapopulateDisplayData in class PTransform<PCollection<T>,PDone>Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.