1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.apache.hadoop.hbase.replication;
17
18 public class ReplicationSourceDummyWithNoTermination extends ReplicationSourceDummy {
19 volatile boolean firstTime = true;
20 @Override
21 public void terminate(String reason) {
22 // This is to block the zk listener to close the queues
23 // to simulate the znodes getting deleted without zk listener getting invoked
24 if (firstTime) {
25 firstTime = false;
26 throw new RuntimeException(fakeExceptionMessage);
27 }
28 }
29 }