[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-13 Thread Marta Kuczora (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17014177#comment-17014177
 ] 

Marta Kuczora commented on HIVE-22716:
--

Pushed to master. Thanks a lot [~szita] for the review.

> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch, 
> HIVE-22716.3.patch, HIVE-22716.4.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>   if (bufferIx == cacheData.length) return (argPos - offset);
>   ByteBuffer data = cacheData[bufferIx].getByteBufferDup();
>   int toConsume = Math.min(argEnd - argPos, data.remaining() - bufferPos);
>   data.position(data.position() + bufferPos);
>   data.get(b, argPos, toConsume);
>   if (data.remaining() == 0) {
> ++bufferIx;
> bufferPos = 0;
>   } else {
> bufferPos += toConsume;
>   }
>   argPos += toConsume;
> }
> return len;
>   }
> {noformat}
> The read(ByteBuffer bb) method wasn't called before, but in the 1.11.0 
> Parquet version, there were some optimizations (PARQUET-1542), so this method 
> is called now. Because of this bug, the TestMiniLlapCliDriver and 
> TestMiniLlapLocalCliDriver q tests are failing with the new Parquet version.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-13 Thread Jira


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17014133#comment-17014133
 ] 

Ádám Szita commented on HIVE-22716:
---

+1

> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch, 
> HIVE-22716.3.patch, HIVE-22716.4.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>   if (bufferIx == cacheData.length) return (argPos - offset);
>   ByteBuffer data = cacheData[bufferIx].getByteBufferDup();
>   int toConsume = Math.min(argEnd - argPos, data.remaining() - bufferPos);
>   data.position(data.position() + bufferPos);
>   data.get(b, argPos, toConsume);
>   if (data.remaining() == 0) {
> ++bufferIx;
> bufferPos = 0;
>   } else {
> bufferPos += toConsume;
>   }
>   argPos += toConsume;
> }
> return len;
>   }
> {noformat}
> The read(ByteBuffer bb) method wasn't called before, but in the 1.11.0 
> Parquet version, there were some optimizations (PARQUET-1542), so this method 
> is called now. Because of this bug, the TestMiniLlapCliDriver and 
> TestMiniLlapLocalCliDriver q tests are failing with the new Parquet version.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013268#comment-17013268
 ] 

Hive QA commented on HIVE-22716:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12990563/HIVE-22716.4.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:green}SUCCESS:{color} +1 due to 17872 tests passed

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/20148/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/20148/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-20148/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12990563 - PreCommit-HIVE-Build

> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch, 
> HIVE-22716.3.patch, HIVE-22716.4.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>   if (bufferIx == cacheData.length) return (argPos - offset);
>   ByteBuffer data = cacheData[bufferIx].getByteBufferDup();
>   int toConsume = Math.min(argEnd - argPos, data.remaining() - bufferPos);
>   data.position(data.position() + bufferPos);
>   data.get(b, argPos, toConsume);
>   if (data.remaining() == 0) {
> ++bufferIx;
> bufferPos = 0;
>   } else {
> bufferPos += toConsume;
>   }
>   argPos += toConsume;
> }
> return len;
>   }
> {noformat}
> The read(ByteBuffer bb) method wasn't called before, but in the 1.11.0 
> Parquet version, there were some optimizations (PARQUET-1542), so this method 
> is called now. Because of this bug, the TestMiniLlapCliDriver and 
> TestMiniLlapLocalCliDriver q tests are failing with the new Parquet version.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013236#comment-17013236
 ] 

Hive QA commented on HIVE-22716:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  8m 
50s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
6s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m  
8s{color} | {color:blue} ql in master has 1531 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
1s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
26s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
7s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
7s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
41s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  4m 
10s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
0s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
14s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 24m 54s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-20148/dev-support/hive-personality.sh
 |
| git revision | master / dfcb0a4 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.1 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-20148/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch, 
> HIVE-22716.3.patch, HIVE-22716.4.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition 

[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013186#comment-17013186
 ] 

Hive QA commented on HIVE-22716:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12990557/HIVE-22716.3.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 8 failed/errored test(s), 17872 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.metastore.client.TestCatalogs.alterChangeName[Remote] 
(batchId=229)
org.apache.hadoop.hive.metastore.client.TestCatalogs.alterNonExistentCatalog[Remote]
 (batchId=229)
org.apache.hadoop.hive.metastore.client.TestCatalogs.catalogOperations[Remote] 
(batchId=229)
org.apache.hadoop.hive.metastore.client.TestCatalogs.dropCatalogWithNonEmptyDefaultDb[Remote]
 (batchId=229)
org.apache.hadoop.hive.metastore.client.TestCatalogs.dropHiveCatalog[Remote] 
(batchId=229)
org.apache.hadoop.hive.metastore.client.TestCatalogs.dropNonEmptyCatalog[Remote]
 (batchId=229)
org.apache.hadoop.hive.metastore.client.TestCatalogs.dropNonExistentCatalog[Remote]
 (batchId=229)
org.apache.hadoop.hive.metastore.client.TestCatalogs.getNonExistentCatalog[Remote]
 (batchId=229)
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/20147/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/20147/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-20147/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 8 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12990557 - PreCommit-HIVE-Build

> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch, 
> HIVE-22716.3.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>   if (bufferIx == cacheData.length) return (argPos - offset);
>   ByteBuffer data = cacheData[bufferIx].getByteBufferDup();
>   int toConsume = Math.min(argEnd - argPos, data.remaining() - bufferPos);
>   data.position(data.position() + bufferPos);
>   data.get(b, argPos, toConsume);
>   if (data.remaining() == 0) {
> ++bufferIx;
> bufferPos = 0;
>   } else {
> bufferPos += toConsume;
>   }
>   argPos += toConsume;
> }
> return len;
>   }
> {noformat}
> The read(ByteBuffer bb) method wasn't called before, but in the 1.11.0 
> Parquet version, there were some optimizations (PARQUET-1542), so this method 
> is called now. Because of this bug, the TestMiniLlapCliDriver and 
> TestMiniLlapLocalCliDriver q tests are failing with the new Parquet version.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013162#comment-17013162
 ] 

Hive QA commented on HIVE-22716:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  8m 
52s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
8s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m  
9s{color} | {color:blue} ql in master has 1531 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
2s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
31s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
8s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
8s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  4m 
16s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
1s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
14s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 25m 16s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-20147/dev-support/hive-personality.sh
 |
| git revision | master / dfcb0a4 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.1 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-20147/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch, 
> HIVE-22716.3.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> 

[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013149#comment-17013149
 ] 

Hive QA commented on HIVE-22716:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12990535/HIVE-22716.2.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 17872 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[timestamptz_2] 
(batchId=90)
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/20146/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/20146/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-20146/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 1 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12990535 - PreCommit-HIVE-Build

> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>   if (bufferIx == cacheData.length) return (argPos - offset);
>   ByteBuffer data = cacheData[bufferIx].getByteBufferDup();
>   int toConsume = Math.min(argEnd - argPos, data.remaining() - bufferPos);
>   data.position(data.position() + bufferPos);
>   data.get(b, argPos, toConsume);
>   if (data.remaining() == 0) {
> ++bufferIx;
> bufferPos = 0;
>   } else {
> bufferPos += toConsume;
>   }
>   argPos += toConsume;
> }
> return len;
>   }
> {noformat}
> The read(ByteBuffer bb) method wasn't called before, but in the 1.11.0 
> Parquet version, there were some optimizations (PARQUET-1542), so this method 
> is called now. Because of this bug, the TestMiniLlapCliDriver and 
> TestMiniLlapLocalCliDriver q tests are failing with the new Parquet version.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013102#comment-17013102
 ] 

Hive QA commented on HIVE-22716:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  9m 
 2s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
8s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m  
2s{color} | {color:blue} ql in master has 1531 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
59s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
29s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
8s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
8s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  4m  
9s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
4s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
14s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 25m  0s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-20146/dev-support/hive-personality.sh
 |
| git revision | master / dfcb0a4 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.1 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-20146/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch, HIVE-22716.2.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>

[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17012916#comment-17012916
 ] 

Hive QA commented on HIVE-22716:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12990503/HIVE-22716.1.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 17860 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.ql.TestTxnCommands.testMergeOnTezEdges (batchId=358)
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/20143/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/20143/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-20143/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 1 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12990503 - PreCommit-HIVE-Build

> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>   if (bufferIx == cacheData.length) return (argPos - offset);
>   ByteBuffer data = cacheData[bufferIx].getByteBufferDup();
>   int toConsume = Math.min(argEnd - argPos, data.remaining() - bufferPos);
>   data.position(data.position() + bufferPos);
>   data.get(b, argPos, toConsume);
>   if (data.remaining() == 0) {
> ++bufferIx;
> bufferPos = 0;
>   } else {
> bufferPos += toConsume;
>   }
>   argPos += toConsume;
> }
> return len;
>   }
> {noformat}
> The read(ByteBuffer bb) method wasn't called before, but in the 1.11.0 
> Parquet version, there were some optimizations (PARQUET-1542), so this method 
> is called now. Because of this bug, the TestMiniLlapCliDriver and 
> TestMiniLlapLocalCliDriver q tests are failing with the new Parquet version.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22716) Reading to ByteBuffer is broken in ParquetFooterInputFromCache

2020-01-10 Thread Hive QA (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17012869#comment-17012869
 ] 

Hive QA commented on HIVE-22716:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  8m 
45s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
6s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m 
11s{color} | {color:blue} ql in master has 1531 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
6s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
32s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
7s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
7s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  4m 
15s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
59s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
14s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 25m  5s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-20143/dev-support/hive-personality.sh
 |
| git revision | master / f8e583f |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.1 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-20143/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Reading to ByteBuffer is broken in ParquetFooterInputFromCache
> --
>
> Key: HIVE-22716
> URL: https://issues.apache.org/jira/browse/HIVE-22716
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Marta Kuczora
>Assignee: Marta Kuczora
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22716.1.patch
>
>
> The ParquetFooterInputFromCache.read(ByteBuffer bb) calls the readInternal 
> method with the result parameter passed as 'len'. The value of the result 
> parameter will always be -1 at this point, and because of this, the 
> readInternal method won't read anything.
> {noformat}
>   public int read(ByteBuffer bb) throws IOException {
> // Simple implementation for now - currently Parquet uses heap buffers.
> int result = -1;
> if (bb.hasArray()) {
>   result = readInternal(bb.array(), bb.arrayOffset(), result);  // The 
> readInternal is called with result=-1
>   if (result > 0) {
> bb.position(bb.position() + result);
>   }
> } else {
>   byte[] b = new byte[bb.remaining()];
>   result = readInternal(b, 0, result); // The readInternal is called 
> with result=-1
>   bb.put(b, 0, result);
> }
> return result;
>   }
> {noformat}
> {noformat}
>   public int readInternal(byte[] b, int offset, int len) {
> if (position >= length) return -1;
> int argPos = offset, argEnd = offset + len;  // Here argEnd will be -1
> while (argPos < argEnd) { // This condition will never be 
> true, since argEnd=-1
>   if (bufferIx ==