@Test
  public void replicationWithoutExternalTables() throws Throwable {
    List<String> loadWithClause = ReplicationTestUtils.includeExternalTableClause(false);
    List<String> dumpWithClause = ReplicationTestUtils.includeExternalTableClause(false);
    WarehouseInstance.Tuple tuple = primary
        .run("use " + primaryDbName)
        .run("create external table t1 (id int)")
        .run("insert into table t1 values (1)")
        .run("insert into table t1 values (2)")
        .run("create external table t2 (place string) partitioned by (country string)")
        .run("insert into table t2 partition(country='india') values ('bangalore')")
        .run("insert into table t2 partition(country='us') values ('austin')")
        .run("insert into table t2 partition(country='france') values ('paris')")
        .dump(primaryDbName, dumpWithClause);

    // the _file_list_external only should be created if external tables are to be replicated not otherwise
    ReplicationTestUtils.assertFalseExternalFileList(primary, tuple.dumpLocation);

    replica.load(replicatedDbName, primaryDbName, loadWithClause)
        .run("repl status " + replicatedDbName)
        .verifyResult(tuple.lastReplicationId)
        .run("use " + replicatedDbName)
        .run("show tables like 't1'")
        .verifyFailure(new String[] {"t1"})
        .run("show tables like 't2'")
        .verifyFailure(new String[] {"t2"})
        .verifyReplTargetProperty(replicatedDbName);

    tuple = primary.run("use " + primaryDbName)
        .run("create external table t3 (id int)")
        .run("insert into table t3 values (10)")
        .run("insert into table t3 values (20)")
        .dump(primaryDbName, dumpWithClause);

    // the _file_list_external should be created if external tables are to be replicated not otherwise
    assertFalse(primary.miniDFSCluster.getFileSystem()
        .exists(new Path(new Path(tuple.dumpLocation,
                REPL_HIVE_BASE_DIR), EximUtil.FILE_LIST_EXTERNAL)));

    replica.load(replicatedDbName, primaryDbName, loadWithClause)
        .run("use " + replicatedDbName)
        .run("show tables like 't3'")
        .verifyFailure(new String[] {"t3"})
        .verifyReplTargetProperty(replicatedDbName);
  }
TestMetadataReplicationScenariosExternalTables - Test metadata only replication.
for external tables.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenariosExternalTablesMetaDataOnly.java