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

QTestUtil side-effects

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      It seems that QTestUtil has side-effects. This test (metadata_export_drop.q) causes failure of other tests on cleanup stage:

      Exception: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:../build/ql/test/data/exports/HIVE-3427/src.2012-09-28-11-38-17
      org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:../build/ql/test/data/exports/HIVE-3427/src.2012-09-28-11-38-17
      at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:845)
      at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:821)
      at org.apache.hadoop.hive.ql.QTestUtil.cleanUp(QTestUtil.java:445)
      at org.apache.hadoop.hive.ql.QTestUtil.shutdown(QTestUtil.java:300)
      at org.apache.hadoop.hive.cli.TestCliDriver.tearDown(TestCliDriver.java:87)
      at junit.framework.TestCase.runBare(TestCase.java:140)
      at junit.framework.TestResult$1.protect(TestResult.java:110)
      at junit.framework.TestResult.runProtected(TestResult.java:128)
      at junit.framework.TestResult.run(TestResult.java:113)
      at junit.framework.TestCase.run(TestCase.java:124)
      at junit.framework.TestSuite.runTest(TestSuite.java:232)
      at junit.framework.TestSuite.run(TestSuite.java:227)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:../build/ql/test/data/exports/HIVE-3427/src.2012-09-28-11-38-17
      at org.apache.hadoop.fs.Path.initialize(Path.java:140)
      at org.apache.hadoop.fs.Path.<init>(Path.java:132)
      at org.apache.hadoop.fs.ProxyFileSystem.swizzleParamPath(ProxyFileSystem.java:56)
      at org.apache.hadoop.fs.ProxyFileSystem.mkdirs(ProxyFileSystem.java:214)
      at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:183)
      at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1120)
      at org.apache.hadoop.hive.ql.parse.MetaDataExportListener.export_meta_data(MetaDataExportListener.java:81)
      at org.apache.hadoop.hive.ql.parse.MetaDataExportListener.onEvent(MetaDataExportListener.java:106)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table_core(HiveMetaStore.java:1024)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table(HiveMetaStore.java:1185)
      at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreClient.java:566)
      at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:839)
      ... 17 more
      Caused by: java.net.URISyntaxException: Relative path in absolute URI: file:../build/ql/test/data/exports/HIVE-3427/src.2012-09-28-11-38-17
      at java.net.URI.checkPath(URI.java:1787)
      at java.net.URI.<init>(URI.java:735)
      at org.apache.hadoop.fs.Path.initialize(Path.java:137)
      ... 28 more

      Flushing 'hive.metastore.pre.event.listeners' into empty string solves the issue. During debugging I figured out this property wan't cleaned for other tests after it was set in metadata_export_drop.q.

      How to reproduce:

       ant test -Dtestcase=TestCliDriver -Dqfile=metadata_export_drop.q,<some test>.q

      where <some test>.q means any test which contains CREATE statement. For example, sample10.q

      Attachments

        1. metadata_export_drop.q
          0.4 kB
          Ivan Gorbachev
        2. HIVE-3518.D5865.2.patch
          0.4 kB
          Phabricator
        3. HIVE-3518.D5865.1.patch
          2 kB
          Phabricator

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            navis Navis Ryu Assign to me
            ivangorbachev Ivan Gorbachev
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment