Revert "HBASE-26523 Upgrade hbase-thirdparty dependency to 4.0.0 (#3910)"
Need a new 4.0.1 release
This reverts commit 139f08587a
.
This commit is contained in:
parent
139f08587a
commit
e598f2c663
|
@ -20,17 +20,17 @@ package org.apache.hadoop.hbase.http.resource;
|
|||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.DefaultValue;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PathParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.QueryParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.ajax.JSON;
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,11 +28,11 @@ import java.util.function.BiConsumer;
|
|||
import java.util.regex.Pattern;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.junit.rules.ExternalResource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Request;
|
||||
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.RequestLog;
|
||||
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server;
|
||||
|
|
|
@ -32,6 +32,14 @@ import java.util.Map;
|
|||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Callable;
|
||||
import javax.ws.rs.client.Client;
|
||||
import javax.ws.rs.client.ClientBuilder;
|
||||
import javax.ws.rs.client.Entity;
|
||||
import javax.ws.rs.client.Invocation;
|
||||
import javax.ws.rs.client.WebTarget;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriBuilder;
|
||||
import javax.xml.ws.http.HTTPException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
|
@ -46,14 +54,6 @@ import org.slf4j.LoggerFactory;
|
|||
import org.apache.hbase.thirdparty.com.google.gson.JsonElement;
|
||||
import org.apache.hbase.thirdparty.com.google.gson.JsonObject;
|
||||
import org.apache.hbase.thirdparty.com.google.gson.JsonParser;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.client.Client;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.client.ClientBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.client.Entity;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.client.Invocation;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.client.WebTarget;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriBuilder;
|
||||
import org.apache.hbase.thirdparty.org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
|
||||
|
||||
/**
|
||||
|
|
|
@ -264,6 +264,10 @@
|
|||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
||||
<artifactId>jackson-jaxrs-json-provider</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
|
@ -276,10 +280,6 @@
|
|||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase.thirdparty</groupId>
|
||||
<artifactId>hbase-shaded-jackson-jaxrs-json-provider</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- We *might* need this for XMLStreamReader use in RemoteAdmin
|
||||
TODO figure out if we can remove it.
|
||||
|
|
|
@ -20,15 +20,16 @@
|
|||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class ExistsResource extends ResourceBase {
|
||||
|
|
|
@ -19,6 +19,14 @@
|
|||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import org.apache.hadoop.hbase.Cell;
|
||||
import org.apache.hadoop.hbase.CellUtil;
|
||||
import org.apache.hadoop.hbase.rest.model.CellModel;
|
||||
|
@ -29,13 +37,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MultivaluedMap;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class MultiRowResource extends ResourceBase implements Constants {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MultiRowResource.class);
|
||||
|
|
|
@ -21,6 +21,18 @@ package org.apache.hadoop.hbase.rest;
|
|||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import org.apache.hadoop.hbase.NamespaceDescriptor;
|
||||
import org.apache.hadoop.hbase.client.Admin;
|
||||
import org.apache.hadoop.hbase.client.TableDescriptor;
|
||||
|
@ -32,19 +44,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Consumes;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.DELETE;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.POST;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PUT;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PathParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.HttpHeaders;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
/**
|
||||
* Implements the following REST end points:
|
||||
* <p>
|
||||
|
|
|
@ -20,19 +20,20 @@
|
|||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import org.apache.hadoop.hbase.rest.model.NamespacesModel;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PathParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
import org.apache.hadoop.hbase.rest.model.NamespacesModel;
|
||||
|
||||
/**
|
||||
* Implements REST GET list of all namespaces.
|
||||
|
|
|
@ -20,6 +20,8 @@ package org.apache.hadoop.hbase.rest;
|
|||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.StreamingOutput;
|
||||
import org.apache.hadoop.hbase.Cell;
|
||||
import org.apache.hadoop.hbase.CellUtil;
|
||||
import org.apache.hadoop.hbase.client.Result;
|
||||
|
@ -32,9 +34,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.StreamingOutput;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class ProtobufStreamingOutput implements StreamingOutput {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ProtobufStreamingOutput.class);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
@ -49,7 +50,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
|
||||
import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
|
||||
import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter;
|
||||
|
|
|
@ -21,6 +21,13 @@ package org.apache.hadoop.hbase.rest;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import org.apache.hadoop.hbase.HRegionLocation;
|
||||
import org.apache.hadoop.hbase.ServerName;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
|
@ -35,14 +42,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class RegionsResource extends ResourceBase {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RegionsResource.class);
|
||||
|
|
|
@ -19,15 +19,14 @@
|
|||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.Response;
|
||||
import org.apache.hadoop.hbase.TableNotFoundException;
|
||||
import org.apache.hadoop.hbase.client.RetriesExhaustedException;
|
||||
import org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException;
|
||||
import org.apache.hadoop.util.StringUtils;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class ResourceBase implements Constants {
|
||||
|
||||
|
|
|
@ -20,22 +20,23 @@
|
|||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.rest.model.TableListModel;
|
||||
import org.apache.hadoop.hbase.rest.model.TableModel;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PathParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.rest.model.TableListModel;
|
||||
import org.apache.hadoop.hbase.rest.model.TableModel;
|
||||
|
||||
@Path("/")
|
||||
@InterfaceAudience.Private
|
||||
|
|
|
@ -22,6 +22,20 @@ package org.apache.hadoop.hbase.rest;
|
|||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.hadoop.hbase.Cell;
|
||||
import org.apache.hadoop.hbase.Cell.Type;
|
||||
|
@ -43,19 +57,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Consumes;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.DELETE;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.POST;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PUT;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.HttpHeaders;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MultivaluedMap;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class RowResource extends ResourceBase {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RowResource.class);
|
||||
|
|
|
@ -21,26 +21,27 @@ package org.apache.hadoop.hbase.rest;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import org.apache.hadoop.hbase.Cell;
|
||||
import org.apache.hadoop.hbase.CellUtil;
|
||||
import org.apache.hadoop.hbase.TableNotFoundException;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.hadoop.hbase.rest.model.CellModel;
|
||||
import org.apache.hadoop.hbase.rest.model.CellSetModel;
|
||||
import org.apache.hadoop.hbase.rest.model.RowModel;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.DELETE;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.QueryParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class ScannerInstanceResource extends ResourceBase {
|
||||
|
|
|
@ -19,29 +19,32 @@
|
|||
|
||||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.apache.hadoop.hbase.TableNotFoundException;
|
||||
import org.apache.hadoop.hbase.filter.Filter;
|
||||
import org.apache.hadoop.hbase.rest.model.ScannerModel;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriBuilder;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Consumes;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.POST;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PUT;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PathParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
|
||||
import org.apache.hadoop.hbase.TableNotFoundException;
|
||||
import org.apache.hadoop.hbase.filter.Filter;
|
||||
import org.apache.hadoop.hbase.rest.model.ScannerModel;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class ScannerResource extends ResourceBase {
|
||||
|
|
|
@ -19,6 +19,18 @@ package org.apache.hadoop.hbase.rest;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import javax.xml.namespace.QName;
|
||||
import org.apache.hadoop.hbase.TableExistsException;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
|
@ -37,19 +49,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Consumes;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.DELETE;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.POST;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PUT;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class SchemaResource extends ResourceBase {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SchemaResource.class);
|
||||
|
|
|
@ -22,6 +22,13 @@ package org.apache.hadoop.hbase.rest;
|
|||
import java.io.IOException;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import org.apache.hadoop.hbase.ClusterMetrics;
|
||||
import org.apache.hadoop.hbase.ClusterMetrics.Option;
|
||||
import org.apache.hadoop.hbase.RegionMetrics;
|
||||
|
@ -33,14 +40,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class StorageClusterStatusResource extends ResourceBase {
|
||||
private static final Logger LOG =
|
||||
|
|
|
@ -21,20 +21,19 @@ package org.apache.hadoop.hbase.rest;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.EnumSet;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import org.apache.hadoop.hbase.ClusterMetrics.Option;
|
||||
import org.apache.hadoop.hbase.rest.model.StorageClusterVersionModel;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class StorageClusterVersionResource extends ResourceBase {
|
||||
private static final Logger LOG =
|
||||
|
|
|
@ -21,9 +21,17 @@ package org.apache.hadoop.hbase.rest;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.Encoded;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.hadoop.hbase.CellUtil;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.hadoop.hbase.client.Scan;
|
||||
import org.apache.hadoop.hbase.client.Table;
|
||||
import org.apache.hadoop.hbase.filter.Filter;
|
||||
|
@ -31,15 +39,6 @@ import org.apache.hadoop.hbase.filter.FilterList;
|
|||
import org.apache.hadoop.hbase.filter.ParseFilter;
|
||||
import org.apache.hadoop.hbase.filter.PrefixFilter;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.DefaultValue;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Encoded;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.PathParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.QueryParam;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class TableResource extends ResourceBase {
|
||||
|
|
|
@ -18,16 +18,24 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.HeaderParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.StreamingOutput;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.apache.hadoop.hbase.Cell;
|
||||
import org.apache.hadoop.hbase.CellUtil;
|
||||
import org.apache.hadoop.hbase.client.Result;
|
||||
|
@ -38,14 +46,8 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.HeaderParam;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.StreamingOutput;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@InterfaceAudience.Private
|
||||
public class TableScanResource extends ResourceBase {
|
||||
|
|
|
@ -20,20 +20,21 @@
|
|||
package org.apache.hadoop.hbase.rest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import org.apache.hadoop.hbase.rest.model.VersionModel;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.CacheControl;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo;
|
||||
import org.apache.hadoop.hbase.rest.model.VersionModel;
|
||||
|
||||
/**
|
||||
* Implements REST software version reporting
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase.rest.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
@ -26,11 +25,15 @@ import java.util.Base64;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NavigableSet;
|
||||
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.apache.hadoop.hbase.CompareOperator;
|
||||
import org.apache.hadoop.hbase.HConstants;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.client.Scan;
|
||||
import org.apache.hadoop.hbase.filter.BinaryComparator;
|
||||
import org.apache.hadoop.hbase.filter.BinaryPrefixComparator;
|
||||
|
@ -68,16 +71,16 @@ import org.apache.hadoop.hbase.filter.WhileMatchFilter;
|
|||
import org.apache.hadoop.hbase.rest.ProtobufMessageHandler;
|
||||
import org.apache.hadoop.hbase.security.visibility.Authorizations;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.com.google.protobuf.ByteString;
|
||||
import org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
|
||||
import org.apache.hadoop.hbase.shaded.rest.protobuf.generated.ScannerMessage.Scanner;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.google.protobuf.ByteString;
|
||||
import org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
|
||||
/**
|
||||
* A representation of Scanner parameters.
|
||||
*
|
||||
|
|
|
@ -22,7 +22,12 @@ package org.apache.hadoop.hbase.rest.provider;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ws.rs.ext.ContextResolver;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.rest.model.CellModel;
|
||||
import org.apache.hadoop.hbase.rest.model.CellSetModel;
|
||||
import org.apache.hadoop.hbase.rest.model.ColumnSchemaModel;
|
||||
|
@ -38,10 +43,6 @@ import org.apache.hadoop.hbase.rest.model.TableModel;
|
|||
import org.apache.hadoop.hbase.rest.model.TableRegionModel;
|
||||
import org.apache.hadoop.hbase.rest.model.TableSchemaModel;
|
||||
import org.apache.hadoop.hbase.rest.model.VersionModel;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.ContextResolver;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.Provider;
|
||||
|
||||
/**
|
||||
* Plumbing for hooking up Jersey's JSON entity body encoding and decoding
|
||||
|
|
|
@ -25,18 +25,19 @@ import java.io.InputStream;
|
|||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Type;
|
||||
import org.apache.hadoop.hbase.rest.Constants;
|
||||
import org.apache.hadoop.hbase.rest.ProtobufMessageHandler;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.ext.MessageBodyReader;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Consumes;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MultivaluedMap;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyReader;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.Provider;
|
||||
import org.apache.hadoop.hbase.rest.Constants;
|
||||
import org.apache.hadoop.hbase.rest.ProtobufMessageHandler;
|
||||
|
||||
/**
|
||||
* Adapter for hooking up Jersey content processing dispatch to
|
||||
|
|
|
@ -23,16 +23,17 @@ import java.io.IOException;
|
|||
import java.io.OutputStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Type;
|
||||
import org.apache.hadoop.hbase.rest.Constants;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MultivaluedMap;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.Provider;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.ext.MessageBodyWriter;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.rest.Constants;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
* An adapter between Jersey and Object.toString(). Hooks up plain text output
|
||||
|
|
|
@ -23,17 +23,18 @@ import java.io.IOException;
|
|||
import java.io.OutputStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.ext.MessageBodyWriter;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
||||
import org.apache.hadoop.hbase.rest.Constants;
|
||||
import org.apache.hadoop.hbase.rest.ProtobufMessageHandler;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.WebApplicationException;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MultivaluedMap;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.ext.Provider;
|
||||
|
||||
/**
|
||||
* An adapter between Jersey and ProtobufMessageHandler implementors. Hooks up
|
||||
* protobuf output producing methods to the Jersey content handling framework.
|
||||
|
|
|
@ -20,15 +20,20 @@ package org.apache.hadoop.hbase.rest;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Marshaller;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.HBaseTestingUtil;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
|
@ -48,9 +53,6 @@ import org.junit.AfterClass;
|
|||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
public class RowResourceBase {
|
||||
protected static final String TABLE = "TestRowResource";
|
||||
|
||||
|
|
|
@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.rest;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.Marshaller;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.HBaseClassTestRule;
|
||||
import org.apache.hadoop.hbase.HBaseCommonTestingUtil;
|
||||
|
@ -43,8 +47,10 @@ import org.apache.hadoop.hbase.rest.model.RowModel;
|
|||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
import org.apache.hadoop.hbase.testclassification.RestTests;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.message.BasicHeader;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.ClassRule;
|
||||
|
@ -53,9 +59,6 @@ import org.junit.experimental.categories.Category;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
@Category({RestTests.class, MediumTests.class})
|
||||
@RunWith(Parameterized.class)
|
||||
public class TestMultiRowResource {
|
||||
|
|
|
@ -23,6 +23,7 @@ import static org.junit.Assert.assertNull;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
|
@ -31,6 +32,7 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
|
@ -60,9 +62,6 @@ import org.junit.Ignore;
|
|||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
@Category({RestTests.class, MediumTests.class})
|
||||
public class TestNamespacesInstanceResource {
|
||||
@ClassRule
|
||||
|
|
|
@ -22,12 +22,17 @@ import static org.junit.Assert.assertEquals;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.security.Principal;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.HBaseClassTestRule;
|
||||
|
@ -94,9 +99,6 @@ import org.junit.experimental.categories.Category;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
/**
|
||||
* Test class for SPNEGO authentication on the HttpServer. Uses Kerby's MiniKDC and Apache
|
||||
* HttpComponents to verify that a simple Servlet is reachable via SPNEGO and unreachable w/o.
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.fasterxml.jackson.core.JsonFactory;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
|
@ -36,6 +37,7 @@ import java.nio.charset.StandardCharsets;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
|
@ -73,9 +75,6 @@ import org.junit.experimental.categories.Category;
|
|||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
@Category({RestTests.class, MediumTests.class})
|
||||
public class TestTableScan {
|
||||
@ClassRule
|
||||
|
|
|
@ -22,8 +22,10 @@ import static org.junit.Assert.assertNotNull;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import org.apache.hadoop.hbase.HBaseClassTestRule;
|
||||
|
@ -44,9 +46,6 @@ import org.junit.experimental.categories.Category;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
@Category({RestTests.class, MediumTests.class})
|
||||
public class TestVersionResource {
|
||||
|
||||
|
|
|
@ -21,19 +21,18 @@ import static org.junit.Assert.assertEquals;
|
|||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
import java.util.Base64;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import org.apache.hadoop.hbase.rest.ProtobufMessageHandler;
|
||||
import org.apache.hadoop.hbase.rest.provider.JAXBContextResolver;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
|
||||
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
|
||||
|
||||
public abstract class TestModelBase<T> {
|
||||
|
||||
protected String AS_XML;
|
||||
|
|
|
@ -206,37 +206,41 @@ public class MetaTableMetrics implements RegionCoprocessor {
|
|||
return "";
|
||||
}
|
||||
MetaTableOps ops = opsNameMap.get(op.getClass());
|
||||
if (ops == null) {
|
||||
return "";
|
||||
}
|
||||
String opWithClientMeterName = "";
|
||||
switch (ops) {
|
||||
case GET:
|
||||
return String.format("MetaTable_client_%s_get_request", clientIP);
|
||||
opWithClientMeterName = String.format("MetaTable_client_%s_get_request", clientIP);
|
||||
break;
|
||||
case PUT:
|
||||
return String.format("MetaTable_client_%s_put_request", clientIP);
|
||||
opWithClientMeterName = String.format("MetaTable_client_%s_put_request", clientIP);
|
||||
break;
|
||||
case DELETE:
|
||||
return String.format("MetaTable_client_%s_delete_request", clientIP);
|
||||
opWithClientMeterName = String.format("MetaTable_client_%s_delete_request", clientIP);
|
||||
break;
|
||||
default:
|
||||
return "";
|
||||
break;
|
||||
}
|
||||
return opWithClientMeterName;
|
||||
}
|
||||
|
||||
private String opMeterName(Object op) {
|
||||
// Extract meter name containing the access type
|
||||
MetaTableOps ops = opsNameMap.get(op.getClass());
|
||||
if (ops == null) {
|
||||
return "";
|
||||
}
|
||||
String opMeterName = "";
|
||||
switch (ops) {
|
||||
case GET:
|
||||
return "MetaTable_get_request";
|
||||
opMeterName = "MetaTable_get_request";
|
||||
break;
|
||||
case PUT:
|
||||
return "MetaTable_put_request";
|
||||
opMeterName = "MetaTable_put_request";
|
||||
break;
|
||||
case DELETE:
|
||||
return "MetaTable_delete_request";
|
||||
opMeterName = "MetaTable_delete_request";
|
||||
break;
|
||||
default:
|
||||
return "";
|
||||
break;
|
||||
}
|
||||
return opMeterName;
|
||||
}
|
||||
|
||||
private String tableMeterName(String tableName) {
|
||||
|
|
|
@ -18,12 +18,11 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase.io.hfile;
|
||||
|
||||
import org.apache.hadoop.hbase.io.HeapSize;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
|
||||
import org.apache.hbase.thirdparty.com.google.common.collect.MinMaxPriorityQueue;
|
||||
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.io.HeapSize;
|
||||
|
||||
/**
|
||||
* A memory-bound queue that will grow until an element brings
|
||||
* total size >= maxSize. From then on, only entries that are sorted larger
|
||||
|
@ -50,12 +49,8 @@ public class LruCachedBlockQueue implements HeapSize {
|
|||
* @param blockSize expected average size of blocks
|
||||
*/
|
||||
public LruCachedBlockQueue(long maxSize, long blockSize) {
|
||||
Preconditions.checkArgument(blockSize > 0, "negative blockSize %s", blockSize);
|
||||
Preconditions.checkArgument(maxSize > 0, "negative maxSize %s", maxSize);
|
||||
int initialSize = (int) (maxSize / blockSize);
|
||||
if (initialSize == 0) {
|
||||
initialSize++;
|
||||
}
|
||||
int initialSize = (int)(maxSize / blockSize);
|
||||
if(initialSize == 0) initialSize++;
|
||||
queue = MinMaxPriorityQueue.expectedSize(initialSize).create();
|
||||
heapSize = 0;
|
||||
this.maxSize = maxSize;
|
||||
|
@ -69,20 +64,16 @@ public class LruCachedBlockQueue implements HeapSize {
|
|||
* added to the queue. Otherwise, there is no side effect of this call.
|
||||
* @param cb block to try to add to the queue
|
||||
*/
|
||||
@edu.umd.cs.findbugs.annotations.SuppressWarnings(
|
||||
value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE",
|
||||
justification = "head can not be null as heapSize is greater than maxSize,"
|
||||
+ " which means we have something in the queue")
|
||||
public void add(LruCachedBlock cb) {
|
||||
if (heapSize < maxSize) {
|
||||
if(heapSize < maxSize) {
|
||||
queue.add(cb);
|
||||
heapSize += cb.heapSize();
|
||||
} else {
|
||||
LruCachedBlock head = queue.peek();
|
||||
if (cb.compareTo(head) > 0) {
|
||||
if(cb.compareTo(head) > 0) {
|
||||
heapSize += cb.heapSize();
|
||||
heapSize -= head.heapSize();
|
||||
if (heapSize > maxSize) {
|
||||
if(heapSize > maxSize) {
|
||||
queue.poll();
|
||||
} else {
|
||||
heapSize += head.heapSize();
|
||||
|
|
|
@ -25,7 +25,6 @@ import java.util.Map;
|
|||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
|
||||
|
||||
import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
|
||||
import org.apache.hbase.thirdparty.com.google.common.collect.MinMaxPriorityQueue;
|
||||
|
||||
/**
|
||||
|
@ -55,8 +54,6 @@ public class CachedEntryQueue {
|
|||
* @param blockSize expected average size of blocks
|
||||
*/
|
||||
public CachedEntryQueue(long maxSize, long blockSize) {
|
||||
Preconditions.checkArgument(blockSize > 0, "negative blockSize %s", blockSize);
|
||||
Preconditions.checkArgument(maxSize > 0, "negative maxSize %s", maxSize);
|
||||
int initialSize = (int) (maxSize / blockSize);
|
||||
if (initialSize == 0) {
|
||||
initialSize++;
|
||||
|
@ -74,10 +71,6 @@ public class CachedEntryQueue {
|
|||
* to the queue. Otherwise, there is no side effect of this call.
|
||||
* @param entry a bucket entry with key to try to add to the queue
|
||||
*/
|
||||
@edu.umd.cs.findbugs.annotations.SuppressWarnings(
|
||||
value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE",
|
||||
justification = "head can not be null as cacheSize is greater than maxSize,"
|
||||
+ " which means we have something in the queue")
|
||||
public void add(Map.Entry<BlockCacheKey, BucketEntry> entry) {
|
||||
if (cacheSize < maxSize) {
|
||||
queue.add(entry);
|
||||
|
|
28
pom.xml
28
pom.xml
|
@ -1454,22 +1454,6 @@
|
|||
<bannedImport>org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting</bannedImport>
|
||||
</bannedImports>
|
||||
</restrictImports>
|
||||
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
|
||||
<includeTestCode>true</includeTestCode>
|
||||
<commentLineBufferSize>512</commentLineBufferSize>
|
||||
<reason>Use shaded javax.ws.rs in hbase-thirdparty</reason>
|
||||
<bannedImports>
|
||||
<bannedImport>javax.ws.rs.**</bannedImport>
|
||||
</bannedImports>
|
||||
</restrictImports>
|
||||
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
|
||||
<includeTestCode>true</includeTestCode>
|
||||
<commentLineBufferSize>512</commentLineBufferSize>
|
||||
<reason>Use shaded jackson-jaxrs-json-provider in hbase-thirdparty</reason>
|
||||
<bannedImports>
|
||||
<bannedImport>com.fasterxml.jackson.jaxrs.**</bannedImport>
|
||||
</bannedImports>
|
||||
</restrictImports>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -1814,7 +1798,7 @@
|
|||
<snappy.version>1.1.8.4</snappy.version>
|
||||
<xz.version>1.9</xz.version>
|
||||
<zstd-jni.version>1.5.0-4</zstd-jni.version>
|
||||
<hbase-thirdparty.version>4.0.0</hbase-thirdparty.version>
|
||||
<hbase-thirdparty.version>3.5.1</hbase-thirdparty.version>
|
||||
<!-- Intraproject jar naming properties -->
|
||||
<!-- TODO this is pretty ugly, but works for the moment.
|
||||
Modules are pretty heavy-weight things, so doing this work isn't too bad. -->
|
||||
|
@ -2383,6 +2367,11 @@
|
|||
<artifactId>joni</artifactId>
|
||||
<version>${joni.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
||||
<artifactId>jackson-jaxrs-json-provider</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
|
@ -2637,11 +2626,6 @@
|
|||
<artifactId>hbase-shaded-jersey</artifactId>
|
||||
<version>${hbase-thirdparty.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase.thirdparty</groupId>
|
||||
<artifactId>hbase-shaded-jackson-jaxrs-json-provider</artifactId>
|
||||
<version>${hbase-thirdparty.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.ws</groupId>
|
||||
<artifactId>jaxws-ri</artifactId>
|
||||
|
|
Loading…
Reference in New Issue