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

org.apache.hive.hcatalog.pig.TestHCatLoaderEncryption.* fails in Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0
    • 1.2.0
    • None
    • None

    Description

      java.io.IOException: Failed to execute "create table encrypted_table(a int, b string) location 'D:/w/hv/hcatalog/hcatalog-pig-adapter/target/tmp/org.apache.hive.hcatalog.pig.TestHCatLoader-1429172673960/warehouse/encryptedTable'". Driver returned 1 Error: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.lang.IllegalArgumentException: Pathname /D:/w/hv/hcatalog/hcatalog-pig-adapter/target/tmp/org.apache.hive.hcatalog.pig.TestHCatLoader-1429172673960/warehouse/encryptedTable from hdfs://127.0.0.1:64735/D:/w/hv/hcatalog/hcatalog-pig-adapter/target/tmp/org.apache.hive.hcatalog.pig.TestHCatLoader-1429172673960/warehouse/encryptedTable is not a valid DFS filename.)
      	at org.apache.hive.hcatalog.pig.TestHCatLoaderEncryption.executeStatementOnDriver(TestHCatLoaderEncryption.java:163)
      	at org.apache.hive.hcatalog.pig.TestHCatLoaderEncryption.createTableInSpecifiedPath(TestHCatLoaderEncryption.java:423)
      	at org.apache.hive.hcatalog.pig.TestHCatLoaderEncryption.setup(TestHCatLoaderEncryption.java:197)
      

      It looks like the error is happening because of the below query:
      create table encrypted_table(a int, b string) location 'D:/w/hv/hcatalog/hcatalog-pig-adapter/target/tmp/org.apache.hive.hcatalog.pig.TestHCatLoader-1429056939184/warehouse/encryptedTable'
      This gets called from createTableInSpecifiedPath() in TestHCatLoaderEncryption. I think an invalid HDFS path is passed here when we are running the tests on Windows OS, so in line 197, changing

      createTableInSpecifiedPath(ENCRYPTED_TABLE, "a int, b string", encryptedTablePath, driver);
      

      to the below line might resolve the issue.

      createTableInSpecifiedPath(ENCRYPTED_TABLE, "a int, b string", WindowsPathUtil.getHdfsUriString(encryptedTablePath), driver);
      

      Attachments

        1. HIVE-10367.1.patch
          0.9 kB
          Hari Sankar Sivarama Subramaniyan

        Issue Links

          Activity

            People

              hsubramaniyan Hari Sankar Sivarama Subramaniyan
              hsubramaniyan Hari Sankar Sivarama Subramaniyan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: