Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5401

Error in running apache.phoenix.mapreduce.index.automation.PhoenixMRJobSubmitter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.14.1
    • 4.15.0, 5.1.0, 4.14.3
    • None
    • None

    Description

      Initially, the following query is executed:

       

      CREATE TABLE IF NOT EXISTS us_population (
       state CHAR(2) NOT NULL,
       city VARCHAR NOT NULL,
       population BIGINT,
       CONSTRAINT my_pk PRIMARY KEY (state, city)) COLUMN_ENCODED_BYTES=0;
      UPSERT INTO us_population VALUES('NY','New York',8143197);
      UPSERT INTO us_population VALUES('CA','Los Angeles',3844829);
      UPSERT INTO us_population VALUES('IL','Chicago',2842518);
      UPSERT INTO us_population VALUES('TX','Houston',2016582);
      UPSERT INTO us_population VALUES('PA','Philadelphia',1463281);
      UPSERT INTO us_population VALUES('AZ','Phoenix',1461575);
      UPSERT INTO us_population VALUES('TX','San Antonio',1256509);
      UPSERT INTO us_population VALUES('CA','San Diego',1255540);
      UPSERT INTO us_population VALUES('TX','Dallas',1213825);
      UPSERT INTO us_population VALUES('CA','San Jose',912332);
      
      CREATE VIEW us_population_global_view (name VARCHAR,
       age BIGINT) AS
      SELECT * FROM us_population
      WHERE state = 'CA';
      CREATE INDEX us_population_gv_gi_1 ON us_population_global_view(age) include (city) async;
      

       

      Then,

      org.apache.phoenix.mapreduce.index.automation.PhoenixMRJobSubmitter

      is run.

      The YARN application logs then show the following error:

      2019-07-16 19:40:50,397 ERROR [main] org.apache.phoenix.mapreduce.PhoenixServerBuildIndexInputFormat: Failed to get the query plan with error [ERROR 534 (42911): If both specified, values of CURRENT_SCN and BUILD_INDEX_AT must be equal.]
      2019-07-16 19:40:50,398 WARN [main] org.apache.hadoop.mapred.YarnChild: Exception running child : java.lang.RuntimeException: java.sql.SQLException: ERROR 534 (42911): If both specified, values of CURRENT_SCN and BUILD_INDEX_AT must be equal.
       at org.apache.phoenix.mapreduce.PhoenixServerBuildIndexInputFormat.getQueryPlan(PhoenixServerBuildIndexInputFormat.java:108)
       at org.apache.phoenix.mapreduce.PhoenixInputFormat.createRecordReader(PhoenixInputFormat.java:75)
       at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.<init>(MapTask.java:515)
       at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:758)
       at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
       at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:170)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.Subject.doAs(Subject.java:422)
       at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1760)
       at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)
      Caused by: java.sql.SQLException: ERROR 534 (42911): If both specified, values of CURRENT_SCN and BUILD_INDEX_AT must be equal.
       at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
       at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
       at org.apache.phoenix.jdbc.PhoenixConnection.checkScnAndBuildIndexAtEquality(PhoenixConnection.java:415)
       at org.apache.phoenix.jdbc.PhoenixConnection.<init>(PhoenixConnection.java:285)
       at org.apache.phoenix.jdbc.PhoenixConnection.<init>(PhoenixConnection.java:229)
       at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2533)
       at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2499)
       at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
       at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2499)
       at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
       at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:147)
       at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
       at java.sql.DriverManager.getConnection(DriverManager.java:664)
       at java.sql.DriverManager.getConnection(DriverManager.java:208)
       at org.apache.phoenix.mapreduce.util.ConnectionUtil.getConnection(ConnectionUtil.java:113)
       at org.apache.phoenix.mapreduce.util.ConnectionUtil.getInputConnection(ConnectionUtil.java:58)
       at org.apache.phoenix.mapreduce.PhoenixServerBuildIndexInputFormat.getQueryPlan(PhoenixServerBuildIndexInputFormat.java:82)
       ... 9 more

       

      Will require an appropriate resolution for this.

      Attachments

        1. yarnIssueIT.java
          2 kB
          Swaroopa Kadam
        2. PHOENIX-5401.master.001.patch
          4 kB
          Kadir OZDEMIR
        3. PHOENIX-5401.addendum.patch
          2 kB
          Kadir OZDEMIR

        Issue Links

          Activity

            People

              kozdemir Kadir OZDEMIR
              ashuparekh Ashutosh Parekh
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h