Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-28571 Remove deprecated methods map reduce utils #5878

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public Job createSubmittableJob(String[] args) throws IOException {
}
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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ public int runCopier(String outputDir) throws Exception {
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);
Expand Down Expand Up @@ -430,7 +431,8 @@ private int doVerify(Path outputDir, int numReducers)

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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,26 +481,6 @@ public static void initCredentials(Job job) throws IOException {
}
}

/**
* 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.
Expand Down Expand Up @@ -781,22 +761,6 @@ public static void addDependencyJars(Job job) throws IOException {
}
}

/**
* 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
Expand Down