3.4

Shard configuration


(
1
) Create a new
Collection
Fragment processing is performed.


Enter the following address in the browser, you can follow our requirements
Create a new
Collection


[AppleScript]

Plain text view
Copy the code

?
1
2
[
url
]http
:
/
/
192.1
68.2
5.1
40
:
8180
/
solr
/
admin
/
collections? action
=
CREATE
&
name
=
collection
2
&
nu[
/
url
]
mShards
=
2
&
replicationFactor
=
2


Parameters:


name
:
The name of the collection to be created


numShard
s:
Number of logical shards to be created when the collection is created


replicationFactor
:
Number of copies of the shard.


Success is indicated when you see this prompt





(
2
) Delete unused ones
Collection
. Execute the following command





3.5
Simulate cluster exception tests


(
1
) Stop the first one
tomcat
Node to see if the query works properly
Can!!!! Because there are slave nodes


(
2
) Stop the third
tomcat
Node to see if the query works properly
No, because the entire piece of data is gone,
Not working properly.


(
3
) Restore the third
tomcat
Node to see if it works properly. It’ll take a long time to recover, probably
2
And a half to
3
points
Between the clock. Please be patient.


More learning materials can be obtained at Annalin1203