public class InputSplitRecordInfoLoader<K,V> extends java.lang.Object implements RecordInfoLoader<K,V>
Constructor and Description |
---|
InputSplitRecordInfoLoader() |
Modifier and Type | Method and Description |
---|---|
void |
finishLoading()
When called, stops reading the current split
|
<any> |
getCurrReader()
Gets the current reader
|
K |
getKey()
Gets the current record's key
|
java.lang.String |
getLocationField()
Gets the location field
|
static <K,V> java.lang.String |
getLocationField(RecordInfoProvider<K,V> riProvider, Configuration conf)
Gets the location field name which is the RecordInfo's field containing the the location text that can be sent to MVSuggest.
|
static void |
getRecordInfo(RecordInfoProvider<?,?> riProvider, RecordInfo recordInfo, java.util.Map<java.lang.String,java.lang.String> extraFields) |
RecordInfoProvider<K,V> |
getRecordInfoProvider()
Gets the current
RecordInfoProvider instance |
V |
getValue()
Gets the current record's value
|
boolean |
hasNext() |
void |
init(JobContext context)
Initializes the loader.
|
RecordInfo |
next() |
void |
remove() |
void |
startLoading(InputSplit split)
Sets the split to be read
|
public void finishLoading()
RecordInfoLoader
finishLoading
in interface RecordInfoLoader<K,V>
public <any> getCurrReader()
RecordInfoLoader
getCurrReader
in interface RecordInfoLoader<K,V>
public K getKey()
RecordInfoLoader
getKey
in interface RecordInfoLoader<K,V>
public java.lang.String getLocationField()
RecordInfoLoader
getLocationField
in interface RecordInfoLoader<K,V>
public static <K,V> java.lang.String getLocationField(RecordInfoProvider<K,V> riProvider, Configuration conf)
riProvider
-conf
-public static void getRecordInfo(RecordInfoProvider<?,?> riProvider, RecordInfo recordInfo, java.util.Map<java.lang.String,java.lang.String> extraFields)
public RecordInfoProvider<K,V> getRecordInfoProvider()
RecordInfoLoader
RecordInfoProvider
instancegetRecordInfoProvider
in interface RecordInfoLoader<K,V>
public V getValue()
RecordInfoLoader
getValue
in interface RecordInfoLoader<K,V>
public boolean hasNext()
public void init(JobContext context)
RecordInfoLoader
init
in interface RecordInfoLoader<K,V>
context
- the job contextpublic RecordInfo next()
public void remove()
public void startLoading(InputSplit split) throws java.io.IOException, java.lang.InterruptedException
RecordInfoLoader
startLoading
in interface RecordInfoLoader<K,V>
split
- an input splitjava.io.IOException
java.lang.InterruptedException
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.