HBASE-28571 Remove deprecated methods map reduce utils (#5878)
Signed-off-by: Xin Sun <sunxin@apache.org>
diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceHFileSplitterJob.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceHFileSplitterJob.java
index 755b0a4..0418097 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceHFileSplitterJob.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceHFileSplitterJob.java
@@ -122,7 +122,7 @@
}
LOG.debug("success configuring load incremental job");
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
org.apache.hbase.thirdparty.com.google.common.base.Preconditions.class);
} else {
throw new IOException("No bulk output directory specified");
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
index a25a1e0..38c91fc 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
@@ -277,7 +277,8 @@
job.getConfiguration().setBoolean("mapreduce.reduce.speculative", false);
TableMapReduceUtil.initTableReducerJob(COMMON_TABLE_NAME, null, job, null, null, null, null);
TableMapReduceUtil.addDependencyJars(job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
+ AbstractHBaseTool.class);
TableMapReduceUtil.initCredentials(job);
job.setNumReduceTasks(0);
boolean success = job.waitForCompletion(true);
@@ -430,7 +431,8 @@
TableMapReduceUtil.initTableMapperJob(tableName.getName(), scan, VerifyMapper.class,
BytesWritable.class, BytesWritable.class, job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
+ AbstractHBaseTool.class);
job.getConfiguration().setBoolean("mapreduce.map.speculative", false);
diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
index dc39155..f189767 100644
--- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
+++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
@@ -483,26 +483,6 @@
/**
* Obtain an authentication token, for the specified cluster, on behalf of the current user and
- * add it to the credentials for the given map reduce job. The quorumAddress is the key to the ZK
- * ensemble, which contains: hbase.zookeeper.quorum, hbase.zookeeper.client.port and
- * zookeeper.znode.parent
- * @param job The job that requires the permission.
- * @param quorumAddress string that contains the 3 required configuratins
- * @throws IOException When the authentication token cannot be obtained.
- * @deprecated Since 1.2.0 and will be removed in 3.0.0. Use
- * {@link #initCredentialsForCluster(Job, Configuration)} instead.
- * @see #initCredentialsForCluster(Job, Configuration)
- * @see <a href="https://issues.apache.org/jira/browse/HBASE-14886">HBASE-14886</a>
- */
- @Deprecated
- public static void initCredentialsForCluster(Job job, String quorumAddress) throws IOException {
- Configuration peerConf =
- HBaseConfiguration.createClusterConf(job.getConfiguration(), quorumAddress);
- initCredentialsForCluster(job, peerConf);
- }
-
- /**
- * Obtain an authentication token, for the specified cluster, on behalf of the current user and
* add it to the credentials for the given map reduce job.
* @param job The job that requires the permission.
* @param conf The configuration to use in connecting to the peer cluster
@@ -783,22 +763,6 @@
/**
* Add the jars containing the given classes to the job's configuration such that JobClient will
- * ship them to the cluster and add them to the DistributedCache.
- * @deprecated since 1.3.0 and will be removed in 3.0.0. Use {@link #addDependencyJars(Job)}
- * instead.
- * @see #addDependencyJars(Job)
- * @see <a href="https://issues.apache.org/jira/browse/HBASE-8386">HBASE-8386</a>
- */
- @Deprecated
- public static void addDependencyJars(Configuration conf, Class<?>... classes) throws IOException {
- LOG.warn("The addDependencyJars(Configuration, Class<?>...) method has been deprecated since it"
- + " is easy to use incorrectly. Most users should rely on addDependencyJars(Job) "
- + "instead. See HBASE-8386 for more details.");
- addDependencyJarsForClasses(conf, classes);
- }
-
- /**
- * Add the jars containing the given classes to the job's configuration such that JobClient will
* ship them to the cluster and add them to the DistributedCache. N.B. that this method at most
* adds one jar per class given. If there is more than one jar available containing a class with
* the same name as a given class, we don't define which of those jars might be chosen.