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, putMappingaddSetting, addSetting, addSetting, connect, createClient, findSettings, getConnectedNodes, getMappings, getSettings, getSettingsBuilder, isShutdown, mapping, mapping, resetSettings, setSettings, settingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSetting, addSetting, addSetting, deleteMapping, getConnectedNodes, getMappings, getSettings, getSettingsBuilder, isShutdown, mapping, mapping, newIndex, newIndex, putMapping, setSettings, settingpublic BulkTransportClient()
public BulkTransportClient maxActionsPerBulkRequest(int maxActionsPerBulkRequest)
IngestmaxActionsPerBulkRequest in interface IngestmaxActionsPerBulkRequest - maximum number of bulk actionspublic BulkTransportClient maxConcurrentBulkRequests(int maxConcurrentBulkRequests)
IngestmaxConcurrentBulkRequests in interface IngestmaxConcurrentBulkRequests - maximum number of concurrent ingest requestspublic BulkTransportClient maxVolumePerBulkRequest(org.elasticsearch.common.unit.ByteSizeValue maxVolumePerBulkRequest)
IngestmaxVolumePerBulkRequest in interface IngestmaxVolumePerBulkRequest - maximum volumepublic BulkTransportClient maxRequestWait(org.elasticsearch.common.unit.TimeValue timeout)
IngestmaxRequestWait in interface Ingesttimeout - timeoutpublic BulkTransportClient flushIngestInterval(org.elasticsearch.common.unit.TimeValue flushInterval)
IngestflushIngestInterval in interface IngestflushInterval - 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 IngestnewClient in class BaseIngestTransportClientpublic org.elasticsearch.client.Client client()
client in interface Ingestclient in class BaseTransportClientpublic BulkTransportClient shards(int value)
Ingestshards in interface Ingestshards in class BaseIngestTransportClientvalue - the number of shardspublic BulkTransportClient replica(int value)
Ingestreplica in interface Ingestreplica in class BaseIngestTransportClientvalue - the number of replicapublic BulkTransportClient newIndex(String index)
IngestnewIndex in interface IngestnewIndex in class BaseIngestTransportClientpublic BulkTransportClient deleteIndex(String index)
IngestdeleteIndex in interface IngestdeleteIndex in class BaseIngestTransportClientpublic BulkTransportClient startBulk(String index) throws IOException
IngeststartBulk in interface IngestIOExceptionpublic BulkTransportClient stopBulk(String index) throws IOException
IngeststopBulk in interface IngestIOExceptionpublic BulkTransportClient flush(String index)
Ingestpublic BulkTransportClient refresh(String index)
Ingestpublic BulkTransportClient index(String index, String type, String id, String source)
Ingestpublic BulkTransportClient bulkIndex(org.elasticsearch.action.index.IndexRequest indexRequest)
Ingestpublic BulkTransportClient delete(String index, String type, String id)
Ingestpublic BulkTransportClient bulkDelete(org.elasticsearch.action.delete.DeleteRequest deleteRequest)
IngestbulkDelete in interface IngestdeleteRequest - the delete request to addpublic BulkTransportClient flushIngest()
IngestflushIngest in interface Ingestpublic BulkTransportClient waitForResponses(org.elasticsearch.common.unit.TimeValue maxWaitTime) throws InterruptedException
IngestwaitForResponses in interface IngestmaxWaitTime - maximum wait timeInterruptedExceptionpublic BulkTransportClient waitForCluster(org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus status, org.elasticsearch.common.unit.TimeValue timeValue) throws IOException
IngestwaitForCluster in interface IngestwaitForCluster in class BaseIngestTransportClientIOExceptionpublic int waitForRecovery(String index) throws IOException
IngestwaitForRecovery in interface IngestIOExceptionpublic int updateReplicaLevel(String index, int level) throws IOException
IngestupdateReplicaLevel in interface Ingestlevel - the replica levelIOExceptionpublic void shutdown()
Ingestshutdown in interface Ingestshutdown in class BaseTransportClientpublic boolean hasThrowable()
hasThrowable in interface Ingestpublic Throwable getThrowable()
IngestgetThrowable in interface Ingestelasticsearch-river-jdbc