Skip to content

Commit

Permalink
Upgrade Jetty to 9.4.51.v20230217.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnturton committed Aug 21, 2023
1 parent e208729 commit ed71182
Show file tree
Hide file tree
Showing 12 changed files with 177 additions and 165 deletions.
4 changes: 0 additions & 4 deletions contrib/storage-hive/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@
<artifactId>reload4j</artifactId>
<groupId>ch.qos.reload4j</groupId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions distribution/src/assemble/component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<include>org.glassfish.jersey.core</include>
<include>org.reflections</include>
<include>org.glassfish.hk2.external</include>
<include>org.mortbay.jetty</include>
<include>org.eclipse.jetty</include>
<include>javax.activation</include>
<include>javax.annotation</include>
<include>org.glassfish.jersey.containers</include>
Expand Down Expand Up @@ -155,7 +155,7 @@
<exclude>org.glassfish.jersey.core</exclude>
<exclude>org.reflections</exclude>
<exclude>org.glassfish.hk2.external</exclude>
<exclude>org.mortbay.jetty</exclude>
<exclude>org.eclipse.jetty</exclude>
<exclude>javax.activation</exclude>
<exclude>javax.annotation</exclude>
<exclude>org.glassfish.jersey.containers</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
import java.util.Map;

import org.apache.drill.yarn.appMaster.TaskSpec;
import org.mortbay.log.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.typesafe.config.Config;
import com.typesafe.config.ConfigList;
import com.typesafe.config.ConfigValue;

