public class ParquetTableWriter extends java.lang.Object implements StarTableWriter, DocumentedIOHandler
| Constructor and Description |
|---|
ParquetTableWriter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
docIncludesExample()
Indicates whether the serialization of some (short) example table
should be added to the user documentation for this handler.
|
java.lang.String[] |
getExtensions()
Returns the list of filename extensions recognised by this handler.
|
java.lang.String |
getFormatName()
Gives the name of the format which is written by this writer.
|
java.lang.String |
getMimeType()
Returns a string suitable for use as the value of a MIME
Content-Type header.
|
java.lang.String |
getXmlDescription()
Returns user-directed documentation in XML format.
|
boolean |
isGroupArray()
Indicates how array-valued columns are written.
|
boolean |
looksLikeFile(java.lang.String location)
Indicates whether the destination is of a familiar form for this
kind of writer.
|
void |
setGroupArray(boolean groupArray)
Configures how array-valued columns are written.
|
void |
writeStarTable(StarTable table,
java.io.OutputStream out)
Writes a StarTable object to a given output stream.
|
void |
writeStarTable(StarTable table,
java.lang.String location,
StarTableOutput sto)
Writes a StarTable object to a given location.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmatchesExtension, readText, toLinkpublic java.lang.String getFormatName()
StarTableWritergetFormatName in interface StarTableWriterpublic java.lang.String[] getExtensions()
DocumentedIOHandlergetExtensions in interface DocumentedIOHandlerpublic boolean looksLikeFile(java.lang.String location)
StarTableWriterlooksLikeFile in interface StarTableWriterlocation - the location name (probably filename)public java.lang.String getMimeType()
StarTableWriterapplication/octet-stream"
(for binary formats) or "text/plain" for ASCII ones)
is recommended.getMimeType in interface StarTableWriterpublic boolean docIncludesExample()
DocumentedIOHandlerDocumented.getXmlDescription()
method already includes some example output, should return false.docIncludesExample in interface DocumentedIOHandlerpublic java.lang.String getXmlDescription()
DocumentedThe output should be a sequence of one or more <P> elements, using XHTML-like XML. Since rendering may be done in a number of contexts however, use of the full range of XHTML elements is discouraged. Where possible, the content should stick to simple markup such as the elements P, A, UL, OL, LI, DL, DT, DD EM, STRONG, I, B, CODE, TT, PRE.
getXmlDescription in interface Documentedpublic void writeStarTable(StarTable table, java.lang.String location, StarTableOutput sto) throws java.io.IOException
StarTableWriterStreamStarTableWriter provides a suitable implementation
for this case.writeStarTable in interface StarTableWritertable - table to writelocation - destination for startabsto - StarTableOutput which dispatched this requestTableFormatException - if startab cannot be written
to locationjava.io.IOException - if there is some I/O errorpublic void writeStarTable(StarTable table, java.io.OutputStream out) throws java.io.IOException
StarTableWriterBufferedOutputStream), and should not close it
at the end of the call.
Not all table writers are capable of writing to a stream;
an implementation may throw a TableFormatException to
indicate that it cannot do so.
writeStarTable in interface StarTableWritertable - the table to writeout - the output stream to which startab should be
writtenTableFormatException - if this table cannot be written to a
streamjava.io.IOException - if there is some I/O error@ConfigMethod(property="groupArray", usage="true|false", example="false", doc="<p>Controls the low-level detail of how array-valued columns\nare written.\nFor an array-valued int32 column named IVAL,\n<code>groupArray=false</code> will write it as\n\"<code>repeated int32 IVAL</code>\"\nwhile <code>groupArray=true</code> will write it as\n\"<code>optional group IVAL (LIST) { repeated group list\n{ optional int32 item} }</code>\".\nI don\'t know why you\'d want to do it the latter way,\nbut some other parquet writers seem to do that by default,\nso there must be some good reason.\n</p>") public void setGroupArray(boolean groupArray)
repeated primitive,
if true, it's an optional group containing a
repeated group containing a optional
primitive. The latter way seems unnecessarily complicated to me,
but it seems to be what python writes.groupArray - true for grouped arrays,
false for repeated primitivespublic boolean isGroupArray()