@Test
  public void testModifyColumnFamilyStoreFileTracker() throws IOException {
    TableName tableName = TableName.valueOf(name.getMethodName());
    byte[] family = Bytes.toBytes("info");
    byte[] qual = Bytes.toBytes("q");
    byte[] row = Bytes.toBytes(0);
    byte[] value = Bytes.toBytes(1);
    try (Table table = TEST_UTIL.createTable(tableName, family)) {
      table.put(new Put(row).addColumn(family, qual, value));
    }
    // change to FILE
    ADMIN.modifyColumnFamilyStoreFileTracker(tableName, family,
      StoreFileTrackerFactory.Trackers.FILE.name());
    verifyModifyColumnFamilyResult(tableName, family, qual, row, value,
      StoreFileTrackerFactory.Trackers.FILE.name());

    // change to FILE again, should have no effect
    ADMIN.modifyColumnFamilyStoreFileTracker(tableName, family,
      StoreFileTrackerFactory.Trackers.FILE.name());
    verifyModifyColumnFamilyResult(tableName, family, qual, row, value,
      StoreFileTrackerFactory.Trackers.FILE.name());

    // change to MIGRATION, and then to FILE
    TableDescriptor current = ADMIN.getDescriptor(tableName);
    ADMIN.modifyTable(TableDescriptorBuilder.newBuilder(current)
      .modifyColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(current.getColumnFamily(family))
        .setConfiguration(StoreFileTrackerFactory.TRACKER_IMPL,
          StoreFileTrackerFactory.Trackers.MIGRATION.name())
        .setConfiguration(SRC_IMPL, StoreFileTrackerFactory.Trackers.FILE.name())
        .setConfiguration(DST_IMPL, StoreFileTrackerFactory.Trackers.DEFAULT.name()).build())
      .build());
    ADMIN.modifyColumnFamilyStoreFileTracker(tableName, family,
      StoreFileTrackerFactory.Trackers.FILE.name());
    verifyModifyColumnFamilyResult(tableName, family, qual, row, value,
      StoreFileTrackerFactory.Trackers.FILE.name());

    // change to MIGRATION, and then to DEFAULT
    current = ADMIN.getDescriptor(tableName);
    ADMIN.modifyTable(TableDescriptorBuilder.newBuilder(current)
      .modifyColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(current.getColumnFamily(family))
        .setConfiguration(StoreFileTrackerFactory.TRACKER_IMPL,
          StoreFileTrackerFactory.Trackers.MIGRATION.name())
        .setConfiguration(SRC_IMPL, StoreFileTrackerFactory.Trackers.FILE.name())
        .setConfiguration(DST_IMPL, StoreFileTrackerFactory.Trackers.DEFAULT.name()).build())
      .build());
    ADMIN.modifyColumnFamilyStoreFileTracker(tableName, family,
      StoreFileTrackerFactory.Trackers.DEFAULT.name());
    verifyModifyColumnFamilyResult(tableName, family, qual, row, value,
      StoreFileTrackerFactory.Trackers.DEFAULT.name());
  }
Verify schema change for read only table
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin3.java