HADOOP-13239 Deprecate s3:// in branch-2
This commit is contained in:
parent
8a121dc3b8
commit
70a45e3122
|
@ -26,6 +26,7 @@ import org.apache.hadoop.classification.InterfaceStability;
|
|||
*/
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
public class Block {
|
||||
private long id;
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.hadoop.fs.Path;
|
|||
*/
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
public interface FileSystemStore {
|
||||
|
||||
void initialize(URI uri, Configuration conf) throws IOException;
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.hadoop.io.IOUtils;
|
|||
*/
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
public class INode {
|
||||
|
||||
enum FileType {
|
||||
|
|
|
@ -50,6 +50,7 @@ import org.jets3t.service.security.AWSCredentials;
|
|||
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
class Jets3tFileSystemStore implements FileSystemStore {
|
||||
|
||||
private static final String FILE_SYSTEM_NAME = "fs";
|
||||
|
|
|
@ -52,6 +52,7 @@ import org.jets3t.service.security.AWSCredentials;
|
|||
*/
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
public class MigrationTool extends Configured implements Tool {
|
||||
|
||||
private S3Service s3Service;
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.hadoop.fs.s3native.S3xLoginHelper;
|
|||
*/
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
public class S3Credentials {
|
||||
|
||||
private String accessKey;
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.hadoop.classification.InterfaceStability;
|
|||
*/
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Stable
|
||||
@Deprecated
|
||||
public class S3Exception extends IOException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.apache.hadoop.fs.FileSystem;
|
|||
import org.apache.hadoop.fs.ParentNotDirectoryException;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
import org.apache.hadoop.fs.permission.FsPermission;
|
||||
import org.apache.hadoop.fs.s3a.S3AFileSystem;
|
||||
import org.apache.hadoop.fs.s3native.NativeS3FileSystem;
|
||||
import org.apache.hadoop.fs.s3native.S3xLoginHelper;
|
||||
import org.apache.hadoop.io.retry.RetryPolicies;
|
||||
|
@ -50,11 +51,15 @@ import org.apache.hadoop.util.Progressable;
|
|||
* <a href="http://aws.amazon.com/s3">Amazon S3</a>.
|
||||
*
|
||||
* @see NativeS3FileSystem
|
||||
* @deprecated Use {@link NativeS3FileSystem} and {@link S3AFileSystem} instead.
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Stable
|
||||
@Deprecated
|
||||
public class S3FileSystem extends FileSystem {
|
||||
|
||||
private static boolean hasWarnedDeprecation = false;
|
||||
|
||||
private URI uri;
|
||||
|
||||
private FileSystemStore store;
|
||||
|
@ -62,13 +67,26 @@ public class S3FileSystem extends FileSystem {
|
|||
private Path workingDir;
|
||||
|
||||
public S3FileSystem() {
|
||||
warnDeprecation();
|
||||
// set store in initialize()
|
||||
}
|
||||
|
||||
public S3FileSystem(FileSystemStore store) {
|
||||
warnDeprecation();
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is to warn the first time in a JVM that an S3FileSystem is created.
|
||||
*/
|
||||
private static synchronized void warnDeprecation() {
|
||||
if (!hasWarnedDeprecation) {
|
||||
System.err.println("S3FileSystem is deprecated and will be removed in " +
|
||||
"future releases. Use NativeS3FileSystem or S3AFileSystem instead.");
|
||||
hasWarnedDeprecation = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the protocol scheme for the FileSystem.
|
||||
*
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.apache.hadoop.fs.CommonConfigurationKeys;
|
|||
*/
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
public class S3FileSystemConfigKeys extends CommonConfigurationKeys {
|
||||
public static final String S3_BLOCK_SIZE_KEY = "s3.blocksize";
|
||||
public static final long S3_BLOCK_SIZE_DEFAULT = 64*1024*1024;
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.apache.hadoop.classification.InterfaceStability;
|
|||
*/
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Stable
|
||||
@Deprecated
|
||||
public class S3FileSystemException extends IOException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.apache.hadoop.fs.FileSystem;
|
|||
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
class S3InputStream extends FSInputStream {
|
||||
|
||||
private FileSystemStore store;
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.apache.hadoop.util.Progressable;
|
|||
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Deprecated
|
||||
class S3OutputStream extends OutputStream {
|
||||
|
||||
private Configuration conf;
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.hadoop.classification.InterfaceStability;
|
|||
*/
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Stable
|
||||
@Deprecated
|
||||
public class VersionMismatchException extends S3FileSystemException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.apache.hadoop.fs.contract.AbstractBondedFSContract;
|
|||
/**
|
||||
* The contract of S3: only enabled if the test bucket is provided.
|
||||
*/
|
||||
@Deprecated
|
||||
public class S3Contract extends AbstractBondedFSContract {
|
||||
|
||||
public static final String CONTRACT_XML = "contract/s3.xml";
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.apache.hadoop.fs.contract.AbstractContractCreateTest;
|
|||
import org.apache.hadoop.fs.contract.AbstractFSContract;
|
||||
import org.apache.hadoop.fs.contract.ContractTestUtils;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3ContractCreate extends AbstractContractCreateTest {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.hadoop.conf.Configuration;
|
|||
import org.apache.hadoop.fs.contract.AbstractContractDeleteTest;
|
||||
import org.apache.hadoop.fs.contract.AbstractFSContract;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3ContractDelete extends AbstractContractDeleteTest {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.apache.hadoop.fs.contract.AbstractContractMkdirTest;
|
|||
import org.apache.hadoop.fs.contract.AbstractFSContract;
|
||||
import org.apache.hadoop.fs.contract.ContractTestUtils;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3ContractMkdir extends AbstractContractMkdirTest {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.apache.hadoop.fs.contract.AbstractContractOpenTest;
|
|||
import org.apache.hadoop.fs.contract.AbstractFSContract;
|
||||
import org.apache.hadoop.fs.contract.ContractTestUtils;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3ContractOpen extends AbstractContractOpenTest {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.hadoop.conf.Configuration;
|
|||
import org.apache.hadoop.fs.contract.AbstractContractRenameTest;
|
||||
import org.apache.hadoop.fs.contract.AbstractFSContract;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3ContractRename extends AbstractContractRenameTest {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.junit.Test;
|
|||
/**
|
||||
* root dir operations against an S3 bucket
|
||||
*/
|
||||
@Deprecated
|
||||
public class TestS3ContractRootDir extends AbstractContractRootDirectoryTest {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.hadoop.fs.contract.ContractTestUtils;
|
|||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3ContractSeek extends AbstractContractSeekTest {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,6 +41,7 @@ import org.apache.hadoop.fs.s3.INode.FileType;
|
|||
* A stub implementation of {@link FileSystemStore} for testing
|
||||
* {@link S3FileSystem} without actually connecting to S3.
|
||||
*/
|
||||
@Deprecated
|
||||
public class InMemoryFileSystemStore implements FileSystemStore {
|
||||
|
||||
private Configuration conf;
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.apache.hadoop.fs.s3;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@Deprecated
|
||||
public class Jets3tS3FileSystemContractTest
|
||||
extends S3FileSystemContractBaseTest {
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.hadoop.conf.Configuration;
|
|||
import org.apache.hadoop.fs.FileSystemContractBaseTest;
|
||||
import org.junit.internal.AssumptionViolatedException;
|
||||
|
||||
@Deprecated
|
||||
public abstract class S3FileSystemContractBaseTest
|
||||
extends FileSystemContractBaseTest {
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.apache.hadoop.fs.s3.InMemoryFileSystemStore;
|
|||
* A helper implementation of {@link S3FileSystem}
|
||||
* without actually connecting to S3 for unit testing.
|
||||
*/
|
||||
@Deprecated
|
||||
public class S3InMemoryFileSystem extends S3FileSystem {
|
||||
public S3InMemoryFileSystem() {
|
||||
super(new InMemoryFileSystemStore());
|
||||
|
|
|
@ -25,6 +25,7 @@ import junit.framework.TestCase;
|
|||
|
||||
import org.apache.hadoop.fs.s3.INode.FileType;
|
||||
|
||||
@Deprecated
|
||||
public class TestINode extends TestCase {
|
||||
|
||||
public void testSerializeFileWithSingleBlock() throws IOException {
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.apache.hadoop.fs.s3;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@Deprecated
|
||||
public class TestInMemoryS3FileSystemContract
|
||||
extends S3FileSystemContractBaseTest {
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.junit.rules.TestName;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3Credentials {
|
||||
public static final Log LOG = LogFactory.getLog(TestS3Credentials.class);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import junit.framework.TestCase;
|
|||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3FileSystem extends TestCase {
|
||||
|
||||
public static final URI EXPECTED = URI.create("s3://c");
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.hadoop.fs.FSDataInputStream;
|
|||
import org.apache.hadoop.fs.FSDataOutputStream;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
|
||||
@Deprecated
|
||||
public class TestS3InMemoryFileSystem extends TestCase {
|
||||
|
||||
private static final String TEST_PATH = "s3://test/data.txt";
|
||||
|
|
Loading…
Reference in New Issue