IMPALA-3539: Return error status if def/rep level caches failed to allocate.

The information in the JIRA is consistent with a failure to allocate
memory for the def level cache. There was a bug where this failure status
was not properly propagated, so eventually a DCHECK was hit that expected
the cache memory to be allocated.

Change-Id: I38856e6e1f5fbdbf5327cf31a2a109e6c930901d
Reviewed-on: http://gerrit.cloudera.org:8080/3065
Reviewed-by: Alex Behm <[email protected]>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/b4558d38
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/b4558d38
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/b4558d38

Branch: refs/heads/master
Commit: b4558d384ee103e8cc1b7456e504ac1ef07180be
Parents: e61b5bc
Author: Alex Behm <[email protected]>
Authored: Fri May 13 14:03:58 2016 -0700
Committer: Tim Armstrong <[email protected]>
Committed: Sat May 14 01:30:01 2016 -0700

----------------------------------------------------------------------
 be/src/exec/hdfs-parquet-scanner.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/b4558d38/be/src/exec/hdfs-parquet-scanner.cc
----------------------------------------------------------------------
diff --git a/be/src/exec/hdfs-parquet-scanner.cc 
b/be/src/exec/hdfs-parquet-scanner.cc
index 3fcb693..a70fc8a 100644
--- a/be/src/exec/hdfs-parquet-scanner.cc
+++ b/be/src/exec/hdfs-parquet-scanner.cc
@@ -1490,17 +1490,17 @@ Status 
HdfsParquetScanner::BaseScalarColumnReader::ReadDataPage() {
     }
 
     // Initialize the repetition level data
-    rep_levels_.Init(filename(),
+    RETURN_IF_ERROR(rep_levels_.Init(filename(),
         current_page_header_.data_page_header.repetition_level_encoding,
         parent_->level_cache_pool_.get(), parent_->state_->batch_size(),
         max_rep_level(), num_buffered_values_,
-        &data_, &data_size);
+        &data_, &data_size));
 
     // Initialize the definition level data
-    def_levels_.Init(filename(),
+    RETURN_IF_ERROR(def_levels_.Init(filename(),
         current_page_header_.data_page_header.definition_level_encoding,
         parent_->level_cache_pool_.get(), parent_->state_->batch_size(),
-        max_def_level(), num_buffered_values_, &data_, &data_size);
+        max_def_level(), num_buffered_values_, &data_, &data_size));
 
     // Data can be empty if the column contains all NULLs
     if (data_size != 0) RETURN_IF_ERROR(InitDataPage(data_, data_size));

Reply via email to