Gabor Bota created HADOOP-16502:
-----------------------------------

             Summary: Add fsck to S3A tests where additional diagnosis is needed
                 Key: HADOOP-16502
                 URL: https://issues.apache.org/jira/browse/HADOOP-16502
             Project: Hadoop Common
          Issue Type: Sub-task
          Components: fs/s3
            Reporter: Gabor Bota


Extend 
{{org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore#testPruneTombstoneUnderTombstone}}

{code:java}
    // the child2 entry is still there, though it's now orphan (the store isn't
    // meeting the rule "all entries must have a parent which exists"
    getFile(child2);

    + // todo create a raw fs
    + S3GuardFsck fsck = new S3GuardFsck(rawFs, ms);

    // a full prune will still find and delete it, as this
    // doesn't walk the tree
    getDynamoMetadataStore().prune(PruneMode.ALL_BY_MODTIME,
        now + MINUTE);
{code}

Extend 
{{org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore#testPutFileDeepUnderTombstone}}:

{code:java}
    // now put the tombstone
    putTombstone(base, now, null);
    assertIsTombstone(base);

    + // todo create a raw fs for checking
    + S3GuardFsck fsck = new S3GuardFsck(rawFs, ms);

    /*- --------------------------------------------*/
    /* Begin S3FileSystem.finishedWrite() sequence. */
    /* ---------------------------------------------*/
    AncestorState ancestorState = getDynamoMetadataStore()
        .initiateBulkWrite(BulkOperationState.OperationType.Put,
            childPath);
{code}



Add new test: 
{{org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardDDBRootOperations#test_070_run_fsck_on_store}}
{code:java}

  @Test
  public void test_070_run_fsck_on_store() throws Throwable {
    // todo create a raw fs
    S3AFileSystem rawFs = ;
    S3GuardFsck s3GuardFsck = new S3GuardFsck(rawFs, metastore);
  }
{code}





--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-dev-h...@hadoop.apache.org

Reply via email to