public class HiveJsonWriter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HiveJsonWriter.Feature
Enumeration that defines all on/off features for this writer.
|
| Constructor and Description |
|---|
HiveJsonWriter()
Default constructor.
|
HiveJsonWriter(BinaryEncoding encoding,
List<String> rootStructFieldNames)
Constructs a JSON writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disable(HiveJsonWriter.Feature feature) |
void |
enable(HiveJsonWriter.Feature feature) |
BinaryEncoding |
getBinaryEncodingType() |
Set<HiveJsonWriter.Feature> |
getFeatures() |
boolean |
isEnabled(HiveJsonWriter.Feature feature) |
void |
setBinaryEncoding(BinaryEncoding encoding) |
String |
toString() |
String |
write(Object o,
ObjectInspector objInspector)
Given an Object and an ObjectInspector, convert the structure into a JSON
text string.
|
public HiveJsonWriter()
public HiveJsonWriter(BinaryEncoding encoding, List<String> rootStructFieldNames)
encoding - The encoding to use for binary datarootStructFieldNames - The names of the fields at the root levelpublic String write(Object o, ObjectInspector objInspector) throws SerDeException
o - The object to convertobjInspector - The ObjectInspector describing the objectSerDeException - The object cannot be transformedpublic void enable(HiveJsonWriter.Feature feature)
public void disable(HiveJsonWriter.Feature feature)
public Set<HiveJsonWriter.Feature> getFeatures()
public boolean isEnabled(HiveJsonWriter.Feature feature)
public BinaryEncoding getBinaryEncodingType()
public void setBinaryEncoding(BinaryEncoding encoding)
Copyright © 2022 The Apache Software Foundation. All rights reserved.