You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Alex Behm (Code Review)" <ge...@cloudera.org> on 2016/07/27 23:49:53 UTC

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Alex Behm has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/3801

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................

IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

This is a first step towards making our scan node single threaded since we are
moving to an execution model where multi-threading is done at the fragment level.

This patch adds a new synchronous HdfsScanner::GetNext() interface and implements
it for the Parquet scanner. The async execution via HdfsScanner::ProcessSplit()
is still supported and is implemented by repeatedly calling GetNext() for
code sharing purposes.

I did not yet add a single-threaded scan node that uses GetNext().
The new code will be excercised by the existing scan node and tests.

Testing: I ran an exhaustive private build which passed. I also
ran a microbenchmark on a big TPCH lineitem table and there was no
significant difference in scan performance.

Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
---
M be/src/exec/base-sequence-scanner.cc
M be/src/exec/base-sequence-scanner.h
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/hdfs-rcfile-scanner.cc
M be/src/exec/hdfs-rcfile-scanner.h
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-scanner.h
M be/src/exec/hdfs-sequence-scanner.cc
M be/src/exec/hdfs-sequence-scanner.h
M be/src/exec/hdfs-text-scanner.cc
M be/src/exec/hdfs-text-scanner.h
M be/src/exec/parquet-column-readers.h
17 files changed, 430 insertions(+), 334 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/01/3801/1
-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has uploaded a new patch set (#2).

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................

IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

This is a first step towards making our scan node single threaded since we are
moving to an execution model where multi-threading is done at the fragment level.

This patch adds a new synchronous HdfsScanner::GetNext() interface and implements
it for the Parquet scanner. The async execution via HdfsScanner::ProcessSplit()
is still supported and is implemented by repeatedly calling GetNext() for
code sharing purposes.

I did not yet add a single-threaded scan node that uses GetNext().
The new code will be excercised by the existing scan node and tests.

Testing: I ran an exhaustive private build which passed. I also
ran a microbenchmark on a big TPCH lineitem table and there was no
significant difference in scan performance.

Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
---
M be/src/exec/base-sequence-scanner.cc
M be/src/exec/base-sequence-scanner.h
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/hdfs-rcfile-scanner.cc
M be/src/exec/hdfs-rcfile-scanner.h
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-scanner.h
M be/src/exec/hdfs-sequence-scanner.cc
M be/src/exec/hdfs-sequence-scanner.h
M be/src/exec/hdfs-text-scanner.cc
M be/src/exec/hdfs-text-scanner.h
M be/src/exec/parquet-column-readers.h
17 files changed, 489 insertions(+), 365 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/01/3801/2
-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3801/2/be/src/exec/hdfs-parquet-scanner.cc
File be/src/exec/hdfs-parquet-scanner.cc:

Line 346:       return Status::OK();
> these seem like significant control flow changes (and i haven't looked at t
I'll ask Tim, but I don't think it's a significant change because we always transfer resources in Close(), so there's no need to also transfer on eos.


http://gerrit.cloudera.org:8080/#/c/3801/4/be/src/exec/hdfs-parquet-scanner.h
File be/src/exec/hdfs-parquet-scanner.h:

Line 333:   virtual Status GetNext(RowBatch* row_batch, bool* eos) {
> alternatively, put this GetNext with body into the base class and make GetN
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Marcel Kornacker (Code Review)" <ge...@cloudera.org>.
Marcel Kornacker has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/3801/2/be/src/exec/hdfs-parquet-scanner.cc
File be/src/exec/hdfs-parquet-scanner.cc:

Line 302: Status HdfsParquetScanner::GetNext(RowBatch* row_batch, bool* eos) {
hm, it would still be nice to check that if this is getting called from outside, add_batches_to_queue is false.

private GetNextAux(), and have the public GetNext() perform the check?


http://gerrit.cloudera.org:8080/#/c/3801/2/be/src/exec/hdfs-scanner.h
File be/src/exec/hdfs-scanner.h:

Line 109:   /// If 'add_batches_to_queue' is true the caller most use ProcessSplit() and not
must (call)


Line 132:   /// This function should only return on error or end of scan range.
you can't call this if add_batches_to_queue was false, right? point that out. same for other functions in this class.


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Hello Marcel Kornacker, Tim Armstrong,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/3801

to look at the new patch set (#6).

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................

IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

This is a first step towards making our scan node single threaded since we are
moving to an execution model where multi-threading is done at the fragment level.

This patch adds a new synchronous HdfsScanner::GetNext() interface and implements
it for the Parquet scanner. The async execution via HdfsScanner::ProcessSplit()
is still supported and is implemented by repeatedly calling GetNext() for
code sharing purposes.

I did not yet add a single-threaded scan node that uses GetNext().
The new code will be excercised by the existing scan node and tests.

Testing: I ran an exhaustive private build which passed. I also
ran a microbenchmark on a big TPCH lineitem table and there was no
significant difference in scan performance.

Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
---
M be/src/exec/base-sequence-scanner.cc
M be/src/exec/base-sequence-scanner.h
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/hdfs-rcfile-scanner.cc
M be/src/exec/hdfs-rcfile-scanner.h
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-scanner-ir.cc
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-scanner.h
M be/src/exec/hdfs-sequence-scanner.cc
M be/src/exec/hdfs-sequence-scanner.h
M be/src/exec/hdfs-text-scanner.cc
M be/src/exec/hdfs-text-scanner.h
M be/src/exec/parquet-column-readers.h
18 files changed, 506 insertions(+), 365 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/01/3801/6
-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 1: Code-Review+1

Carry Tim's +1.

-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3801/5/be/src/exec/hdfs-scanner.h
File be/src/exec/hdfs-scanner.h:

Line 123:   /// The memory referenced by the tuples is valid until either Close() is called,
> Now that I think about it, I think the bit about "Close is called" is wrong
Nice catch. You are right. Fixed.


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/3801/2/be/src/exec/hdfs-parquet-scanner.cc
File be/src/exec/hdfs-parquet-scanner.cc:

Line 302: Status HdfsParquetScanner::GetNext(RowBatch* row_batch, bool* eos) {
> hm, it would still be nice to check that if this is getting called from out
Done. Added a GetNextInternal().


http://gerrit.cloudera.org:8080/#/c/3801/2/be/src/exec/hdfs-scanner.h
File be/src/exec/hdfs-scanner.h:

Line 109:   /// If 'add_batches_to_queue' is true the caller most use ProcessSplit() and not
> must (call)
Done


Line 132:   /// This function should only return on error or end of scan range.
> you can't call this if add_batches_to_queue was false, right? point that ou
Added comments and DCHECKs.


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 5: Code-Review+1

(1 comment)

LGTM, I think the comment just needs updating.

http://gerrit.cloudera.org:8080/#/c/3801/5/be/src/exec/hdfs-scanner.h
File be/src/exec/hdfs-scanner.h:

Line 123:   /// The memory referenced by the tuples is valid until either Close() is called,
Now that I think about it, I think the bit about "Close is called" is wrong for Scanners (although it is true for ExecNodes). I think the second clause should be the only rule. We should be able to close a scanner while its batches are still in the queue.

The code looks like it implements that correctly (otherwise why would we bother passing along resources on Close()), just the comment is wrong.


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has uploaded a new patch set (#4).

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................

IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

This is a first step towards making our scan node single threaded since we are
moving to an execution model where multi-threading is done at the fragment level.

This patch adds a new synchronous HdfsScanner::GetNext() interface and implements
it for the Parquet scanner. The async execution via HdfsScanner::ProcessSplit()
is still supported and is implemented by repeatedly calling GetNext() for
code sharing purposes.

I did not yet add a single-threaded scan node that uses GetNext().
The new code will be excercised by the existing scan node and tests.

Testing: I ran an exhaustive private build which passed. I also
ran a microbenchmark on a big TPCH lineitem table and there was no
significant difference in scan performance.

Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
---
M be/src/exec/base-sequence-scanner.cc
M be/src/exec/base-sequence-scanner.h
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/hdfs-rcfile-scanner.cc
M be/src/exec/hdfs-rcfile-scanner.h
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-scanner-ir.cc
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-scanner.h
M be/src/exec/hdfs-sequence-scanner.cc
M be/src/exec/hdfs-sequence-scanner.h
M be/src/exec/hdfs-text-scanner.cc
M be/src/exec/hdfs-text-scanner.h
M be/src/exec/parquet-column-readers.h
18 files changed, 505 insertions(+), 365 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/01/3801/4
-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3801/3/be/src/exec/hdfs-parquet-scanner.h
File be/src/exec/hdfs-parquet-scanner.h:

Line 434:   /// Implements GetNext(). May be called if 'add_batches_to_queue_' is false.
sorry will correct this to 'true'


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 6: Code-Review+2

Carry +2

-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 7: Code-Review+2 Verified+1

Validated with a private build since it also requires simultaneous changes with LZO. Merging directly.
http://sandbox.jenkins.cloudera.com/view/Impala/view/Private-Utility/job/impala-private-build-and-test/3849/

-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 7
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Marcel Kornacker (Code Review)" <ge...@cloudera.org>.
Marcel Kornacker has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3801/2/be/src/exec/hdfs-parquet-scanner.cc
File be/src/exec/hdfs-parquet-scanner.cc:

Line 346:       return Status::OK();
these seem like significant control flow changes (and i haven't looked at that very closely). best for tim to take another look.


http://gerrit.cloudera.org:8080/#/c/3801/4/be/src/exec/hdfs-parquet-scanner.h
File be/src/exec/hdfs-parquet-scanner.h:

Line 333:   virtual Status GetNext(RowBatch* row_batch, bool* eos) {
alternatively, put this GetNext with body into the base class and make GetNextInternal virtual.


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Marcel Kornacker (Code Review)" <ge...@cloudera.org>.
Marcel Kornacker has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 5: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: No

Re: [Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by Alex Behm <al...@cloudera.com>.
This needs corresponding LZO changes. Both changes have +2, I'll merge them
in sync this night. I ran the branches on exhaustive and everything passed.

On Fri, Jul 29, 2016 at 12:04 PM, Internal Jenkins (Code Review) <
gerrit@cloudera.org> wrote:

> Internal Jenkins has posted comments on this change.
>
> Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and
> implementation for Parquet.
> ......................................................................
>
>
> Patch Set 6: Verified-1
>
> Build failed:
> http://sandbox.jenkins.cloudera.com/job/impala-external-gerrit-verify-merge-ASF/47/
>
> --
> To view, visit http://gerrit.cloudera.org:8080/3801
> To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
>
> Gerrit-MessageType: comment
> Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
> Gerrit-PatchSet: 6
> Gerrit-Project: Impala-ASF
> Gerrit-Branch: master
> Gerrit-Owner: Alex Behm <al...@cloudera.com>
> Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
> Gerrit-Reviewer: Internal Jenkins
> Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
> Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
> Gerrit-HasComments: No
>

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Internal Jenkins (Code Review)" <ge...@cloudera.org>.
Internal Jenkins has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 6: Verified-1

Build failed: http://sandbox.jenkins.cloudera.com/job/impala-external-gerrit-verify-merge-ASF/47/

-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Marcel Kornacker (Code Review)" <ge...@cloudera.org>.
Marcel Kornacker has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/3801/1/be/src/exec/hdfs-scanner.h
File be/src/exec/hdfs-scanner.h:

Line 119:   /// the batch is reset or destroyed, or a batch returned from a subsequent GetNext()
more succinctly: or this or any subsequently returned batch is reset or destroyed.


Line 137:   virtual void Close(RowBatch* row_batch, bool add_to_queue);
on second thought, add_to_queue is a bit odd (what if you never called ProcessSplit?).

why not have ProcessSplit set an internal flag add_to_queue? (and have GetNext dcheck that it's not set; or have two flags to make sure that you only ever call one or the other)


Line 139:   RowBatch* batch() const { return batch_; }
is this valid in GetNext mode? if not, add the above mentioned flags.


http://gerrit.cloudera.org:8080/#/c/3801/1/be/src/exec/hdfs-sequence-scanner.h
File be/src/exec/hdfs-sequence-scanner.h:

Line 165:   
fix all trailing spaces


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has uploaded a new patch set (#5).

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................

IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

This is a first step towards making our scan node single threaded since we are
moving to an execution model where multi-threading is done at the fragment level.

This patch adds a new synchronous HdfsScanner::GetNext() interface and implements
it for the Parquet scanner. The async execution via HdfsScanner::ProcessSplit()
is still supported and is implemented by repeatedly calling GetNext() for
code sharing purposes.

I did not yet add a single-threaded scan node that uses GetNext().
The new code will be excercised by the existing scan node and tests.

Testing: I ran an exhaustive private build which passed. I also
ran a microbenchmark on a big TPCH lineitem table and there was no
significant difference in scan performance.

Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
---
M be/src/exec/base-sequence-scanner.cc
M be/src/exec/base-sequence-scanner.h
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/hdfs-rcfile-scanner.cc
M be/src/exec/hdfs-rcfile-scanner.h
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-scanner-ir.cc
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-scanner.h
M be/src/exec/hdfs-sequence-scanner.cc
M be/src/exec/hdfs-sequence-scanner.h
M be/src/exec/hdfs-text-scanner.cc
M be/src/exec/hdfs-text-scanner.h
M be/src/exec/parquet-column-readers.h
18 files changed, 506 insertions(+), 365 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/01/3801/5
-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has uploaded a new patch set (#3).

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................

IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

This is a first step towards making our scan node single threaded since we are
moving to an execution model where multi-threading is done at the fragment level.

This patch adds a new synchronous HdfsScanner::GetNext() interface and implements
it for the Parquet scanner. The async execution via HdfsScanner::ProcessSplit()
is still supported and is implemented by repeatedly calling GetNext() for
code sharing purposes.

I did not yet add a single-threaded scan node that uses GetNext().
The new code will be excercised by the existing scan node and tests.

Testing: I ran an exhaustive private build which passed. I also
ran a microbenchmark on a big TPCH lineitem table and there was no
significant difference in scan performance.

Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
---
M be/src/exec/base-sequence-scanner.cc
M be/src/exec/base-sequence-scanner.h
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/hdfs-rcfile-scanner.cc
M be/src/exec/hdfs-rcfile-scanner.h
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-scanner-ir.cc
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-scanner.h
M be/src/exec/hdfs-sequence-scanner.cc
M be/src/exec/hdfs-sequence-scanner.h
M be/src/exec/hdfs-text-scanner.cc
M be/src/exec/hdfs-text-scanner.h
M be/src/exec/parquet-column-readers.h
18 files changed, 508 insertions(+), 365 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/01/3801/3
-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/3801/1/be/src/exec/hdfs-scanner.h
File be/src/exec/hdfs-scanner.h:

Line 119:   /// the batch is reset or destroyed, or a batch returned from a subsequent GetNext()
> more succinctly: or this or any subsequently returned batch is reset or des
Done


Line 137:   virtual void Close(RowBatch* row_batch, bool add_to_queue);
> on second thought, add_to_queue is a bit odd (what if you never called Proc
In that case, I think it's cleaner to declare the intent in the c'tor because batch() and Close() can be called before even calling ProcessSplit(), e.g., if Open() fails.

Added the c'tor param.


Line 139:   RowBatch* batch() const { return batch_; }
> is this valid in GetNext mode? if not, add the above mentioned flags.
Added comment and DCHECK.


http://gerrit.cloudera.org:8080/#/c/3801/1/be/src/exec/hdfs-sequence-scanner.h
File be/src/exec/hdfs-sequence-scanner.h:

Line 165:   
> fix all trailing spaces
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has submitted this change and it was merged.

Change subject: IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.
......................................................................


IMPALA-3905: Add HdfsScanner::GetNext() interface and implementation for Parquet.

This is a first step towards making our scan node single threaded since we are
moving to an execution model where multi-threading is done at the fragment level.

This patch adds a new synchronous HdfsScanner::GetNext() interface and implements
it for the Parquet scanner. The async execution via HdfsScanner::ProcessSplit()
is still supported and is implemented by repeatedly calling GetNext() for
code sharing purposes.

I did not yet add a single-threaded scan node that uses GetNext().
The new code will be excercised by the existing scan node and tests.

Testing: I ran an exhaustive private build which passed. I also
ran a microbenchmark on a big TPCH lineitem table and there was no
significant difference in scan performance.

Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Reviewed-on: http://gerrit.cloudera.org:8080/3801
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Alex Behm <al...@cloudera.com>
---
M be/src/exec/base-sequence-scanner.cc
M be/src/exec/base-sequence-scanner.h
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/hdfs-rcfile-scanner.cc
M be/src/exec/hdfs-rcfile-scanner.h
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-scanner-ir.cc
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-scanner.h
M be/src/exec/hdfs-sequence-scanner.cc
M be/src/exec/hdfs-sequence-scanner.h
M be/src/exec/hdfs-text-scanner.cc
M be/src/exec/hdfs-text-scanner.h
M be/src/exec/parquet-column-readers.h
18 files changed, 506 insertions(+), 365 deletions(-)

Approvals:
  Alex Behm: Looks good to me, approved; Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/3801
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab50770bac05afcda4d3404fb4f53a0104931eb0
Gerrit-PatchSet: 8
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Marcel Kornacker <ma...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>