public class SolrSearchSinkConfig extends ReferencePluginConfig
| Modifier and Type | Field and Description |
|---|---|
static String |
SINGLE_NODE_MODE |
static String |
SOLR_CLOUD_MODE |
referenceName| Constructor and Description |
|---|
SolrSearchSinkConfig(String referenceName,
String solrMode,
String solrHost,
String collectionName,
String keyField,
String outputFieldMappings) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
createOutputFieldMap()
Creates a map for input field and its mapping for output field, if present.
|
String |
getCollectionName()
Returns the Solr collection name.
|
String |
getKeyField()
Returns the Key field.
|
String |
getOutputFieldMappings()
Returns the input fields and its output fields mapping.
|
org.apache.solr.client.solrj.SolrClient |
getSolrConnection()
Returns the SolrClient for establishing the connection with Solr server, using the hostname and port.
|
String |
getSolrHost()
Returns the hostname and port.
|
String |
getSolrMode()
Returns the Solr mode.
|
void |
testSolrConnection()
Verifies whether the Solr server is running or not.
|
void |
validateInputFieldsDataType(co.cask.cdap.api.data.schema.Schema inputSchema)
Validates whether the CDAP data types coming from the input schema are compatible with the Solr data types or not.
|
void |
validateKeyField(co.cask.cdap.api.data.schema.Schema inputSchema)
Validates whether the key field is present in the input schema or not.
|
void |
validateOutputFieldMappings()
Validates whether the key or value for key-value pair that specifies input and output names, is present or not.
|
void |
validateSolrConnectionString()
Validates whether the host entered for Single Node Solr instance is proper or not.
|
containsMacro, getPropertiespublic static final String SINGLE_NODE_MODE
public static final String SOLR_CLOUD_MODE
public String getSolrMode()
public String getSolrHost()
public String getCollectionName()
public String getKeyField()
@Nullable public String getOutputFieldMappings()
public Map<String,String> createOutputFieldMap()
public org.apache.solr.client.solrj.SolrClient getSolrConnection()
public void validateSolrConnectionString()
public void testSolrConnection()
public void validateKeyField(co.cask.cdap.api.data.schema.Schema inputSchema)
inputSchema - public void validateInputFieldsDataType(co.cask.cdap.api.data.schema.Schema inputSchema)
inputSchema - public void validateOutputFieldMappings()
Copyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.