HADOOP-16332. Remove S3A dependency on http core.
Contributed by Steve Loughran. Change-Id: I53209c993a405fefdb5e1b692d5a56d027d3b845
This commit is contained in:
parent
79d14d0d42
commit
0c73dba3a6
@ -406,11 +406,6 @@
|
||||
<artifactId>hadoop-common</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-common</artifactId>
|
||||
|
@ -41,7 +41,6 @@
|
||||
import org.apache.hadoop.fs.s3a.S3ObjectAttributes;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.apache.http.HttpStatus.SC_PRECONDITION_FAILED;
|
||||
|
||||
/**
|
||||
* Change tracking for input streams: the version ID or etag of the object is
|
||||
@ -57,6 +56,8 @@ public class ChangeTracker {
|
||||
private static final Logger LOG =
|
||||
LoggerFactory.getLogger(ChangeTracker.class);
|
||||
|
||||
/** {@code 412 Precondition Failed} (HTTP/1.1 - RFC 2616) */
|
||||
public static final int SC_PRECONDITION_FAILED = 412;
|
||||
public static final String CHANGE_REPORTED_BY_S3 = "Change reported by S3";
|
||||
|
||||
/** Policy to use. */
|
||||
|
@ -36,7 +36,6 @@
|
||||
import org.apache.hadoop.fs.s3a.impl.ChangeDetectionPolicy;
|
||||
import org.apache.hadoop.fs.s3a.impl.ChangeTracker;
|
||||
import org.apache.hadoop.test.HadoopTestBase;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import static org.apache.hadoop.fs.s3a.impl.ChangeDetectionPolicy.CHANGE_DETECTED;
|
||||
import static org.apache.hadoop.fs.s3a.impl.ChangeDetectionPolicy.createPolicy;
|
||||
@ -250,7 +249,7 @@ public void testCopyVersionMismatch() throws Throwable {
|
||||
// https://github.com/aws/aws-sdk-java/issues/1644
|
||||
AmazonServiceException awsException =
|
||||
new AmazonServiceException("aws exception");
|
||||
awsException.setStatusCode(HttpStatus.SC_PRECONDITION_FAILED);
|
||||
awsException.setStatusCode(ChangeTracker.SC_PRECONDITION_FAILED);
|
||||
expectChangeException(tracker, awsException, "copy",
|
||||
RemoteFileChangedException.PRECONDITIONS_FAILED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user