@InterfaceAudience.Private public class HttpProxyExample extends Object
AsyncTable to write a fully
 asynchronous HTTP proxy server. The AsyncConnection will share the same event loop with
 the HTTP server.
 The request URL is:
http://<host>:<port>/<table>/<rowgt;/<family>:<qualifier>Use HTTP GET to fetch data, and use HTTP PUT to put data. Encode the value as the request content when doing PUT.
| Modifier and Type | Class and Description | 
|---|---|
| private static class  | HttpProxyExample.Params | 
| private static class  | HttpProxyExample.RequestHandler | 
| Modifier and Type | Field and Description | 
|---|---|
| private org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup | bossGroup | 
| private org.apache.hbase.thirdparty.io.netty.channel.group.ChannelGroup | channelGroup | 
| private org.apache.hadoop.conf.Configuration | conf | 
| private AsyncConnection | conn | 
| private int | port | 
| private org.apache.hbase.thirdparty.io.netty.channel.Channel | serverChannel | 
| private org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup | workerGroup | 
| Constructor and Description | 
|---|
| HttpProxyExample(org.apache.hadoop.conf.Configuration conf,
                int port) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | join() | 
| static void | main(String[] args) | 
| int | port() | 
| void | start() | 
| void | stop() | 
private final org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup bossGroup
private final org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup workerGroup
private final org.apache.hadoop.conf.Configuration conf
private final int port
private AsyncConnection conn
private org.apache.hbase.thirdparty.io.netty.channel.Channel serverChannel
private org.apache.hbase.thirdparty.io.netty.channel.group.ChannelGroup channelGroup
public HttpProxyExample(org.apache.hadoop.conf.Configuration conf, int port)
public void start() throws InterruptedException, ExecutionException
public void join()
public int port()
public void stop() throws IOException
IOExceptionpublic static void main(String[] args) throws InterruptedException, ExecutionException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.