drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdiravka <...@git.apache.org>
Subject [GitHub] drill pull request #824: DRILL-3867: Store relative paths in metadata file
Date Wed, 21 Jun 2017 19:36:45 GMT
Github user vdiravka commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
    @@ -398,6 +398,23 @@ public void testDrill4877() throws Exception {
    +  @Test // DRILL-3867
    +  public void testMoveCache() throws Exception {
    +    String tableName = "nation_move";
    +    String newTableName = "nation_moved";
    +    test("use dfs_test.tmp");
    +    test("create table `%s/t1` as select * from cp.`tpch/nation.parquet`", tableName);
    +    test("create table `%s/t2` as select * from cp.`tpch/nation.parquet`", tableName);
    +    test(String.format("refresh table metadata %s", tableName));
    +    checkForMetadataFile(tableName);
    +    File srcFile = new File(getDfsTestTmpSchemaLocation(), tableName);
    +    File dstFile = new File(getDfsTestTmpSchemaLocation(), newTableName);
    +    FileUtils.moveDirectory(srcFile, dstFile);
    +    Assert.assertFalse("Cache file was not moved successfully", srcFile.exists());
    +    int rowCount = testSql(String.format("select * from %s", newTableName));
    +    Assert.assertEquals(50, rowCount);
    +  }
    --- End diff --
    There is no requirement for them to use absolute paths. After this fix they can be upgraded
to use relative paths. (I'm going to open separate jira for it). Therefore a new test case
for metadata cache files with absolute paths was added.

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