Index: ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java (revision 1507186) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java (working copy) @@ -64,6 +64,8 @@ */ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer { + public static final String METADATA_NAME="_metadata"; + public ImportSemanticAnalyzer(HiveConf conf) throws SemanticException { super(conf); } @@ -89,7 +91,7 @@ Path fromPath = new Path(fromURI.getScheme(), fromURI.getAuthority(), fromURI.getPath()); try { - Path metadataPath = new Path(fromPath, "_metadata"); + Path metadataPath = new Path(fromPath, METADATA_NAME); Map.Entry> rv = EximUtil.readMetaData(fs, metadataPath); dbname = db.getCurrentDatabase(); Index: ql/src/java/org/apache/hadoop/hive/ql/parse/MetaDataExportListener.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/MetaDataExportListener.java (revision 1507186) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/MetaDataExportListener.java (working copy) @@ -38,7 +38,7 @@ import org.apache.hadoop.hive.metastore.events.PreEventContext; import org.apache.hadoop.hive.metastore.events.PreEventContext.PreEventType; import org.apache.hadoop.hive.ql.session.SessionState; - +import org.apache.hadoop.hive.ql.parse.ImportSemanticAnalyzer; /** * This class listens for drop events and, if set, exports the table's metadata as JSON to the trash * of the user performing the drop @@ -83,7 +83,7 @@ } catch (IOException e) { throw new MetaException(e.getMessage()); } - Path outFile = new Path(metaPath, name + ".metadata"); + Path outFile = new Path(metaPath, name + ImportSemanticAnalyzer.METADATA_NAME); try { SessionState.getConsole().printInfo("Beginning metadata export"); EximUtil.createExportDump(fs, outFile, mTbl, null);