Documentation ¶
Overview ¶
Package elasticsearch provides a DataSource which reads data from an ElasticSearch server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDataFrame ¶
func CreateDataFrame(conf *DataSourceConf, schema sif.Schema) sif.DataFrame
CreateDataFrame is a factory for DataSources
Types ¶
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
DataSource is an ElasticSearch index containing documents which will be manipulating according to a DataFrame
func (*DataSource) Analyze ¶
func (es *DataSource) Analyze() (sif.PartitionMap, error)
Analyze returns a PartitionMap, describing how the source file will be divided into Partitions
func (*DataSource) DeserializeLoader ¶
func (es *DataSource) DeserializeLoader(bytes []byte) (sif.PartitionLoader, error)
DeserializeLoader creates a PartitionLoader for this DataSource from a serialized representation
func (*DataSource) IsStreaming ¶
func (es *DataSource) IsStreaming() bool
IsStreaming returns false for ElasticSearch DataSources
type DataSourceConf ¶
type DataSourceConf struct { PartitionSize int Index string ScrollTimeout time.Duration ES6Query *es6api.SearchRequest ES7Query *es7api.SearchRequest ES6Conf *elasticsearch6.Config ES7Conf *elasticsearch7.Config }
DataSourceConf configures an ElasticSearch DataSource
type PartitionLoader ¶
type PartitionLoader struct {
// contains filtered or unexported fields
}
PartitionLoader is capable of loading partitions of data from a file
func (*PartitionLoader) GobDecode ¶
func (pl *PartitionLoader) GobDecode(in []byte) error
GobDecode deserializes a PartitionLoader
func (*PartitionLoader) GobEncode ¶
func (pl *PartitionLoader) GobEncode() ([]byte, error)
GobEncode serializes a PartitionLoader
func (*PartitionLoader) Load ¶
func (pl *PartitionLoader) Load(parser sif.DataSourceParser, widestInitialSchema sif.Schema) (sif.PartitionIterator, error)
Load is capable of loading partitions of data from a file
func (*PartitionLoader) ToString ¶
func (pl *PartitionLoader) ToString() string
ToString returns a string representation of this PartitionLoader
type PartitionMap ¶
type PartitionMap struct {
// contains filtered or unexported fields
}
PartitionMap is an iterator producing a sequence of PartitionLoaders
func (*PartitionMap) HasNext ¶
func (pm *PartitionMap) HasNext() bool
HasNext returns true iff there is another PartitionLoader remaining
func (*PartitionMap) Next ¶
func (pm *PartitionMap) Next() sif.PartitionLoader
Next returns the next PartitionLoader for a file