You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by to...@apache.org on 2011/05/19 08:31:20 UTC
svn commit: r1124553 - in /hadoop/mapreduce/trunk: ./
src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/
src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/
Author: todd
Date: Thu May 19 06:31:20 2011
New Revision: 1124553
URL: http://svn.apache.org/viewvc?rev=1124553&view=rev
Log:
MAPREDUCE-2449. Allow for command line arguments when performing "Run on Hadoop" action in Eclipse plugin. Contributed by Jeff Zemerick.
Modified:
hadoop/mapreduce/trunk/CHANGES.txt
hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java
hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/RunOnHadoopWizard.java
Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=1124553&r1=1124552&r2=1124553&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Thu May 19 06:31:20 2011
@@ -109,6 +109,9 @@ Trunk (unreleased changes)
MAPREDUCE-2381. JobTracker instrumentation not consistent about error
handling. (Philip Zeyliger via tomwhite)
+ MAPREDUCE-2449. Allow for command line arguments when performing
+ "Run on Hadoop" action in Eclipse plugin. (Jeff Zemerick via todd)
+
OPTIMIZATIONS
MAPREDUCE-2026. Make JobTracker.getJobCounters() and
Modified: hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java?rev=1124553&r1=1124552&r2=1124553&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java (original)
+++ hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java Thu May 19 06:31:20 2011
@@ -111,7 +111,10 @@ public class HadoopApplicationLaunchShor
return null;
try {
- iConfWC.doSave();
+
+ // Only save if some configuration is different.
+ if(!iConfWC.contentsEqual(iConf))
+ iConfWC.doSave();
} catch (CoreException e) {
e.printStackTrace();
Modified: hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/RunOnHadoopWizard.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/RunOnHadoopWizard.java?rev=1124553&r1=1124552&r2=1124553&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/RunOnHadoopWizard.java (original)
+++ hadoop/mapreduce/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/RunOnHadoopWizard.java Thu May 19 06:31:20 2011
@@ -52,6 +52,7 @@ import org.eclipse.swt.widgets.Composite
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
/**
* Wizard for publishing a job to a Hadoop server.
@@ -184,6 +185,7 @@ public class RunOnHadoopWizard extends W
classPath.add(0, cpEntry.getMemento());
iConf.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH,
classPath);
+ iConf.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, mainPage.argumentsText.getText());
} catch (CoreException e) {
e.printStackTrace();
@@ -220,6 +222,7 @@ public class RunOnHadoopWizard extends W
private Button createNew;
private Table table;
+ private Text argumentsText;
private Button chooseExisting;
@@ -238,8 +241,8 @@ public class RunOnHadoopWizard extends W
/* @inheritDoc */
public void createControl(Composite parent) {
Composite panel = new Composite(parent, SWT.NONE);
- panel.setLayout(new GridLayout(1, false));
-
+ panel.setLayout(new GridLayout(1, false));
+
// Label
Label label = new Label(panel, SWT.NONE);
label.setText("Select a Hadoop Server to run on.");
@@ -319,6 +322,25 @@ public class RunOnHadoopWizard extends W
}
});
+ // Label
+ Label argumentsLabel = new Label(panel, SWT.NONE);
+ argumentsLabel.setText("Arguments:");
+ GridData gDataArgumentsLabel = new GridData(GridData.FILL_BOTH);
+ gDataArgumentsLabel.grabExcessVerticalSpace = false;
+ argumentsLabel.setLayoutData(gDataArgumentsLabel);
+
+ // Textbox
+ argumentsText = new Text(panel, SWT.NONE);
+ try {
+ argumentsText.setText(iConf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""));
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+ GridData gDataArgumentsText = new GridData(GridData.FILL_BOTH);
+ gDataArgumentsText.grabExcessVerticalSpace = false;
+ argumentsText.setLayoutData(gDataArgumentsText);
+
+
TableViewer viewer = new TableViewer(table);
HadoopServerSelectionListContentProvider provider =
new HadoopServerSelectionListContentProvider();