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-28389 HBase backup yarn queue parameter ignored #6131

Merged
merged 1 commit into from
Jul 31, 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 @@ -124,8 +124,8 @@ private int parseAndRun() throws IOException {

if (cmd.hasOption(OPTION_YARN_QUEUE_NAME)) {
String queueName = cmd.getOptionValue(OPTION_YARN_QUEUE_NAME);
// Set system property value for MR job
System.setProperty("mapreduce.job.queuename", queueName);
// Set MR job queuename to configuration
getConf().set("mapreduce.job.queuename", queueName);
NihalJain marked this conversation as resolved.
Show resolved Hide resolved
}

// parse main restore command options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ public void execute() throws IOException {
throw new IOException(INCORRECT_USAGE);
}

if (cmdline.hasOption(OPTION_YARN_QUEUE_NAME)) {
String queueName = cmdline.getOptionValue(OPTION_YARN_QUEUE_NAME);
// Set MR job queuename to configuration
getConf().set("mapreduce.job.queuename", queueName);
NihalJain marked this conversation as resolved.
Show resolved Hide resolved
}

// Create connection
conn = ConnectionFactory.createConnection(getConf());
if (requiresNoActiveSession()) {
Expand Down Expand Up @@ -333,12 +339,6 @@ public void execute() throws IOException {

boolean ignoreChecksum = cmdline.hasOption(OPTION_IGNORECHECKSUM);

if (cmdline.hasOption(OPTION_YARN_QUEUE_NAME)) {
String queueName = cmdline.getOptionValue(OPTION_YARN_QUEUE_NAME);
// Set system property value for MR job
System.setProperty("mapreduce.job.queuename", queueName);
}

try (BackupAdminImpl admin = new BackupAdminImpl(conn)) {
BackupRequest.Builder builder = new BackupRequest.Builder();
BackupRequest request = builder.withBackupType(BackupType.valueOf(args[1].toUpperCase()))
Expand Down