Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .mvn/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions .mvn/extensions.xml

This file was deleted.

2 changes: 0 additions & 2 deletions .mvn/maven.config

This file was deleted.

25 changes: 3 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
- KUDU_TESTS=true

sudo: required
dist: trusty
dist: bionic

cache:
yarn: true
Expand All @@ -43,28 +43,9 @@ git:
quiet: true

install:
- rm -rf $HOME/.m2/repository/com/facebook
- ./mvnw -v
- |
if [[ -v TEST_SPECIFIC_MODULES ]]; then
./mvnw install $MAVEN_FAST_INSTALL -pl $TEST_SPECIFIC_MODULES -am
fi
- |
if [[ -v TEST_OTHER_MODULES ]]; then
./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server,!presto-server-rpm'
fi
- |
if [[ -v PRODUCT_TESTS_BASIC_ENVIRONMENT || -v PRODUCT_TESTS_SPECIFIC_ENVIRONMENT || -v PRODUCT_TESTS_SPECIFIC_ENVIRONMENT_2 ]]; then
./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server-rpm'
fi
- |
if [[ -v HIVE_TESTS ]]; then
./mvnw install $MAVEN_FAST_INSTALL -pl presto-hive-hadoop2 -am
fi
- |
if [[ -v KUDU_TESTS ]]; then
./mvnw install $MAVEN_FAST_INSTALL -pl presto-kudu -am
fi

