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

HiveKVResultCache.setupOutput hangs when the file creation failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.2
    • None
    • SQL
    • None

    Description

      The while loop in the HiveKVResultCache.setupOutput function hangs endlessly when the file creation failed, causing the delete() returns false.

      The file creation failure can be caused by different reasons, e.g., disk full.

      Here is the code snippet.

       

        private void setupOutput() throws IOException {
          if (parentFile == null) {
            while (true) {
              parentFile = File.createTempFile("hive-resultcache", "");
              if (parentFile.delete() && parentFile.mkdir()) {
                parentFile.deleteOnExit();
                break;
              }
              if (LOG.isDebugEnabled()) {
                LOG.debug("Retry creating tmp result-cache directory...");
              }
            }
          }
          ...
        }
      

      A similar case is HIVE-19391

      Attachments

        Activity

          People

            Unassigned Unassigned
            dustinday John Doe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: