@Override
    public void prePut(final ObserverContext<? extends RegionCoprocessorEnvironment> e,
      final Put put, final WALEdit edit, final Durability durability) throws IOException {
      try (Table table = e.getEnvironment().getConnection().getTable(otherTable)) {
        table.put(put);
        completed[0] = true;
      }
    }
Custom coprocessor that just copies the write to another table.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java