public interface Ingest
Modifier and Type | Method and Description |
---|---|
void |
addSetting(String key,
Boolean value)
Create a key/value in the settings
|
void |
addSetting(String key,
Integer value)
Create a key/value in the settings
|
void |
addSetting(String key,
String value)
Create a key/value in the settings
|
Ingest |
bulkDelete(org.elasticsearch.action.delete.DeleteRequest deleteRequest)
Bulked delete request.
|
Ingest |
bulkIndex(org.elasticsearch.action.index.IndexRequest indexRequest)
Bulked index request.
|
org.elasticsearch.client.Client |
client() |
Ingest |
delete(String index,
String type,
String id)
Delete document
|
Ingest |
deleteIndex(String index)
Delete index
|
Ingest |
deleteMapping(String index,
String type) |
Ingest |
flush(String index)
Flush the index
|
Ingest |
flushIngest()
Flush ingest, move all pending documents to the bulk indexer
|
Ingest |
flushIngestInterval(org.elasticsearch.common.unit.TimeValue flushInterval)
Set the flush interval for automatic flushing outstanding ingest requests
|
List<String> |
getConnectedNodes() |
Map<String,String> |
getMappings() |
Metric |
getMetric() |
org.elasticsearch.common.settings.Settings |
getSettings() |
org.elasticsearch.common.settings.ImmutableSettings.Builder |
getSettingsBuilder() |
Throwable |
getThrowable()
Return last throwable if exists.
|
boolean |
hasThrowable() |
Ingest |
index(String index,
String type,
String id,
String source)
Index document
|
boolean |
isShutdown() |
void |
mapping(String type,
InputStream in) |
void |
mapping(String type,
String mapping) |
Ingest |
maxActionsPerBulkRequest(int maxActions)
Set the maximum number of actions per bulk request
|
Ingest |
maxConcurrentBulkRequests(int maxConcurentBulkRequests)
Set the maximum concurent bulk requests
|
Ingest |
maxRequestWait(org.elasticsearch.common.unit.TimeValue timeout)
Set request timeout.
|
Ingest |
maxVolumePerBulkRequest(org.elasticsearch.common.unit.ByteSizeValue maxVolume)
Set the maximum volume for bulk request before flush
|
Ingest |
newClient(org.elasticsearch.client.Client client) |
Ingest |
newClient(Map<String,String> settings) |
Ingest |
newClient(org.elasticsearch.common.settings.Settings settings) |
Ingest |
newIndex(String index)
Create a new index
|
Ingest |
newIndex(String index,
org.elasticsearch.common.settings.Settings settings,
Map<String,String> mappings) |
Ingest |
newIndex(String index,
String type,
InputStream settings,
InputStream mappings) |
Ingest |
putMapping(String index) |
Ingest |
refresh(String index)
Refresh the index.
|
Ingest |
replica(int replica)
The number of replica for index creation
|
void |
resume() |
void |
setSettings(org.elasticsearch.common.settings.Settings settings) |
void |
setting(InputStream in)
Create settings
|
Ingest |
shards(int shards)
The number of shards for index creation
|
void |
shutdown()
Shutdown the ingesting
|
Ingest |
startBulk(String index)
Start bulk mode
|
Ingest |
stopBulk(String index)
Stops bulk mode.
|
void |
suspend() |
int |
updateReplicaLevel(String index,
int level)
Add replica level.
|
Ingest |
waitForCluster(org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus status,
org.elasticsearch.common.unit.TimeValue timeValue)
Wait for cluster being healthy.
|
int |
waitForRecovery(String index)
Wait for index recovery (after replica change)
|
Ingest |
waitForResponses(org.elasticsearch.common.unit.TimeValue maxWait)
Wait for all outstanding responses
|
Ingest index(String index, String type, String id, String source)
index
- the indextype
- the typeid
- the idsource
- the sourceIngest delete(String index, String type, String id)
index
- the indextype
- the typeid
- the idList<String> getConnectedNodes()
org.elasticsearch.client.Client client()
Ingest maxActionsPerBulkRequest(int maxActions)
maxActions
- maximum number of bulk actionsIngest maxConcurrentBulkRequests(int maxConcurentBulkRequests)
maxConcurentBulkRequests
- maximum number of concurrent ingest requestsIngest maxVolumePerBulkRequest(org.elasticsearch.common.unit.ByteSizeValue maxVolume)
maxVolume
- maximum volumeIngest flushIngestInterval(org.elasticsearch.common.unit.TimeValue flushInterval)
flushInterval
- the flush interval, default is 30 secondsIngest maxRequestWait(org.elasticsearch.common.unit.TimeValue timeout)
timeout
- timeoutIngest shards(int shards)
shards
- the number of shardsIngest replica(int replica)
replica
- the number of replicavoid setSettings(org.elasticsearch.common.settings.Settings settings)
org.elasticsearch.common.settings.ImmutableSettings.Builder getSettingsBuilder()
org.elasticsearch.common.settings.Settings getSettings()
void setting(InputStream in) throws IOException
in
- the input stream with settingsIOException
void addSetting(String key, String value)
key
- the keyvalue
- the valuevoid addSetting(String key, Boolean value)
key
- the keyvalue
- the valuevoid addSetting(String key, Integer value)
key
- the keyvalue
- the valuevoid mapping(String type, InputStream in) throws IOException
IOException
void mapping(String type, String mapping) throws IOException
IOException
Map<String,String> getMappings()
Ingest putMapping(String index)
Ingest deleteMapping(String index, String type)
Ingest newIndex(String index) throws IOException
IOException
Ingest newIndex(String index, String type, InputStream settings, InputStream mappings) throws IOException
IOException
Ingest newIndex(String index, org.elasticsearch.common.settings.Settings settings, Map<String,String> mappings) throws IOException
IOException
Ingest deleteIndex(String index)
Ingest startBulk(String index) throws IOException
IOException
Ingest stopBulk(String index) throws IOException
IOException
Ingest bulkIndex(org.elasticsearch.action.index.IndexRequest indexRequest)
indexRequest
- the index request to addIngest bulkDelete(org.elasticsearch.action.delete.DeleteRequest deleteRequest)
deleteRequest
- the delete request to addIngest flushIngest()
Ingest waitForResponses(org.elasticsearch.common.unit.TimeValue maxWait) throws InterruptedException
maxWait
- maximum wait timeInterruptedException
int updateReplicaLevel(String index, int level) throws IOException
level
- the replica levelIOException
Ingest waitForCluster(org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus status, org.elasticsearch.common.unit.TimeValue timeValue) throws IOException
IOException
int waitForRecovery(String index) throws IOException
IOException
boolean hasThrowable()
Throwable getThrowable()
void shutdown()
boolean isShutdown()
void suspend()
void resume()
elasticsearch-river-jdbc