Java 类org.apache.hadoop.hbase.replication.HBaseReplicationEndpoint 实例源码

项目:ditb    文件:ReplicationSinkManager.java   
/**
 * Instantiate for a single replication peer cluster.
 * @param conn connection to the peer cluster
 * @param peerClusterId identifier of the peer cluster
 * @param endpoint replication endpoint for inter cluster replication
 * @param conf HBase configuration, used for determining replication source ratio and bad peer
 *          threshold
 */
public ReplicationSinkManager(HConnection conn, String peerClusterId,
    HBaseReplicationEndpoint endpoint, Configuration conf) {
  this.conn = conn;
  this.peerClusterId = peerClusterId;
  this.endpoint = endpoint;
  this.badReportCounts = Maps.newHashMap();
  this.ratio = conf.getFloat("replication.source.ratio", DEFAULT_REPLICATION_SOURCE_RATIO);
  this.badSinkThreshold = conf.getInt("replication.bad.sink.threshold",
                                      DEFAULT_BAD_SINK_THRESHOLD);
  this.random = new Random();
}
项目:ditb    文件:TestReplicationSinkManager.java   
@Before
public void setUp() {
  replicationPeers = mock(ReplicationPeers.class);
  replicationEndpoint = mock(HBaseReplicationEndpoint.class);
  sinkManager = new ReplicationSinkManager(mock(HConnection.class),
                    PEER_CLUSTER_ID, replicationEndpoint, new Configuration());
}
项目:pbase    文件:ReplicationSinkManager.java   
/**
 * Instantiate for a single replication peer cluster.
 * @param conn connection to the peer cluster
 * @param peerClusterId identifier of the peer cluster
 * @param endpoint replication endpoint for inter cluster replication
 * @param conf HBase configuration, used for determining replication source ratio and bad peer
 *          threshold
 */
public ReplicationSinkManager(HConnection conn, String peerClusterId,
    HBaseReplicationEndpoint endpoint, Configuration conf) {
  this.conn = conn;
  this.peerClusterId = peerClusterId;
  this.endpoint = endpoint;
  this.badReportCounts = Maps.newHashMap();
  this.ratio = conf.getFloat("replication.source.ratio", DEFAULT_REPLICATION_SOURCE_RATIO);
  this.badSinkThreshold = conf.getInt("replication.bad.sink.threshold",
                                      DEFAULT_BAD_SINK_THRESHOLD);
  this.random = new Random();
}
项目:pbase    文件:TestReplicationSinkManager.java   
@Before
public void setUp() {
  replicationPeers = mock(ReplicationPeers.class);
  replicationEndpoint = mock(HBaseReplicationEndpoint.class);
  sinkManager = new ReplicationSinkManager(mock(HConnection.class),
                    PEER_CLUSTER_ID, replicationEndpoint, new Configuration());
}
项目:hbase    文件:ReplicationSinkManager.java   
/**
 * Instantiate for a single replication peer cluster.
 * @param conn connection to the peer cluster
 * @param peerClusterId identifier of the peer cluster
 * @param endpoint replication endpoint for inter cluster replication
 * @param conf HBase configuration, used for determining replication source ratio and bad peer
 *          threshold
 */
public ReplicationSinkManager(ClusterConnection conn, String peerClusterId,
    HBaseReplicationEndpoint endpoint, Configuration conf) {
  this.conn = conn;
  this.peerClusterId = peerClusterId;
  this.endpoint = endpoint;
  this.badReportCounts = Maps.newHashMap();
  this.ratio = conf.getFloat("replication.source.ratio", DEFAULT_REPLICATION_SOURCE_RATIO);
  this.badSinkThreshold = conf.getInt("replication.bad.sink.threshold",
                                      DEFAULT_BAD_SINK_THRESHOLD);
  this.random = new Random();
}
项目:hbase    文件:TestReplicationSinkManager.java   
@Before
public void setUp() {
  replicationPeers = mock(ReplicationPeers.class);
  replicationEndpoint = mock(HBaseReplicationEndpoint.class);
  sinkManager = new ReplicationSinkManager(mock(ClusterConnection.class),
                    PEER_CLUSTER_ID, replicationEndpoint, new Configuration());
}