Skip to content

Commit

Permalink
HBASE-13661 Correct binary compatibility issues discovered in 1.1.0RC0
Browse files Browse the repository at this point in the history
  • Loading branch information
enis authored and ndimiduk committed May 12, 2015
1 parent 5ebd912 commit e860c66
Show file tree
Hide file tree
Showing 17 changed files with 149 additions and 131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ public ClusterStatusProtos.ServerLoad obtainServerLoadPB() {
protected ClusterStatusProtos.ServerLoad serverLoad;

/* @return number of requests since last report. */
public int getNumberOfRequests() {
public long getNumberOfRequests() {
return serverLoad.getNumberOfRequests();
}
public boolean hasNumberOfRequests() {
return serverLoad.hasNumberOfRequests();
}

/* @return total Number of requests from the start of the region server. */
public int getTotalNumberOfRequests() {
public long getTotalNumberOfRequests() {
return serverLoad.getTotalNumberOfRequests();
}
public boolean hasTotalNumberOfRequests() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.TableNotFoundException;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceStability;
import org.apache.hadoop.hbase.client.AsyncProcess.AsyncRequestFuture;
import org.apache.hadoop.hbase.client.coprocessor.Batch;
import org.apache.hadoop.hbase.client.coprocessor.Batch.Callback;
Expand Down Expand Up @@ -107,7 +105,7 @@
*/
@InterfaceAudience.Private
@InterfaceStability.Stable
public class HTable implements HTableInterface {
public class HTable implements HTableInterface, RegionLocator {
private static final Log LOG = LogFactory.getLog(HTable.class);
protected ClusterConnection connection;
private final TableName tableName;
Expand Down Expand Up @@ -364,7 +362,7 @@ private void finishSetup() throws IOException {
multiAp = this.connection.getAsyncProcess();

this.closed = false;

this.locator = new HRegionLocator(tableName, connection);
}

Expand Down Expand Up @@ -481,6 +479,7 @@ public HRegionLocation getRegionLocation(final String row)
/**
* @deprecated Use {@link RegionLocator#getRegionLocation(byte[])} instead.
*/
@Override
@Deprecated
public HRegionLocation getRegionLocation(final byte [] row)
throws IOException {
Expand All @@ -490,6 +489,7 @@ public HRegionLocation getRegionLocation(final byte [] row)
/**
* @deprecated Use {@link RegionLocator#getRegionLocation(byte[], boolean)} instead.
*/
@Override
@Deprecated
public HRegionLocation getRegionLocation(final byte [] row, boolean reload)
throws IOException {
Expand Down Expand Up @@ -601,6 +601,7 @@ private <V> V executeMasterCallable(MasterCallable<V> callable) throws IOExcepti
/**
* @deprecated Use {@link RegionLocator#getStartEndKeys()} instead;
*/
@Override
@Deprecated
public byte [][] getStartKeys() throws IOException {
return locator.getStartKeys();
Expand All @@ -609,6 +610,7 @@ private <V> V executeMasterCallable(MasterCallable<V> callable) throws IOExcepti
/**
* @deprecated Use {@link RegionLocator#getEndKeys()} instead;
*/
@Override
@Deprecated
public byte[][] getEndKeys() throws IOException {
return locator.getEndKeys();
Expand All @@ -617,6 +619,7 @@ public byte[][] getEndKeys() throws IOException {
/**
* @deprecated Use {@link RegionLocator#getStartEndKeys()} instead;
*/
@Override
@Deprecated
public Pair<byte[][],byte[][]> getStartEndKeys() throws IOException {
return locator.getStartEndKeys();
Expand Down Expand Up @@ -645,6 +648,7 @@ public NavigableMap<HRegionInfo, ServerName> getRegionLocations() throws IOExcep
*
* @deprecated Use {@link RegionLocator#getAllRegionLocations()} instead;
*/
@Override
@Deprecated
public List<HRegionLocation> getAllRegionLocations() throws IOException {
return locator.getAllRegionLocations();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ public boolean isPartial() {
* @throws UnsupportedOperationException if invoked on instance of EMPTY_RESULT
* (which is supposed to be immutable).
*/
@InterfaceAudience.Private
@Deprecated
public void addResults(ClientProtos.RegionLoadStats loadStats) {
checkReadonly();
Expand All @@ -996,6 +997,7 @@ public void addResults(ClientProtos.RegionLoadStats loadStats) {
* Set load information about the region to the information about the result
* @param loadStats statistics about the current region from which this was returned
*/
@InterfaceAudience.Private
public void setStatistics(ClientProtos.RegionLoadStats loadStats) {
this.stats = loadStats;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ public class Scan extends Query {
// scan.setAttribute(Scan.SCAN_ATTRIBUTES_TABLE_NAME, Bytes.toBytes(tableName))
static public final String SCAN_ATTRIBUTES_TABLE_NAME = "scan.attributes.table.name";

/**
* @deprecated without replacement
* This is now a no-op, SEEKs and SKIPs are optimizated automatically.
* Will be removed in 2.0+
*/
@Deprecated
public static final String HINT_LOOKAHEAD = "_look_ahead_";

/*
* -1 means no caching
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* Utility methods for helping with security tasks.
*/
@InterfaceAudience.Public
@InterfaceAudience.Private
@InterfaceStability.Evolving
public class AuthUtil {
private static final Log LOG = LogFactory.getLog(AuthUtil.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public interface MetricsMasterSource extends BaseSource {
*
* @param inc Ammount to increment the total by.
*/
void incRequests(final int inc);
void incRequests(final long inc);





}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public void init() {
clusterRequestsCounter = metricsRegistry.newCounter(CLUSTER_REQUESTS_NAME, "", 0l);
}

public void incRequests(final int inc) {
@Override
public void incRequests(final long inc) {
this.clusterRequestsCounter.incr(inc);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* It can be used by the ProcedureStore to identify which procedures are already
* deleted/completed to avoid the deserialization step on restart.
*/
@InterfaceAudience.Public
@InterfaceAudience.Private
@InterfaceStability.Evolving
public class ProcedureStoreTracker {
private final TreeMap<Long, BitSetNode> map = new TreeMap<Long, BitSetNode>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Thrown when a procedure WAL is corrupted
*/
@InterfaceAudience.Public
@InterfaceAudience.Private
@InterfaceStability.Stable
public class CorruptedWALProcedureStoreException extends HBaseIOException {
/** default constructor */
Expand Down
Loading

0 comments on commit e860c66

Please sign in to comment.