public abstract class SplitReaderAdapter<FROM_KEY,TO_KEY,FROM_VALUE,TO_VALUE> extends SplitReader<TO_KEY,TO_VALUE>
SplitReader to convert types.| Constructor and Description |
|---|
SplitReaderAdapter(SplitReader<FROM_KEY,FROM_VALUE> delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the record reader.
|
protected abstract TO_KEY |
convertKey(FROM_KEY key) |
protected abstract TO_VALUE |
convertValue(FROM_VALUE value) |
TO_KEY |
getCurrentKey()
Get the current key.
|
TO_VALUE |
getCurrentValue()
Get the current value.
|
void |
initialize(Split split)
Called once at initialization.
|
boolean |
nextKeyValue()
Read the next key, value pair.
|
getProgresspublic SplitReaderAdapter(SplitReader<FROM_KEY,FROM_VALUE> delegate)
protected abstract TO_VALUE convertValue(FROM_VALUE value)
public void initialize(Split split) throws InterruptedException
SplitReaderinitialize in class SplitReader<TO_KEY,TO_VALUE>split - The split that defines the range of records to read.InterruptedExceptionpublic boolean nextKeyValue()
throws InterruptedException
SplitReadernextKeyValue in class SplitReader<TO_KEY,TO_VALUE>InterruptedExceptionpublic TO_KEY getCurrentKey() throws InterruptedException
SplitReadergetCurrentKey in class SplitReader<TO_KEY,TO_VALUE>InterruptedExceptionpublic TO_VALUE getCurrentValue() throws InterruptedException
SplitReadergetCurrentValue in class SplitReader<TO_KEY,TO_VALUE>InterruptedExceptionpublic void close()
SplitReaderclose in class SplitReader<TO_KEY,TO_VALUE>Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.