mirror of
https://github.com/apache/sqoop.git
synced 2025-05-05 04:31:48 +08:00
SQOOP-811: Client shell variable substitution for recent commands
(Vasanth kumar RJ via Jarek Jarcec Cecho)
This commit is contained in:
parent
53688b54b5
commit
2016dedce6
@ -42,7 +42,7 @@ public CloneCommand(Shell shell) {
|
||||
Constants.PRE_CLONE, Constants.SUF_INFO);
|
||||
}
|
||||
|
||||
public Object execute(List args) {
|
||||
public Object executeCommand(List args) {
|
||||
String usageMsg = MessageFormat.format(getResource().getString(Constants
|
||||
.RES_CLONE_USAGE), getUsage());
|
||||
|
||||
|
@ -41,7 +41,7 @@ public CreateCommand(Shell shell) {
|
||||
Constants.PRE_CREATE, Constants.SUF_INFO);
|
||||
}
|
||||
|
||||
public Object execute(List args) {
|
||||
public Object executeCommand(List args) {
|
||||
String usageMsg = MessageFormat.format(getResource().getString(Constants
|
||||
.RES_CREATE_USAGE), getUsage());
|
||||
|
||||
|
@ -42,7 +42,7 @@ public DeleteCommand(Shell shell) {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object execute(List args) {
|
||||
public Object executeCommand(List args) {
|
||||
String usageMsg = MessageFormat.format(getResource().getString(Constants
|
||||
.RES_DELETE_USAGE), getUsage());
|
||||
if (args.size() == 0) {
|
||||
|
@ -40,7 +40,7 @@ protected SetCommand(Shell shell) {
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public Object execute(List args) {
|
||||
public Object executeCommand(List args) {
|
||||
String usageMsg = MessageFormat.format(getResource().getString(Constants
|
||||
.RES_SET_USAGE), getUsage());
|
||||
|
||||
@ -49,7 +49,6 @@ public Object execute(List args) {
|
||||
io.out.println();
|
||||
return null;
|
||||
}
|
||||
resolveVariables(args);
|
||||
String func = (String)args.get(0);
|
||||
if (func.equals(Constants.FN_SERVER)) {
|
||||
if (serverFunction == null) {
|
||||
|
@ -47,7 +47,7 @@ protected ShowCommand(Shell shell) {
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public Object execute(List args) {
|
||||
public Object executeCommand(List args) {
|
||||
String usageMsg = MessageFormat.format(getResource().getString(Constants
|
||||
.RES_SHOW_USAGE), getUsage());
|
||||
if (args.size() == 0) {
|
||||
|
@ -126,6 +126,22 @@ public String getHelp() {
|
||||
return help;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override execute method
|
||||
*/
|
||||
@Override
|
||||
public Object execute(List args) {
|
||||
resolveVariables(args);
|
||||
return executeCommand(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract executeCommand
|
||||
* @param args list
|
||||
* @return Object
|
||||
*/
|
||||
public abstract Object executeCommand(List args);
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected void resolveVariables(List arg) {
|
||||
List temp = new ArrayList();
|
||||
|
@ -43,7 +43,7 @@ public SubmissionCommand(Shell shell) {
|
||||
Constants.PRE_SUBMISSION, Constants.SUF_INFO);
|
||||
}
|
||||
|
||||
public Object execute(List args) {
|
||||
public Object executeCommand(List args) {
|
||||
String usageMsg = MessageFormat.format(getResource().getString(Constants
|
||||
.RES_SUBMISSION_USAGE), getUsage());
|
||||
if (args.size() == 0) {
|
||||
|
@ -40,7 +40,7 @@ public UpdateCommand(Shell shell) {
|
||||
Constants.PRE_UPDATE, Constants.SUF_INFO);
|
||||
}
|
||||
|
||||
public Object execute(List args) {
|
||||
public Object executeCommand(List args) {
|
||||
String usageMsg = MessageFormat.format(getResource().getString(Constants
|
||||
.RES_UPDATE_USAGE), getUsage());
|
||||
if (args.size() == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user