@Override
  public void preBulkLoadHFile(ObserverContext<? extends RegionCoprocessorEnvironment> ctx,
    List<Pair<byte[], String>> familyPaths) throws IOException {
    RegionCoprocessorEnvironment e = ctx.getEnvironment();
    assertNotNull(e);
    assertNotNull(e.getRegion());
    if (
      e.getRegion().getTableDescriptor().getTableName()
        .equals(TestRegionObserverInterface.TEST_TABLE)
    ) {
      assertNotNull(familyPaths);
      assertEquals(1, familyPaths.size());
      assertArrayEquals(TestRegionObserverInterface.A, familyPaths.get(0).getFirst());
      String familyPath = familyPaths.get(0).getSecond();
      String familyName = Bytes.toString(TestRegionObserverInterface.A);
      assertEquals(familyPath.substring(familyPath.length() - familyName.length() - 1),
        "/" + familyName);
    }
    ctPreBulkLoadHFile.incrementAndGet();
  }
A sample region observer that tests the RegionObserver interface. It works with
TestRegionObserverInterface to provide the test case.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java