Java 类org.apache.hadoop.hbase.regionserver.compactions.StripeCompactionPolicy 实例源码

项目:ditb    文件:StripeStoreFileManager.java   
private void debugDumpState(String string) {
  if (!LOG.isDebugEnabled()) return;
  StringBuilder sb = new StringBuilder();
  sb.append("\n" + string + "; current stripe state is as such:");
  sb.append("\n level 0 with ")
      .append(state.level0Files.size())
      .append(
        " files: "
            + TraditionalBinaryPrefix.long2String(
              StripeCompactionPolicy.getTotalFileSize(state.level0Files), "", 1) + ";");
  for (int i = 0; i < state.stripeFiles.size(); ++i) {
    String endRow = (i == state.stripeEndRows.length)
        ? "(end)" : "[" + Bytes.toString(state.stripeEndRows[i]) + "]";
    sb.append("\n stripe ending in ")
        .append(endRow)
        .append(" with ")
        .append(state.stripeFiles.get(i).size())
        .append(
          " files: "
              + TraditionalBinaryPrefix.long2String(
                StripeCompactionPolicy.getTotalFileSize(state.stripeFiles.get(i)), "", 1) + ";");
  }
  sb.append("\n").append(state.stripeFiles.size()).append(" stripes total.");
  sb.append("\n").append(getStorefileCount()).append(" files total.");
  LOG.debug(sb.toString());
}
项目:pbase    文件:StripeStoreFileManager.java   
private void debugDumpState(String string) {
  if (!LOG.isDebugEnabled()) return;
  StringBuilder sb = new StringBuilder();
  sb.append("\n" + string + "; current stripe state is as such:");
  sb.append("\n level 0 with ").append(state.level0Files.size())
      .append(
        " files: "
            + StringUtils.humanReadableInt(StripeCompactionPolicy
                .getTotalFileSize(state.level0Files)) + ";");
  for (int i = 0; i < state.stripeFiles.size(); ++i) {
    String endRow = (i == state.stripeEndRows.length)
        ? "(end)" : "[" + Bytes.toString(state.stripeEndRows[i]) + "]";
    sb.append("\n stripe ending in ").append(endRow).append(" with ")
        .append(state.stripeFiles.get(i).size())
        .append(
          " files: "
              + StringUtils.humanReadableInt(StripeCompactionPolicy
                  .getTotalFileSize(state.stripeFiles.get(i))) + ";");
  }
  sb.append("\n").append(state.stripeFiles.size()).append(" stripes total.");
  sb.append("\n").append(getStorefileCount()).append(" files total.");
  LOG.debug(sb.toString());
}
项目:hbase    文件:StripeStoreFileManager.java   
private void debugDumpState(String string) {
  if (!LOG.isDebugEnabled()) return;
  StringBuilder sb = new StringBuilder();
  sb.append("\n" + string + "; current stripe state is as such:");
  sb.append("\n level 0 with ")
      .append(state.level0Files.size())
      .append(
        " files: "
            + TraditionalBinaryPrefix.long2String(
              StripeCompactionPolicy.getTotalFileSize(state.level0Files), "", 1) + ";");
  for (int i = 0; i < state.stripeFiles.size(); ++i) {
    String endRow = (i == state.stripeEndRows.length)
        ? "(end)" : "[" + Bytes.toString(state.stripeEndRows[i]) + "]";
    sb.append("\n stripe ending in ")
        .append(endRow)
        .append(" with ")
        .append(state.stripeFiles.get(i).size())
        .append(
          " files: "
              + TraditionalBinaryPrefix.long2String(
                StripeCompactionPolicy.getTotalFileSize(state.stripeFiles.get(i)), "", 1) + ";");
  }
  sb.append("\n").append(state.stripeFiles.size()).append(" stripes total.");
  sb.append("\n").append(getStorefileCount()).append(" files total.");
  LOG.debug(sb.toString());
}
项目:ditb    文件:StripeStoreEngine.java   
@Override
protected void createComponents(
    Configuration conf, Store store, KVComparator comparator) throws IOException {
  this.config = new StripeStoreConfig(conf, store);
  this.compactionPolicy = new StripeCompactionPolicy(conf, store, config);
  this.storeFileManager = new StripeStoreFileManager(comparator, conf, this.config);
  this.storeFlusher = new StripeStoreFlusher(
    conf, store, this.compactionPolicy, this.storeFileManager);
  this.compactor = new StripeCompactor(conf, store);
}
项目:ditb    文件:TestStripeStoreEngine.java   
@Test
public void testCreateBasedOnConfig() throws Exception {
  Configuration conf = HBaseConfiguration.create();
  conf.set(StoreEngine.STORE_ENGINE_CLASS_KEY, TestStoreEngine.class.getName());
  StripeStoreEngine se = createEngine(conf);
  assertTrue(se.getCompactionPolicy() instanceof StripeCompactionPolicy);
}
项目:pbase    文件:StripeStoreEngine.java   
@Override
protected void createComponents(
    Configuration conf, Store store, KVComparator comparator) throws IOException {
  this.config = new StripeStoreConfig(conf, store);
  this.compactionPolicy = new StripeCompactionPolicy(conf, store, config);
  this.storeFileManager = new StripeStoreFileManager(comparator, conf, this.config);
  this.storeFlusher = new StripeStoreFlusher(
    conf, store, this.compactionPolicy, this.storeFileManager);
  this.compactor = new StripeCompactor(conf, store);
}
项目:pbase    文件:TestStripeStoreEngine.java   
@Test
public void testCreateBasedOnConfig() throws Exception {
  Configuration conf = HBaseConfiguration.create();
  conf.set(StoreEngine.STORE_ENGINE_CLASS_KEY, TestStoreEngine.class.getName());
  StripeStoreEngine se = createEngine(conf);
  assertTrue(se.getCompactionPolicy() instanceof StripeCompactionPolicy);
}
项目:HIndex    文件:StripeStoreEngine.java   
@Override
protected void createComponents(
    Configuration conf, Store store, KVComparator comparator) throws IOException {
  this.config = new StripeStoreConfig(conf, store);
  this.compactionPolicy = new StripeCompactionPolicy(conf, store, config);
  this.storeFileManager = new StripeStoreFileManager(comparator, conf, this.config);
  this.storeFlusher = new StripeStoreFlusher(
    conf, store, this.compactionPolicy, this.storeFileManager);
  this.compactor = new StripeCompactor(conf, store);
}
项目:HIndex    文件:TestStripeStoreEngine.java   
@Test
public void testCreateBasedOnConfig() throws Exception {
  Configuration conf = HBaseConfiguration.create();
  conf.set(StoreEngine.STORE_ENGINE_CLASS_KEY, TestStoreEngine.class.getName());
  StripeStoreEngine se = createEngine(conf);
  assertTrue(se.getCompactionPolicy() instanceof StripeCompactionPolicy);
}
项目:hbase    文件:StripeStoreEngine.java   
@Override
protected void createComponents(
    Configuration conf, HStore store, CellComparator comparator) throws IOException {
  this.config = new StripeStoreConfig(conf, store);
  this.compactionPolicy = new StripeCompactionPolicy(conf, store, config);
  this.storeFileManager = new StripeStoreFileManager(comparator, conf, this.config);
  this.storeFlusher = new StripeStoreFlusher(
    conf, store, this.compactionPolicy, this.storeFileManager);
  this.compactor = new StripeCompactor(conf, store);
}
项目:hbase    文件:TestStripeStoreEngine.java   
@Test
public void testCreateBasedOnConfig() throws Exception {
  Configuration conf = HBaseConfiguration.create();
  conf.set(StoreEngine.STORE_ENGINE_CLASS_KEY, TestStoreEngine.class.getName());
  StripeStoreEngine se = createEngine(conf);
  assertTrue(se.getCompactionPolicy() instanceof StripeCompactionPolicy);
}
项目:PyroDB    文件:StripeStoreEngine.java   
@Override
protected void createComponents(
    Configuration conf, Store store, KVComparator comparator) throws IOException {
  this.config = new StripeStoreConfig(conf, store);
  this.compactionPolicy = new StripeCompactionPolicy(conf, store, config);
  this.storeFileManager = new StripeStoreFileManager(comparator, conf, this.config);
  this.storeFlusher = new StripeStoreFlusher(
    conf, store, this.compactionPolicy, this.storeFileManager);
  this.compactor = new StripeCompactor(conf, store);
}
项目:PyroDB    文件:TestStripeStoreEngine.java   
@Test
public void testCreateBasedOnConfig() throws Exception {
  Configuration conf = HBaseConfiguration.create();
  conf.set(StoreEngine.STORE_ENGINE_CLASS_KEY, TestStoreEngine.class.getName());
  StripeStoreEngine se = createEngine(conf);
  assertTrue(se.getCompactionPolicy() instanceof StripeCompactionPolicy);
}
项目:ditb    文件:StripeStoreFlusher.java   
public StripeStoreFlusher(Configuration conf, Store store, StripeCompactionPolicy policy,
    StripeStoreFileManager stripes) {
  super(conf, store);
  this.policy = policy;
  this.stripes = stripes;
}
项目:pbase    文件:StripeStoreFlusher.java   
public StripeStoreFlusher(Configuration conf, Store store,
    StripeCompactionPolicy policy, StripeStoreFileManager stripes) {
  super(conf, store);
  this.policy = policy;
  this.stripes = stripes;
}
项目:HIndex    文件:StripeStoreFlusher.java   
public StripeStoreFlusher(Configuration conf, Store store,
    StripeCompactionPolicy policy, StripeStoreFileManager stripes) {
  super(conf, store);
  this.policy = policy;
  this.stripes = stripes;
}
项目:hbase    文件:StripeStoreFlusher.java   
public StripeStoreFlusher(Configuration conf, HStore store,
    StripeCompactionPolicy policy, StripeStoreFileManager stripes) {
  super(conf, store);
  this.policy = policy;
  this.stripes = stripes;
}
项目:PyroDB    文件:StripeStoreFlusher.java   
public StripeStoreFlusher(Configuration conf, Store store,
    StripeCompactionPolicy policy, StripeStoreFileManager stripes) {
  super(conf, store);
  this.policy = policy;
  this.stripes = stripes;
}