Repository: incubator-impala
Updated Branches:
  refs/heads/master 1083639ff -> 88448d1d4


IMPALA-3788: Fix Kudu ReadMode flag checking

Commit 0d4bdc1 to add flag --kudu_read_mode wasn't checking
the value properly; so the behavior was reversed. This
became apparent immediately in stress testing, though there
isn't a good way to validate this in EE or unit tests. I
added some logging which I used to verify the correct
behavior manually in the minicluster.

Change-Id: I843842560844732505af53ea360a3a9ccbab04a9
Reviewed-on: http://gerrit.cloudera.org:8080/5402
Reviewed-by: Matthew Jacobs <[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/5ec0eeda
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/5ec0eeda
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/5ec0eeda

Branch: refs/heads/master
Commit: 5ec0eeda0800c9213dd20a290a24178e5f57b20e
Parents: 1083639
Author: Matthew Jacobs <[email protected]>
Authored: Wed Dec 7 12:15:10 2016 -0800
Committer: Internal Jenkins <[email protected]>
Committed: Thu Dec 8 03:53:52 2016 +0000

----------------------------------------------------------------------
 be/src/exec/kudu-scanner.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/5ec0eeda/be/src/exec/kudu-scanner.cc
----------------------------------------------------------------------
diff --git a/be/src/exec/kudu-scanner.cc b/be/src/exec/kudu-scanner.cc
index ff9ca27..55975e0 100644
--- a/be/src/exec/kudu-scanner.cc
+++ b/be/src/exec/kudu-scanner.cc
@@ -139,13 +139,14 @@ Status KuduScanner::OpenNextScanToken(const string& 
scan_token)  {
                          "Could not set replica selection.");
   }
   kudu::client::KuduScanner::ReadMode mode =
-      MODE_READ_AT_SNAPSHOT.compare(FLAGS_kudu_read_mode) ?
+      MODE_READ_AT_SNAPSHOT == FLAGS_kudu_read_mode ?
           kudu::client::KuduScanner::READ_AT_SNAPSHOT :
           kudu::client::KuduScanner::READ_LATEST;
   KUDU_RETURN_IF_ERROR(scanner_->SetReadMode(mode), "Could not set scanner 
ReadMode");
-
   
KUDU_RETURN_IF_ERROR(scanner_->SetTimeoutMillis(FLAGS_kudu_operation_timeout_ms),
       "Could not set scanner timeout");
+  VLOG_ROW << "Starting KuduScanner with ReadMode=" << mode << " timeout=" <<
+      FLAGS_kudu_operation_timeout_ms;
 
   {
     SCOPED_TIMER(state_->total_storage_wait_timer());

Reply via email to