public class ClusterDef {

private static Logger logger = LoggerFactory.getLogger(ClusterDef.class);

// The following keys are relative to the cluster group definition

public static final String GROUP_NAME = "name";
Expand Down Expand Up @@ -139,7 +143,7 @@ public LabeledGroup(Map<String, Object> pool, int index) {
super(pool, index, GroupType.LABELED);
drillbitLabelExpr = (String) pool.get(DRILLBIT_LABEL);
if (drillbitLabelExpr == null) {
Log.warn("Labeled pool is missing the drillbit label expression ("
logger.warn("Labeled pool is missing the drillbit label expression ("
+ DRILLBIT_LABEL + "), will treat pool as basic.");
}
}
Expand Down
9 changes: 2 additions & 7 deletions exec/java-exec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,8 @@
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>6.1.26</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
Expand Down Expand Up @@ -442,10 +441,6 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
Expand Down Expand Up @@ -845,9 +840,9 @@
<goal>unpack</goal>
</goals>
<configuration>
<overWrite>false</overWrite>
<artifactItems>
<artifactItem>
<overWrite>false</overWrite>
<groupId>${calcite.groupId}</groupId>
<artifactId>calcite-core</artifactId>
<type>jar</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.codehaus.janino.Java.CompilationUnit;
import org.codehaus.janino.Parser;
import org.codehaus.janino.Scanner;
import org.mortbay.util.IO;
import org.eclipse.jetty.util.IO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.eclipse.jetty.security.DefaultIdentityService;
import org.eclipse.jetty.security.SpnegoLoginService;
import org.eclipse.jetty.server.UserIdentity;
import org.eclipse.jetty.util.B64Code;
import org.ietf.jgss.GSSContext;
import org.ietf.jgss.GSSCredential;
import org.ietf.jgss.GSSException;
Expand All @@ -42,6 +41,7 @@
import java.lang.reflect.Field;
import java.security.Principal;
import java.security.PrivilegedExceptionAction;
import java.util.Base64;

/**
* Custom implementation of DrillSpnegoLoginService to avoid the need of passing targetName in a config file,
Expand Down Expand Up @@ -94,7 +94,7 @@ public UserIdentity login(final String username, final Object credentials, Servl
private UserIdentity spnegoLogin(Object credentials, ServletRequest request) {

String encodedAuthToken = (String) credentials;
byte[] authToken = B64Code.decode(encodedAuthToken);
byte[] authToken = Base64.getDecoder().decode(encodedAuthToken);
GSSManager manager = GSSManager.getInstance();

try {
Expand Down Expand Up @@ -149,4 +149,3 @@ private UserIdentity spnegoLogin(Object credentials, ServletRequest request) {
return null;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public SslContextFactoryConfigurator(DrillConfig config, String drillbitEndpoint
* @return new configured sslContextFactory
* @throws Exception when generation of self-signed certificate failed
*/
public SslContextFactory configureNewSslContextFactory() throws Exception {
public SslContextFactory.Server configureNewSslContextFactory() throws Exception {
SSLConfig sslConf = new SSLConfigBuilder()
.config(config)
.mode(SSLConfig.Mode.SERVER)
.initializeSSLContext(false)
.validateKeyStore(true)
.build();
final SslContextFactory sslContextFactory = new SslContextFactory();
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
if (sslConf.isSslValid()) {
useOptionsConfiguredByUser(sslContextFactory, sslConf);
} else {
Expand All @@ -82,7 +82,7 @@ public SslContextFactory configureNewSslContextFactory() throws Exception {
return sslContextFactory;
}

private void useOptionsConfiguredByUser(SslContextFactory sslFactory, SSLConfig sslConf) {
private void useOptionsConfiguredByUser(SslContextFactory.Server sslFactory, SSLConfig sslConf) {
logger.info("Using configured SSL settings for web server");
sslFactory.setKeyStorePath(sslConf.getKeyStorePath());
sslFactory.setKeyStorePassword(sslConf.getKeyStorePassword());
Expand Down Expand Up @@ -159,7 +159,7 @@ private <T> void setIfPresent(String optKey, Function<String, T> optGet, Consume
}


private void useAutoGeneratedSelfSignedCertificate(SslContextFactory sslContextFactory) throws Exception {
private void useAutoGeneratedSelfSignedCertificate(SslContextFactory.Server sslContextFactory) throws Exception {
logger.info("Using generated self-signed SSL settings for web server");
final SecureRandom random = new SecureRandom();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void setUpClass() throws Exception {

@Test
public void configureNewSslContextFactory() throws Exception {
SslContextFactory sslContextFactory = sslContextFactoryConfigurator.configureNewSslContextFactory();
SslContextFactory.Server sslContextFactory = sslContextFactoryConfigurator.configureNewSslContextFactory();

assertEquals(30, sslContextFactory.getSslSessionTimeout());
assertTrue(sslContextFactory.getWantClientAuth());
Expand Down
6 changes: 3 additions & 3 deletions exec/jdbc-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
</exclusion>
<exclusion>
<artifactId>jetty-util</artifactId>
<groupId>org.mortbay.jetty</groupId>
<groupId>org.eclipse.jetty</groupId>
</exclusion>
<exclusion>
<artifactId>freemarker</artifactId>
Expand Down Expand Up @@ -413,7 +413,7 @@
<exclude>org.tukaani:*</exclude>
<exclude>org.apache.velocity:*</exclude>
<exclude>net.hydromatic:linq4j</exclude>
<exclude>org.mortbay.jetty:*</exclude>
<exclude>org.eclipse.jetty:*</exclude>
<exclude>org.slf4j:jul-to-slf4j</exclude>
<exclude>org.hamcrest:hamcrest-core</exclude>
<exclude>org.mockito:mockito-core</exclude>
Expand Down Expand Up @@ -870,7 +870,7 @@
<exclude>org.apache.velocity:*</exclude>
<exclude>net.hydromatic:linq4j</exclude>
<exclude>org.codehaus.janino:*</exclude>
<exclude>org.mortbay.jetty:*</exclude>
<exclude>org.eclipse.jetty:*</exclude>
<exclude>org.slf4j:jul-to-slf4j</exclude>
<exclude>org.slf4j:log4j-over-slf4j</exclude>
<exclude>org.hamcrest:hamcrest-core</exclude>
Expand Down
11 changes: 7 additions & 4 deletions exec/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<groupId>org.apache.drill</groupId>
<artifactId>drill-logical</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.drill.exec</groupId>
<artifactId>drill-java-exec</artifactId>
Expand All @@ -66,7 +66,6 @@
<artifactId>foodmart-data-json</artifactId>
<version>0.4</version>
</dependency>

<dependency>
<groupId>sqlline</groupId>
<artifactId>sqlline</artifactId>
Expand Down Expand Up @@ -137,8 +136,12 @@
<groupId>commons-logging</groupId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.apache.drill.exec.record.MaterializedField;
import org.apache.drill.exec.record.TransferPair;
import org.apache.drill.exec.vector.complex.BaseRepeatedValueVector;
import org.mortbay.jetty.servlet.Holder;
import org.eclipse.jetty.servlet.Holder;

<@pp.dropOutputFile />
<#list vv.types as type>
Expand Down
Loading

0 comments on commit ed71182

Please sign in to comment.