1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.hadoop.hbase.replication;
21
22 import org.apache.hadoop.conf.Configuration;
23 import org.apache.hadoop.fs.FileSystem;
24 import org.apache.hadoop.fs.Path;
25 import org.apache.hadoop.hbase.Stoppable;
26 import org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceInterface;
27 import org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager;
28
29 import java.io.IOException;
30 import java.util.concurrent.atomic.AtomicBoolean;
31
32
33
34
35 public class ReplicationSourceDummy implements ReplicationSourceInterface {
36
37 ReplicationSourceManager manager;
38 String peerClusterId;
39 Path currentPath;
40
41 @Override
42 public void init(Configuration conf, FileSystem fs,
43 ReplicationSourceManager manager, Stoppable stopper,
44 AtomicBoolean replicating, String peerClusterId)
45 throws IOException {
46 this.manager = manager;
47 this.peerClusterId = peerClusterId;
48 }
49
50 @Override
51 public void enqueueLog(Path log) {
52 this.currentPath = log;
53 }
54
55 @Override
56 public Path getCurrentPath() {
57 return this.currentPath;
58 }
59
60 @Override
61 public void startup() {
62
63 }
64
65 @Override
66 public void terminate(String reason) {
67
68 }
69
70 @Override
71 public void terminate(String reason, Exception e) {
72
73 }
74
75 @Override
76 public String getPeerClusterZnode() {
77 return peerClusterId;
78 }
79
80 @Override
81 public String getPeerClusterId() {
82 return peerClusterId;
83 }
84
85 @Override
86 public void setSourceEnabled(boolean status) {
87
88 }
89
90 }