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 6c27ad8e121..ad69248d858 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 @@ -684,6 +684,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi private final Durability durability; private final boolean regionStatsEnabled; + private static final List EMPTY_CLUSTERID_LIST = new ArrayList(); + /** * HRegion constructor. This constructor should only be used for testing and * extensions. Instances of HRegion should be instantiated with the @@ -6037,6 +6039,15 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi return isSuccessful; } + @Override + @Deprecated + public boolean bulkLoadHFiles(Collection> 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(), 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 9654e675278..fcac45257bf 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> familyPaths, boolean assignSeqId, BulkLoadListener bulkLoadListener, List 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> familyPaths, boolean assignSeqId, + BulkLoadListener bulkLoadListener) throws IOException; + /////////////////////////////////////////////////////////////////////////// // Coprocessors