HBASE-23128 Restore Region interface compatibility

Restore and deprecate Region#bulkLoadHFiles(Collection<Pair<byte[],String>>, boolean,
  Region.BulkLoadListener).
Warn if invoked.

Signed-off-by: Sakthi <sakthi@apache.org>
(cherry picked from commit 0e8e5a36dbaeec75ffb2e7ac29cf63ea2410d4cd)
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 161a7a9..f82a51e 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
@@ -613,6 +613,8 @@
   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
@@ -5856,6 +5858,15 @@
   }
 
   @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 90e8c87..00be850 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
@@ -547,6 +547,22 @@
   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&lt;byte[] column family, String hfilePath&gt;
+   * @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