private static boolean externalTablePartition(ImportTableDesc tblDesc,
      ReplicationSpec replicationSpec) {
    return (replicationSpec != null) && replicationSpec.isInReplicationScope()
        && tblDesc.isExternal();
  }
Helper method to set location properly in partSpec
ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java