public class CsvToMapInPlaceResourceBuilder extends AbstractCsvResourceBuilder
This builder always returns the same resource Tuple, to avoid twice the memory for the current and the newly loaded copy.
IResourceBuilder.CompactionType
columns, csvOperator
Constructor and Description |
---|
CsvToMapInPlaceResourceBuilder(Supplier<IResourceTuple> supplier,
List<String> columns,
String delimiter,
boolean inferTypes,
String hashKey,
boolean lowerCase,
boolean hasHeader)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
onStart()
The same resource tuple is kept in memory, we simply signal a new loading is about to
happen.
|
onEnd
onStream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepare
public CsvToMapInPlaceResourceBuilder(Supplier<IResourceTuple> supplier, List<String> columns, String delimiter, boolean inferTypes, String hashKey, boolean lowerCase, boolean hasHeader)
supplier
- the tuple supplier. It is invoked at every re‚Singsource loading.isLazy
- true to make the tuple contain only strings, to avoid costly inner tuples. This is backed by special
tuple implementations.hashKey
- the key to be used as a hash key for the resource tuple.lowerCaseKeys
- true to convert all keys to lower case‚public void onStart()
onStart
in interface IResourceBuilder
onStart
in class AbstractCsvLineResourceBuilder
Copyright © 2023. All rights reserved.