Package org.elasticsearch.client.ml
Class PostDataRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.client.ml.PostDataRequest
- All Implemented Interfaces:
Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class PostDataRequest
extends ActionRequest
implements org.elasticsearch.xcontent.ToXContentObject
Request to post data to a Machine Learning job
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass for incrementally building a bulk document request inXContentType.JSONformatNested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends Object>, Writeable.Writer<V extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ConstructingObjectParser<PostDataRequest,Void> static final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionPostDataRequest(String jobId, PostDataRequest.JsonBuilder builder) Create a new PostDataRequest object referencing the passedPostDataRequest.JsonBuilderobjectPostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, byte[] content) Create a new PostDataRequest object referencing the passedbyte[]contentPostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, BytesReference content) Create a new PostDataRequest object -
Method Summary
Modifier and TypeMethodDescriptionbooleangetJobId()org.elasticsearch.xcontent.XContentTypeinthashCode()voidsetResetEnd(String resetEnd) Specifies the end of the bucket resetting rangevoidsetResetStart(String resetStart) Specifies the start of the bucket resetting rangeorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) validate()Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, writeToMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTaskMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
RESET_START
public static final org.elasticsearch.xcontent.ParseField RESET_START -
RESET_END
public static final org.elasticsearch.xcontent.ParseField RESET_END -
CONTENT_TYPE
public static final org.elasticsearch.xcontent.ParseField CONTENT_TYPE -
PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<PostDataRequest,Void> PARSER
-
-
Constructor Details
-
PostDataRequest
public PostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, BytesReference content) Create a new PostDataRequest object- Parameters:
jobId- non-null jobId of the job to post data toxContentType- content type of the data to post. OnlyXContentType.JSONorXContentType.SMILEare supportedcontent- bulk serialized content in the format of the passedXContentType
-
PostDataRequest
public PostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, byte[] content) Create a new PostDataRequest object referencing the passedbyte[]content- Parameters:
jobId- non-null jobId of the job to post data toxContentType- content type of the data to post. OnlyXContentType.JSONorXContentType.SMILEare supportedcontent- bulk serialized content in the format of the passedXContentType
-
PostDataRequest
Create a new PostDataRequest object referencing the passedPostDataRequest.JsonBuilderobject- Parameters:
jobId- non-null jobId of the job to post data tobuilder-PostDataRequest.JsonBuilderobject containing documents to be serialized and sent inXContentType.JSONformat
-
-
Method Details
-
getJobId
-
getResetStart
-
setResetStart
Specifies the start of the bucket resetting range- Parameters:
resetStart- String representation of a timestamp; may be an epoch seconds, epoch millis or an ISO 8601 string
-
getResetEnd
-
setResetEnd
Specifies the end of the bucket resetting range- Parameters:
resetEnd- String representation of a timestamp; may be an epoch seconds, epoch millis or an ISO 8601 string
-
getContent
-
getXContentType
public org.elasticsearch.xcontent.XContentType getXContentType() -
hashCode
public int hashCode() -
equals
-
validate
- Specified by:
validatein classActionRequest
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-