Example usage for org.apache.hadoop.tools DistCpOptions shouldPreserve

List of usage examples for org.apache.hadoop.tools DistCpOptions shouldPreserve

Introduction

In this page you can find the example usage for org.apache.hadoop.tools DistCpOptions shouldPreserve.

Prototype

public boolean shouldPreserve(FileAttribute attribute) 

Source Link

Document

Checks if the input attribute should be preserved or not.

Usage

From source file:org.apache.falcon.replication.FeedReplicatorTest.java

License:Apache License

private void validateOptionalArguments(DistCpOptions options) {
    Assert.assertTrue(options.shouldOverwrite());
    Assert.assertFalse(options.shouldIgnoreFailures());
    Assert.assertFalse(options.shouldSkipCRC());
    Assert.assertFalse(options.shouldDeleteMissing());
    Assert.assertFalse(options.shouldPreserve(DistCpOptions.FileAttribute.BLOCKSIZE));
    Assert.assertTrue(options.shouldPreserve(DistCpOptions.FileAttribute.REPLICATION));
    Assert.assertFalse(options.shouldPreserve(DistCpOptions.FileAttribute.PERMISSION));
    Assert.assertTrue(options.shouldPreserve(DistCpOptions.FileAttribute.USER));
    Assert.assertFalse(options.shouldPreserve(DistCpOptions.FileAttribute.GROUP));
    Assert.assertFalse(options.shouldPreserve(DistCpOptions.FileAttribute.CHECKSUMTYPE));
    Assert.assertTrue(options.shouldPreserve(DistCpOptions.FileAttribute.ACL));
    Assert.assertFalse(options.shouldPreserve(DistCpOptions.FileAttribute.XATTR));
    Assert.assertFalse(options.shouldPreserve(DistCpOptions.FileAttribute.TIMES));
}