drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #824: DRILL-3867: Store relative paths in metadata file
Date Thu, 22 Jun 2017 00:43:50 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/824#discussion_r123398393
  
    --- Diff: exec/java-exec/src/test/java/org/apache/drill/BaseTestQuery.java ---
    @@ -593,4 +610,49 @@ private void convert(List<QueryDataBatch> batches) throws SchemaChangeException
           }
         }
       }
    +
    +  private static String replaceWorkingPathInString(String orig) {
    +    return orig.replaceAll(Pattern.quote("[WORKING_PATH]"), Matcher.quoteReplacement(TestTools.getWorkingPath()));
    +  }
    +
    +  protected static void copyDirectoryIntoTempSpace(String resourcesDir) throws IOException
{
    +    copyDirectoryIntoTempSpace(resourcesDir, null);
    +  }
    +
    +  protected static void copyDirectoryIntoTempSpace(String resourcesDir, String destinationSubDir)
throws IOException {
    +    Path destination = destinationSubDir != null ? new Path(getDfsTestTmpSchemaLocation(),
destinationSubDir)
    +        : new Path(getDfsTestTmpSchemaLocation());
    +    fs.copyFromLocalFile(
    +        new Path(replaceWorkingPathInString(resourcesDir)),
    +        destination);
    +  }
    +
    +  /**
    +   * Metadata cache files include full paths to the files that have been scanned.
    +   *
    +   * There is no way to generate a metadata cache file with absolute paths that
    +   * will be guaranteed to be available on an arbitrary test machine.
    +   *
    --- End diff --
    
    Very small suggestion: Javadoc is HTML-formatted. Insert a <p> between paragraphs.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message