Skip to content
Draft

[WIP] #6415

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
4 changes: 2 additions & 2 deletions hbase-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions hcatalog/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@
</dependency>
<!-- test -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions hcatalog/hcatalog-pig-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
16 changes: 8 additions & 8 deletions hcatalog/webhcat/svr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
<artifactId>jetty-servlet</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
Expand All @@ -64,21 +64,21 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
</exclusion>
</exclusions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.slf4j.LoggerFactory;
import org.eclipse.jetty.http.HttpStatus;

import com.sun.jersey.api.NotFoundException;
import javax.ws.rs.NotFoundException;

/**
* Map all exceptions to the Jersey response. This lets us have nice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import com.google.common.base.Splitter;
import com.google.common.collect.Sets;
import com.sun.jersey.api.core.PackagesResourceConfig;
import com.sun.jersey.spi.container.servlet.ServletContainer;

import java.io.File;
import java.io.FileInputStream;
Expand All @@ -35,6 +33,8 @@
import org.apache.hadoop.security.authentication.server.AuthenticationFilter;
import org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler;
import org.apache.hadoop.hive.common.IPStackUtils;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -364,16 +364,16 @@ public void destroy() {
}
}

public PackagesResourceConfig makeJerseyConfig() {
PackagesResourceConfig rc
= new PackagesResourceConfig("org.apache.hive.hcatalog.templeton");
public ResourceConfig makeJerseyConfig() {
ResourceConfig resourceConfig =
new ResourceConfig().packages("org.apache.hive.hcatalog.templeton");
HashMap<String, Object> props = new HashMap<String, Object>();
props.put("com.sun.jersey.api.json.POJOMappingFeature", "true");
props.put("com.sun.jersey.config.property.WadlGeneratorConfig",
"org.apache.hive.hcatalog.templeton.WadlConfig");
rc.setPropertiesAndFeatures(props);
resourceConfig.addProperties(props);

return rc;
return resourceConfig;
}

public void addRedirects(Server server) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

import java.util.List;

import com.sun.jersey.api.wadl.config.WadlGeneratorConfig;
import com.sun.jersey.api.wadl.config.WadlGeneratorDescription;
import com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport;
import org.glassfish.jersey.server.wadl.config.WadlGeneratorConfig;
import org.glassfish.jersey.server.wadl.config.WadlGeneratorDescription;
import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.WadlGeneratorResourceDocSupport;

/**
* Simple class that incorporates javadoc information into the
Expand Down
4 changes: 2 additions & 2 deletions itests/hcatalog-unit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
Expand Down
4 changes: 2 additions & 2 deletions itests/hive-minikdc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions itests/hive-unit-hadoop2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions itests/hive-unit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions itests/qtest-accumulo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions itests/qtest-iceberg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions itests/qtest-kudu/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions itests/qtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions llap-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<!-- HBase dependencies to call the API to localize the JARs -->
Expand Down
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<guava.version>22.0</guava.version>
<groovy.version>2.4.21</groovy.version>
<h2database.version>2.2.220</h2database.version>
<hadoop.version>3.4.2</hadoop.version>
<hadoop.version>3.5.0</hadoop.version>
<hadoop.bin.path>${basedir}/${hive.path.to.root}/testutils/hadoop</hadoop.bin.path>
<hamcrest.version>1.3</hamcrest.version>
<hbase.version>2.5.6-hadoop3</hbase.version>
Expand All @@ -161,7 +161,7 @@
<javolution.version>5.5.1</javolution.version>
<jettison.version>1.5.4</jettison.version>
<jetty.version>9.4.57.v20241219</jetty.version>
<jersey.version>1.19.4</jersey.version>
<jersey.version>2.46</jersey.version>
<!-- HIVE-28992: only upgrade to newer than 3.25.0 if you tested the prompt -->
<jline.version>3.25.0</jline.version>
<jms.version>2.0.2</jms.version>
Expand Down Expand Up @@ -340,17 +340,17 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
Expand All @@ -365,8 +365,8 @@
<version>${jaxb-runtime.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
Expand Down
16 changes: 14 additions & 2 deletions ql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -72,6 +80,10 @@
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -851,8 +863,8 @@
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import static com.sun.jersey.api.client.ClientResponse.Status.NOT_FOUND;
import static javax.ws.rs.core.Response.Status.NOT_FOUND;

/**
* Implementation of RESTClient, encapsulates Atlas' REST APIs.
Expand Down Expand Up @@ -137,12 +137,12 @@ public AtlasServer getServer(String endpoint, HiveConf conf) throws SemanticExce
try {
return clientV2.getServer(endpoint);
} catch (AtlasServiceException e) {
int statusCode = e.getStatus() != null ? e.getStatus().getStatusCode() : -1;
/* int statusCode = e.getStatus() != null ? e.getStatus().getStatusCode() : -1;
if (NOT_FOUND.getStatusCode() == statusCode) {
// Atlas server entity is initialized on first import/export o/p.
LOG.info("Atlas server entity is not found");
return null;
}
} */
throw e;
}
});
Expand Down Expand Up @@ -171,13 +171,13 @@ public String getEntityGuid(final String entityType,
}
return entityWithExtInfo.getEntity().getGuid();
} catch (AtlasServiceException e) {
int statusCode = e.getStatus() != null ? e.getStatus().getStatusCode() : -1;
/* int statusCode = e.getStatus() != null ? e.getStatus().getStatusCode() : -1;
if (statusCode != NOT_FOUND.getStatusCode()) {
throw new SemanticException(ErrorMsg.REPL_INVALID_INTERNAL_CONFIG_FOR_SERVICE.format("Exception " +
"while getEntityGuid ", ReplUtils.REPL_ATLAS_SERVICE), e.getCause());
}
LOG.warn("getEntityGuid: Could not retrieve entity guid for: {}-{}-{}",
entityType, attributeName, qualifiedName, e.getMessage());
entityType, attributeName, qualifiedName, e.getMessage()); */
return null;
} catch (Exception e) {
throw new SemanticException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package org.apache.hadoop.hive.ql.exec.repl.atlas;

import com.sun.jersey.api.client.UniformInterfaceException;
import javax.ws.rs.ClientErrorException;
import org.apache.atlas.AtlasServiceException;
import org.apache.hadoop.hive.ql.ErrorMsg;
import org.apache.hadoop.hive.ql.parse.SemanticException;
Expand Down Expand Up @@ -92,7 +92,8 @@ private long elapsedTimeInSeconds(long fromTimeMillis) {
}

private boolean processInvalidParameterException(Exception e) {
if (e instanceof UniformInterfaceException) {
// JERSEY2: Confirm what type of exceptions need to cover here
if (e instanceof ClientErrorException) {
return true;
}
if (!(e instanceof AtlasServiceException)) {
Expand Down
Loading
Loading