Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18506

LlapBaseInputFormat - negative array index

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0
    • None
    • None

    Description

       

      "nextInt % value" may generate negative values:

      int randIdx = rand.nextInt() % allInstances.size();
      serviceInstance = allInstances.toArray(serviceInstanceArray)[randIdx];
      

       

       

      Attachments

        1. HIVE-18506.patch
          1 kB
          Oleg Danilov
        2. HIVE-18506.01.patch
          0.8 kB
          Sergey Shelukhin

        Activity

          hiveqa Hive QA added a comment -

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

          ERROR: -1 due to build exiting with an error

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

          Messages:

          Executing org.apache.hive.ptest.execution.TestCheckPhase
          Executing org.apache.hive.ptest.execution.PrepPhase
          Tests exited with: NonZeroExitCodeException
          Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ date '+%Y-%m-%d %T.%3N'
          2018-01-21 22:56:14.521
          + [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]]
          + export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
          + JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
          + export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
          + PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
          + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
          + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
          + export 'MAVEN_OPTS=-Xmx1g '
          + MAVEN_OPTS='-Xmx1g '
          + cd /data/hiveptest/working/
          + tee /data/hiveptest/logs/PreCommit-HIVE-Build-8743/source-prep.txt
          + [[ false == \t\r\u\e ]]
          + mkdir -p maven ivy
          + [[ git = \s\v\n ]]
          + [[ git = \g\i\t ]]
          + [[ -z master ]]
          + [[ -d apache-github-source-source ]]
          + [[ ! -d apache-github-source-source/.git ]]
          + [[ ! -d apache-github-source-source ]]
          + date '+%Y-%m-%d %T.%3N'
          2018-01-21 22:56:14.524
          + cd apache-github-source-source
          + git fetch origin
          + git reset --hard HEAD
          HEAD is now at 90d236a HIVE-18231 : validate resource plan - part 2 - validate action and trigger expressions (Harish Jaiprakash, reviewed by Sergey Shelukhin)
          + git clean -f -d
          + git checkout master
          Already on 'master'
          Your branch is up-to-date with 'origin/master'.
          + git reset --hard origin/master
          HEAD is now at 90d236a HIVE-18231 : validate resource plan - part 2 - validate action and trigger expressions (Harish Jaiprakash, reviewed by Sergey Shelukhin)
          + git merge --ff-only origin/master
          Already up-to-date.
          + date '+%Y-%m-%d %T.%3N'
          2018-01-21 22:56:15.231
          + rm -rf ../yetus
          + mkdir ../yetus
          + git gc
          + cp -R . ../yetus
          + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-8743/yetus
          + patchCommandPath=/data/hiveptest/working/scratch/smart-apply-patch.sh
          + patchFilePath=/data/hiveptest/working/scratch/build.patch
          + [[ -f /data/hiveptest/working/scratch/build.patch ]]
          + chmod +x /data/hiveptest/working/scratch/smart-apply-patch.sh
          + /data/hiveptest/working/scratch/smart-apply-patch.sh /data/hiveptest/working/scratch/build.patch
          error: patch failed: llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java:373
          error: repository lacks the necessary blob to fall back on 3-way merge.
          error: llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java: patch does not apply
          error: src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java: does not exist in index
          error: java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java: does not exist in index
          The patch does not appear to apply with p0, p1, or p2
          + exit 1
          '
          

          This message is automatically generated.

          ATTACHMENT ID: 12907023 - PreCommit-HIVE-Build

          hiveqa Hive QA added a comment - Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12907023/HIVE-18506.patch ERROR: -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/8743/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/8743/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-8743/ Messages: Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Tests exited with: NonZeroExitCodeException Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ date '+%Y-%m-%d %T.%3N' 2018-01-21 22:56:14.521 + [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]] + export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 + JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 + export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m ' + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m ' + export 'MAVEN_OPTS=-Xmx1g ' + MAVEN_OPTS='-Xmx1g ' + cd /data/hiveptest/working/ + tee /data/hiveptest/logs/PreCommit-HIVE-Build-8743/source-prep.txt + [[ false == \t\r\u\e ]] + mkdir -p maven ivy + [[ git = \s\v\n ]] + [[ git = \g\i\t ]] + [[ -z master ]] + [[ -d apache-github-source-source ]] + [[ ! -d apache-github-source-source/.git ]] + [[ ! -d apache-github-source-source ]] + date '+%Y-%m-%d %T.%3N' 2018-01-21 22:56:14.524 + cd apache-github-source-source + git fetch origin + git reset --hard HEAD HEAD is now at 90d236a HIVE-18231 : validate resource plan - part 2 - validate action and trigger expressions (Harish Jaiprakash, reviewed by Sergey Shelukhin) + git clean -f -d + git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. + git reset --hard origin/master HEAD is now at 90d236a HIVE-18231 : validate resource plan - part 2 - validate action and trigger expressions (Harish Jaiprakash, reviewed by Sergey Shelukhin) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2018-01-21 22:56:15.231 + rm -rf ../yetus + mkdir ../yetus + git gc + cp -R . ../yetus + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-8743/yetus + patchCommandPath=/data/hiveptest/working/scratch/smart-apply-patch.sh + patchFilePath=/data/hiveptest/working/scratch/build.patch + [[ -f /data/hiveptest/working/scratch/build.patch ]] + chmod +x /data/hiveptest/working/scratch/smart-apply-patch.sh + /data/hiveptest/working/scratch/smart-apply-patch.sh /data/hiveptest/working/scratch/build.patch error: patch failed: llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java:373 error: repository lacks the necessary blob to fall back on 3-way merge. error: llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java: patch does not apply error: src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java: does not exist in index error: java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java: does not exist in index The patch does not appear to apply with p0, p1, or p2 + exit 1 ' This message is automatically generated. ATTACHMENT ID: 12907023 - PreCommit-HIVE-Build

          Rebased the patch so that it actually applies for Hive QA.
          +1 pending that.
          cc jdere

          sershe Sergey Shelukhin added a comment - Rebased the patch so that it actually applies for Hive QA. +1 pending that. cc jdere
          hiveqa Hive QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
                Prechecks
          0 findbugs 0m 1s Findbugs executables are not available.
          +1 @author 0m 0s The patch does not contain any @author tags.
                master Compile Tests
          +1 mvninstall 6m 49s master passed
          +1 compile 0m 18s master passed
          +1 checkstyle 0m 9s master passed
          +1 javadoc 0m 11s master passed
                Patch Compile Tests
          +1 mvninstall 0m 16s the patch passed
          +1 compile 0m 15s the patch passed
          +1 javac 0m 15s the patch passed
          -1 checkstyle 0m 10s llap-ext-client: The patch generated 1 new + 38 unchanged - 0 fixed = 39 total (was 38)
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 javadoc 0m 10s the patch passed
                Other Tests
          -1 asflicense 0m 12s The patch generated 6 ASF License warnings.
          8m 46s



          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.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
          Build tool maven
          Personality /data/hiveptest/working/yetus/dev-support/hive-personality.sh
          git revision master / 09ce6cd
          Default Java 1.8.0_111
          checkstyle http://104.198.109.242/logs//PreCommit-HIVE-Build-8812/yetus/diff-checkstyle-llap-ext-client.txt
          asflicense http://104.198.109.242/logs//PreCommit-HIVE-Build-8812/yetus/patch-asflicense-problems.txt
          modules C: llap-ext-client U: llap-ext-client
          Console output http://104.198.109.242/logs//PreCommit-HIVE-Build-8812/yetus.txt
          Powered by Apache Yetus http://yetus.apache.org

          This message was automatically generated.

          hiveqa Hive QA added a comment - -1 overall Vote Subsystem Runtime Comment       Prechecks 0 findbugs 0m 1s Findbugs executables are not available. +1 @author 0m 0s The patch does not contain any @author tags.       master Compile Tests +1 mvninstall 6m 49s master passed +1 compile 0m 18s master passed +1 checkstyle 0m 9s master passed +1 javadoc 0m 11s master passed       Patch Compile Tests +1 mvninstall 0m 16s the patch passed +1 compile 0m 15s the patch passed +1 javac 0m 15s the patch passed -1 checkstyle 0m 10s llap-ext-client: The patch generated 1 new + 38 unchanged - 0 fixed = 39 total (was 38) +1 whitespace 0m 0s The patch has no whitespace issues. +1 javadoc 0m 10s the patch passed       Other Tests -1 asflicense 0m 12s The patch generated 6 ASF License warnings. 8m 46s 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.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux Build tool maven Personality /data/hiveptest/working/yetus/dev-support/hive-personality.sh git revision master / 09ce6cd Default Java 1.8.0_111 checkstyle http://104.198.109.242/logs//PreCommit-HIVE-Build-8812/yetus/diff-checkstyle-llap-ext-client.txt asflicense http://104.198.109.242/logs//PreCommit-HIVE-Build-8812/yetus/patch-asflicense-problems.txt modules C: llap-ext-client U: llap-ext-client Console output http://104.198.109.242/logs//PreCommit-HIVE-Build-8812/yetus.txt Powered by Apache Yetus http://yetus.apache.org This message was automatically generated.
          hiveqa Hive QA added a comment -

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

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

          ERROR: -1 due to 21 failed/errored test(s), 11652 tests executed
          Failed tests:

          org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[auto_sortmerge_join_2] (batchId=48)
          org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[mapjoin_hook] (batchId=12)
          org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[ppd_join5] (batchId=35)
          org.apache.hadoop.hive.cli.TestEncryptedHDFSCliDriver.testCliDriver[encryption_move_tbl] (batchId=173)
          org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[llap_smb] (batchId=151)
          org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[bucket_map_join_tez1] (batchId=170)
          org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[insert_values_orig_table_use_metadata] (batchId=165)
          org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[llap_acid] (batchId=169)
          org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[llap_acid_fast] (batchId=160)
          org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[sysdb] (batchId=160)
          org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vectorization_input_format_excludes] (batchId=162)
          org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[bucketizedhiveinputformat] (batchId=178)
          org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[authorization_part] (batchId=94)
          org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[stats_aggregator_error_1] (batchId=94)
          org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[ppd_join5] (batchId=121)
          org.apache.hadoop.hive.ql.io.TestDruidRecordWriter.testWrite (batchId=254)
          org.apache.hive.beeline.TestBeeLineWithArgs.testQueryProgress (batchId=229)
          org.apache.hive.beeline.cli.TestHiveCli.testNoErrorDB (batchId=186)
          org.apache.hive.jdbc.TestSSL.testConnectionMismatch (batchId=232)
          org.apache.hive.jdbc.TestSSL.testConnectionWrongCertCN (batchId=232)
          org.apache.hive.jdbc.TestSSL.testMetastoreConnectionWrongCertCN (batchId=232)
          

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

          Messages:

          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: 21 tests failed
          

          This message is automatically generated.

          ATTACHMENT ID: 12907352 - PreCommit-HIVE-Build

          hiveqa Hive QA added a comment - Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12907352/HIVE-18506.01.patch ERROR: -1 due to no test(s) being added or modified. ERROR: -1 due to 21 failed/errored test(s), 11652 tests executed Failed tests: org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[auto_sortmerge_join_2] (batchId=48) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[mapjoin_hook] (batchId=12) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[ppd_join5] (batchId=35) org.apache.hadoop.hive.cli.TestEncryptedHDFSCliDriver.testCliDriver[encryption_move_tbl] (batchId=173) org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[llap_smb] (batchId=151) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[bucket_map_join_tez1] (batchId=170) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[insert_values_orig_table_use_metadata] (batchId=165) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[llap_acid] (batchId=169) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[llap_acid_fast] (batchId=160) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[sysdb] (batchId=160) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vectorization_input_format_excludes] (batchId=162) org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[bucketizedhiveinputformat] (batchId=178) org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[authorization_part] (batchId=94) org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[stats_aggregator_error_1] (batchId=94) org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[ppd_join5] (batchId=121) org.apache.hadoop.hive.ql.io.TestDruidRecordWriter.testWrite (batchId=254) org.apache.hive.beeline.TestBeeLineWithArgs.testQueryProgress (batchId=229) org.apache.hive.beeline.cli.TestHiveCli.testNoErrorDB (batchId=186) org.apache.hive.jdbc.TestSSL.testConnectionMismatch (batchId=232) org.apache.hive.jdbc.TestSSL.testConnectionWrongCertCN (batchId=232) org.apache.hive.jdbc.TestSSL.testMetastoreConnectionWrongCertCN (batchId=232) Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/8812/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/8812/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-8812/ Messages: 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: 21 tests failed This message is automatically generated. ATTACHMENT ID: 12907352 - PreCommit-HIVE-Build

          Committed to master; thanks for the patch

          sershe Sergey Shelukhin added a comment - Committed to master; thanks for the patch

          This jira is resolved and released with Hive 3.0 If you find an issue with it, please create a new jira.

          ashutoshc Ashutosh Chauhan added a comment - This jira is resolved and released with Hive 3.0 If you find an issue with it, please create a new jira.

          People

            olegd Oleg Danilov
            olegd Oleg Danilov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: