FAQ
Author: xuefu
Date: Fri Dec 19 19:15:13 2014
New Revision: 1646831

URL: http://svn.apache.org/r1646831
Log:
HIVE-9154: Cache pathToPartitionInfo in context aware record reader (Chao via Xuefu)

Modified:
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java?rev=1646831&r1=1646830&r2=1646831&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java Fri Dec 19 19:15:13 2014
@@ -66,6 +66,7 @@ public abstract class HiveContextAwareRe
    private boolean wasUsingSortedSearch = false;
    private String genericUDFClassName = null;
    private final List<Comparison> stopComparisons = new ArrayList<Comparison>();
+ private Map<String, PartitionDesc> pathToPartitionInfo;

    protected RecordReader recordReader;
    protected JobConf jobConf;
@@ -171,6 +172,8 @@ public abstract class HiveContextAwareRe
      ioCxtRef.isBlockPointer = isBlockPointer;
      ioCxtRef.inputPath = inputPath;
      LOG.info("Processing file " + inputPath);
+ pathToPartitionInfo =
+ Utilities.getMapWork(jobConf).getPathToPartitionInfo();
      initDone = true;
    }

@@ -310,8 +313,6 @@ public abstract class HiveContextAwareRe
          Path filePath = this.ioCxtRef.getInputPath();
          PartitionDesc part = null;
          try {
- Map<String, PartitionDesc> pathToPartitionInfo = Utilities
- .getMapWork(jobConf).getPathToPartitionInfo();
            part = HiveFileFormatUtils
                .getPartitionDescFromPathRecursively(pathToPartitionInfo,
                    filePath, IOPrepareCache.get().getPartitionDescMap());

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedDec 19, '14 at 7:15p
activeDec 19, '14 at 7:15p
posts1
users1
websitehive.apache.org

1 user in discussion

Xuefu: 1 post

People

Translate

site design / logo © 2021 Grokbase