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