use of org.apache.hadoop.hive.ql.cache.results.QueryResultsCache in project hive by apache.
the class SemanticAnalyzer method getDestinationFilePath.
private Path getDestinationFilePath(final String destinationFile, boolean isMmTable) {
if (this.isResultsCacheEnabled() && this.queryTypeCanUseCache()) {
assert (!isMmTable);
QueryResultsCache instance = QueryResultsCache.getInstance();
// QueryResultsCache should have been initialized by now
if (instance != null) {
Path resultCacheTopDir = instance.getCacheDirPath();
String dirName = UUID.randomUUID().toString();
Path resultDir = new Path(resultCacheTopDir, dirName);
this.ctx.setFsResultCacheDirs(resultDir);
return resultDir;
}
}
return new Path(destinationFile);
}
Aggregations