drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arina-ielchiieva <...@git.apache.org>
Subject [GitHub] drill pull request #877: DRILL-5660: Drill 1.10 queries fail due to Parquet ...
Date Thu, 10 Aug 2017 10:21:38 GMT
Github user arina-ielchiieva commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/test/java/org/apache/drill/BaseTestQuery.java ---
    @@ -639,14 +644,18 @@ protected static void copyDirectoryIntoTempSpace(String resourcesDir,
String des
        * @param srcFileOnClassPath the source path of metadata cache file, which should be
        * @param destFolderInTmp  the parent folder name of the metadata cache file
        * @param metaFileName the name of metadata cache file depending on the type of the
    +   * @param customStringReplacement custom string to replace the "CUSTOM_REPLACED" target
string in metadata file
        * @throws IOException if a create or write errors occur
    -  protected static void copyMetaDataCacheToTempReplacingInternalPaths(String srcFileOnClassPath,
String destFolderInTmp,
    -      String metaFileName) throws IOException {
    +  protected static void copyMetaDataCacheToTempWithReplacements(String srcFileOnClassPath,
    +      String destFolderInTmp, String metaFileName, String customStringReplacement) throws
IOException {
         String metadataFileContents = getFile(srcFileOnClassPath);
         Path rootMeta = new Path(dfsTestTmpSchemaLocation, destFolderInTmp);
         Path newMetaCache = new Path(rootMeta, metaFileName);
         FSDataOutputStream outSteam = fs.create(newMetaCache);
    +    if (customStringReplacement != null) {
    +      metadataFileContents = metadataFileContents.replace("CUSTOM_STRING_REPLACEMENT",
    +    }
         outSteam.writeBytes(metadataFileContents.replace("REPLACED_IN_TEST", dfsTestTmpSchemaLocation));
    --- End diff --
    Please use try-with-resources to ensure that stream will be closed in any case.

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.

View raw message