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.
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.
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?
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.
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?
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.
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.