private static void assertSDLocationCorrect() throws HiveException {
    org.apache.hadoop.hive.ql.metadata.Table table = Hive.get().getTable("manwhwh");
    List<Partition> partitions = Hive.get().getPartitions(table);
    assertTrue(partitions.get(0).getLocation().contains("/newExternal/manwhwh/p=p1"));
    assertTrue(partitions.get(1).getLocation().contains("/newExternal/manwhwh/p=p2"));

    table = Hive.get().getTable("manwhout");
    partitions = Hive.get().getPartitions(table);
    assertTrue(partitions.get(0).getLocation().contains("/tmp/manwhoutp1"));
    assertTrue(partitions.get(1).getLocation().contains("/tmp/manwhoutp2"));

    table = Hive.get().getTable("manwhmixed");
    partitions = Hive.get().getPartitions(table);
    assertTrue(partitions.get(0).getLocation().contains("/tmp/manwhmixedp1"));
    assertTrue(partitions.get(1).getLocation().contains("/newExternal/manwhmixed/p=p2"));
  }
Should encounter a DB with an unset owner, and should try to chown the new dir path to 'hive' user.
This will always fail in this test, as we're never running it as root.
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/util/TestHiveStrictManagedMigration.java