public class HeaderBuilder extends Object
That is, this class is as permissive as possible with file headers to avoid spurious query failures for trivial reasons.
| Modifier and Type | Field and Description |
|---|---|
static String |
ANONYMOUS_COLUMN_PREFIX
Prefix used to create numbered columns for missing
headers.
|
static String |
COLUMN_PREFIX
Prefix used to replace non-alphabetic characters at the start of
a column name.
|
static int |
MAX_HEADER_LEN
Maximum Drill symbol length, as enforced for headers.
|
| Constructor and Description |
|---|
HeaderBuilder(org.apache.hadoop.fs.Path filePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte data)
Appends a byte to the output character data buffer.
|
boolean |
endEmptyField()
Shortcut that lets the output know that we are closing ending a field with no data.
|
boolean |
endField()
End processing a field within a record.
|
void |
finishRecord()
Completes the processing of a given record.
|
String[] |
getHeaders() |
long |
getRecordCount()
Return the total number of records (across batches) processed
|
boolean |
isFull()
Indicates if the current batch is full and reading for this batch
should stop.
|
void |
startField(int index)
Start processing a new field within a record.
|
void |
startRecord()
Start processing a new record.
|
public static final int MAX_HEADER_LEN
public static final String COLUMN_PREFIX
public static final String ANONYMOUS_COLUMN_PREFIX
public void startField(int index)
index - index within the recordpublic boolean endField()
public boolean endEmptyField()
public void append(byte data)
data - current byte readpublic void finishRecord()
public void startRecord()
public String[] getHeaders()
public long getRecordCount()
public boolean isFull()
Copyright © 2021 The Apache Software Foundation. All rights reserved.