Skip to content

Commit

Permalink
HBASE-21661 Provide Thrift2 implementation of Table/Admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Yang committed Jan 9, 2019
1 parent 5c902b4 commit f053003
Show file tree
Hide file tree
Showing 48 changed files with 3,946 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,16 @@ private Constants(){}
public static final String THRIFT_READONLY_ENABLED = "hbase.thrift.readonly";
public static final boolean THRIFT_READONLY_ENABLED_DEFAULT = false;

public static final String HBASE_THRIFT_CLIENT_SCANNER_CACHING =
"hbase.thrift.client.scanner.caching";

public static final int HBASE_THRIFT_CLIENT_SCANNER_CACHING_DEFAULT = 20;

public static final String HBASE_THRIFT_SERVER_NAME = "hbase.thrift.server.name";
public static final String HBASE_THRIFT_SERVER_PORT = "hbase.thrift.server.port";

public static final String HBASE_THRIFT_CLIENT_BUIDLER_CLASS =
"hbase.thrift.client.builder.class";


}
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
import org.apache.hbase.thirdparty.com.google.common.base.Joiner;
import org.apache.hbase.thirdparty.com.google.common.base.Splitter;
import org.apache.hbase.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder;
Expand Down Expand Up @@ -277,6 +278,16 @@ protected TProcessor createProcessor() {
HbaseHandlerMetricsProxy.newInstance((Hbase.Iface) hbaseServiceHandler, metrics, conf));
}

@VisibleForTesting
public TServer getTserver() {
return tserver;
}

@VisibleForTesting
public Server getHttpServer() {
return httpServer;
}

protected void printUsageAndExit(Options options, int exitCode)
throws ExitCodeException {
HelpFormatter formatter = new HelpFormatter();
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ public boolean tableExists(TTableName tTableName) throws TIOError, TException {
public List<TTableDescriptor> getTableDescriptorsByPattern(String regex, boolean includeSysTables)
throws TIOError, TException {
try {
Pattern pattern = Pattern.compile(regex);
Pattern pattern = (regex == null ? null : Pattern.compile(regex));
List<TableDescriptor> tableDescriptors = connectionCache.getAdmin()
.listTableDescriptors(pattern, includeSysTables);
return tableDescriptorsFromHBase(tableDescriptors);
Expand All @@ -600,7 +600,7 @@ public List<TTableDescriptor> getTableDescriptorsByNamespace(String name)
public List<TTableName> getTableNamesByPattern(String regex, boolean includeSysTables)
throws TIOError, TException {
try {
Pattern pattern = Pattern.compile(regex);
Pattern pattern = (regex == null ? null : Pattern.compile(regex));
TableName[] tableNames = connectionCache.getAdmin()
.listTableNames(pattern, includeSysTables);
return tableNamesFromHBase(tableNames);
Expand Down
Loading

0 comments on commit f053003

Please sign in to comment.