http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.10.get.http ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.10.get.http b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.10.get.http new file mode 100644 index 0000000..3faa945 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.10.get.http @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : node_failback.aql + * Description : Make sure node failback completes as expected. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, + kill one node and wait until the failover complete, query cluster state, + query data, insert new data, start the killed node and wait for failback, + query cluster state, query data. + * Expected Result : Success + * Date : February 3 2016 + */ +/admin/cluster/summary \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.11.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.11.query.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.11.query.aql new file mode 100644 index 0000000..b09c3d3 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.11.query.aql @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : node_failback.aql + * Description : Make sure node failback completes as expected. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, + kill one node and wait until the failover complete, query cluster state, + query data, insert new data, start the killed node and wait for failback, + query cluster state, query data. + * Expected Result : Success + * Date : February 3 2016 + */ + +use dataverse TinySocial; + +count (for $x in dataset FacebookUsersInMemory return $x); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.2.update.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.2.update.aql new file mode 100644 index 0000000..377e097 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.2.update.aql @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : node_failback.aql + * Description : Make sure node failback completes as expected. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, + kill one node and wait until the failover complete, query cluster state, + query data, insert new data, start the killed node and wait for failback, + query cluster state, query data. + * Expected Result : Success + * Date : February 3 2016 + */ +use dataverse TinySocial; + +load dataset FacebookUsers using localfs +(("path"="asterix_nc1://../asterix-server/src/test/resources/integrationts/replication/data/fbu.adm"), +("format"="adm")); + +insert into dataset TinySocial.FacebookUsersInMemory(for $x in dataset TinySocial.FacebookUsers return $x); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.3.node.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.3.node.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.3.node.aql new file mode 100644 index 0000000..9d5dc9b --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.3.node.aql @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ +kill asterix_nc1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.4.sleep.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.4.sleep.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.4.sleep.aql new file mode 100644 index 0000000..9c50bf1 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.4.sleep.aql @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +60000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.5.get.http ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.5.get.http b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.5.get.http new file mode 100644 index 0000000..3faa945 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.5.get.http @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : node_failback.aql + * Description : Make sure node failback completes as expected. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, + kill one node and wait until the failover complete, query cluster state, + query data, insert new data, start the killed node and wait for failback, + query cluster state, query data. + * Expected Result : Success + * Date : February 3 2016 + */ +/admin/cluster/summary \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.6.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.6.query.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.6.query.aql new file mode 100644 index 0000000..b09c3d3 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.6.query.aql @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : node_failback.aql + * Description : Make sure node failback completes as expected. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, + kill one node and wait until the failover complete, query cluster state, + query data, insert new data, start the killed node and wait for failback, + query cluster state, query data. + * Expected Result : Success + * Date : February 3 2016 + */ + +use dataverse TinySocial; + +count (for $x in dataset FacebookUsersInMemory return $x); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.7.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.7.update.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.7.update.aql new file mode 100644 index 0000000..56a88a2 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.7.update.aql @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : node_failback.aql + * Description : Make sure node failback completes as expected. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, + kill one node and wait until the failover complete, query cluster state, + query data, insert new data, start the killed node and wait for failback, + query cluster state, query data. + * Expected Result : Success + * Date : February 3 2016 + */ +use dataverse TinySocial; + +/* insert ids 11-20 */ +insert into dataset TinySocial.FacebookUsersInMemory {"id":11,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":12,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":13,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":14,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":15,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":16,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":17,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":18,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":19,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; + +insert into dataset TinySocial.FacebookUsersInMemory {"id":20,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.8.node.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.8.node.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.8.node.aql new file mode 100644 index 0000000..98e2761 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.8.node.aql @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ +start asterix_nc1 http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.9.sleep.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.9.sleep.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.9.sleep.aql new file mode 100644 index 0000000..dd83b4b --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failback/node_failback/node_failback.9.sleep.aql @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +20000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.1.ddl.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.1.ddl.aql new file mode 100644 index 0000000..6a2441e --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.1.ddl.aql @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ + +drop dataverse TinySocial if exists; +create dataverse TinySocial; +use dataverse TinySocial; + +create type EmploymentType as open { + organization-name: string, + start-date: date, + end-date: date? +} + +create type FacebookUserType as closed { + id: int, + alias: string, + name: string, + user-since: datetime, + friend-ids: {{ int32 }}, + employment: [EmploymentType] +} + +/********* 2. Create Datasets ***********/ +use dataverse TinySocial; + +drop dataset FacebookUsers if exists; + +create dataset FacebookUsers(FacebookUserType) +primary key id; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.2.update.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.2.update.aql new file mode 100644 index 0000000..3cb5e80 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.2.update.aql @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ + +use dataverse TinySocial; + +load dataset FacebookUsers using localfs +(("path"="asterix_nc1://../asterix-server/src/test/resources/integrationts/replication/data/fbu.adm"), +("format"="adm")); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.3.node.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.3.node.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.3.node.aql new file mode 100644 index 0000000..118b7e8 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.3.node.aql @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ +kill asterix_nc2 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.4.sleep.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.4.sleep.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.4.sleep.aql new file mode 100644 index 0000000..9c50bf1 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.4.sleep.aql @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +60000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.5.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.5.query.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.5.query.aql new file mode 100644 index 0000000..9c8cb96 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/bulkload/bulkload.5.query.aql @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ + +use dataverse TinySocial; + +count (for $x in dataset FacebookUsers return $x); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.1.ddl.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.1.ddl.aql new file mode 100644 index 0000000..8de2067 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.1.ddl.aql @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : mem_component_recovery.aql + * Description : Check that Memory LSM component are replicated and recovered correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, query + data from memory, kill one node and wait until the failover complete, + query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ + +drop dataverse TinySocial if exists; +create dataverse TinySocial; +use dataverse TinySocial; + +create type EmploymentType as open { + organization-name: string, + start-date: date, + end-date: date? +} + +create type FacebookUserType as closed { + id: int, + alias: string, + name: string, + user-since: datetime, + friend-ids: {{ int32 }}, + employment: [EmploymentType] +} + +/********* 2. Create Datasets ***********/ +use dataverse TinySocial; + +drop dataset FacebookUsers if exists; + +create dataset FacebookUsers(FacebookUserType) +primary key id; + +create dataset FacebookUsersInMemory(FacebookUserType) +primary key id; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.2.update.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.2.update.aql new file mode 100644 index 0000000..6dd2cea --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.2.update.aql @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : mem_component_recovery.aql + * Description : Check that Memory LSM component are replicated and recovered correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, query + data from memory, kill one node and wait until the failover complete, + query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ +use dataverse TinySocial; + +load dataset FacebookUsers using localfs +(("path"="asterix_nc1://../asterix-server/src/test/resources/integrationts/replication/data/fbu.adm"),("format"="adm")); + +insert into dataset TinySocial.FacebookUsersInMemory(for $x in dataset TinySocial.FacebookUsers return $x); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.3.node.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.3.node.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.3.node.aql new file mode 100644 index 0000000..118b7e8 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.3.node.aql @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ +kill asterix_nc2 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.4.sleep.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.4.sleep.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.4.sleep.aql new file mode 100644 index 0000000..9c50bf1 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.4.sleep.aql @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +60000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.5.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.5.query.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.5.query.aql new file mode 100644 index 0000000..e25e409 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/mem_component_recovery/mem_component_recovery.5.query.aql @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : mem_component_recovery.aql + * Description : Check that Memory LSM component are replicated and recovered correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, copy it to in-memory dataset, query + data from memory, kill one node and wait until the failover complete, + query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ + +use dataverse TinySocial; + +count (for $x in dataset FacebookUsersInMemory return $x); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.1.ddl.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.1.ddl.aql new file mode 100644 index 0000000..113d144 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.1.ddl.aql @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : metadata_node_recovery.aql + * Description : Check that metadata node failover is done correctly. + The test goes as follows: + start 2 nodes, create a dataset, kill metadata node + and wait until the failover complete, verify the + dataset still exists. + * Expected Result : Success + * Date : January 6 2016 + */ + +drop dataverse TinySocial if exists; +create dataverse TinySocial; +use dataverse TinySocial; + +create type EmploymentType as open { + organization-name: string, + start-date: date, + end-date: date? +} + +create type FacebookUserType as closed { + id: int, + alias: string, + name: string, + user-since: datetime, + friend-ids: {{ int32 }}, + employment: [EmploymentType] +} + +/********* 2. Create Datasets ***********/ +use dataverse TinySocial; + +drop dataset FacebookUsers if exists; + +create dataset FacebookUsers(FacebookUserType) +primary key id; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.2.node.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.2.node.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.2.node.aql new file mode 100644 index 0000000..9d5dc9b --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.2.node.aql @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : bulkload.aql + * Description : Check that Bulkload LSM component are replicated correclty. + The test goes as follows: + start 2 nodes, bulkload a dataset, query data, kill one node + and wait until the failover complete, query the data again. + * Expected Result : Success + * Date : January 6 2016 + */ +kill asterix_nc1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.3.sleep.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.3.sleep.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.3.sleep.aql new file mode 100644 index 0000000..9c50bf1 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.3.sleep.aql @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +60000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.4.query.aql b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.4.query.aql new file mode 100644 index 0000000..3d525f6 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/queries/failover/metadata_node/metadata_node.4.query.aql @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : metadata_node_recovery.aql + * Description : Check that metadata node failover is done correctly. + The test goes as follows: + start 2 nodes, create a dataset, kill metadata node + and wait until the failover complete, verify the + dataset still exists. + * Expected Result : Success + * Date : January 6 2016 + */ + +use dataverse TinySocial; + +count( +for $x in dataset Metadata.Dataset +where $x.DatasetName ='FacebookUsers' +return $x.DatasetName +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm new file mode 100644 index 0000000..c0697b7 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.10.adm @@ -0,0 +1,38 @@ +{ + "metadata_node" : "asterix_nc1", + "partitions" : { + "0" : { + "active" : true, + "activeNodeId" : "asterix_nc1", + "iodeviceNum" : 0, + "nodeId" : "asterix_nc1", + "partitionId" : 0, + "pendingActivation" : false + }, + "1" : { + "active" : true, + "activeNodeId" : "asterix_nc1", + "iodeviceNum" : 1, + "nodeId" : "asterix_nc1", + "partitionId" : 1, + "pendingActivation" : false + }, + "2" : { + "active" : true, + "activeNodeId" : "asterix_nc2", + "iodeviceNum" : 0, + "nodeId" : "asterix_nc2", + "partitionId" : 2, + "pendingActivation" : false + }, + "3" : { + "active" : true, + "activeNodeId" : "asterix_nc2", + "iodeviceNum" : 1, + "nodeId" : "asterix_nc2", + "partitionId" : 3, + "pendingActivation" : false + } + }, + "state" : "ACTIVE" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm new file mode 100644 index 0000000..15c200c --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.cluster_state.5.adm @@ -0,0 +1,38 @@ +{ + "metadata_node" : "asterix_nc2", + "partitions" : { + "0" : { + "active" : true, + "activeNodeId" : "asterix_nc2", + "iodeviceNum" : 0, + "nodeId" : "asterix_nc1", + "partitionId" : 0, + "pendingActivation" : false + }, + "1" : { + "active" : true, + "activeNodeId" : "asterix_nc2", + "iodeviceNum" : 1, + "nodeId" : "asterix_nc1", + "partitionId" : 1, + "pendingActivation" : false + }, + "2" : { + "active" : true, + "activeNodeId" : "asterix_nc2", + "iodeviceNum" : 0, + "nodeId" : "asterix_nc2", + "partitionId" : 2, + "pendingActivation" : false + }, + "3" : { + "active" : true, + "activeNodeId" : "asterix_nc2", + "iodeviceNum" : 1, + "nodeId" : "asterix_nc2", + "partitionId" : 3, + "pendingActivation" : false + } + }, + "state" : "ACTIVE" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.11.adm ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.11.adm b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.11.adm new file mode 100644 index 0000000..2edeafb --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.11.adm @@ -0,0 +1 @@ +20 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.6.adm ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.6.adm b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.6.adm new file mode 100644 index 0000000..9a03714 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failback/node_failback/node_failback.query.6.adm @@ -0,0 +1 @@ +10 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/bulkload/bulkload.5.adm ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/bulkload/bulkload.5.adm b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/bulkload/bulkload.5.adm new file mode 100644 index 0000000..9a03714 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/bulkload/bulkload.5.adm @@ -0,0 +1 @@ +10 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/mem_component_recovery/mem_component_recovery.5.adm ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/mem_component_recovery/mem_component_recovery.5.adm b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/mem_component_recovery/mem_component_recovery.5.adm new file mode 100644 index 0000000..9a03714 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/mem_component_recovery/mem_component_recovery.5.adm @@ -0,0 +1 @@ +10 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/metadata_node/metadata_node.4.adm ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/metadata_node/metadata_node.4.adm b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/metadata_node/metadata_node.4.adm new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/results/failover/metadata_node/metadata_node.4.adm @@ -0,0 +1 @@ +1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/replication/testsuite.xml ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/test/resources/integrationts/replication/testsuite.xml b/asterixdb/asterix-server/src/test/resources/integrationts/replication/testsuite.xml new file mode 100644 index 0000000..0f6b528 --- /dev/null +++ b/asterixdb/asterix-server/src/test/resources/integrationts/replication/testsuite.xml @@ -0,0 +1,44 @@ +<!-- + ! Licensed to the Apache Software Foundation (ASF) under one + ! or more contributor license agreements. See the NOTICE file + ! distributed with this work for additional information + ! regarding copyright ownership. The ASF licenses this file + ! to you under the Apache License, Version 2.0 (the + ! "License"); you may not use this file except in compliance + ! with the License. You may obtain a copy of the License at + ! + ! http://www.apache.org/licenses/LICENSE-2.0 + ! + ! Unless required by applicable law or agreed to in writing, + ! software distributed under the License is distributed on an + ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ! KIND, either express or implied. See the License for the + ! specific language governing permissions and limitations + ! under the License. + !--> +<test-suite xmlns="urn:xml.testframework.asterix.apache.org" ResultOffsetPath="results" QueryOffsetPath="queries" QueryFileExtension=".aql"> + <test-group name="failover"> + <test-case FilePath="failover"> + <compilation-unit name="bulkload"> + <output-dir compare="Text">bulkload</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="failover"> + <compilation-unit name="mem_component_recovery"> + <output-dir compare="Text">mem_component_recovery</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="failover"> + <compilation-unit name="metadata_node"> + <output-dir compare="Text">metadata_node</output-dir> + </compilation-unit> + </test-case> + </test-group> + <test-group name="failback"> + <test-case FilePath="failback"> + <compilation-unit name="node_failback"> + <output-dir compare="Text">node_failback</output-dir> + </compilation-unit> + </test-case> + </test-group> +</test-suite> \ No newline at end of file
