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 Fri, 16 Jun 2017 22:54:52 GMT
Github user vdiravka commented on a diff in the pull request:

    https://github.com/apache/drill/pull/824#discussion_r122529973
  
    --- 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 are the metadata files with full absolute paths in other test cases (for example
in TestCorruptParquetDateCorrection`).


---
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