Fix all javadocs issues, re-enable compiler warnings (but disable on java9 where maven is broken)
This commit is contained in:
parent
eedb39a5a9
commit
2f67cacaa3
|
@ -55,8 +55,8 @@ import static org.elasticsearch.common.lucene.search.Queries.fixNegativeQueryIfN
|
|||
/**
|
||||
* A query parser that uses the {@link MapperService} in order to build smarter
|
||||
* queries based on the mapping information.
|
||||
* <p/>
|
||||
* <p>Also breaks fields with [type].[name] into a boolean query that must include the type
|
||||
* <p>
|
||||
* Also breaks fields with [type].[name] into a boolean query that must include the type
|
||||
* as well as the query on the name.
|
||||
*/
|
||||
public class MapperQueryParser extends QueryParser {
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class XFilteredDocIdSetIterator extends DocIdSetIterator {
|
|||
* Validation method to determine whether a docid should be in the result set.
|
||||
* @param doc docid to be tested
|
||||
* @return true if input docid should be in the result set, false otherwise.
|
||||
* @see #FilteredDocIdSetIterator(DocIdSetIterator)
|
||||
* @see #XFilteredDocIdSetIterator(DocIdSetIterator)
|
||||
* @throws CollectionTerminatedException if the underlying iterator is exhausted.
|
||||
*/
|
||||
protected abstract boolean match(int doc);
|
||||
|
|
|
@ -100,7 +100,7 @@ import java.util.*;
|
|||
public class XAnalyzingSuggester extends Lookup {
|
||||
|
||||
/**
|
||||
* FST<Weight,Surface>:
|
||||
* FST<Weight,Surface>:
|
||||
* input is the analyzed form, with a null byte between terms
|
||||
* weights are encoded as costs: (Integer.MAX_VALUE-weight)
|
||||
* surface is the original, unanalyzed form.
|
||||
|
@ -129,14 +129,14 @@ public class XAnalyzingSuggester extends Lookup {
|
|||
*/
|
||||
private final boolean preserveSep;
|
||||
|
||||
/** Include this flag in the options parameter to {@link
|
||||
/** Include this flag in the options parameter to {@code
|
||||
* #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)} to always
|
||||
* return the exact match first, regardless of score. This
|
||||
* has no performance impact but could result in
|
||||
* low-quality suggestions. */
|
||||
public static final int EXACT_FIRST = 1;
|
||||
|
||||
/** Include this flag in the options parameter to {@link
|
||||
/** Include this flag in the options parameter to {@code
|
||||
* #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)} to preserve
|
||||
* token separators when matching. */
|
||||
public static final int PRESERVE_SEP = 2;
|
||||
|
@ -183,7 +183,7 @@ public class XAnalyzingSuggester extends Lookup {
|
|||
private long count = 0;
|
||||
|
||||
/**
|
||||
* Calls {@link #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)
|
||||
* Calls {@code #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)
|
||||
* AnalyzingSuggester(analyzer, analyzer, EXACT_FIRST |
|
||||
* PRESERVE_SEP, 256, -1)}
|
||||
*/
|
||||
|
@ -192,7 +192,7 @@ public class XAnalyzingSuggester extends Lookup {
|
|||
}
|
||||
|
||||
/**
|
||||
* Calls {@link #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)
|
||||
* Calls {@code #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)
|
||||
* AnalyzingSuggester(indexAnalyzer, queryAnalyzer, EXACT_FIRST |
|
||||
* PRESERVE_SEP, 256, -1)}
|
||||
*/
|
||||
|
@ -986,12 +986,12 @@ public long ramBytesUsed() {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/** cost -> weight */
|
||||
/** cost -> weight */
|
||||
public static int decodeWeight(long encoded) {
|
||||
return (int)(Integer.MAX_VALUE - encoded);
|
||||
}
|
||||
|
||||
/** weight -> cost */
|
||||
/** weight -> cost */
|
||||
public static int encodeWeight(long value) {
|
||||
if (value < 0 || value > Integer.MAX_VALUE) {
|
||||
throw new UnsupportedOperationException("cannot encode value: " + value);
|
||||
|
|
|
@ -115,7 +115,7 @@ public final class XFuzzySuggester extends XAnalyzingSuggester {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link FuzzySuggester} instance with an index & a query analyzer initialized with default values.
|
||||
* Creates a {@link FuzzySuggester} instance with an index & a query analyzer initialized with default values.
|
||||
*
|
||||
* @param indexAnalyzer
|
||||
* Analyzer that will be used for analyzing suggestions while building the index.
|
||||
|
@ -143,7 +143,7 @@ public final class XFuzzySuggester extends XAnalyzingSuggester {
|
|||
* @param maxGraphExpansions Maximum number of graph paths
|
||||
* to expand from the analyzed form. Set this to -1 for
|
||||
* no limit.
|
||||
* @param maxEdits must be >= 0 and <= {@link org.apache.lucene.util.automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE} .
|
||||
* @param maxEdits must be >= 0 and <= {@link org.apache.lucene.util.automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE} .
|
||||
* @param transpositions <code>true</code> if transpositions should be treated as a primitive
|
||||
* edit operation. If this is false, comparisons will implement the classic
|
||||
* Levenshtein algorithm.
|
||||
|
|
|
@ -55,7 +55,7 @@ public class ElasticsearchException extends RuntimeException implements ToXConte
|
|||
/**
|
||||
* Construct a <code>ElasticsearchException</code> with the specified detail message.
|
||||
*
|
||||
* The message can be parameterized using {@code {}} as placeholders for the given
|
||||
* The message can be parameterized using <code>{}</code> as placeholders for the given
|
||||
* arguments
|
||||
*
|
||||
* @param msg the detail message
|
||||
|
@ -69,7 +69,7 @@ public class ElasticsearchException extends RuntimeException implements ToXConte
|
|||
* Construct a <code>ElasticsearchException</code> with the specified detail message
|
||||
* and nested exception.
|
||||
*
|
||||
* The message can be parameterized using {@code {}} as placeholders for the given
|
||||
* The message can be parameterized using <code>{}</code> as placeholders for the given
|
||||
* arguments
|
||||
*
|
||||
* @param msg the detail message
|
||||
|
|
|
@ -37,8 +37,8 @@ public interface ActionFuture<T> extends Future<T> {
|
|||
* Similar to {@link #get()}, just catching the {@link InterruptedException} and throwing
|
||||
* an {@link IllegalStateException} instead. Also catches
|
||||
* {@link java.util.concurrent.ExecutionException} and throws the actual cause instead.
|
||||
* <p/>
|
||||
* <p>Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* <p>
|
||||
* Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is
|
||||
* still accessible using {@link #getRootFailure()}.
|
||||
*/
|
||||
|
@ -48,8 +48,8 @@ public interface ActionFuture<T> extends Future<T> {
|
|||
* Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing
|
||||
* an {@link IllegalStateException} instead. Also catches
|
||||
* {@link java.util.concurrent.ExecutionException} and throws the actual cause instead.
|
||||
* <p/>
|
||||
* <p>Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* <p>
|
||||
* Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is
|
||||
* still accessible using {@link #getRootFailure()}.
|
||||
*/
|
||||
|
@ -59,8 +59,8 @@ public interface ActionFuture<T> extends Future<T> {
|
|||
* Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing
|
||||
* an {@link IllegalStateException} instead. Also catches
|
||||
* {@link java.util.concurrent.ExecutionException} and throws the actual cause instead.
|
||||
* <p/>
|
||||
* <p>Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* <p>
|
||||
* Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is
|
||||
* still accessible using {@link #getRootFailure()}.
|
||||
*
|
||||
|
@ -72,8 +72,8 @@ public interface ActionFuture<T> extends Future<T> {
|
|||
* Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing
|
||||
* an {@link IllegalStateException} instead. Also catches
|
||||
* {@link java.util.concurrent.ExecutionException} and throws the actual cause instead.
|
||||
* <p/>
|
||||
* <p>Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* <p>
|
||||
* Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is
|
||||
* still accessible using {@link #getRootFailure()}.
|
||||
*/
|
||||
|
@ -83,8 +83,8 @@ public interface ActionFuture<T> extends Future<T> {
|
|||
* Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing
|
||||
* an {@link IllegalStateException} instead. Also catches
|
||||
* {@link java.util.concurrent.ExecutionException} and throws the actual cause instead.
|
||||
* <p/>
|
||||
* <p>Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* <p>
|
||||
* Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
|
||||
* from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is
|
||||
* still accessible using {@link #getRootFailure()}.
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,6 @@ public interface DocumentRequest<T> extends IndicesRequest {
|
|||
|
||||
/**
|
||||
* Set the routing for this request
|
||||
* @param routing
|
||||
* @return the Request
|
||||
*/
|
||||
T routing(String routing);
|
||||
|
|
|
@ -126,7 +126,7 @@ public class ClusterHealthRequest extends MasterNodeReadRequest<ClusterHealthReq
|
|||
}
|
||||
|
||||
/**
|
||||
* Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
|
||||
* Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
|
||||
*/
|
||||
public ClusterHealthRequest waitForNodes(String waitForNodes) {
|
||||
this.waitForNodes = waitForNodes;
|
||||
|
|
|
@ -74,7 +74,7 @@ public class ClusterHealthRequestBuilder extends MasterNodeReadOperationRequestB
|
|||
}
|
||||
|
||||
/**
|
||||
* Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
|
||||
* Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
|
||||
*/
|
||||
public ClusterHealthRequestBuilder setWaitForNodes(String waitForNodes) {
|
||||
request.waitForNodes(waitForNodes);
|
||||
|
|
|
@ -30,7 +30,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
|
||||
/**
|
||||
* Unregister repository request.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The unregister repository command just unregisters the repository. No data is getting deleted from the repository.
|
||||
*/
|
||||
public class DeleteRepositoryRequest extends AcknowledgedRequest<DeleteRepositoryRequest> {
|
||||
|
|
|
@ -41,7 +41,7 @@ public class GetRepositoriesRequest extends MasterNodeReadRequest<GetRepositorie
|
|||
|
||||
/**
|
||||
* Constructs a new get repositories request with a list of repositories.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If the list of repositories is empty or it contains a single element "_all", all registered repositories
|
||||
* are returned.
|
||||
*
|
||||
|
@ -71,7 +71,7 @@ public class GetRepositoriesRequest extends MasterNodeReadRequest<GetRepositorie
|
|||
|
||||
/**
|
||||
* Sets the list or repositories.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If the list of repositories is empty or it contains a single element "_all", all registered repositories
|
||||
* are returned.
|
||||
*
|
||||
|
|
|
@ -41,7 +41,7 @@ import static org.elasticsearch.common.settings.Settings.writeSettingsToStream;
|
|||
|
||||
/**
|
||||
* Register repository request.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Registers a repository with given name, type and settings. If the repository with the same name already
|
||||
* exists in the cluster, the new repository will replace the existing repository.
|
||||
*/
|
||||
|
@ -98,7 +98,6 @@ public class PutRepositoryRequest extends AcknowledgedRequest<PutRepositoryReque
|
|||
|
||||
/**
|
||||
* The type of the repository
|
||||
* <p/>
|
||||
* <ul>
|
||||
* <li>"fs" - shared filesystem repository</li>
|
||||
* </ul>
|
||||
|
|
|
@ -30,7 +30,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
|
||||
/**
|
||||
* Unregister repository request.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The unregister repository command just unregisters the repository. No data is getting deleted from the repository.
|
||||
*/
|
||||
public class VerifyRepositoryRequest extends AcknowledgedRequest<VerifyRepositoryRequest> {
|
||||
|
|
|
@ -49,7 +49,7 @@ import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeBo
|
|||
|
||||
/**
|
||||
* Create snapshot request
|
||||
* <p/>
|
||||
* <p>
|
||||
* The only mandatory parameter is repository name. The repository name has to satisfy the following requirements
|
||||
* <ul>
|
||||
* <li>be a non-empty string</li>
|
||||
|
@ -162,12 +162,11 @@ public class CreateSnapshotRequest extends MasterNodeRequest<CreateSnapshotReque
|
|||
|
||||
/**
|
||||
* Sets a list of indices that should be included into the snapshot
|
||||
* <p/>
|
||||
* <p>
|
||||
* The list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with
|
||||
* prefix "test" except index "test42". Aliases are supported. An empty list or {"_all"} will snapshot all open
|
||||
* indices in the cluster.
|
||||
*
|
||||
* @param indices
|
||||
* @return this request
|
||||
*/
|
||||
@Override
|
||||
|
@ -178,12 +177,11 @@ public class CreateSnapshotRequest extends MasterNodeRequest<CreateSnapshotReque
|
|||
|
||||
/**
|
||||
* Sets a list of indices that should be included into the snapshot
|
||||
* <p/>
|
||||
* <p>
|
||||
* The list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with
|
||||
* prefix "test" except index "test42". Aliases are supported. An empty list or {"_all"} will snapshot all open
|
||||
* indices in the cluster.
|
||||
*
|
||||
* @param indices
|
||||
* @return this request
|
||||
*/
|
||||
public CreateSnapshotRequest indices(List<String> indices) {
|
||||
|
@ -268,7 +266,7 @@ public class CreateSnapshotRequest extends MasterNodeRequest<CreateSnapshotReque
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -281,7 +279,7 @@ public class CreateSnapshotRequest extends MasterNodeRequest<CreateSnapshotReque
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -294,7 +292,7 @@ public class CreateSnapshotRequest extends MasterNodeRequest<CreateSnapshotReque
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings in JSON, YAML or properties format
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param source repository-specific snapshot settings
|
||||
|
@ -307,7 +305,7 @@ public class CreateSnapshotRequest extends MasterNodeRequest<CreateSnapshotReque
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param source repository-specific snapshot settings
|
||||
|
|
|
@ -69,12 +69,11 @@ public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuil
|
|||
|
||||
/**
|
||||
* Sets a list of indices that should be included into the snapshot
|
||||
* <p/>
|
||||
* <p>
|
||||
* The list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with
|
||||
* prefix "test" except index "test42". Aliases are supported. An empty list or {"_all"} will snapshot all open
|
||||
* indices in the cluster.
|
||||
*
|
||||
* @param indices
|
||||
* @return this builder
|
||||
*/
|
||||
public CreateSnapshotRequestBuilder setIndices(String... indices) {
|
||||
|
@ -117,7 +116,7 @@ public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuil
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -130,7 +129,7 @@ public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuil
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -143,7 +142,7 @@ public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuil
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings in YAML, JSON or properties format
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param source repository-specific snapshot settings
|
||||
|
@ -156,7 +155,7 @@ public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuil
|
|||
|
||||
/**
|
||||
* Sets repository-specific snapshot settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
|
|
@ -69,14 +69,11 @@ public class CreateSnapshotResponse extends ActionResponse implements ToXContent
|
|||
|
||||
/**
|
||||
* Returns HTTP status
|
||||
* <p/>
|
||||
* <ul>
|
||||
* <li>{@link RestStatus#ACCEPTED}</li> if snapshot is still in progress
|
||||
* <li>{@link RestStatus#OK}</li> if snapshot was successful or partially successful
|
||||
* <li>{@link RestStatus#INTERNAL_SERVER_ERROR}</li> if snapshot failed completely
|
||||
* <li>{@link RestStatus#ACCEPTED} if snapshot is still in progress</li>
|
||||
* <li>{@link RestStatus#OK} if snapshot was successful or partially successful</li>
|
||||
* <li>{@link RestStatus#INTERNAL_SERVER_ERROR} if snapshot failed completely</li>
|
||||
* </ul>
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public RestStatus status() {
|
||||
if (snapshotInfo == null) {
|
||||
|
|
|
@ -30,7 +30,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
|
||||
/**
|
||||
* Delete snapshot request
|
||||
* <p/>
|
||||
* <p>
|
||||
* Delete snapshot request removes the snapshot record from the repository and cleans up all
|
||||
* files that are associated with this particular snapshot. All files that are shared with
|
||||
* at least one other existing snapshot are left intact.
|
||||
|
|
|
@ -105,7 +105,6 @@ public class GetSnapshotsRequest extends MasterNodeRequest<GetSnapshotsRequest>
|
|||
/**
|
||||
* Sets the list of snapshots to be returned
|
||||
*
|
||||
* @param snapshots
|
||||
* @return this request
|
||||
*/
|
||||
public GetSnapshotsRequest snapshots(String[] snapshots) {
|
||||
|
|
|
@ -147,7 +147,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets the list of indices that should be restored from snapshot
|
||||
* <p/>
|
||||
* <p>
|
||||
* The list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with
|
||||
* prefix "test" except index "test42". Aliases are not supported. An empty list or {"_all"} will restore all open
|
||||
* indices in the snapshot.
|
||||
|
@ -162,7 +162,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets the list of indices that should be restored from snapshot
|
||||
* <p/>
|
||||
* <p>
|
||||
* The list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with
|
||||
* prefix "test" except index "test42". Aliases are not supported. An empty list or {"_all"} will restore all open
|
||||
* indices in the snapshot.
|
||||
|
@ -177,8 +177,6 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Returns list of indices that should be restored from snapshot
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String[] indices() {
|
||||
return indices;
|
||||
|
@ -208,7 +206,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets rename pattern that should be applied to restored indices.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Indices that match the rename pattern will be renamed according to {@link #renameReplacement(String)}. The
|
||||
* rename pattern is applied according to the {@link java.util.regex.Matcher#appendReplacement(StringBuffer, String)}
|
||||
* The request will fail if two or more indices will be renamed into the same name.
|
||||
|
@ -232,11 +230,10 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets rename replacement
|
||||
* <p/>
|
||||
* <p>
|
||||
* See {@link #renamePattern(String)} for more information.
|
||||
*
|
||||
* @param renameReplacement rename replacement
|
||||
* @return
|
||||
*/
|
||||
public RestoreSnapshotRequest renameReplacement(String renameReplacement) {
|
||||
this.renameReplacement = renameReplacement;
|
||||
|
@ -294,7 +291,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -307,7 +304,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -320,7 +317,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings in JSON, YAML or properties format
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param source repository-specific snapshot settings
|
||||
|
@ -333,7 +330,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param source repository-specific snapshot settings
|
||||
|
@ -384,7 +381,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* If set to true the restore procedure will restore global cluster state.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The global cluster state includes persistent settings and index template definitions.
|
||||
*
|
||||
* @param includeGlobalState true if global state should be restored from the snapshot
|
||||
|
@ -548,7 +545,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Parses restore definition
|
||||
* <p/>
|
||||
* <p>
|
||||
* JSON, YAML and properties formats are supported
|
||||
*
|
||||
* @param source restore definition
|
||||
|
@ -567,7 +564,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Parses restore definition
|
||||
* <p/>
|
||||
* <p>
|
||||
* JSON, YAML and properties formats are supported
|
||||
*
|
||||
* @param source restore definition
|
||||
|
@ -579,7 +576,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Parses restore definition
|
||||
* <p/>
|
||||
* <p>
|
||||
* JSON, YAML and properties formats are supported
|
||||
*
|
||||
* @param source restore definition
|
||||
|
@ -600,7 +597,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
|||
|
||||
/**
|
||||
* Parses restore definition
|
||||
* <p/>
|
||||
* <p>
|
||||
* JSON, YAML and properties formats are supported
|
||||
*
|
||||
* @param source restore definition
|
||||
|
|
|
@ -71,7 +71,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* Sets the list of indices that should be restored from snapshot
|
||||
* <p/>
|
||||
* <p>
|
||||
* The list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with
|
||||
* prefix "test" except index "test42". Aliases are not supported. An empty list or {"_all"} will restore all open
|
||||
* indices in the snapshot.
|
||||
|
@ -99,7 +99,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* Sets rename pattern that should be applied to restored indices.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Indices that match the rename pattern will be renamed according to {@link #setRenameReplacement(String)}. The
|
||||
* rename pattern is applied according to the {@link java.util.regex.Matcher#appendReplacement(StringBuffer, String)}
|
||||
* The request will fail if two or more indices will be renamed into the same name.
|
||||
|
@ -114,7 +114,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* Sets rename replacement
|
||||
* <p/>
|
||||
* <p>
|
||||
* See {@link #setRenamePattern(String)} for more information.
|
||||
*
|
||||
* @param renameReplacement rename replacement
|
||||
|
@ -128,7 +128,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -141,7 +141,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param settings repository-specific snapshot settings
|
||||
|
@ -154,7 +154,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings in JSON, YAML or properties format
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param source repository-specific snapshot settings
|
||||
|
@ -167,7 +167,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* Sets repository-specific restore settings
|
||||
* <p/>
|
||||
* <p>
|
||||
* See repository documentation for more information.
|
||||
*
|
||||
* @param source repository-specific snapshot settings
|
||||
|
@ -191,7 +191,7 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui
|
|||
|
||||
/**
|
||||
* If set to true the restore procedure will restore global cluster state.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The global cluster state includes persistent settings and index template definitions.
|
||||
*
|
||||
* @param restoreGlobalState true if global state should be restored from the snapshot
|
||||
|
|
|
@ -149,7 +149,6 @@ public class SnapshotStatus implements ToXContent, Streamable {
|
|||
*
|
||||
* @param in stream input
|
||||
* @return deserialized snapshot status
|
||||
* @throws IOException
|
||||
*/
|
||||
public static SnapshotStatus readSnapshotStatus(StreamInput in) throws IOException {
|
||||
SnapshotStatus snapshotInfo = new SnapshotStatus();
|
||||
|
|
|
@ -105,7 +105,6 @@ public class SnapshotsStatusRequest extends MasterNodeRequest<SnapshotsStatusReq
|
|||
/**
|
||||
* Sets the list of snapshots to be returned
|
||||
*
|
||||
* @param snapshots
|
||||
* @return this request
|
||||
*/
|
||||
public SnapshotsStatusRequest snapshots(String[] snapshots) {
|
||||
|
|
|
@ -297,7 +297,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
|
|||
}
|
||||
|
||||
/**
|
||||
* maximum replication factor across the indices. See {@link #getReplication
|
||||
* maximum replication factor across the indices. See {@link #getReplication}
|
||||
*/
|
||||
public double getMaxIndexReplication() {
|
||||
return this.maxIndexReplication;
|
||||
|
|
|
@ -55,8 +55,8 @@ import static org.elasticsearch.common.settings.Settings.writeSettingsToStream;
|
|||
|
||||
/**
|
||||
* A request to create an index. Best created with {@link org.elasticsearch.client.Requests#createIndexRequest(String)}.
|
||||
* <p/>
|
||||
* <p>The index created can optionally be created with {@link #settings(org.elasticsearch.common.settings.Settings)}.
|
||||
* <p>
|
||||
* The index created can optionally be created with {@link #settings(org.elasticsearch.common.settings.Settings)}.
|
||||
*
|
||||
* @see org.elasticsearch.client.IndicesAdminClient#create(CreateIndexRequest)
|
||||
* @see org.elasticsearch.client.Requests#createIndexRequest(String)
|
||||
|
|
|
@ -53,7 +53,7 @@ public class DeleteIndexRequestBuilder extends MasterNodeOperationRequestBuilder
|
|||
|
||||
/**
|
||||
* Specifies what type of requested indices to ignore and wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example indices that don't exist.
|
||||
*/
|
||||
public DeleteIndexRequestBuilder setIndicesOptions(IndicesOptions options) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public class IndicesExistsRequestBuilder extends MasterNodeReadOperationRequestB
|
|||
|
||||
/**
|
||||
* Specifies what type of requested indices to ignore and wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example indices that don't exist.
|
||||
*/
|
||||
public IndicesExistsRequestBuilder setIndicesOptions(IndicesOptions options) {
|
||||
|
|
|
@ -30,8 +30,8 @@ import java.io.IOException;
|
|||
* A flush request to flush one or more indices. The flush process of an index basically frees memory from the index
|
||||
* by flushing data to the index storage and clearing the internal transaction log. By default, Elasticsearch uses
|
||||
* memory heuristics in order to automatically trigger flush operations as required in order to clear memory.
|
||||
* <p/>
|
||||
* <p>Best created with {@link org.elasticsearch.client.Requests#flushRequest(String...)}.
|
||||
* <p>
|
||||
* Best created with {@link org.elasticsearch.client.Requests#flushRequest(String...)}.
|
||||
*
|
||||
* @see org.elasticsearch.client.Requests#flushRequest(String...)
|
||||
* @see org.elasticsearch.client.IndicesAdminClient#flush(FlushRequest)
|
||||
|
|
|
@ -49,7 +49,7 @@ public class GetFieldMappingsRequest extends ActionRequest<GetFieldMappingsReque
|
|||
|
||||
/**
|
||||
* Indicate whether the receiving node should operate based on local index information or forward requests,
|
||||
* where needed, to other nodes. If running locally, request will not raise errors if running locally & missing indices.
|
||||
* where needed, to other nodes. If running locally, request will not raise errors if running locally & missing indices.
|
||||
*/
|
||||
public GetFieldMappingsRequest local(boolean local) {
|
||||
this.local = local;
|
||||
|
|
|
@ -40,8 +40,8 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* Puts mapping definition registered under a specific type into one or more indices. Best created with
|
||||
* {@link org.elasticsearch.client.Requests#putMappingRequest(String...)}.
|
||||
* <p/>
|
||||
* <p>If the mappings already exists, the new mappings will be merged with the new one. If there are elements
|
||||
* <p>
|
||||
* If the mappings already exists, the new mappings will be merged with the new one. If there are elements
|
||||
* that can't be merged are detected, the request will be rejected.
|
||||
*
|
||||
* @see org.elasticsearch.client.Requests#putMappingRequest(String...)
|
||||
|
|
|
@ -42,7 +42,7 @@ public class PutMappingRequestBuilder extends AcknowledgedRequestBuilder<PutMapp
|
|||
|
||||
/**
|
||||
* Specifies what type of requested indices to ignore and wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example indices that don't exist.
|
||||
*/
|
||||
public PutMappingRequestBuilder setIndicesOptions(IndicesOptions options) {
|
||||
|
|
|
@ -28,8 +28,8 @@ import java.io.IOException;
|
|||
/**
|
||||
* A request to optimize one or more indices. In order to optimize on all the indices, pass an empty array or
|
||||
* <tt>null</tt> for the indices.
|
||||
* <p/>
|
||||
* <p>{@link #maxNumSegments(int)} allows to control the number of segments to optimize down to. By default, will
|
||||
* <p>
|
||||
* {@link #maxNumSegments(int)} allows to control the number of segments to optimize down to. By default, will
|
||||
* cause the optimize process to optimize down to half the configured number of segments.
|
||||
*
|
||||
* @see org.elasticsearch.client.Requests#optimizeRequest(String...)
|
||||
|
@ -62,7 +62,7 @@ public class OptimizeRequest extends BroadcastRequest<OptimizeRequest> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Will optimize the index down to <= maxNumSegments. By default, will cause the optimize
|
||||
* Will optimize the index down to <= maxNumSegments. By default, will cause the optimize
|
||||
* process to optimize down to half the configured number of segments.
|
||||
*/
|
||||
public int maxNumSegments() {
|
||||
|
@ -70,7 +70,7 @@ public class OptimizeRequest extends BroadcastRequest<OptimizeRequest> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Will optimize the index down to <= maxNumSegments. By default, will cause the optimize
|
||||
* Will optimize the index down to <= maxNumSegments. By default, will cause the optimize
|
||||
* process to optimize down to half the configured number of segments.
|
||||
*/
|
||||
public OptimizeRequest maxNumSegments(int maxNumSegments) {
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.client.ElasticsearchClient;
|
|||
/**
|
||||
* A request to optimize one or more indices. In order to optimize on all the indices, pass an empty array or
|
||||
* <tt>null</tt> for the indices.
|
||||
* <p/>
|
||||
* <p>{@link #setMaxNumSegments(int)} allows to control the number of segments to optimize down to. By default, will
|
||||
* cause the optimize process to optimize down to half the configured number of segments.
|
||||
*/
|
||||
|
@ -36,7 +35,7 @@ public class OptimizeRequestBuilder extends BroadcastOperationRequestBuilder<Opt
|
|||
}
|
||||
|
||||
/**
|
||||
* Will optimize the index down to <= maxNumSegments. By default, will cause the optimize
|
||||
* Will optimize the index down to <= maxNumSegments. By default, will cause the optimize
|
||||
* process to optimize down to half the configured number of segments.
|
||||
*/
|
||||
public OptimizeRequestBuilder setMaxNumSegments(int maxNumSegments) {
|
||||
|
|
|
@ -44,7 +44,7 @@ public class GetSettingsRequestBuilder extends MasterNodeReadOperationRequestBui
|
|||
|
||||
/**
|
||||
* Specifies what type of requested indices to ignore and wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example indices that don't exist.
|
||||
*/
|
||||
public GetSettingsRequestBuilder setIndicesOptions(IndicesOptions options) {
|
||||
|
|
|
@ -45,7 +45,7 @@ public class UpdateSettingsRequestBuilder extends AcknowledgedRequestBuilder<Upd
|
|||
|
||||
/**
|
||||
* Specifies what type of requested indices to ignore and wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example indices that don't exist.
|
||||
*/
|
||||
public UpdateSettingsRequestBuilder setIndicesOptions(IndicesOptions options) {
|
||||
|
|
|
@ -28,10 +28,10 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* A request to get indices level stats. Allow to enable different stats to be returned.
|
||||
* <p/>
|
||||
* <p>By default, all statistics are enabled.
|
||||
* <p/>
|
||||
* <p>All the stats to be returned can be cleared using {@link #clear()}, at which point, specific
|
||||
* <p>
|
||||
* By default, all statistics are enabled.
|
||||
* <p>
|
||||
* All the stats to be returned can be cleared using {@link #clear()}, at which point, specific
|
||||
* stats can be enabled.
|
||||
*/
|
||||
public class IndicesStatsRequest extends BroadcastRequest<IndicesStatsRequest> {
|
||||
|
|
|
@ -24,11 +24,11 @@ import org.elasticsearch.client.ElasticsearchClient;
|
|||
|
||||
/**
|
||||
* A request to get indices level stats. Allow to enable different stats to be returned.
|
||||
* <p/>
|
||||
* <p>By default, the {@link #setDocs(boolean)}, {@link #setStore(boolean)}, {@link #setIndexing(boolean)}
|
||||
* <p>
|
||||
* By default, the {@link #setDocs(boolean)}, {@link #setStore(boolean)}, {@link #setIndexing(boolean)}
|
||||
* are enabled. Other stats can be enabled as well.
|
||||
* <p/>
|
||||
* <p>All the stats to be returned can be cleared using {@link #clear()}, at which point, specific
|
||||
* <p>
|
||||
* All the stats to be returned can be cleared using {@link #clear()}, at which point, specific
|
||||
* stats can be enabled.
|
||||
*/
|
||||
public class IndicesStatsRequestBuilder extends BroadcastOperationRequestBuilder<IndicesStatsRequest, IndicesStatsResponse, IndicesStatsRequestBuilder> {
|
||||
|
|
|
@ -28,7 +28,6 @@ import java.io.IOException;
|
|||
/**
|
||||
* A request to upgrade one or more indices. In order to optimize on all the indices, pass an empty array or
|
||||
* <tt>null</tt> for the indices.
|
||||
* <p/>
|
||||
* @see org.elasticsearch.client.Requests#upgradeRequest(String...)
|
||||
* @see org.elasticsearch.client.IndicesAdminClient#upgrade(UpgradeRequest)
|
||||
* @see UpgradeResponse
|
||||
|
|
|
@ -40,8 +40,8 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* A request to validate a specific query.
|
||||
* <p/>
|
||||
* <p>The request requires the query source to be set either using {@link #source(QuerySourceBuilder)},
|
||||
* <p>
|
||||
* The request requires the query source to be set either using {@link #source(QuerySourceBuilder)},
|
||||
* or {@link #source(byte[])}.
|
||||
*/
|
||||
public class ValidateQueryRequest extends BroadcastRequest<ValidateQueryRequest> {
|
||||
|
|
|
@ -48,7 +48,7 @@ public class DeleteWarmerRequest extends AcknowledgedRequest<DeleteWarmerRequest
|
|||
/**
|
||||
* Constructs a new delete warmer request for the specified name.
|
||||
*
|
||||
* @param names: the name (or wildcard expression) of the warmer to match, null to delete all.
|
||||
* @param names the name (or wildcard expression) of the warmer to match, null to delete all.
|
||||
*/
|
||||
public DeleteWarmerRequest(String... names) {
|
||||
names(names);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class DeleteWarmerRequestBuilder extends AcknowledgedRequestBuilder<Delet
|
|||
|
||||
/**
|
||||
* Specifies what type of requested indices to ignore and wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example indices that don't exist.
|
||||
*/
|
||||
public DeleteWarmerRequestBuilder setIndicesOptions(IndicesOptions options) {
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
* search. This includes things such as the query cache, filesystem cache, and loading field data for fields.
|
||||
* </p>
|
||||
*
|
||||
* @see the reference guide for more detailed information about the Indices / Search Warmer
|
||||
* See the reference guide for more detailed information about the Indices / Search Warmer
|
||||
*/
|
||||
package org.elasticsearch.action.admin.indices.warmer;
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||
* A bulk processor is a thread safe bulk processing class, allowing to easily set when to "flush" a new bulk request
|
||||
* (either based on number of actions, based on the size, or time), and to easily control the number of concurrent bulk
|
||||
* requests allowed to be executed in parallel.
|
||||
* <p/>
|
||||
* <p>
|
||||
* In order to create a new bulk processor, use the {@link Builder}.
|
||||
*/
|
||||
public class BulkProcessor implements Closeable {
|
||||
|
@ -127,7 +127,7 @@ public class BulkProcessor implements Closeable {
|
|||
|
||||
/**
|
||||
* Sets a flush interval flushing *any* bulk actions pending if the interval passes. Defaults to not set.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note, both {@link #setBulkActions(int)} and {@link #setBulkSize(org.elasticsearch.common.unit.ByteSizeValue)}
|
||||
* can be set to <tt>-1</tt> with the flush interval set allowing for complete async processing of bulk actions.
|
||||
*/
|
||||
|
|
|
@ -195,7 +195,7 @@ public class BulkRequest extends ActionRequest<BulkRequest> implements Composite
|
|||
/**
|
||||
* The list of optional payloads associated with requests in the same order as the requests. Note, elements within
|
||||
* it might be null if no payload has been provided.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note, if no payloads have been provided, this method will return null (as to conserve memory overhead).
|
||||
*/
|
||||
@Nullable
|
||||
|
|
|
@ -44,8 +44,8 @@ import static org.elasticsearch.search.internal.SearchContext.DEFAULT_TERMINATE_
|
|||
/**
|
||||
* A request to count the number of documents matching a specific query. Best created with
|
||||
* {@link org.elasticsearch.client.Requests#countRequest(String...)}.
|
||||
* <p/>
|
||||
* <p>The request requires the query source to be set either using {@link #source(QuerySourceBuilder)},
|
||||
* <p>
|
||||
* The request requires the query source to be set either using {@link #source(QuerySourceBuilder)},
|
||||
* or {@link #source(byte[])}.
|
||||
*
|
||||
* @see CountResponse
|
||||
|
|
|
@ -71,7 +71,7 @@ public class CountRequestBuilder extends BroadcastOperationRequestBuilder<CountR
|
|||
/**
|
||||
* Sets the preference to execute the search. Defaults to randomize across shards. Can be set to
|
||||
* <tt>_local</tt> to prefer local shards, <tt>_primary</tt> to execute only on primary shards,
|
||||
* _shards:x,y to operate on shards x & y, or a custom value, which guarantees that the same order
|
||||
* _shards:x,y to operate on shards x & y, or a custom value, which guarantees that the same order
|
||||
* will be used across different requests.
|
||||
*/
|
||||
public CountRequestBuilder setPreference(String preference) {
|
||||
|
|
|
@ -36,8 +36,8 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* A request to delete a document from an index based on its type and id. Best created using
|
||||
* {@link org.elasticsearch.client.Requests#deleteRequest(String)}.
|
||||
* <p/>
|
||||
* <p>The operation requires the {@link #index()}, {@link #type(String)} and {@link #id(String)} to
|
||||
* <p>
|
||||
* The operation requires the {@link #index()}, {@link #type(String)} and {@link #id(String)} to
|
||||
* be set.
|
||||
*
|
||||
* @see DeleteResponse
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ExistsRequestBuilder extends BroadcastOperationRequestBuilder<Exist
|
|||
/**
|
||||
* Sets the preference to execute the search. Defaults to randomize across shards. Can be set to
|
||||
* <tt>_local</tt> to prefer local shards, <tt>_primary</tt> to execute only on primary shards,
|
||||
* _shards:x,y to operate on shards x & y, or a custom value, which guarantees that the same order
|
||||
* _shards:x,y to operate on shards x & y, or a custom value, which guarantees that the same order
|
||||
* will be used across different requests.
|
||||
*/
|
||||
public ExistsRequestBuilder setPreference(String preference) {
|
||||
|
|
|
@ -36,8 +36,8 @@ import java.io.IOException;
|
|||
/**
|
||||
* A request to get a document (its source) from an index based on its type (optional) and id. Best created using
|
||||
* {@link org.elasticsearch.client.Requests#getRequest(String)}.
|
||||
* <p/>
|
||||
* <p>The operation requires the {@link #index()}, {@link #type(String)} and {@link #id(String)}
|
||||
* <p>
|
||||
* The operation requires the {@link #index()}, {@link #type(String)} and {@link #id(String)}
|
||||
* to be set.
|
||||
*
|
||||
* @see org.elasticsearch.action.get.GetResponse
|
||||
|
|
|
@ -49,15 +49,15 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* Index request to index a typed JSON document into a specific index and make it searchable. Best
|
||||
* created using {@link org.elasticsearch.client.Requests#indexRequest(String)}.
|
||||
* <p/>
|
||||
* <p>The index requires the {@link #index()}, {@link #type(String)}, {@link #id(String)} and
|
||||
* <p>
|
||||
* The index requires the {@link #index()}, {@link #type(String)}, {@link #id(String)} and
|
||||
* {@link #source(byte[])} to be set.
|
||||
* <p/>
|
||||
* <p>The source (content to index) can be set in its bytes form using ({@link #source(byte[])}),
|
||||
* <p>
|
||||
* The source (content to index) can be set in its bytes form using ({@link #source(byte[])}),
|
||||
* its string form ({@link #source(String)}) or using a {@link org.elasticsearch.common.xcontent.XContentBuilder}
|
||||
* ({@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}).
|
||||
* <p/>
|
||||
* <p>If the {@link #id(String)} is not set, it will be automatically generated.
|
||||
* <p>
|
||||
* If the {@link #id(String)} is not set, it will be automatically generated.
|
||||
*
|
||||
* @see IndexResponse
|
||||
* @see org.elasticsearch.client.Requests#indexRequest(String)
|
||||
|
@ -316,7 +316,7 @@ public class IndexRequest extends ReplicationRequest<IndexRequest> implements Do
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the relative ttl value. It musts be > 0 as it makes little sense otherwise. Setting it
|
||||
* Sets the relative ttl value. It musts be > 0 as it makes little sense otherwise. Setting it
|
||||
* to <tt>null</tt> will reset to have no ttl.
|
||||
*/
|
||||
public IndexRequest ttl(Long ttl) throws ElasticsearchGenerationException {
|
||||
|
@ -372,8 +372,8 @@ public class IndexRequest extends ReplicationRequest<IndexRequest> implements Do
|
|||
|
||||
/**
|
||||
* Sets the document source to index.
|
||||
* <p/>
|
||||
* <p>Note, its preferable to either set it using {@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* <p>
|
||||
* Note, its preferable to either set it using {@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* or using the {@link #source(byte[])}.
|
||||
*/
|
||||
public IndexRequest source(String source) {
|
||||
|
|
|
@ -107,8 +107,8 @@ public class IndexRequestBuilder extends ReplicationRequestBuilder<IndexRequest,
|
|||
|
||||
/**
|
||||
* Sets the document source to index.
|
||||
* <p/>
|
||||
* <p>Note, its preferable to either set it using {@link #setSource(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* <p>
|
||||
* Note, its preferable to either set it using {@link #setSource(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* or using the {@link #setSource(byte[])}.
|
||||
*/
|
||||
public IndexRequestBuilder setSource(String source) {
|
||||
|
|
|
@ -55,8 +55,8 @@ import org.elasticsearch.transport.TransportService;
|
|||
|
||||
/**
|
||||
* Performs the index operation.
|
||||
* <p/>
|
||||
* <p>Allows for the following settings:
|
||||
* <p>
|
||||
* Allows for the following settings:
|
||||
* <ul>
|
||||
* <li><b>autoCreateIndex</b>: When set to <tt>true</tt>, will automatically create an index if one does not exists.
|
||||
* Defaults to <tt>true</tt>.
|
||||
|
|
|
@ -35,8 +35,8 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
|
||||
/**
|
||||
* A request to delete a script from the script index based on its scriptLang and id. Best created using
|
||||
* <p/>
|
||||
* <p>The operation requires the , {@link #scriptLang(String)} and {@link #id(String)} to
|
||||
* <p>
|
||||
* The operation requires the , {@link #scriptLang(String)} and {@link #id(String)} to
|
||||
* be set.
|
||||
*
|
||||
* @see DeleteIndexedScriptResponse
|
||||
|
|
|
@ -46,15 +46,15 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
|
||||
/**
|
||||
* Index request to index a script to the script index and make it available at search time.
|
||||
* <p/>
|
||||
* <p>The request requires the {@link #scriptLang(String)}, {@link #id(String)} and
|
||||
* <p>
|
||||
* The request requires the {@link #scriptLang(String)}, {@link #id(String)} and
|
||||
* {@link #source(byte[])} to be set.
|
||||
* <p/>
|
||||
* <p>The source (content to index) can be set in its bytes form using ({@link #source()} (byte[])}),
|
||||
* <p>
|
||||
* The source (content to index) can be set in its bytes form using ({@link #source()} (byte[])}),
|
||||
* its string form ({@link #source(String)}) or using a {@link org.elasticsearch.common.xcontent.XContentBuilder}
|
||||
* ({@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}).
|
||||
* <p/>
|
||||
* <p>If the {@link #id(String)} is not set, it will be automatically generated.
|
||||
* <p>
|
||||
* If the {@link #id(String)} is not set, it will be automatically generated.
|
||||
*
|
||||
* @see PutIndexedScriptResponse
|
||||
*/
|
||||
|
@ -200,8 +200,8 @@ public class PutIndexedScriptRequest extends ActionRequest<PutIndexedScriptReque
|
|||
|
||||
/**
|
||||
* Sets the document source to index.
|
||||
* <p/>
|
||||
* <p>Note, its preferable to either set it using {@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* <p>
|
||||
* Note, its preferable to either set it using {@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* or using the {@link #source(byte[])}.
|
||||
*/
|
||||
public PutIndexedScriptRequest source(String source) {
|
||||
|
|
|
@ -85,8 +85,8 @@ public class PutIndexedScriptRequestBuilder extends ActionRequestBuilder<PutInde
|
|||
|
||||
/**
|
||||
* Sets the document source to index.
|
||||
* <p/>
|
||||
* <p>Note, its preferable to either set it using {@link #setSource(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* <p>
|
||||
* Note, its preferable to either set it using {@link #setSource(org.elasticsearch.common.xcontent.XContentBuilder)}
|
||||
* or using the {@link #setSource(byte[])}.
|
||||
*/
|
||||
public PutIndexedScriptRequestBuilder setSource(String source) {
|
||||
|
|
|
@ -49,7 +49,7 @@ public class MultiPercolateRequestBuilder extends ActionRequestBuilder<MultiPerc
|
|||
|
||||
/**
|
||||
* Specifies how to globally ignore indices that are not available and how to deal with wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Invoke this method before invoking {@link #add(PercolateRequestBuilder)}.
|
||||
*/
|
||||
public MultiPercolateRequestBuilder setIndicesOptions(IndicesOptions indicesOptions) {
|
||||
|
|
|
@ -35,7 +35,7 @@ public class MultiSearchRequestBuilder extends ActionRequestBuilder<MultiSearchR
|
|||
/**
|
||||
* Add a search request to execute. Note, the order is important, the search response will be returned in the
|
||||
* same order as the search requests.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If ignoreIndices has been set on the search request, then the indicesOptions of the multi search request
|
||||
* will not be used (if set).
|
||||
*/
|
||||
|
@ -64,7 +64,7 @@ public class MultiSearchRequestBuilder extends ActionRequestBuilder<MultiSearchR
|
|||
/**
|
||||
* Specifies what type of requested indices to ignore and how to deal with wildcard indices expressions.
|
||||
* For example indices that don't exist.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Invoke this method before invoking {@link #add(SearchRequestBuilder)}.
|
||||
*/
|
||||
public MultiSearchRequestBuilder setIndicesOptions(IndicesOptions indicesOptions) {
|
||||
|
|
|
@ -50,11 +50,11 @@ import static org.elasticsearch.search.Scroll.readScroll;
|
|||
/**
|
||||
* A request to execute search against one or more indices (or all). Best created using
|
||||
* {@link org.elasticsearch.client.Requests#searchRequest(String...)}.
|
||||
* <p/>
|
||||
* <p>Note, the search {@link #source(org.elasticsearch.search.builder.SearchSourceBuilder)}
|
||||
* <p>
|
||||
* Note, the search {@link #source(org.elasticsearch.search.builder.SearchSourceBuilder)}
|
||||
* is required. The search source is the different search options, including aggregations and such.
|
||||
* <p/>
|
||||
* <p>There is an option to specify an addition search source using the {@link #extraSource(org.elasticsearch.search.builder.SearchSourceBuilder)}.
|
||||
* <p>
|
||||
* There is an option to specify an addition search source using the {@link #extraSource(org.elasticsearch.search.builder.SearchSourceBuilder)}.
|
||||
*
|
||||
* @see org.elasticsearch.client.Requests#searchRequest(String...)
|
||||
* @see org.elasticsearch.client.Client#search(SearchRequest)
|
||||
|
@ -319,7 +319,7 @@ public class SearchRequest extends ActionRequest<SearchRequest> implements Indic
|
|||
/**
|
||||
* The name of the stored template
|
||||
*
|
||||
* @deprecated use {@link #template(Template))} instead.
|
||||
* @deprecated use {@link #template(Template)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void templateName(String templateName) {
|
||||
|
@ -329,7 +329,7 @@ public class SearchRequest extends ActionRequest<SearchRequest> implements Indic
|
|||
/**
|
||||
* The type of the stored template
|
||||
*
|
||||
* @deprecated use {@link #template(Template))} instead.
|
||||
* @deprecated use {@link #template(Template)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void templateType(ScriptService.ScriptType templateType) {
|
||||
|
@ -339,7 +339,7 @@ public class SearchRequest extends ActionRequest<SearchRequest> implements Indic
|
|||
/**
|
||||
* Template parameters used for rendering
|
||||
*
|
||||
* @deprecated use {@link #template(Template))} instead.
|
||||
* @deprecated use {@link #template(Template)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void templateParams(Map<String, Object> params) {
|
||||
|
|
|
@ -167,7 +167,7 @@ public class SearchRequestBuilder extends ActionRequestBuilder<SearchRequest, Se
|
|||
|
||||
/**
|
||||
* Specifies what type of requested indices to ignore and wildcard indices expressions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example indices that don't exist.
|
||||
*/
|
||||
public SearchRequestBuilder setIndicesOptions(IndicesOptions indicesOptions) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import java.util.Arrays;
|
|||
/**
|
||||
* A request to get suggestions for corrections of phrases. Best created with
|
||||
* {@link org.elasticsearch.client.Requests#suggestRequest(String...)}.
|
||||
* <p/>
|
||||
* <p>The request requires the suggest query source to be set either using
|
||||
* <p>
|
||||
* The request requires the suggest query source to be set either using
|
||||
* {@link #suggest(org.elasticsearch.common.bytes.BytesReference)} / {@link #suggest(org.elasticsearch.common.bytes.BytesReference)}
|
||||
* or by using {@link #suggest(org.elasticsearch.search.suggest.SuggestBuilder)}
|
||||
* (Best created using the {link @org.elasticsearch.search.suggest.SuggestBuilders)}).
|
||||
|
|
|
@ -66,7 +66,7 @@ public class SuggestRequestBuilder extends BroadcastOperationRequestBuilder<Sugg
|
|||
/**
|
||||
* Sets the preference to execute the search. Defaults to randomize across shards. Can be set to
|
||||
* <tt>_local</tt> to prefer local shards, <tt>_primary</tt> to execute only on primary shards,
|
||||
* _shards:x,y to operate on shards x & y, or a custom value, which guarantees that the same order
|
||||
* _shards:x,y to operate on shards x & y, or a custom value, which guarantees that the same order
|
||||
* will be used across different requests.
|
||||
*/
|
||||
public SuggestRequestBuilder setPreference(String preference) {
|
||||
|
|
|
@ -127,7 +127,6 @@ public abstract class TransportBroadcastByNodeAction<Request extends BroadcastRe
|
|||
*
|
||||
* @param in input stream
|
||||
* @return a deserialized shard-level result
|
||||
* @throws IOException
|
||||
*/
|
||||
protected abstract ShardOperationResult readShardResult(StreamInput in) throws IOException;
|
||||
|
||||
|
@ -150,7 +149,6 @@ public abstract class TransportBroadcastByNodeAction<Request extends BroadcastRe
|
|||
*
|
||||
* @param in input stream
|
||||
* @return a de-serialized request
|
||||
* @throws IOException
|
||||
*/
|
||||
protected abstract Request readRequestFrom(StreamInput in) throws IOException;
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ public abstract class TransportReplicationAction<Request extends ReplicationRequ
|
|||
/**
|
||||
* Responsible for performing all operations up to the point we start starting sending requests to replica shards.
|
||||
* Including forwarding the request to another node if the primary is not assigned locally.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note that as soon as we start sending request to replicas, state responsibility is transferred to {@link ReplicationPhase}
|
||||
*/
|
||||
final class PrimaryPhase extends AbstractRunnable {
|
||||
|
|
|
@ -42,10 +42,10 @@ import static org.apache.lucene.util.ArrayUtil.grow;
|
|||
* offsets and payloads even if positions are not present. You must call
|
||||
* nextPosition() anyway to move the counter although this method only returns
|
||||
* <tt>-1,</tt>, if no positions were returned by the {@link TermVectorsRequest}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The data is stored in two byte arrays ({@code headerRef} and
|
||||
* {@code termVectors}, both {@link BytesRef}) that have the following format:
|
||||
* <p/>
|
||||
* <p>
|
||||
* {@code headerRef}: Stores offsets per field in the {@code termVectors} array
|
||||
* and some header information as {@link BytesRef}. Format is
|
||||
* <ul>
|
||||
|
@ -54,6 +54,7 @@ import static org.apache.lucene.util.ArrayUtil.grow;
|
|||
* <li>boolean: hasTermStatistics (are the term statistics stored?)</li>
|
||||
* <li>boolean: hasFieldStatitsics (are the field statistics stored?)</li>
|
||||
* <li>vint: number of fields</li>
|
||||
* <li>
|
||||
* <ul>
|
||||
* <li>String: field name 1</li>
|
||||
* <li>vint: offset in {@code termVectors} for field 1</li>
|
||||
|
@ -61,10 +62,11 @@ import static org.apache.lucene.util.ArrayUtil.grow;
|
|||
* <li>String: field name last field</li>
|
||||
* <li>vint: offset in {@code termVectors} for last field</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* </ul>
|
||||
* <p/>
|
||||
* <p>
|
||||
* termVectors: Stores the actual term vectors as a {@link BytesRef}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Term vectors for each fields are stored in blocks, one for each field. The
|
||||
* offsets in {@code headerRef} are used to find where the block for a field
|
||||
* starts. Each block begins with a
|
||||
|
@ -82,14 +84,13 @@ import static org.apache.lucene.util.ArrayUtil.grow;
|
|||
* <li>vint: number of documents in the shard that has an entry for this field
|
||||
* (docCount)</li>
|
||||
* </ul>
|
||||
* <p/>
|
||||
* <p>
|
||||
* After that, for each term it stores
|
||||
* <ul>
|
||||
* <ul>
|
||||
* <li>vint: term lengths</li>
|
||||
* <li>BytesRef: term name</li>
|
||||
* </ul>
|
||||
* <p/>
|
||||
* <p>
|
||||
* If term statistics are requested ({@code hasTermStatistics} is true, see
|
||||
* {@code headerRef}):
|
||||
* <ul>
|
||||
|
@ -99,6 +100,7 @@ import static org.apache.lucene.util.ArrayUtil.grow;
|
|||
* After that
|
||||
* <ul>
|
||||
* <li>vint: frequency (always returned)</li>
|
||||
* <li>
|
||||
* <ul>
|
||||
* <li>vint: position_1 (if positions == true)</li>
|
||||
* <li>vint: startOffset_1 (if offset == true)</li>
|
||||
|
@ -107,8 +109,8 @@ import static org.apache.lucene.util.ArrayUtil.grow;
|
|||
* <li>...</li>
|
||||
* <li>vint: endOffset_freqency (if offset == true)</li>
|
||||
* <li>BytesRef: payload_freqency (if payloads == true)</li>
|
||||
* <ul>
|
||||
* </ul> </ul>
|
||||
* </ul></li>
|
||||
* </ul>
|
||||
*/
|
||||
|
||||
public final class TermVectorsFields extends Fields {
|
||||
|
|
|
@ -52,7 +52,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
|||
/**
|
||||
* Request returning the term vector (doc frequency, positions, offsets) for a
|
||||
* document.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note, the {@link #index()}, {@link #type(String)} and {@link #id(String)} are
|
||||
* required.
|
||||
*/
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.Map;
|
|||
/**
|
||||
* The builder class for a term vector request.
|
||||
* Returns the term vector (doc frequency, positions, offsets) for a document.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note, the {@code index}, {@code type} and {@code id} are
|
||||
* required.
|
||||
*/
|
||||
|
|
|
@ -76,7 +76,7 @@ public class UpdateRequestBuilder extends InstanceShardOperationRequestBuilder<U
|
|||
/**
|
||||
* The script to execute. Note, make sure not to send different script each times and instead
|
||||
* use script params if possible with the same (automatically compiled) script.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The script works with the variable <code>ctx</code>, which is bound to the entry,
|
||||
* e.g. <code>ctx._source.mycounter += 1</code>.
|
||||
*
|
||||
|
|
|
@ -68,7 +68,6 @@ final class JNAKernel32Library {
|
|||
/**
|
||||
* Adds a Console Ctrl Handler.
|
||||
*
|
||||
* @param handler
|
||||
* @return true if the handler is correctly set
|
||||
* @throws java.lang.UnsatisfiedLinkError if the Kernel32 library is not loaded or if the native function is not found
|
||||
* @throws java.lang.NoClassDefFoundError if the library for native calls is missing
|
||||
|
@ -92,8 +91,6 @@ final class JNAKernel32Library {
|
|||
/**
|
||||
* Native call to the Kernel32 API to set a new Console Ctrl Handler.
|
||||
*
|
||||
* @param handler
|
||||
* @param add
|
||||
* @return true if the handler is correctly set
|
||||
* @throws java.lang.UnsatisfiedLinkError if the Kernel32 library is not loaded or if the native function is not found
|
||||
* @throws java.lang.NoClassDefFoundError if the library for native calls is missing
|
||||
|
@ -102,7 +99,7 @@ final class JNAKernel32Library {
|
|||
|
||||
/**
|
||||
* Handles consoles event with WIN API
|
||||
* <p/>
|
||||
* <p>
|
||||
* See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683242%28v=vs.85%29.aspx
|
||||
*/
|
||||
class NativeHandlerCallback implements StdCallLibrary.StdCallCallback {
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.regex.Pattern;
|
|||
|
||||
/**
|
||||
* Initializes SecurityManager with necessary permissions.
|
||||
* <p>
|
||||
* <br>
|
||||
* <h1>Initialization</h1>
|
||||
* The JVM is not initially started with security manager enabled,
|
||||
* instead we turn it on early in the startup process. This is a tradeoff
|
||||
|
@ -51,7 +51,7 @@ import java.util.regex.Pattern;
|
|||
* <li>Allows for some contained usage of native code that would not
|
||||
* otherwise be permitted.</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* <br>
|
||||
* <h1>Permissions</h1>
|
||||
* Permissions use a policy file packaged as a resource, this file is
|
||||
* also used in tests. File permissions are generated dynamically and
|
||||
|
@ -71,13 +71,13 @@ import java.util.regex.Pattern;
|
|||
* behalf (no package protections are yet in place, this would need some
|
||||
* cleanups to the scripting apis). But still it can provide some defense for users
|
||||
* that enable dynamic scripting without being fully aware of the consequences.
|
||||
* <p>
|
||||
* <br>
|
||||
* <h1>Disabling Security</h1>
|
||||
* SecurityManager can be disabled completely with this setting:
|
||||
* <pre>
|
||||
* es.security.manager.enabled = false
|
||||
* </pre>
|
||||
* <p>
|
||||
* <br>
|
||||
* <h1>Debugging Security</h1>
|
||||
* A good place to start when there is a problem is to turn on security debugging:
|
||||
* <pre>
|
||||
|
|
|
@ -71,12 +71,12 @@ import org.elasticsearch.common.settings.Settings;
|
|||
|
||||
/**
|
||||
* A client provides a one stop interface for performing actions/operations against the cluster.
|
||||
* <p/>
|
||||
* <p>All operations performed are asynchronous by nature. Each action/operation has two flavors, the first
|
||||
* <p>
|
||||
* All operations performed are asynchronous by nature. Each action/operation has two flavors, the first
|
||||
* simply returns an {@link org.elasticsearch.action.ActionFuture}, while the second accepts an
|
||||
* {@link org.elasticsearch.action.ActionListener}.
|
||||
* <p/>
|
||||
* <p>A client can either be retrieved from a {@link org.elasticsearch.node.Node} started, or connected remotely
|
||||
* <p>
|
||||
* A client can either be retrieved from a {@link org.elasticsearch.node.Node} started, or connected remotely
|
||||
* to one or more nodes using {@link org.elasticsearch.client.transport.TransportClient}.
|
||||
*
|
||||
* @see org.elasticsearch.node.Node#client()
|
||||
|
@ -94,8 +94,8 @@ public interface Client extends ElasticsearchClient, Releasable {
|
|||
|
||||
/**
|
||||
* Index a JSON source associated with a given index and type.
|
||||
* <p/>
|
||||
* <p>The id is optional, if it is not provided, one will be generated automatically.
|
||||
* <p>
|
||||
* The id is optional, if it is not provided, one will be generated automatically.
|
||||
*
|
||||
* @param request The index request
|
||||
* @return The result future
|
||||
|
@ -105,8 +105,8 @@ public interface Client extends ElasticsearchClient, Releasable {
|
|||
|
||||
/**
|
||||
* Index a document associated with a given index and type.
|
||||
* <p/>
|
||||
* <p>The id is optional, if it is not provided, one will be generated automatically.
|
||||
* <p>
|
||||
* The id is optional, if it is not provided, one will be generated automatically.
|
||||
*
|
||||
* @param request The index request
|
||||
* @param listener A listener to be notified with a result
|
||||
|
@ -116,8 +116,8 @@ public interface Client extends ElasticsearchClient, Releasable {
|
|||
|
||||
/**
|
||||
* Index a document associated with a given index and type.
|
||||
* <p/>
|
||||
* <p>The id is optional, if it is not provided, one will be generated automatically.
|
||||
* <p>
|
||||
* The id is optional, if it is not provided, one will be generated automatically.
|
||||
*/
|
||||
IndexRequestBuilder prepareIndex();
|
||||
|
||||
|
@ -149,8 +149,8 @@ public interface Client extends ElasticsearchClient, Releasable {
|
|||
|
||||
/**
|
||||
* Index a document associated with a given index and type.
|
||||
* <p/>
|
||||
* <p>The id is optional, if it is not provided, one will be generated automatically.
|
||||
* <p>
|
||||
* The id is optional, if it is not provided, one will be generated automatically.
|
||||
*
|
||||
* @param index The index to index the document to
|
||||
* @param type The type to index the document to
|
||||
|
@ -159,8 +159,8 @@ public interface Client extends ElasticsearchClient, Releasable {
|
|||
|
||||
/**
|
||||
* Index a document associated with a given index and type.
|
||||
* <p/>
|
||||
* <p>The id is optional, if it is not provided, one will be generated automatically.
|
||||
* <p>
|
||||
* The id is optional, if it is not provided, one will be generated automatically.
|
||||
*
|
||||
* @param index The index to index the document to
|
||||
* @param type The type to index the document to
|
||||
|
@ -482,7 +482,6 @@ public interface Client extends ElasticsearchClient, Releasable {
|
|||
* An action that returns the term vectors for a specific document.
|
||||
*
|
||||
* @param request The term vector request
|
||||
* @return The response future
|
||||
*/
|
||||
void termVectors(TermVectorsRequest request, ActionListener<TermVectorsResponse> listener);
|
||||
|
||||
|
@ -513,7 +512,6 @@ public interface Client extends ElasticsearchClient, Releasable {
|
|||
* An action that returns the term vectors for a specific document.
|
||||
*
|
||||
* @param request The term vector request
|
||||
* @return The response future
|
||||
*/
|
||||
@Deprecated
|
||||
void termVector(TermVectorsRequest request, ActionListener<TermVectorsResponse> listener);
|
||||
|
|
|
@ -65,8 +65,8 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
|
|||
/**
|
||||
* The transport client allows to create a client that is not part of the cluster, but simply connects to one
|
||||
* or more nodes directly by adding their respective addresses using {@link #addTransportAddress(org.elasticsearch.common.transport.TransportAddress)}.
|
||||
* <p/>
|
||||
* <p>The transport client important modules used is the {@link org.elasticsearch.transport.TransportModule} which is
|
||||
* <p>
|
||||
* The transport client important modules used is the {@link org.elasticsearch.transport.TransportModule} which is
|
||||
* started in client mode (only connects, no bind).
|
||||
*/
|
||||
public class TransportClient extends AbstractClient {
|
||||
|
@ -196,8 +196,8 @@ public class TransportClient extends AbstractClient {
|
|||
|
||||
/**
|
||||
* Returns the current connected transport nodes that this client will use.
|
||||
* <p/>
|
||||
* <p>The nodes include all the nodes that are currently alive based on the transport
|
||||
* <p>
|
||||
* The nodes include all the nodes that are currently alive based on the transport
|
||||
* addresses provided.
|
||||
*/
|
||||
public List<DiscoveryNode> connectedNodes() {
|
||||
|
@ -221,11 +221,11 @@ public class TransportClient extends AbstractClient {
|
|||
|
||||
/**
|
||||
* Adds a transport address that will be used to connect to.
|
||||
* <p/>
|
||||
* <p>The Node this transport address represents will be used if its possible to connect to it.
|
||||
* <p>
|
||||
* The Node this transport address represents will be used if its possible to connect to it.
|
||||
* If it is unavailable, it will be automatically connected to once it is up.
|
||||
* <p/>
|
||||
* <p>In order to get the list of all the current connected nodes, please see {@link #connectedNodes()}.
|
||||
* <p>
|
||||
* In order to get the list of all the current connected nodes, please see {@link #connectedNodes()}.
|
||||
*/
|
||||
public TransportClient addTransportAddress(TransportAddress transportAddress) {
|
||||
nodesService.addTransportAddresses(transportAddress);
|
||||
|
@ -234,11 +234,11 @@ public class TransportClient extends AbstractClient {
|
|||
|
||||
/**
|
||||
* Adds a list of transport addresses that will be used to connect to.
|
||||
* <p/>
|
||||
* <p>The Node this transport address represents will be used if its possible to connect to it.
|
||||
* <p>
|
||||
* The Node this transport address represents will be used if its possible to connect to it.
|
||||
* If it is unavailable, it will be automatically connected to once it is up.
|
||||
* <p/>
|
||||
* <p>In order to get the list of all the current connected nodes, please see {@link #connectedNodes()}.
|
||||
* <p>
|
||||
* In order to get the list of all the current connected nodes, please see {@link #connectedNodes()}.
|
||||
*/
|
||||
public TransportClient addTransportAddresses(TransportAddress... transportAddress) {
|
||||
nodesService.addTransportAddresses(transportAddress);
|
||||
|
|
|
@ -295,7 +295,7 @@ public class ClusterState implements ToXContent, Diffable<ClusterState> {
|
|||
|
||||
/**
|
||||
* a cluster state supersedes another state iff they are from the same master and the version this state is higher thant the other state.
|
||||
* <p/>
|
||||
* <p>
|
||||
* In essence that means that all the changes from the other cluster state are also reflected by the current one
|
||||
*/
|
||||
public boolean supersedes(ClusterState other) {
|
||||
|
|
|
@ -60,7 +60,6 @@ public class ClusterStateObserver {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param clusterService
|
||||
* @param timeout a global timeout for this observer. After it has expired the observer
|
||||
* will fail any existing or new #waitForNextChange calls. Set to null
|
||||
* to wait indefinitely
|
||||
|
@ -157,8 +156,6 @@ public class ClusterStateObserver {
|
|||
|
||||
/**
|
||||
* reset this observer to the give cluster state. Any pending waits will be canceled.
|
||||
*
|
||||
* @param toState
|
||||
*/
|
||||
public void reset(ClusterState toState) {
|
||||
if (observingContext.getAndSet(null) != null) {
|
||||
|
|
|
@ -35,8 +35,6 @@ public interface Diff<T> {
|
|||
|
||||
/**
|
||||
* Writes the differences into the output stream
|
||||
* @param out
|
||||
* @throws IOException
|
||||
*/
|
||||
void writeTo(StreamOutput out) throws IOException;
|
||||
}
|
||||
|
|
|
@ -20,12 +20,13 @@
|
|||
package org.elasticsearch.cluster;
|
||||
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.cluster.Diff;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Thrown by {@link Diffable#readDiffAndApply(org.elasticsearch.common.io.stream.StreamInput)} method
|
||||
* Thrown by {@link Diff#apply} method
|
||||
*/
|
||||
public class IncompatibleClusterStateVersionException extends ElasticsearchException {
|
||||
public IncompatibleClusterStateVersionException(String msg) {
|
||||
|
|
|
@ -301,7 +301,6 @@ public class InternalClusterInfoService extends AbstractComponent implements Clu
|
|||
|
||||
/**
|
||||
* Refreshes the ClusterInfo in a blocking fashion
|
||||
* @return
|
||||
*/
|
||||
public final ClusterInfo refresh() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
|
|
|
@ -270,7 +270,6 @@ public class RestoreInProgress extends AbstractDiffable<Custom> implements Custo
|
|||
*
|
||||
* @param in stream input
|
||||
* @return restore status
|
||||
* @throws IOException
|
||||
*/
|
||||
public static ShardRestoreStatus readShardRestoreStatus(StreamInput in) throws IOException {
|
||||
ShardRestoreStatus shardSnapshotStatus = new ShardRestoreStatus();
|
||||
|
@ -282,7 +281,6 @@ public class RestoreInProgress extends AbstractDiffable<Custom> implements Custo
|
|||
* Reads restore status from stream input
|
||||
*
|
||||
* @param in stream input
|
||||
* @throws IOException
|
||||
*/
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
nodeId = in.readOptionalString();
|
||||
|
@ -294,7 +292,6 @@ public class RestoreInProgress extends AbstractDiffable<Custom> implements Custo
|
|||
* Writes restore status to stream output
|
||||
*
|
||||
* @param out stream input
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeOptionalString(nodeId);
|
||||
|
@ -471,7 +468,6 @@ public class RestoreInProgress extends AbstractDiffable<Custom> implements Custo
|
|||
* @param entry restore operation metadata
|
||||
* @param builder XContent builder
|
||||
* @param params serialization parameters
|
||||
* @throws IOException
|
||||
*/
|
||||
public void toXContent(Entry entry, XContentBuilder builder, ToXContent.Params params) throws IOException {
|
||||
builder.startObject();
|
||||
|
|
|
@ -105,7 +105,7 @@ public class MappingUpdatedAction extends AbstractComponent {
|
|||
}
|
||||
|
||||
/**
|
||||
* Same as {@link #updateMappingOnMasterSynchronously(String, String, String, Mapping, TimeValue)}
|
||||
* Same as {@link #updateMappingOnMasterSynchronously(String, String, Mapping, TimeValue)}
|
||||
* using the default timeout.
|
||||
*/
|
||||
public void updateMappingOnMasterSynchronously(String index, String type, Mapping mappingUpdate) throws Throwable {
|
||||
|
|
|
@ -430,7 +430,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, FromXContentBuild
|
|||
/**
|
||||
* Sometimes, the default mapping exists and an actual mapping is not created yet (introduced),
|
||||
* in this case, we want to return the default mapping in case it has some default mapping definitions.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note, once the mapping type is introduced, the default mapping is applied on the actual typed MappingMetaData,
|
||||
* setting its routing, timestamp, and so on if needed.
|
||||
*/
|
||||
|
|
|
@ -222,9 +222,8 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|||
/**
|
||||
* Iterates through the list of indices and selects the effective list of filtering aliases for the
|
||||
* given index.
|
||||
* <p/>
|
||||
* <p>Only aliases with filters are returned. If the indices list contains a non-filtering reference to
|
||||
* the index itself - null is returned. Returns <tt>null</tt> if no filtering is required.</p>
|
||||
* the index itself - null is returned. Returns <tt>null</tt> if no filtering is required.
|
||||
*/
|
||||
public String[] filteringAliases(ClusterState state, String index, String... expressions) {
|
||||
// expand the aliases wildcard
|
||||
|
|
|
@ -43,7 +43,7 @@ import java.util.Set;
|
|||
|
||||
/**
|
||||
* This service is responsible for upgrading legacy index metadata to the current version
|
||||
* <p/>
|
||||
* <p>
|
||||
* Every time an existing index is introduced into cluster this service should be used
|
||||
* to upgrade the existing index metadata to the latest version of the cluster. It typically
|
||||
* occurs during cluster upgrade, when dangling indices are imported into the cluster or indices
|
||||
|
@ -97,7 +97,7 @@ public class MetaDataIndexUpgradeService extends AbstractComponent {
|
|||
/**
|
||||
* Checks that the index can be upgraded to the current version of the master node.
|
||||
*
|
||||
* <p/>
|
||||
* <p>
|
||||
* If the index does not need upgrade it returns the index metadata unchanged, otherwise it returns a modified index metadata. If index
|
||||
* cannot be updated the method throws an exception.
|
||||
*/
|
||||
|
|
|
@ -195,7 +195,6 @@ public class RepositoriesMetaData extends AbstractDiffable<Custom> implements Me
|
|||
* @param repository repository metadata
|
||||
* @param builder XContent builder
|
||||
* @param params serialization parameters
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void toXContent(RepositoryMetaData repository, XContentBuilder builder, ToXContent.Params params) throws IOException {
|
||||
builder.startObject(repository.name(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
|
|
|
@ -78,7 +78,6 @@ public class RepositoryMetaData {
|
|||
*
|
||||
* @param in stream input
|
||||
* @return repository metadata
|
||||
* @throws IOException
|
||||
*/
|
||||
public static RepositoryMetaData readFrom(StreamInput in) throws IOException {
|
||||
String name = in.readString();
|
||||
|
@ -91,7 +90,6 @@ public class RepositoryMetaData {
|
|||
* Writes repository metadata to stream output
|
||||
*
|
||||
* @param out stream output
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeString(name);
|
||||
|
|
|
@ -99,7 +99,6 @@ public class SnapshotId implements Streamable {
|
|||
*
|
||||
* @param in stream input
|
||||
* @return snapshot id
|
||||
* @throws IOException
|
||||
*/
|
||||
public static SnapshotId readSnapshotId(StreamInput in) throws IOException {
|
||||
SnapshotId snapshot = new SnapshotId();
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.io.IOException;
|
|||
/**
|
||||
* Uniquely identifies an allocation. An allocation is a shard moving from unassigned to initializing,
|
||||
* or relocation.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Relocation is a special case, where the origin shard is relocating with a relocationId and same id, and
|
||||
* the target shard (only materialized in RoutingNodes) is initializing with the id set to the origin shard
|
||||
* relocationId. Once relocation is done, the new allocation id is set to the relocationId. This is similar
|
||||
|
@ -83,7 +83,7 @@ public class AllocationId implements ToXContent {
|
|||
|
||||
/**
|
||||
* Creates a new allocation id representing a cancelled relocation.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note that this is expected to be called on the allocation id
|
||||
* of the *source* shard
|
||||
*/
|
||||
|
@ -94,7 +94,7 @@ public class AllocationId implements ToXContent {
|
|||
|
||||
/**
|
||||
* Creates a new allocation id finalizing a relocation.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note that this is expected to be called on the allocation id
|
||||
* of the *target* shard and thus it only needs to clear the relocating id.
|
||||
*/
|
||||
|
|
|
@ -34,7 +34,7 @@ public interface HashFunction {
|
|||
/**
|
||||
* Calculate a hash value for routing and its type
|
||||
* @param type types name
|
||||
* @param routing String to calculate the hash value from
|
||||
* @param id String to calculate the hash value from
|
||||
* @return hash value of the given type and routing string
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
|
@ -286,8 +286,8 @@ public class IndexRoutingTable extends AbstractDiffable<IndexRoutingTable> imple
|
|||
/**
|
||||
* A groups shards iterator where each groups is a single {@link ShardRouting} and a group
|
||||
* is created for each shard routing.
|
||||
* <p/>
|
||||
* <p>This basically means that components that use the {@link GroupShardsIterator} will iterate
|
||||
* <p>
|
||||
* This basically means that components that use the {@link GroupShardsIterator} will iterate
|
||||
* over *all* the shards (all the replicas) within the index.</p>
|
||||
*/
|
||||
public GroupShardsIterator groupByAllIt() {
|
||||
|
|
|
@ -379,9 +379,6 @@ public class IndexShardRoutingTable implements Iterable<ShardRouting> {
|
|||
/**
|
||||
* Returns shards based on nodeAttributes given such as node name , node attribute, node IP
|
||||
* Supports node specifications in cluster API
|
||||
*
|
||||
* @param nodeAttribute
|
||||
* @param discoveryNodes
|
||||
*/
|
||||
public ShardIterator onlyNodeSelectorActiveInitializingShardsIt(String nodeAttribute, DiscoveryNodes discoveryNodes) {
|
||||
ArrayList<ShardRouting> ordered = new ArrayList<>(activeShards.size() + allInitializingShards.size());
|
||||
|
|
|
@ -424,7 +424,6 @@ public class RoutingNodes implements Iterable<RoutingNode> {
|
|||
/**
|
||||
* Cancels the give shard from the Routing nodes internal statistics and cancels
|
||||
* the relocation if the shard is relocating.
|
||||
* @param shard
|
||||
*/
|
||||
private void remove(ShardRouting shard) {
|
||||
ensureMutable();
|
||||
|
|
|
@ -528,7 +528,7 @@ public final class ShardRouting implements Streamable, ToXContent {
|
|||
|
||||
/**
|
||||
* returns true if this routing has the same allocation ID as another.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note: if both shard routing has a null as their {@link #allocationId()}, this method returns false as the routing describe
|
||||
* no allocation at all..
|
||||
**/
|
||||
|
|
|
@ -47,7 +47,7 @@ public class UnassignedInfo implements ToXContent, Writeable<UnassignedInfo> {
|
|||
|
||||
/**
|
||||
* Reason why the shard is in unassigned state.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note, ordering of the enum is important, make sure to add new values
|
||||
* at the end and handle version serialization properly.
|
||||
*/
|
||||
|
|
|
@ -52,7 +52,7 @@ public class AllocationExplanation implements Streamable {
|
|||
/**
|
||||
* Creates a new {@link NodeExplanation}
|
||||
*
|
||||
* @param node node referenced by {@link This} {@link NodeExplanation}
|
||||
* @param node node referenced by this {@link NodeExplanation}
|
||||
* @param description a message associated with the given node
|
||||
*/
|
||||
public NodeExplanation(DiscoveryNode node, String description) {
|
||||
|
|
|
@ -65,8 +65,8 @@ public class AllocationService extends AbstractComponent {
|
|||
|
||||
/**
|
||||
* Applies the started shards. Note, shards can be called several times within this method.
|
||||
* <p/>
|
||||
* <p>If the same instance of the routing table is returned, then no change has been made.</p>
|
||||
* <p>
|
||||
* If the same instance of the routing table is returned, then no change has been made.</p>
|
||||
*/
|
||||
public RoutingAllocation.Result applyStartedShards(ClusterState clusterState, List<? extends ShardRouting> startedShards) {
|
||||
return applyStartedShards(clusterState, startedShards, true);
|
||||
|
@ -94,8 +94,8 @@ public class AllocationService extends AbstractComponent {
|
|||
|
||||
/**
|
||||
* Applies the failed shards. Note, shards can be called several times within this method.
|
||||
* <p/>
|
||||
* <p>If the same instance of the routing table is returned, then no change has been made.</p>
|
||||
* <p>
|
||||
* If the same instance of the routing table is returned, then no change has been made.</p>
|
||||
*/
|
||||
public RoutingAllocation.Result applyFailedShards(ClusterState clusterState, List<FailedRerouteAllocation.FailedShard> failedShards) {
|
||||
RoutingNodes routingNodes = getMutableRoutingNodes(clusterState);
|
||||
|
@ -139,8 +139,8 @@ public class AllocationService extends AbstractComponent {
|
|||
|
||||
/**
|
||||
* Reroutes the routing table based on the live nodes.
|
||||
* <p/>
|
||||
* <p>If the same instance of the routing table is returned, then no change has been made.
|
||||
* <p>
|
||||
* If the same instance of the routing table is returned, then no change has been made.
|
||||
*/
|
||||
public RoutingAllocation.Result reroute(ClusterState clusterState) {
|
||||
return reroute(clusterState, false);
|
||||
|
@ -148,8 +148,8 @@ public class AllocationService extends AbstractComponent {
|
|||
|
||||
/**
|
||||
* Reroutes the routing table based on the live nodes.
|
||||
* <p/>
|
||||
* <p>If the same instance of the routing table is returned, then no change has been made.
|
||||
* <p>
|
||||
* If the same instance of the routing table is returned, then no change has been made.
|
||||
*/
|
||||
public RoutingAllocation.Result reroute(ClusterState clusterState, boolean debug) {
|
||||
RoutingNodes routingNodes = getMutableRoutingNodes(clusterState);
|
||||
|
|
|
@ -49,7 +49,6 @@ import static org.elasticsearch.cluster.routing.ShardRoutingState.RELOCATING;
|
|||
* The {@link BalancedShardsAllocator} re-balances the nodes allocations
|
||||
* within an cluster based on a {@link WeightFunction}. The clusters balance is defined by four parameters which can be set
|
||||
* in the cluster update API that allows changes in real-time:
|
||||
* <p/>
|
||||
* <ul><li><code>cluster.routing.allocation.balance.shard</code> - The <b>shard balance</b> defines the weight factor
|
||||
* for shards allocated on a {@link RoutingNode}</li>
|
||||
* <li><code>cluster.routing.allocation.balance.index</code> - The <b>index balance</b> defines a factor to the number
|
||||
|
@ -57,7 +56,7 @@ import static org.elasticsearch.cluster.routing.ShardRoutingState.RELOCATING;
|
|||
* <li><code>cluster.routing.allocation.balance.threshold</code> - A <b>threshold</b> to set the minimal optimization
|
||||
* value of operations that should be performed</li>
|
||||
* </ul>
|
||||
* <p/>
|
||||
* <p>
|
||||
* These parameters are combined in a {@link WeightFunction} that allows calculation of node weights which
|
||||
* are used to re-balance shards based on global as well as per-index factors.
|
||||
*/
|
||||
|
|
|
@ -126,7 +126,6 @@ public class CancelAllocationCommand implements AllocationCommand {
|
|||
*
|
||||
* @param shardId id of the shard which allocation should be canceled
|
||||
* @param node id of the node that manages the shard which allocation should be canceled
|
||||
* @param allowPrimary
|
||||
*/
|
||||
public CancelAllocationCommand(ShardId shardId, String node, boolean allowPrimary) {
|
||||
this.shardId = shardId;
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.elasticsearch.index.shard.ShardId;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* A command that moves a shard from a specific node to another node.<br />
|
||||
* A command that moves a shard from a specific node to another node.<br>
|
||||
* <b>Note:</b> The shard needs to be in the state
|
||||
* {@link ShardRoutingState#STARTED} in order to be moved.
|
||||
*/
|
||||
|
|
|
@ -39,40 +39,35 @@ import java.util.Map;
|
|||
* attributes like node or physical rack locations. Awareness attributes accept
|
||||
* arbitrary configuration keys like a rack data-center identifier. For example
|
||||
* the setting:
|
||||
* <p/>
|
||||
* <pre>
|
||||
* cluster.routing.allocation.awareness.attributes: rack_id
|
||||
* </pre>
|
||||
* <p/>
|
||||
* <p>
|
||||
* will cause allocations to be distributed over different racks such that
|
||||
* ideally at least one replicas of the all shard is available on the same rack.
|
||||
* To enable allocation awareness in this example nodes should contain a value
|
||||
* for the <tt>rack_id</tt> key like:
|
||||
* <p/>
|
||||
* <pre>
|
||||
* node.rack_id:1
|
||||
* </pre>
|
||||
* <p/>
|
||||
* <p>
|
||||
* Awareness can also be used to prevent over-allocation in the case of node or
|
||||
* even "zone" failure. For example in cloud-computing infrastructures like
|
||||
* Amazone AWS a cluster might span over multiple "zones". Awareness can be used
|
||||
* to distribute replicas to individual zones by setting:
|
||||
* <p/>
|
||||
* <pre>
|
||||
* cluster.routing.allocation.awareness.attributes: zone
|
||||
* </pre>
|
||||
* <p/>
|
||||
* <p>
|
||||
* and forcing allocation to be aware of the following zone the data resides in:
|
||||
* <p/>
|
||||
* <pre>
|
||||
* cluster.routing.allocation.awareness.force.zone.values: zone1,zone2
|
||||
* </pre>
|
||||
* <p/>
|
||||
* <p>
|
||||
* In contrast to regular awareness this setting will prevent over-allocation on
|
||||
* <tt>zone1</tt> even if <tt>zone2</tt> fails partially or becomes entirely
|
||||
* unavailable. Nodes that belong to a certain zone / group should be started
|
||||
* with the zone id configured on the node-level settings like:
|
||||
* <p/>
|
||||
* <pre>
|
||||
* node.zone: zone1
|
||||
* </pre>
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.elasticsearch.node.settings.NodeSettingsService;
|
|||
* re-balance (relocation) operations and restricts node allocations if the
|
||||
* configured threashold is reached. The default number of concurrent rebalance
|
||||
* operations is set to <tt>2</tt>
|
||||
* <p/>
|
||||
* <p>
|
||||
* Re-balance operations can be controlled in real-time via the cluster update API using
|
||||
* <tt>cluster.routing.allocation.cluster_concurrent_rebalance</tt>. Iff this
|
||||
* setting is set to <tt>-1</tt> the number of concurrent re-balance operations
|
||||
|
|
|
@ -41,7 +41,6 @@ import java.util.Locale;
|
|||
* <li> <code>PRIMARIES</code> - only primary shards are allowed to be allocated
|
||||
* <li> <code>ALL</code> - all shards are allowed to be allocated
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Rebalancing settings can have the following values (non-casesensitive):
|
||||
|
@ -51,7 +50,6 @@ import java.util.Locale;
|
|||
* <li> <code>PRIMARIES</code> - only primary shards are allowed to be balanced
|
||||
* <li> <code>ALL</code> - all shards are allowed to be balanced
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see Rebalance
|
||||
* @see Allocation
|
||||
|
|
|
@ -51,10 +51,8 @@ import static org.elasticsearch.cluster.node.DiscoveryNodeFilters.OpType.OR;
|
|||
* <ol>
|
||||
* <li><tt>required</tt> - filters required allocations.
|
||||
* If any <tt>required</tt> filters are set the allocation is denied if the index is <b>not</b> in the set of <tt>required</tt> to allocate on the filtered node</li>
|
||||
* <p/>
|
||||
* <li><tt>include</tt> - filters "allowed" allocations.
|
||||
* If any <tt>include</tt> filters are set the allocation is denied if the index is <b>not</b> in the set of <tt>include</tt> filters for the filtered node</li>
|
||||
* <p/>
|
||||
* <li><tt>exclude</tt> - filters "prohibited" allocations.
|
||||
* If any <tt>exclude</tt> filters are set the allocation is denied if the index is in the set of <tt>exclude</tt> filters for the filtered node</li>
|
||||
* </ol>
|
||||
|
|
|
@ -31,17 +31,15 @@ import org.elasticsearch.node.settings.NodeSettingsService;
|
|||
* {@link ThrottlingAllocationDecider} controls the recovery process per node in
|
||||
* the cluster. It exposes two settings via the cluster update API that allow
|
||||
* changes in real-time:
|
||||
* <p/>
|
||||
* <ul>
|
||||
* <li><tt>cluster.routing.allocation.node_initial_primaries_recoveries</tt> -
|
||||
* restricts the number of initial primary shard recovery operations on a single
|
||||
* node. The default is <tt>4</tt></li>
|
||||
* <p/>
|
||||
* <li><tt>cluster.routing.allocation.node_concurrent_recoveries</tt> -
|
||||
* restricts the number of total concurrent shards initializing on a single node. The
|
||||
* default is <tt>2</tt></li>
|
||||
* </ul>
|
||||
* <p/>
|
||||
* <p>
|
||||
* If one of the above thresholds is exceeded per node this allocation decider
|
||||
* will return {@link Decision#THROTTLE} as a hit to upstream logic to throttle
|
||||
* the allocation process to prevent overloading nodes due to too many concurrent recovery
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue