Elasticsearch-Indexing data in two different DataCenters

Hi ,

i want to index same data in two different servers. Can you please suggest
bestways to index in both DCs at same time.


having two Data centers- means two different clusters, want to index data
into two different data centers(two different clusters) with same index
name.

Please provide me inputs on this.

Thanks in advance

Srikanth.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d8ce1d01-9f08-43f2-9173-a2a42a88995d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

How are you expecting to index the data to one cluster?

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 15 July 2014 07:33, srikanth ramineni ri.srikanth@gmail.com wrote:

Hi ,

i want to index same data in two different servers. Can you please suggest
bestways to index in both DCs at same time.


having two Data centers- means two different clusters, want to index data
into two different data centers(two different clusters) with same index
name.

Please provide me inputs on this.

Thanks in advance

Srikanth.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/d8ce1d01-9f08-43f2-9173-a2a42a88995d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/d8ce1d01-9f08-43f2-9173-a2a42a88995d%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624ZxXXX0yU62vUZQpr3jY%3DY5ws21PvM2ph4HvhP%3DNDfhVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Mark,

Thanks for your response..

Now we are using bulk request to index the data
Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
"DC1_TS3_ES_CLUSTER").build();
Client client = new TransportClient(settings).addTransportAddress(new
InetSocketTransportAddress("one", 9300))
.addTransportAddress(new InetSocketTransportAddress("two", 9300))
.addTransportAddress(new InetSocketTransportAddress("three", 9300))
.addTransportAddress(new InetSocketTransportAddress("four", 9300));
BulkRequestBuilder bulkRequest = client.prepareBulk();
bulkRequest.add(client.prepareIndex(childIndex,
"tnccontracts",rs.getString("ID")).setSource(mapper.writeValueAsString(map))
.setParent(contractNo));
bulkParentRequest.execute().actionGet();

Similarly i have another cluster DC2, Do i need to create again prepare
bulk request ,add records to it, execute or Is there any way to index data
into DC2 without creating another bulk request.

Thanks,
Srikanth.

Now we are indexing to cluster
On Monday, 14 July 2014 15:52:51 UTC-7, Mark Walkom wrote:

How are you expecting to index the data to one cluster?

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: ma...@campaignmonitor.com <javascript:>
web: www.campaignmonitor.com

On 15 July 2014 07:33, srikanth ramineni <ri.sr...@gmail.com <javascript:>

wrote:

Hi ,

i want to index same data in two different servers. Can you please
suggest bestways to index in both DCs at same time.


having two Data centers- means two different clusters, want to index
data into two different data centers(two different clusters) with same
index name.

Please provide me inputs on this.

Thanks in advance

Srikanth.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/d8ce1d01-9f08-43f2-9173-a2a42a88995d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/d8ce1d01-9f08-43f2-9173-a2a42a88995d%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ba237ead-a27a-4d19-8f02-5df226fe473c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You'll have to send another request, but someone might be able to give you
some hints around optimising that in your code.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 15 July 2014 09:12, srikanth ramineni ri.srikanth@gmail.com wrote:

Hi Mark,

Thanks for your response..

Now we are using bulk request to index the data
Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
"DC1_TS3_ES_CLUSTER").build();
Client client = new TransportClient(settings).addTransportAddress(new
InetSocketTransportAddress("one", 9300))
.addTransportAddress(new InetSocketTransportAddress("two", 9300))
.addTransportAddress(new InetSocketTransportAddress("three", 9300))
.addTransportAddress(new InetSocketTransportAddress("four", 9300));
BulkRequestBuilder bulkRequest = client.prepareBulk();
bulkRequest.add(client.prepareIndex(childIndex,
"tnccontracts",rs.getString("ID")).setSource(mapper.writeValueAsString(map))
.setParent(contractNo));
bulkParentRequest.execute().actionGet();

Similarly i have another cluster DC2, Do i need to create again prepare
bulk request ,add records to it, execute or Is there any way to index data
into DC2 without creating another bulk request.

Thanks,
Srikanth.

Now we are indexing to cluster
On Monday, 14 July 2014 15:52:51 UTC-7, Mark Walkom wrote:

How are you expecting to index the data to one cluster?

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: ma...@campaignmonitor.com
web: www.campaignmonitor.com

On 15 July 2014 07:33, srikanth ramineni ri.sr...@gmail.com wrote:

Hi ,

i want to index same data in two different servers. Can you please
suggest bestways to index in both DCs at same time.


having two Data centers- means two different clusters, want to index
data into two different data centers(two different clusters) with same
index name.

Please provide me inputs on this.

Thanks in advance

Srikanth.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/d8ce1d01-9f08-43f2-9173-a2a42a88995d%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/d8ce1d01-9f08-43f2-9173-a2a42a88995d%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/ba237ead-a27a-4d19-8f02-5df226fe473c%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/ba237ead-a27a-4d19-8f02-5df226fe473c%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624ZGbuAjae-4rGJTwLSrXjv0a4KS_qOqBszq1UAfHTXp8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.