本文整理汇总了Java中org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner类的典型用法代码示例。如果您正苦于以下问题:Java ReplicationLogCleaner类的具体用法?Java ReplicationLogCleaner怎么用?Java ReplicationLogCleaner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReplicationLogCleaner类属于org.apache.hadoop.hbase.replication.master包,在下文中一共展示了ReplicationLogCleaner类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testZnodeCversionChange
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner; //导入依赖的package包/类
@Test(timeout=5000)
public void testZnodeCversionChange() throws Exception {
Configuration conf = TEST_UTIL.getConfiguration();
ReplicationLogCleaner cleaner = new ReplicationLogCleaner();
cleaner.setConf(conf);
ReplicationQueuesClient rqcMock = Mockito.mock(ReplicationQueuesClient.class);
Mockito.when(rqcMock.getQueuesZNodeCversion()).thenReturn(1, 2, 3, 4);
Field rqc = ReplicationLogCleaner.class.getDeclaredField("replicationQueues");
rqc.setAccessible(true);
rqc.set(cleaner, rqcMock);
// This should return eventually when cversion stabilizes
cleaner.getDeletableFiles(new LinkedList<FileStatus>());
}
示例2: decorateMasterConfiguration
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner; //导入依赖的package包/类
/**
* This method modifies the master's configuration in order to inject replication-related features
*/
@VisibleForTesting
public static void decorateMasterConfiguration(Configuration conf) {
String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS);
String cleanerClass = ReplicationLogCleaner.class.getCanonicalName();
if (!plugins.contains(cleanerClass)) {
conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + "," + cleanerClass);
}
if (ReplicationUtils.isReplicationForBulkLoadDataEnabled(conf)) {
plugins = conf.get(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS);
cleanerClass = ReplicationHFileCleaner.class.getCanonicalName();
if (!plugins.contains(cleanerClass)) {
conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, plugins + "," + cleanerClass);
}
}
}
示例3: decorateMasterConfiguration
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner; //导入依赖的package包/类
/**
* This method modifies the master's configuration in order to inject
* replication-related features
* @param conf
*/
public static void decorateMasterConfiguration(Configuration conf) {
if (!isReplication(conf)) {
return;
}
String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS);
String cleanerClass = ReplicationLogCleaner.class.getCanonicalName();
if (!plugins.contains(cleanerClass)) {
conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + "," + cleanerClass);
}
}
示例4: decorateMasterConfiguration
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner; //导入依赖的package包/类
/**
* This method modifies the master's configuration in order to inject
* replication-related features
* @param conf
*/
public static void decorateMasterConfiguration(Configuration conf) {
if (!isReplication(conf)) {
return;
}
String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS);
if (!plugins.contains(ReplicationLogCleaner.class.toString())) {
conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS,
plugins + "," + ReplicationLogCleaner.class.getCanonicalName());
}
}