org.apache.hadoop.hbase.regionserver.HStore.throttleCompaction()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中org.apache.hadoop.hbase.regionserver.HStore.throttleCompaction()方法的一些代码示例,展示了HStore.throttleCompaction()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HStore.throttleCompaction()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.regionserver.HStore
类名称:HStore
方法名:throttleCompaction

HStore.throttleCompaction介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

  1. pool = store.throttleCompaction(compaction.getRequest().getSize()) ? longCompactions
  2. : shortCompactions;
  3. } else {

代码示例来源:origin: apache/hbase

  1. @Test
  2. public void testStoreUsesConfigurationFromHcdAndHtd() throws Exception {
  3. final String CONFIG_KEY = "hbase.regionserver.thread.compaction.throttle";
  4. long anyValue = 10;
  5. // We'll check that it uses correct config and propagates it appropriately by going thru
  6. // the simplest "real" path I can find - "throttleCompaction", which just checks whether
  7. // a number we pass in is higher than some config value, inside compactionPolicy.
  8. Configuration conf = HBaseConfiguration.create();
  9. conf.setLong(CONFIG_KEY, anyValue);
  10. init(name.getMethodName() + "-xml", conf);
  11. assertTrue(store.throttleCompaction(anyValue + 1));
  12. assertFalse(store.throttleCompaction(anyValue));
  13. // HTD overrides XML.
  14. --anyValue;
  15. init(name.getMethodName() + "-htd", conf, TableDescriptorBuilder
  16. .newBuilder(TableName.valueOf(table)).setValue(CONFIG_KEY, Long.toString(anyValue)),
  17. ColumnFamilyDescriptorBuilder.of(family));
  18. assertTrue(store.throttleCompaction(anyValue + 1));
  19. assertFalse(store.throttleCompaction(anyValue));
  20. // HCD overrides them both.
  21. --anyValue;
  22. init(name.getMethodName() + "-hcd", conf,
  23. TableDescriptorBuilder.newBuilder(TableName.valueOf(table)).setValue(CONFIG_KEY,
  24. Long.toString(anyValue)),
  25. ColumnFamilyDescriptorBuilder.newBuilder(family).setValue(CONFIG_KEY, Long.toString(anyValue))
  26. .build());
  27. assertTrue(store.throttleCompaction(anyValue + 1));
  28. assertFalse(store.throttleCompaction(anyValue));
  29. }

代码示例来源:origin: apache/hbase

  1. store.throttleCompaction(c.getRequest().getSize()) ? longCompactions : shortCompactions;

代码示例来源:origin: org.apache.hbase/hbase-server

  1. @Test
  2. public void testStoreUsesConfigurationFromHcdAndHtd() throws Exception {
  3. final String CONFIG_KEY = "hbase.regionserver.thread.compaction.throttle";
  4. long anyValue = 10;
  5. // We'll check that it uses correct config and propagates it appropriately by going thru
  6. // the simplest "real" path I can find - "throttleCompaction", which just checks whether
  7. // a number we pass in is higher than some config value, inside compactionPolicy.
  8. Configuration conf = HBaseConfiguration.create();
  9. conf.setLong(CONFIG_KEY, anyValue);
  10. init(name.getMethodName() + "-xml", conf);
  11. assertTrue(store.throttleCompaction(anyValue + 1));
  12. assertFalse(store.throttleCompaction(anyValue));
  13. // HTD overrides XML.
  14. --anyValue;
  15. init(name.getMethodName() + "-htd", conf, TableDescriptorBuilder
  16. .newBuilder(TableName.valueOf(table)).setValue(CONFIG_KEY, Long.toString(anyValue)),
  17. ColumnFamilyDescriptorBuilder.of(family));
  18. assertTrue(store.throttleCompaction(anyValue + 1));
  19. assertFalse(store.throttleCompaction(anyValue));
  20. // HCD overrides them both.
  21. --anyValue;
  22. init(name.getMethodName() + "-hcd", conf,
  23. TableDescriptorBuilder.newBuilder(TableName.valueOf(table)).setValue(CONFIG_KEY,
  24. Long.toString(anyValue)),
  25. ColumnFamilyDescriptorBuilder.newBuilder(family).setValue(CONFIG_KEY, Long.toString(anyValue))
  26. .build());
  27. assertTrue(store.throttleCompaction(anyValue + 1));
  28. assertFalse(store.throttleCompaction(anyValue));
  29. }

相关文章

HStore类方法