public class BulkTransportClient extends BaseIngestTransportClient implements Ingest
client, configHelper
Constructor and Description |
---|
BulkTransportClient() |
Modifier and Type | Method and Description |
---|---|
BulkTransportClient |
bulkDelete(org.elasticsearch.action.delete.DeleteRequest deleteRequest)
Bulked delete request.
|
BulkTransportClient |
bulkIndex(org.elasticsearch.action.index.IndexRequest indexRequest)
Bulked index request.
|
org.elasticsearch.client.Client |
client() |
BulkTransportClient |
delete(String index,
String type,
String id)
Delete document
|
BulkTransportClient |
deleteIndex(String index)
Delete index
|
BulkTransportClient |
flush(String index)
Flush the index
|
BulkTransportClient |
flushIngest()
Flush ingest, move all pending documents to the bulk indexer
|
BulkTransportClient |
flushIngestInterval(org.elasticsearch.common.unit.TimeValue flushInterval)
Set the flush interval for automatic flushing outstanding ingest requests
|
Metric |
getMetric() |
Throwable |
getThrowable()
Return last throwable if exists.
|
boolean |
hasThrowable() |
BulkTransportClient |
index(String index,
String type,
String id,
String source)
Index document
|
BulkTransportClient |
maxActionsPerBulkRequest(int maxActionsPerBulkRequest)
Set the maximum number of actions per bulk request
|
BulkTransportClient |
maxConcurrentBulkRequests(int maxConcurrentBulkRequests)
Set the maximum concurent bulk requests
|
BulkTransportClient |
maxRequestWait(org.elasticsearch.common.unit.TimeValue timeout)
Set request timeout.
|
BulkTransportClient |
maxVolumePerBulkRequest(org.elasticsearch.common.unit.ByteSizeValue maxVolumePerBulkRequest)
Set the maximum volume for bulk request before flush
|
BulkTransportClient |
newClient(org.elasticsearch.client.Client client) |
BulkTransportClient |
newClient(Map<String,String> settings) |
BulkTransportClient |
newClient(org.elasticsearch.common.settings.Settings settings) |
BulkTransportClient |
newIndex(String index)
Create a new index
|
BulkTransportClient |
refresh(String index)
Refresh the index.
|
BulkTransportClient |
replica(int value)
The number of replica for index creation
|
void |
resume() |
BulkTransportClient |
shards(int value)
The number of shards for index creation
|
void |
shutdown()
Shutdown the ingesting
|
BulkTransportClient |
startBulk(String index)
Start bulk mode
|
BulkTransportClient |
stopBulk(String index)
Stops bulk mode.
|
void |
suspend() |
int |
updateReplicaLevel(String index,
int level)
Add replica level.
|
BulkTransportClient |
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)
|
BulkTransportClient |
waitForResponses(org.elasticsearch.common.unit.TimeValue maxWaitTime)
Wait for all outstanding responses
|
deleteMapping, newIndex, newIndex, putMapping
addSetting, addSetting, addSetting, connect, createClient, findSettings, getConnectedNodes, getMappings, getSettings, getSettingsBuilder, isShutdown, mapping, mapping, resetSettings, setSettings, setting
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSetting, addSetting, addSetting, deleteMapping, getConnectedNodes, getMappings, getSettings, getSettingsBuilder, isShutdown, mapping, mapping, newIndex, newIndex, putMapping, setSettings, setting
public BulkTransportClient()
public BulkTransportClient maxActionsPerBulkRequest(int maxActionsPerBulkRequest)
Ingest
maxActionsPerBulkRequest
in interface Ingest
maxActionsPerBulkRequest
- maximum number of bulk actionspublic BulkTransportClient maxConcurrentBulkRequests(int maxConcurrentBulkRequests)
Ingest
maxConcurrentBulkRequests
in interface Ingest
maxConcurrentBulkRequests
- maximum number of concurrent ingest requestspublic BulkTransportClient maxVolumePerBulkRequest(org.elasticsearch.common.unit.ByteSizeValue maxVolumePerBulkRequest)
Ingest
maxVolumePerBulkRequest
in interface Ingest
maxVolumePerBulkRequest
- maximum volumepublic BulkTransportClient maxRequestWait(org.elasticsearch.common.unit.TimeValue timeout)
Ingest
maxRequestWait
in interface Ingest
timeout
- timeoutpublic BulkTransportClient flushIngestInterval(org.elasticsearch.common.unit.TimeValue flushInterval)
Ingest
flushIngestInterval
in interface Ingest
flushInterval
- the flush interval, default is 30 secondspublic BulkTransportClient newClient(org.elasticsearch.client.Client client)
public BulkTransportClient newClient(Map<String,String> settings)
public BulkTransportClient newClient(org.elasticsearch.common.settings.Settings settings)
newClient
in interface Ingest
newClient
in class BaseIngestTransportClient
public org.elasticsearch.client.Client client()
client
in interface Ingest
client
in class BaseTransportClient
public BulkTransportClient shards(int value)
Ingest
shards
in interface Ingest
shards
in class BaseIngestTransportClient
value
- the number of shardspublic BulkTransportClient replica(int value)
Ingest
replica
in interface Ingest
replica
in class BaseIngestTransportClient
value
- the number of replicapublic BulkTransportClient newIndex(String index)
Ingest
newIndex
in interface Ingest
newIndex
in class BaseIngestTransportClient
public BulkTransportClient deleteIndex(String index)
Ingest
deleteIndex
in interface Ingest
deleteIndex
in class BaseIngestTransportClient
public BulkTransportClient startBulk(String index) throws IOException
Ingest
startBulk
in interface Ingest
IOException
public BulkTransportClient stopBulk(String index) throws IOException
Ingest
stopBulk
in interface Ingest
IOException
public BulkTransportClient flush(String index)
Ingest
public BulkTransportClient refresh(String index)
Ingest
public BulkTransportClient index(String index, String type, String id, String source)
Ingest
public BulkTransportClient bulkIndex(org.elasticsearch.action.index.IndexRequest indexRequest)
Ingest
public BulkTransportClient delete(String index, String type, String id)
Ingest
public BulkTransportClient bulkDelete(org.elasticsearch.action.delete.DeleteRequest deleteRequest)
Ingest
bulkDelete
in interface Ingest
deleteRequest
- the delete request to addpublic BulkTransportClient flushIngest()
Ingest
flushIngest
in interface Ingest
public BulkTransportClient waitForResponses(org.elasticsearch.common.unit.TimeValue maxWaitTime) throws InterruptedException
Ingest
waitForResponses
in interface Ingest
maxWaitTime
- maximum wait timeInterruptedException
public BulkTransportClient waitForCluster(org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus status, org.elasticsearch.common.unit.TimeValue timeValue) throws IOException
Ingest
waitForCluster
in interface Ingest
waitForCluster
in class BaseIngestTransportClient
IOException
public int waitForRecovery(String index) throws IOException
Ingest
waitForRecovery
in interface Ingest
IOException
public int updateReplicaLevel(String index, int level) throws IOException
Ingest
updateReplicaLevel
in interface Ingest
level
- the replica levelIOException
public void shutdown()
Ingest
shutdown
in interface Ingest
shutdown
in class BaseTransportClient
public boolean hasThrowable()
hasThrowable
in interface Ingest
public Throwable getThrowable()
Ingest
getThrowable
in interface Ingest
elasticsearch-river-jdbc