Return-Path:
X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io
Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io
Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183])
by cust-asf2.ponee.io (Postfix) with ESMTP id 7D56D200AF7
for ; Tue, 31 May 2016 04:57:05 +0200 (CEST)
Received: by cust-asf.ponee.io (Postfix)
id 7C33C160A19; Tue, 31 May 2016 02:57:05 +0000 (UTC)
Delivered-To: archive-asf-public@cust-asf.ponee.io
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by cust-asf.ponee.io (Postfix) with SMTP id 1E88C160A3C
for ; Tue, 31 May 2016 04:57:02 +0200 (CEST)
Received: (qmail 26443 invoked by uid 500); 31 May 2016 02:57:02 -0000
Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: dev@hbase.apache.org
Delivered-To: mailing list commits@hbase.apache.org
Received: (qmail 26346 invoked by uid 99); 31 May 2016 02:57:02 -0000
Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2016 02:57:02 +0000
Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33)
id B1853E0252; Tue, 31 May 2016 02:57:01 +0000 (UTC)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: stack@apache.org
To: commits@hbase.apache.org
Date: Tue, 31 May 2016 02:57:02 -0000
Message-Id: <63975a7add32425a96d638becab8a948@git.apache.org>
In-Reply-To: <57b3bb2facd941c1a568472411330d6b@git.apache.org>
References: <57b3bb2facd941c1a568472411330d6b@git.apache.org>
X-Mailer: ASF-Git Admin Mailer
Subject: [2/2] hbase git commit: HBASE-15875 Remove HTable references and
HTableInterface
archived-at: Tue, 31 May 2016 02:57:05 -0000
HBASE-15875 Remove HTable references and HTableInterface
Signed-off-by: stack
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a1f0c1cb
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a1f0c1cb
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a1f0c1cb
Branch: refs/heads/master
Commit: a1f0c1cbb3b227c9a4369d4fee45dab52014177a
Parents: 4717604
Author: Jurriaan Mous
Authored: Sun May 29 17:38:57 2016 +0200
Committer: stack
Committed: Mon May 30 19:56:54 2016 -0700
----------------------------------------------------------------------
bin/region_status.rb | 2 +-
.../hadoop/hbase/client/BufferedMutator.java | 2 +-
.../hbase/client/BufferedMutatorImpl.java | 2 +-
.../hbase/client/ConnectionImplementation.java | 4 +-
.../org/apache/hadoop/hbase/client/HTable.java | 52 +---
.../org/apache/hadoop/hbase/client/Table.java | 8 +-
.../hbase/ipc/SyncCoprocessorRpcChannel.java | 2 +-
.../hadoop/hbase/client/TestAsyncProcess.java | 12 +-
.../hadoop/hbase/client/HTableWrapper.java | 16 +-
.../hbase/mapreduce/LoadIncrementalHFiles.java | 4 +-
.../compactions/PartitionedMobCompactor.java | 12 +-
.../resources/hbase-webapps/master/table.jsp | 10 +-
.../hadoop/hbase/HBaseTestingUtility.java | 126 ++++----
.../hbase/client/HConnectionTestingUtility.java | 2 +-
.../client/TestBlockEvictionFromClient.java | 72 ++---
.../hadoop/hbase/client/TestClientPushback.java | 10 +-
.../hadoop/hbase/client/TestFromClientSide.java | 306 ++++++++-----------
.../hbase/client/TestFromClientSideNoCodec.java | 15 +-
.../org/apache/hadoop/hbase/client/TestHCM.java | 189 ++++++------
.../client/TestHTableMultiplexerFlushCache.java | 2 +-
.../hadoop/hbase/client/TestLeaseRenewal.java | 2 +-
.../TestRegionObserverInterface.java | 3 +-
.../hbase/mapreduce/TestHFileOutputFormat2.java | 9 +-
.../TestSimpleRegionNormalizerOnCluster.java | 6 +-
.../TestCorruptedRegionStoreFile.java | 7 +-
.../regionserver/TestRegionServerMetrics.java | 3 +-
.../TestFlushWithThroughputController.java | 3 +-
.../hbase/regionserver/wal/TestLogRolling.java | 3 -
.../security/token/TestTokenAuthentication.java | 6 +-
.../hadoop/hbase/tool/TestCanaryTool.java | 10 +-
.../hadoop/hbase/util/MultiThreadedReader.java | 1 -
.../hbase/util/MultiThreadedReaderWithACL.java | 3 +-
.../hadoop/hbase/util/MultiThreadedUpdater.java | 1 -
.../hbase/util/MultiThreadedUpdaterWithACL.java | 3 +-
.../hadoop/hbase/util/MultiThreadedWriter.java | 1 -
.../hbase/util/MultiThreadedWriterWithACL.java | 3 +-
.../thrift2/ThriftHBaseServiceHandler.java | 2 +-
37 files changed, 403 insertions(+), 511 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/bin/region_status.rb
----------------------------------------------------------------------
diff --git a/bin/region_status.rb b/bin/region_status.rb
index 55bc672..91873cb 100644
--- a/bin/region_status.rb
+++ b/bin/region_status.rb
@@ -50,7 +50,7 @@ import org.apache.hadoop.hbase.TableName
import org.apache.hadoop.hbase.HConstants
import org.apache.hadoop.hbase.MasterNotRunningException
import org.apache.hadoop.hbase.client.HBaseAdmin
-import org.apache.hadoop.hbase.client.HTable
+import org.apache.hadoop.hbase.client.Table
import org.apache.hadoop.hbase.client.Scan
import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter
import org.apache.hadoop.hbase.util.Bytes
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutator.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutator.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutator.java
index 3287335..5dc7fc3 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutator.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutator.java
@@ -52,7 +52,7 @@ import java.util.List;
* extreme circumstances, such as JVM or machine failure, may cause some data loss.
*
*
NOTE: This class replaces the functionality that used to be available via
- *HTableInterface#setAutoFlush(boolean) set to {@code false}.
+ * HTable#setAutoFlush(boolean) set to {@code false}.
*
*
*
See also the {@code BufferedMutatorExample} in the hbase-examples module.
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
index 01aaec5..2a7effe 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
@@ -260,7 +260,7 @@ public class BufferedMutatorImpl implements BufferedMutator {
/**
* This is used for legacy purposes in {@link HTable#setWriteBufferSize(long)} only. This ought
* not be called for production uses.
- * @deprecated Going away when we drop public support for {@link HTableInterface}.
+ * @deprecated Going away when we drop public support for {@link HTable}.
*/
@Deprecated
public void setWriteBufferSize(long writeBufferSize) throws RetriesExhaustedWithDetailsException,
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 0382a71..d93a8b4 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -275,12 +275,12 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
}
@Override
- public HTableInterface getTable(TableName tableName) throws IOException {
+ public Table getTable(TableName tableName) throws IOException {
return getTable(tableName, getBatchPool());
}
@Override
- public HTableInterface getTable(TableName tableName, ExecutorService pool) throws IOException {
+ public Table getTable(TableName tableName, ExecutorService pool) throws IOException {
return new HTable(tableName, this, connectionConfig,
rpcCallerFactory, rpcControllerFactory, pool);
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
index 60a12a4..54fbfe9 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
@@ -100,14 +100,13 @@ import org.apache.hadoop.hbase.util.Threads;
*/
@InterfaceAudience.Private
@InterfaceStability.Stable
-public class HTable implements HTableInterface {
+public class HTable implements Table {
private static final Log LOG = LogFactory.getLog(HTable.class);
protected ClusterConnection connection;
private final TableName tableName;
private volatile Configuration configuration;
private ConnectionConfiguration connConfiguration;
protected BufferedMutatorImpl mutator;
- private boolean autoFlush = true;
private boolean closed = false;
protected int scannerCaching;
protected long scannerMaxResultSize;
@@ -237,14 +236,6 @@ public class HTable implements HTableInterface {
return configuration;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public byte [] getTableName() {
- return this.tableName.getName();
- }
-
@Override
public TableName getName() {
return tableName;
@@ -328,7 +319,7 @@ public class HTable implements HTableInterface {
/**
* The underlying {@link HTable} must not be closed.
- * {@link HTableInterface#getScanner(Scan)} has other usage details.
+ * {@link Table#getScanner(Scan)} has other usage details.
*/
@Override
public ResultScanner getScanner(final Scan scan) throws IOException {
@@ -379,7 +370,7 @@ public class HTable implements HTableInterface {
/**
* The underlying {@link HTable} must not be closed.
- * {@link HTableInterface#getScanner(byte[])} has other usage details.
+ * {@link Table#getScanner(byte[])} has other usage details.
*/
@Override
public ResultScanner getScanner(byte [] family) throws IOException {
@@ -390,7 +381,7 @@ public class HTable implements HTableInterface {
/**
* The underlying {@link HTable} must not be closed.
- * {@link HTableInterface#getScanner(byte[], byte[])} has other usage details.
+ * {@link Table#getScanner(byte[], byte[])} has other usage details.
*/
@Override
public ResultScanner getScanner(byte [] family, byte [] qualifier)
@@ -572,9 +563,7 @@ public class HTable implements HTableInterface {
@Override
public void put(final Put put) throws IOException {
getBufferedMutator().mutate(put);
- if (autoFlush) {
- flushCommits();
- }
+ flushCommits();
}
/**
@@ -584,9 +573,7 @@ public class HTable implements HTableInterface {
@Override
public void put(final List puts) throws IOException {
getBufferedMutator().mutate(puts);
- if (autoFlush) {
- flushCommits();
- }
+ flushCommits();
}
/**
@@ -984,8 +971,7 @@ public class HTable implements HTableInterface {
* {@inheritDoc}
* @throws IOException
*/
- @Override
- public void flushCommits() throws IOException {
+ void flushCommits() throws IOException {
if (mutator == null) {
// nothing to flush if there's no mutator; don't bother creating one.
return;
@@ -1070,30 +1056,6 @@ public class HTable implements HTableInterface {
}
/**
- * {@inheritDoc}
- */
- @Override
- public boolean isAutoFlush() {
- return autoFlush;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setAutoFlushTo(boolean autoFlush) {
- this.autoFlush = autoFlush;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) {
- this.autoFlush = autoFlush;
- }
-
- /**
* Returns the maximum size in bytes of the write buffer for this HTable.
*
* The default value comes from the configuration parameter
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
index 1b0f387..f2cec97 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
@@ -577,12 +577,12 @@ public interface Table extends Closeable {
* early and throw SocketTimeoutException.
* @param operationTimeout the total timeout of each operation in millisecond.
*/
- public void setOperationTimeout(int operationTimeout);
+ void setOperationTimeout(int operationTimeout);
/**
* Get timeout (millisecond) of each operation for in Table instance.
*/
- public int getOperationTimeout();
+ int getOperationTimeout();
/**
* Set timeout (millisecond) of each rpc request in operations of this Table instance, will
@@ -591,11 +591,11 @@ public interface Table extends Closeable {
* retries exhausted or operation timeout reached.
* @param rpcTimeout the timeout of each rpc request in millisecond.
*/
- public void setRpcTimeout(int rpcTimeout);
+ void setRpcTimeout(int rpcTimeout);
/**
* Get timeout (millisecond) of each rpc request in this Table instance.
*/
- public int getRpcTimeout();
+ int getRpcTimeout();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/SyncCoprocessorRpcChannel.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/SyncCoprocessorRpcChannel.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/SyncCoprocessorRpcChannel.java
index af8ddd4..347d8a1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/SyncCoprocessorRpcChannel.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/SyncCoprocessorRpcChannel.java
@@ -35,7 +35,7 @@ import org.apache.hadoop.hbase.protobuf.ResponseConverter;
* Base class which provides clients with an RPC connection to
* call coprocessor endpoint {@link com.google.protobuf.Service}s.
* Note that clients should not use this class directly, except through
- * {@link org.apache.hadoop.hbase.client.HTableInterface#coprocessorService(byte[])}.
+ * {@link org.apache.hadoop.hbase.client.Table#coprocessorService(byte[])}.
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
index 376c02a..839a33a 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
@@ -712,15 +712,17 @@ public class TestAsyncProcess {
private void doHTableFailedPut(boolean bufferOn) throws Exception {
ClusterConnection conn = createHConnection();
- HTable ht = new HTable(conn, new BufferedMutatorParams(DUMMY_TABLE));
- MyAsyncProcess ap = new MyAsyncProcess(conn, conf, true);
- ht.mutator.ap = ap;
+ BufferedMutatorParams bufferParam = new BufferedMutatorParams(DUMMY_TABLE);
if (bufferOn) {
- ht.setWriteBufferSize(1024L * 1024L);
+ bufferParam.writeBufferSize(1024L * 1024L);
} else {
- ht.setWriteBufferSize(0L);
+ bufferParam.writeBufferSize(0L);
}
+ HTable ht = new HTable(conn, bufferParam);
+ MyAsyncProcess ap = new MyAsyncProcess(conn, conf, true);
+ ht.mutator.ap = ap;
+
Put put = createPut(1, false);
Assert.assertEquals(0L, ht.mutator.currentWriteBufferSize.get());
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
index 292a935..5da0df7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
@@ -18,6 +18,11 @@
*/
package org.apache.hadoop.hbase.client;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+import com.google.protobuf.Message;
+import com.google.protobuf.Service;
+import com.google.protobuf.ServiceException;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -37,11 +42,6 @@ import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel;
import org.apache.hadoop.io.MultipleIOException;
-import com.google.protobuf.Descriptors.MethodDescriptor;
-import com.google.protobuf.Message;
-import com.google.protobuf.Service;
-import com.google.protobuf.ServiceException;
-
/**
* A wrapper for HTable. Can be used to restrict privilege.
*
@@ -61,7 +61,7 @@ import com.google.protobuf.ServiceException;
public final class HTableWrapper implements Table {
private final Table table;
- private ClusterConnection connection;
+ private final ClusterConnection connection;
private final List
openTables;
/**
@@ -134,7 +134,9 @@ public final class HTableWrapper implements Table {
public Boolean[] exists(List gets) throws IOException {
// Do convertion.
boolean [] exists = table.existsAll(gets);
- if (exists == null) return null;
+ if (exists == null) {
+ return null;
+ }
Boolean [] results = new Boolean [exists.length];
for (int i = 0; i < exists.length; i++) {
results[i] = exists[i]? Boolean.TRUE: Boolean.FALSE;
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
index 5781a42..a23d739 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
@@ -444,7 +444,7 @@ public class LoadIncrementalHFiles extends Configured implements Tool {
private void validateFamiliesInHFiles(Table table, Deque queue)
throws IOException {
Collection families = table.getTableDescriptor().getFamilies();
- List familyNames = new ArrayList(families.size());
+ List familyNames = new ArrayList<>(families.size());
for (HColumnDescriptor family : families) {
familyNames.add(family.getNameAsString());
}
@@ -501,7 +501,7 @@ public class LoadIncrementalHFiles extends Configured implements Tool {
ExecutorService pool, Deque queue,
final Multimap regionGroups) throws IOException {
// atomically bulk load the groups.
- Set>> loadingFutures = new HashSet>>();
+ Set>> loadingFutures = new HashSet<>();
for (Entry> e: regionGroups.asMap().entrySet()){
final byte[] first = e.getKey().array();
final Collection lqis = e.getValue();
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
index b4d4bab..29b7e8a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
@@ -396,7 +396,7 @@ public class PartitionedMobCompactor extends MobCompactor {
long mobCells = 0;
try {
writer = MobUtils.createWriter(conf, fs, column, partition.getPartitionId().getDate(),
- tempPath, Long.MAX_VALUE, column.getCompactionCompression(), partition.getPartitionId()
+ tempPath, Long.MAX_VALUE, column.getCompactionCompressionType(), partition.getPartitionId()
.getStartKey(), compactionCacheConfig, cryptoContext);
filePath = writer.getPath();
byte[] fileName = Bytes.toBytes(filePath.getName());
@@ -508,7 +508,7 @@ public class PartitionedMobCompactor extends MobCompactor {
try {
writer = MobUtils.createDelFileWriter(conf, fs, column,
MobUtils.formatDate(new Date(request.selectionTime)), tempPath, Long.MAX_VALUE,
- column.getCompactionCompression(), HConstants.EMPTY_START_ROW, compactionCacheConfig,
+ column.getCompactionCompressionType(), HConstants.EMPTY_START_ROW, compactionCacheConfig,
cryptoContext);
filePath = writer.getPath();
List cells = new ArrayList<>();
@@ -558,9 +558,8 @@ public class PartitionedMobCompactor extends MobCompactor {
scan.setMaxVersions(column.getMaxVersions());
long ttl = HStore.determineTTLFromFamily(column);
ScanInfo scanInfo = new ScanInfo(conf, column, ttl, 0, CellComparator.COMPARATOR);
- StoreScanner scanner = new StoreScanner(scan, scanInfo, scanType, null, scanners, 0L,
+ return new StoreScanner(scan, scanInfo, scanType, null, scanners, 0L,
HConstants.LATEST_TIMESTAMP);
- return scanner;
}
/**
@@ -649,7 +648,7 @@ public class PartitionedMobCompactor extends MobCompactor {
maxKeyCount += Bytes.toLong(count);
}
}
- return new Pair<>(Long.valueOf(maxSeqId), Long.valueOf(maxKeyCount));
+ return new Pair<>(maxSeqId, maxKeyCount);
}
/**
@@ -680,8 +679,7 @@ public class PartitionedMobCompactor extends MobCompactor {
private FileStatus getFileStatus(Path path) throws IOException {
try {
if (path != null) {
- FileStatus file = fs.getFileStatus(path);
- return file;
+ return fs.getFileStatus(path);
}
} catch (FileNotFoundException e) {
LOG.warn("The file " + path + " can not be found", e);
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index ee2a7ba..cc13972 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -32,10 +32,6 @@
import="org.owasp.esapi.ESAPI"
import="org.apache.hadoop.conf.Configuration"
import="org.apache.hadoop.util.StringUtils"
- import="org.apache.hadoop.hbase.client.HTable"
- import="org.apache.hadoop.hbase.client.Admin"
- import="org.apache.hadoop.hbase.client.CompactionState"
- import="org.apache.hadoop.hbase.client.RegionLocator"
import="org.apache.hadoop.hbase.HRegionInfo"
import="org.apache.hadoop.hbase.HRegionLocation"
import="org.apache.hadoop.hbase.ServerName"
@@ -50,9 +46,9 @@
import="org.apache.hadoop.hbase.protobuf.generated.HBaseProtos"
import="org.apache.hadoop.hbase.TableName"
import="org.apache.hadoop.hbase.HColumnDescriptor"
- import="org.apache.hadoop.hbase.client.RegionReplicaUtil"
import="org.apache.hadoop.hbase.HBaseConfiguration"
import="org.apache.hadoop.hbase.TableNotFoundException"%>
+<%@ page import="org.apache.hadoop.hbase.client.*" %>
<%
HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
Configuration conf = master.getConfiguration();
@@ -64,7 +60,7 @@
final boolean reverseOrder = (reverse==null||!reverse.equals("false"));
String showWholeKey = request.getParameter("showwhole");
final boolean showWhole = (showWholeKey!=null && showWholeKey.equals("true"));
- HTable table = null;
+ Table table;
String tableHeader;
boolean withReplica = false;
ServerName rl = metaTableLocator.getMetaRegionLocation(master.getZooKeeper());
@@ -141,7 +137,7 @@
<%
if ( fqtn != null ) {
try {
- table = (HTable) master.getConnection().getTable(TableName.valueOf(fqtn));
+ table = master.getConnection().getTable(TableName.valueOf(fqtn));
if (table.getTableDescriptor().getRegionReplication() > 1) {
tableHeader = "
Table Regions
Name
Region Server
ReadRequests
WriteRequests
StorefileSize
Num.Storefiles
MemSize
Locality
Start Key
End Key
ReplicaID
";
withReplica = true;
http://git-wip-us.apache.org/repos/asf/hbase/blob/a1f0c1cb/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index b71836b..b618d8c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -213,8 +213,8 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
/** This is for unit tests parameterized with a two booleans. */
public static final List