当前位置: 首页>>代码示例>>Java>>正文


Java ReplicationLogCleaner类代码示例

本文整理汇总了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>());
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:18,代码来源:TestLogsCleaner.java

示例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);
    }
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:19,代码来源:HMaster.java

示例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);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:16,代码来源:Replication.java

示例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());
  }
}
 
开发者ID:lifeng5042,项目名称:RStore,代码行数:16,代码来源:Replication.java


注:本文中的org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。