public class ElasticsearchClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static String[] |
ALL_TASK_FIELDS |
AtomicInteger |
numOfBulksPersistedToDisk |
int |
numOfCouldNotBeInserted |
int |
numOfFetchedMaxTimes |
int |
numOfSuccessfulBulksFromDisk |
static org.elasticsearch.index.query.TermsQueryBuilder |
PARTIALS_QUERY |
| Constructor and Description |
|---|
ElasticsearchClient(String elasticUrl,
int indexBulkSize,
int indexingThreads,
String awsRegion,
String elasticUser,
String elasticPassword,
long maxIndexAge,
long maxIndexSizeInGB,
long maxIndexDocs,
int numOfElasticSearchActionsTries,
int maxBulkIndexFetches,
int searchMaxSize,
Map<String,Object> params,
String diskHandlerStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
bootstrapElasticsearch(int numberOfShards,
int numberOfReplicas,
int maxTotalFields) |
org.elasticsearch.action.bulk.BulkResponse |
bulk(DbBulkRequest request,
org.elasticsearch.client.RequestOptions requestOptions) |
void |
close() |
void |
deleteExpiredTasks() |
String |
getCurrentIndex() |
List<Task> |
getMultipleTasksByIds(String taskId) |
String |
getOldIndex() |
Map<String,Task> |
getSingleTaskByIds(org.elasticsearch.index.query.AbstractQueryBuilder queryBuilder,
String index,
String functionDescription,
String[] taskFieldsToInclude,
String[] taskFieldsToExclude) |
Task |
getTaskById(String taskId) |
Map<String,Task> |
getTasksByIds(String index,
Set<String> taskIds,
String functionDescription,
String[] taskFieldsToInclude,
String[] taskFieldsToExclude) |
boolean |
hasFailedRequests() |
void |
index(Map<String,Task> tasksMap,
String index) |
void |
indexAndDeleteTasks(Map<String,Task> previousIndexPartialTasks) |
boolean |
isWithPersistence() |
boolean |
retryFailedRequestsFromDisk() |
void |
retryFailedRequestsFromMemory() |
void |
setCurrentIndex(String currentIndex) |
void |
setOldIndex(String oldIndex) |
public static final org.elasticsearch.index.query.TermsQueryBuilder PARTIALS_QUERY
public static final String[] ALL_TASK_FIELDS
public AtomicInteger numOfBulksPersistedToDisk
public int numOfSuccessfulBulksFromDisk
public int numOfFetchedMaxTimes
public int numOfCouldNotBeInserted
public ElasticsearchClient(String elasticUrl, int indexBulkSize, int indexingThreads, String awsRegion, String elasticUser, String elasticPassword, long maxIndexAge, long maxIndexSizeInGB, long maxIndexDocs, int numOfElasticSearchActionsTries, int maxBulkIndexFetches, int searchMaxSize, Map<String,Object> params, String diskHandlerStrategy)
public String getCurrentIndex()
public String getOldIndex()
public void setCurrentIndex(String currentIndex)
public void setOldIndex(String oldIndex)
public Map<String,Task> getTasksByIds(String index, Set<String> taskIds, String functionDescription, String[] taskFieldsToInclude, String[] taskFieldsToExclude)
public Map<String,Task> getSingleTaskByIds(org.elasticsearch.index.query.AbstractQueryBuilder queryBuilder, String index, String functionDescription, String[] taskFieldsToInclude, String[] taskFieldsToExclude)
public void close()
public org.elasticsearch.action.bulk.BulkResponse bulk(DbBulkRequest request, org.elasticsearch.client.RequestOptions requestOptions) throws IOException
IOExceptionpublic void bootstrapElasticsearch(int numberOfShards,
int numberOfReplicas,
int maxTotalFields)
public void deleteExpiredTasks()
public void retryFailedRequestsFromMemory()
public boolean hasFailedRequests()
public boolean isWithPersistence()
public boolean retryFailedRequestsFromDisk()
Copyright © 2020. All rights reserved.