You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2019/10/14 16:49:47 UTC
[hbase] branch branch-1.4 updated: HBASE-23128 Restore Region
interface compatibility
This is an automated email from the ASF dual-hosted git repository.
apurtell pushed a commit to branch branch-1.4
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1.4 by this push:
new 776795b HBASE-23128 Restore Region interface compatibility
776795b is described below
commit 776795b3f2c77c041c060b5e003fe3e0e89325f6
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Mon Oct 7 12:21:10 2019 -0700
HBASE-23128 Restore Region interface compatibility
Restore and deprecate Region#bulkLoadHFiles(Collection<Pair<byte[],String>>, boolean,
Region.BulkLoadListener).
Warn if invoked.
---
.../org/apache/hadoop/hbase/regionserver/HRegion.java | 11 +++++++++++
.../org/apache/hadoop/hbase/regionserver/Region.java | 16 ++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 8ffca7d..0a3dc3d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -681,6 +681,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
private final Durability durability;
private final boolean regionStatsEnabled;
+ private static final List<String> EMPTY_CLUSTERID_LIST = new ArrayList<String>();
+
/**
* HRegion constructor. This constructor should only be used for testing and
* extensions. Instances of HRegion should be instantiated with the
@@ -6029,6 +6031,15 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
}
@Override
+ @Deprecated
+ public boolean bulkLoadHFiles(Collection<Pair<byte[], String>> familyPaths, boolean assignSeqId,
+ BulkLoadListener bulkLoadListener) throws IOException {
+ LOG.warn("Deprecated bulkLoadHFiles invoked. This does not pass through source cluster ids." +
+ " This is probably not what you want. See HBASE-22380.");
+ return bulkLoadHFiles(familyPaths, assignSeqId, bulkLoadListener, EMPTY_CLUSTERID_LIST);
+ }
+
+ @Override
public boolean equals(Object o) {
return o instanceof HRegion && Bytes.equals(getRegionInfo().getRegionName(),
((HRegion) o).getRegionInfo().getRegionName());
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
index 12ec899..6e906da 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
@@ -562,6 +562,22 @@ public interface Region extends ConfigurationObserver {
boolean bulkLoadHFiles(Collection<Pair<byte[], String>> familyPaths, boolean assignSeqId,
BulkLoadListener bulkLoadListener, List<String> clusterIds) throws IOException;
+ /**
+ * Attempts to atomically load a group of hfiles. This is critical for loading
+ * rows with multiple column families atomically. Deprecated - do not use.
+ *
+ * @param familyPaths List of Pair<byte[] column family, String hfilePath>
+ * @param assignSeqId
+ * @param bulkLoadListener Internal hooks enabling massaging/preparation of a
+ * file about to be bulk loaded
+ * @return true if successful, false if failed recoverably
+ * @throws IOException if failed unrecoverably.
+ * @deprecated Do not use, see HBASE-22380
+ */
+ @Deprecated
+ boolean bulkLoadHFiles(Collection<Pair<byte[], String>> familyPaths, boolean assignSeqId,
+ BulkLoadListener bulkLoadListener) throws IOException;
+
///////////////////////////////////////////////////////////////////////////
// Coprocessors