I'm expecting to implement ES back statistic collecting application. For
that I'm expecting to publish data using bulk API. I want to separate out
request generating and request publishing tasks. First task is creating
bulk request using JAVA API and write that request to a temp file as a JSON
document and then request publisher publishes the requests which are in the
files.
I have tried to write created bulk request using writeTo method as follows.
It writes the request as a semi-json document containing some random weird
bytes(resulting file is attached).
FileOutputStream fileOutputStream = new FileOutputStream(new
File("request.txt"));
OutputStreamStreamOutput streamOutput = new
OutputStreamStreamOutput(fileOutputStream);
bulkRequestBuilder.request().writeTo(streamOutput);
I'm not sure whether I have missed something here. I want to understand
what goes wrong while writing the request and is it possible to implement
my application by separating request generating and publishing tasks as
mentioned above. Any help would be appreciated.
I'm expecting to implement ES back statistic collecting application. For
that I'm expecting to publish data using bulk API. I want to separate out
request generating and request publishing tasks. First task is creating
bulk request using JAVA API and write that request to a temp file as a JSON
document and then request publisher publishes the requests which are in the
files.
I have tried to write created bulk request using writeTo method as
follows. It writes the request as a semi-json document containing some
random weird bytes(resulting file is attached).
FileOutputStream fileOutputStream = new FileOutputStream(new
File("request.txt"));
OutputStreamStreamOutput streamOutput = new
OutputStreamStreamOutput(fileOutputStream);
bulkRequestBuilder.request().writeTo(streamOutput);
I'm not sure whether I have missed something here. I want to understand
what goes wrong while writing the request and is it possible to implement
my application by separating request generating and publishing tasks as
mentioned above. Any help would be appreciated.
I'm expecting to implement ES back statistic collecting application. For
that I'm expecting to publish data using bulk API. I want to separate out
request generating and request publishing tasks. First task is creating
bulk request using JAVA API and write that request to a temp file as a JSON
document and then request publisher publishes the requests which are in the
files.
I have tried to write created bulk request using writeTo method as
follows. It writes the request as a semi-json document containing some
random weird bytes(resulting file is attached).
FileOutputStream fileOutputStream = new FileOutputStream(new
File("request.txt"));
OutputStreamStreamOutput streamOutput = new
OutputStreamStreamOutput(fileOutputStream);
bulkRequestBuilder.request().writeTo(streamOutput);
I'm not sure whether I have missed something here. I want to understand
what goes wrong while writing the request and is it possible to implement
my application by separating request generating and publishing tasks as
mentioned above. Any help would be appreciated.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.