- ./mvnw clean install -q -DskipTests -Dmaven.javadoc.skip=true -T C1 -pl '!presto-docs,!presto-server-rpm'
before_script:
- |
export ARTIFACTS_UPLOAD_PATH=${ARTIFACTS_UPLOAD_PATH_BRANCH}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ See the [User Manual](https://prestodb.github.io/docs/current/) for deployment i
## Requirements

* Mac OS X or Linux
* Java 8 Update 151 or higher (8u151+), 64-bit. Both Oracle JDK and OpenJDK are supported.
* Java 8 Update 161 or higher (8u161+), 64-bit. Both Oracle JDK and OpenJDK are supported.
* Maven 3.3.9+ (for building)
* Python 2.4+ (for running with the launcher script)

Expand Down
28 changes: 23 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>88</version>
<version>91</version>
</parent>

<groupId>com.facebook.presto</groupId>
Expand Down Expand Up @@ -41,11 +41,11 @@
<air.check.skip-jacoco>true</air.check.skip-jacoco>
<air.checkstyle.config-file>src/checkstyle/presto-checks.xml</air.checkstyle.config-file>

<air.java.version>1.8.0-151</air.java.version>
<air.java.version>1.8.0-161</air.java.version>
<air.maven.version>3.3.9</air.maven.version>

<dep.antlr.version>4.7.1</dep.antlr.version>
<dep.airlift.version>0.178</dep.airlift.version>
<dep.airlift.version>0.183</dep.airlift.version>
<dep.packaging.version>${dep.airlift.version}</dep.packaging.version>
<dep.slice.version>0.36</dep.slice.version>
<dep.aws-sdk.version>1.11.445</dep.aws-sdk.version>
Expand Down Expand Up @@ -481,7 +481,7 @@
<dependency>
<groupId>io.airlift</groupId>
<artifactId>aircompressor</artifactId>
<version>0.13</version>
<version>0.15</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -661,7 +661,7 @@
<dependency>
<groupId>io.airlift.tpch</groupId>
<artifactId>tpch</artifactId>
<version>0.9</version>
<version>0.10</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -1132,6 +1132,24 @@
<artifactId>javassist</artifactId>
<version>3.22.0-GA</version>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>2.26</version>
<exclusions>
<exclusion>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.4.14.v20181114</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
1 change: 1 addition & 0 deletions presto-accumulo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>

<dependency>
Expand Down
17 changes: 17 additions & 0 deletions presto-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,23 @@
<scope>test</scope>
</dependency>

<!-- At the time of writing this org.glassfish.jersey.core:jersey-common
and org.eclipse.jetty:jetty-server were only used in HiveQueryRunner
when setting log levels. They were triggering undeclared dependecy
warnings. If they are still only used there it should be safe
to upgrade them if the version needs to change. -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>

<!-- for benchmark -->
<dependency>
<groupId>com.facebook.presto</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
import static com.google.common.base.Throwables.throwIfInstanceOf;
import static com.google.common.base.Throwables.throwIfUnchecked;
import static java.lang.String.format;
import static java.net.HttpURLConnection.HTTP_BAD_REQUEST;
import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.hadoop.hive.serde.serdeConstants.FIELD_DELIM;
import static org.apache.hadoop.hive.serde.serdeConstants.LINE_DELIM;
import static org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT;
import static org.apache.http.HttpStatus.SC_BAD_REQUEST;
import static org.apache.http.HttpStatus.SC_FORBIDDEN;
import static org.apache.http.HttpStatus.SC_NOT_FOUND;

@ThreadSafe
public abstract class S3SelectLineRecordReader
Expand Down Expand Up @@ -137,9 +137,9 @@ private int readLine(Text value)
recordsFromS3 = 0;
if (e instanceof AmazonS3Exception) {
switch (((AmazonS3Exception) e).getStatusCode()) {
case SC_FORBIDDEN:
case SC_NOT_FOUND:
case SC_BAD_REQUEST:
case HTTP_FORBIDDEN:
case HTTP_NOT_FOUND:
case HTTP_BAD_REQUEST:
throw new UnrecoverableS3OperationException(selectClient.getBucketName(), selectClient.getKeyName(), e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,16 @@
import static java.lang.Math.max;
import static java.lang.Math.toIntExact;
import static java.lang.String.format;
import static java.net.HttpURLConnection.HTTP_BAD_REQUEST;
import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
import static java.nio.file.Files.createDirectories;
import static java.nio.file.Files.createTempFile;
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.hadoop.fs.FSExceptionMessages.CANNOT_SEEK_PAST_EOF;
import static org.apache.hadoop.fs.FSExceptionMessages.NEGATIVE_SEEK;
import static org.apache.hadoop.fs.FSExceptionMessages.STREAM_IS_CLOSED;
import static org.apache.http.HttpStatus.SC_BAD_REQUEST;
import static org.apache.http.HttpStatus.SC_FORBIDDEN;
import static org.apache.http.HttpStatus.SC_NOT_FOUND;
import static org.apache.http.HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE;

public class PrestoS3FileSystem
extends FileSystem
Expand All @@ -161,6 +160,7 @@ public class PrestoS3FileSystem
private static final DataSize MAX_SKIP_SIZE = new DataSize(1, MEGABYTE);
private static final String PATH_SEPARATOR = "/";
private static final Duration BACKOFF_MIN_SLEEP = new Duration(1, SECONDS);
private static final int HTTP_RANGE_NOT_SATISFIABLE = 416;

private URI uri;
private Path workingDirectory;
Expand Down Expand Up @@ -595,10 +595,10 @@ private ObjectMetadata getS3ObjectMetadata(Path path, String bucketName, String
STATS.newGetMetadataError();
if (e instanceof AmazonS3Exception) {
switch (((AmazonS3Exception) e).getStatusCode()) {
case SC_NOT_FOUND:
case HTTP_NOT_FOUND:
return null;
case SC_FORBIDDEN:
case SC_BAD_REQUEST:
case HTTP_FORBIDDEN:
case HTTP_BAD_REQUEST:
throw new UnrecoverableS3OperationException(path, e);
}
}
Expand Down Expand Up @@ -859,11 +859,11 @@ public int read(long position, byte[] buffer, int offset, int length)
STATS.newGetObjectError();
if (e instanceof AmazonS3Exception) {
switch (((AmazonS3Exception) e).getStatusCode()) {
case SC_REQUESTED_RANGE_NOT_SATISFIABLE:
case HTTP_RANGE_NOT_SATISFIABLE:
throw new EOFException(CANNOT_SEEK_PAST_EOF);
case SC_FORBIDDEN:
case SC_NOT_FOUND:
case SC_BAD_REQUEST:
case HTTP_FORBIDDEN:
case HTTP_NOT_FOUND:
case HTTP_BAD_REQUEST:
throw new UnrecoverableS3OperationException(path, e);
}
}
Expand Down Expand Up @@ -1023,12 +1023,12 @@ private InputStream openStream(Path path, long start)
STATS.newGetObjectError();
if (e instanceof AmazonS3Exception) {
switch (((AmazonS3Exception) e).getStatusCode()) {
case SC_REQUESTED_RANGE_NOT_SATISFIABLE:
case HTTP_RANGE_NOT_SATISFIABLE:
// ignore request for start past end of object
return new ByteArrayInputStream(new byte[0]);
case SC_FORBIDDEN:
case SC_NOT_FOUND:
case SC_BAD_REQUEST:
case HTTP_FORBIDDEN:
case HTTP_NOT_FOUND:
case HTTP_BAD_REQUEST:
throw new UnrecoverableS3OperationException(path, e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@

import java.util.Date;

import static org.apache.http.HttpStatus.SC_OK;
import static java.net.HttpURLConnection.HTTP_OK;

public class MockAmazonS3
extends AbstractAmazonS3
{
private static final String STANDARD_OBJECT_KEY = "test/standard";
private static final String GLACIER_OBJECT_KEY = "test/glacier";

private int getObjectHttpCode = SC_OK;
private int getObjectMetadataHttpCode = SC_OK;
private int getObjectHttpCode = HTTP_OK;
private int getObjectMetadataHttpCode = HTTP_OK;
private GetObjectMetadataRequest getObjectMetadataRequest;
private CannedAccessControlList acl;
private boolean hasGlacierObjects;
Expand Down Expand Up @@ -72,7 +72,7 @@ public GetObjectMetadataRequest getGetObjectMetadataRequest()
public ObjectMetadata getObjectMetadata(GetObjectMetadataRequest getObjectMetadataRequest)
{
this.getObjectMetadataRequest = getObjectMetadataRequest;
if (getObjectMetadataHttpCode != SC_OK) {
if (getObjectMetadataHttpCode != HTTP_OK) {
AmazonS3Exception exception = new AmazonS3Exception("Failing getObjectMetadata call with " + getObjectMetadataHttpCode);
exception.setStatusCode(getObjectMetadataHttpCode);
throw exception;
Expand All @@ -83,7 +83,7 @@ public ObjectMetadata getObjectMetadata(GetObjectMetadataRequest getObjectMetada
@Override
public S3Object getObject(GetObjectRequest getObjectRequest)
{
if (getObjectHttpCode != SC_OK) {
if (getObjectHttpCode != HTTP_OK) {
AmazonS3Exception exception = new AmazonS3Exception("Failing getObject call with " + getObjectHttpCode);
exception.setStatusCode(getObjectHttpCode);
throw exception;
Expand Down
Loading