This is an automated email from the ASF dual-hosted git repository. zhangduo pushed a commit to branch branch-3 in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-3 by this push: new 592a2648e2b HBASE-28571 Remove deprecated methods map reduce utils (#5878) 592a2648e2b is described below commit 592a2648e2ba098d53c5a8576598b55cc810019b Author: Duo Zhang <zhang...@apache.org> AuthorDate: Tue May 7 21:46:36 2024 +0800 HBASE-28571 Remove deprecated methods map reduce utils (#5878) Signed-off-by: Xin Sun <sun...@apache.org> (cherry picked from commit c4f01ede674bcc7098edc88032c5cb6edae02876) --- .../mapreduce/MapReduceHFileSplitterJob.java | 2 +- ...IntegrationTestBigLinkedListWithVisibility.java | 6 ++-- .../hadoop/hbase/mapreduce/TableMapReduceUtil.java | 36 ---------------------- 3 files changed, 5 insertions(+), 39 deletions(-) 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 755b0a41e32..04180972885 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 @@ public class MapReduceHFileSplitterJob extends Configured implements Tool { } 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 a25a1e05909..38c91fcb37c 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 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB 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 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB 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 dc3915501b2..f189767a7c7 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 @@ -481,26 +481,6 @@ public class TableMapReduceUtil { } } - /** - * 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. @@ -781,22 +761,6 @@ public class TableMapReduceUtil { } } - /** - * 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