public class IndexExtractor extends Object implements FieldExtractor<Long>
This is the row wise count, i.e., the number of examples that the data source has processed, rather than anything extracted from the data.
Constructor and Description |
---|
IndexExtractor()
Extracts the index writing to the default metadata field name
Example.NAME . |
IndexExtractor(String metadataName)
Extracts the index, writing to the supplied metadata field name.
|
Modifier and Type | Method and Description |
---|---|
Optional<Long> |
extract(ColumnarIterator.Row row)
Returns Optional which is filled if extraction succeeded.
|
String |
getMetadataName()
Gets the metadata key name.
|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
Class<Long> |
getValueType()
Gets the class of the value produced by this extractor.
|
public IndexExtractor(String metadataName)
metadataName
- The metadata field to write to.public IndexExtractor()
Example.NAME
.public String getMetadataName()
FieldExtractor
Example
if it is given to RowProcessor
.getMetadataName
in interface FieldExtractor<Long>
public Class<Long> getValueType()
FieldExtractor
getValueType
in interface FieldExtractor<Long>
public Optional<Long> extract(ColumnarIterator.Row row)
FieldExtractor
extract
in interface FieldExtractor<Long>
row
- The raw row from which to extract a valuepublic com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.