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

项目:ditb    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:LCIndex-HBase-0.94.16    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:pbase    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:HIndex    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:IRIndex    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:hbase    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value) throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
      Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:hbase    文件:TestSpaceQuotas.java   
private ClientServiceCallable<Void> generateFileToLoad(
    TableName tn, int numFiles, int numRowsPerFile) throws Exception {
  Connection conn = TEST_UTIL.getConnection();
  FileSystem fs = TEST_UTIL.getTestFileSystem();
  Configuration conf = TEST_UTIL.getConfiguration();
  Path baseDir = new Path(fs.getHomeDirectory(), testName.getMethodName() + "_files");
  fs.mkdirs(baseDir);
  final List<Pair<byte[], String>> famPaths = new ArrayList<Pair<byte[], String>>();
  for (int i = 1; i <= numFiles; i++) {
    Path hfile = new Path(baseDir, "file" + i);
    TestHRegionServerBulkLoad.createHFile(
        fs, hfile, Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"),
        Bytes.toBytes("reject"), numRowsPerFile);
    famPaths.add(new Pair<>(Bytes.toBytes(SpaceQuotaHelperForTests.F1), hfile.toString()));
  }

  // bulk load HFiles
  Table table = conn.getTable(tn);
  final String bulkToken = new SecureBulkLoadClient(conf, table).prepareBulkLoad(conn);
  return new ClientServiceCallable<Void>(conn,
      tn, Bytes.toBytes("row"), new RpcControllerFactory(conf).newController(), HConstants.PRIORITY_UNSET) {
    @Override
    public Void rpcCall() throws Exception {
      SecureBulkLoadClient secureClient = null;
      byte[] regionName = getLocation().getRegionInfo().getRegionName();
      try (Table table = conn.getTable(getTableName())) {
        secureClient = new SecureBulkLoadClient(conf, table);
        secureClient.secureBulkLoadHFiles(getStub(), famPaths, regionName,
              true, null, bulkToken);
      }
      return null;
    }
  };
}
项目:PyroDB    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:c5    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:HBase-Research    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:hbase-0.94.8-qod    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:hbase-0.94.8-qod    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:DominoHBase    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}
项目:hindex    文件:TestLoadIncrementalHFilesSplitRecovery.java   
public static void buildHFiles(FileSystem fs, Path dir, int value)
    throws IOException {
  byte[] val = value(value);
  for (int i = 0; i < NUM_CFS; i++) {
    Path testIn = new Path(dir, family(i));

    TestHRegionServerBulkLoad.createHFile(fs, new Path(testIn, "hfile_" + i),
        Bytes.toBytes(family(i)), QUAL, val, ROWCOUNT);
  }
}