Class ElasticsearchSchemaFactory
- java.lang.Object
-
- org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory
-
- All Implemented Interfaces:
SchemaFactory
public class ElasticsearchSchemaFactory extends java.lang.Object implements SchemaFactory
Factory that creates anElasticsearchSchema
.Allows a custom schema to be included in a model.json file.
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchSchemaFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static org.elasticsearch.client.RestClient
connect(java.util.Map<java.lang.String,java.lang.Integer> coordinates)
Builds elastic rest client from user configurationSchema
create(SchemaPlus parentSchema, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> operand)
Creates a Schema.
-
-
-
Method Detail
-
create
public Schema create(SchemaPlus parentSchema, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> operand)
Description copied from interface:SchemaFactory
Creates a Schema.- Specified by:
create
in interfaceSchemaFactory
- Parameters:
parentSchema
- Parent schemaname
- Name of this schemaoperand
- The "operand" JSON property- Returns:
- Created schema
-
connect
private static org.elasticsearch.client.RestClient connect(java.util.Map<java.lang.String,java.lang.Integer> coordinates)
Builds elastic rest client from user configuration- Parameters:
coordinates
- list ofhostname/port
to connect to- Returns:
- newly initialized low-level rest http client for ES
-
-