[Swift-commit] r2606 - in trunk/src/org/griphyn/vdl: engine karajan karajan/lib karajan/lib/swiftscript mapping mapping/file type
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Wed Feb 25 10:09:25 CST 2009
Author: benc
Date: 2009-02-25 10:09:23 -0600 (Wed, 25 Feb 2009)
New Revision: 2606
Modified:
trunk/src/org/griphyn/vdl/engine/Karajan.java
trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java
trunk/src/org/griphyn/vdl/karajan/Loader.java
trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java
trunk/src/org/griphyn/vdl/karajan/WrapperMap.java
trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java
trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java
trunk/src/org/griphyn/vdl/karajan/lib/Executable.java
trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java
trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java
trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java
trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java
trunk/src/org/griphyn/vdl/karajan/lib/GetField.java
trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java
trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java
trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java
trunk/src/org/griphyn/vdl/karajan/lib/Operators.java
trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java
trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java
trunk/src/org/griphyn/vdl/karajan/lib/Range.java
trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java
trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java
trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java
trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java
trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java
trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java
trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java
trunk/src/org/griphyn/vdl/mapping/MappingParam.java
trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
trunk/src/org/griphyn/vdl/mapping/RootDataNode.java
trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java
trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java
trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java
trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java
trunk/src/org/griphyn/vdl/type/Types.java
Log:
unused code removal, based on report generated by pmd
Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java
===================================================================
--- trunk/src/org/griphyn/vdl/engine/Karajan.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -407,8 +407,6 @@
try {
StringTemplate callST = template("call");
callST.setAttribute("func", call.getProc().getLocalPart());
- StringTemplate parentST = callST.getEnclosingInstance();
-
// Check is called procedure declared previously
String procName = call.getProc().getLocalPart();
if (proceduresMap.get(procName) == null)
Modified: trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -3,7 +3,6 @@
*/
package org.griphyn.vdl.karajan;
-import java.util.Iterator;
import java.util.LinkedList;
import org.globus.cog.karajan.stack.VariableNotFoundException;
Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/Loader.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/Loader.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -18,7 +18,6 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
-import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -73,7 +72,6 @@
try {
ap.parse(argv);
- Map arguments = new Hashtable();
if (ap.isPresent(ARG_HELP)) {
ap.usage();
System.exit(0);
@@ -204,7 +202,6 @@
IncorrectInvocationException, CompilationException,
IOException {
File swiftscript = new File(project);
- File dir = swiftscript.getParentFile();
String projectBase = project.substring(0, project.lastIndexOf('.'));
File xml = new File(projectBase + ".xml");
File kml = new File(projectBase + ".kml");
Modified: trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -7,7 +7,6 @@
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
@@ -16,7 +15,6 @@
import org.globus.cog.abstraction.interfaces.JobSpecification;
import org.globus.cog.abstraction.interfaces.Service;
import org.globus.cog.abstraction.interfaces.Task;
-import org.globus.cog.karajan.scheduler.Scheduler;
import org.globus.cog.karajan.scheduler.TaskTransformer;
import org.globus.cog.karajan.util.BoundContact;
import org.globus.cog.karajan.util.Contact;
@@ -30,8 +28,6 @@
public static final Logger logger = Logger.getLogger(VDSTaskTransformer.class);
private TaskTransformer impl;
- private Scheduler scheduler;
- private Set checkedTRs;
public VDSTaskTransformer(TCCache tc) {
this.impl = new TCTransformer(tc);
Modified: trunk/src/org/griphyn/vdl/karajan/WrapperMap.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/WrapperMap.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/WrapperMap.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -76,9 +76,6 @@
}
public synchronized void mergeListeners(DSHandle destination, DSHandle source) {
- FutureWrappers fwd = (FutureWrappers) map.get(destination);
- FutureWrappers fws = (FutureWrappers) map.get(source);
-
// TODO
throw new RuntimeException("not implemented");
}
Modified: trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -7,7 +7,6 @@
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.util.TypeUtil;
import org.globus.cog.karajan.workflow.ExecutionException;
-import org.griphyn.vdl.karajan.lib.cache.CacheReturn;
import org.griphyn.vdl.karajan.lib.cache.File;
import org.griphyn.vdl.karajan.lib.cache.VDLFileCache;
@@ -24,7 +23,7 @@
Object host = HOST.getValue(stack);
VDLFileCache cache = getCache(stack);
File f = new File(path, host, 0);
- CacheReturn cr = cache.entryRemoved(f);
+ cache.entryRemoved(f);
complete(stack);
}
Modified: trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -1,21 +1,15 @@
package org.griphyn.vdl.karajan.lib;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
-import org.globus.cog.karajan.util.TypeUtil;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.griphyn.vdl.mapping.DSHandle;
import org.griphyn.vdl.mapping.Path;
import org.griphyn.vdl.mapping.RootArrayDataNode;
-import org.griphyn.vdl.mapping.RootDataNode;
-import org.griphyn.vdl.mapping.file.ConcurrentMapper;
import org.griphyn.vdl.type.Type;
-import org.griphyn.vdl.type.Types;
public class CreateArray extends VDLFunction {
public static final Arg PA_VALUE = new Arg.Positional("value");
Modified: trunk/src/org/griphyn/vdl/karajan/lib/Executable.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/Executable.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/Executable.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -24,7 +24,6 @@
TCCache tc = getTC(stack);
String tr = TypeUtil.toString(PA_TR.getValue(stack));
BoundContact bc = (BoundContact) PA_HOST.getValue(stack);
- FQN fqn = new FQN(tr);
TransformationCatalogEntry tce = getTCE(tc, new FQN(tr), bc);
if (tce == null) {
return tr;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -2,7 +2,6 @@
import java.util.ArrayList;
import java.util.Map;
-import java.util.Collections;
import java.util.Comparator;
import java.util.TreeSet;
import java.util.Set;
@@ -12,13 +11,9 @@
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
-import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable;
import org.griphyn.vdl.mapping.ArrayDataNode;
import org.griphyn.vdl.mapping.DSHandle;
-import org.griphyn.vdl.mapping.HandleOpenException;
-import org.griphyn.vdl.mapping.InvalidPathException;
-import org.griphyn.vdl.mapping.Path;
public class ExpandArguments extends VDLFunction {
public static final Logger logger = Logger.getLogger(ExpandArguments.class);
Modified: trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -3,10 +3,7 @@
*/
package org.griphyn.vdl.karajan.lib;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -6,10 +6,8 @@
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
-import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable;
import org.griphyn.vdl.karajan.PairIterator;
import org.griphyn.vdl.mapping.DSHandle;
-import org.griphyn.vdl.mapping.HandleOpenException;
import org.griphyn.vdl.mapping.InvalidPathException;
import org.griphyn.vdl.mapping.Path;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -3,7 +3,6 @@
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
-import org.griphyn.vdl.mapping.AbstractDataNode;
import org.griphyn.vdl.mapping.DSHandle;
public class GetDatasetProvenanceID extends VDLFunction {
Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetField.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/GetField.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/GetField.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -3,17 +3,12 @@
*/
package org.griphyn.vdl.karajan.lib;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.griphyn.vdl.mapping.DSHandle;
import org.griphyn.vdl.mapping.InvalidPathException;
import org.griphyn.vdl.mapping.Path;
-import org.griphyn.vdl.type.Type;
public class GetField extends VDLFunction {
static {
Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -3,8 +3,6 @@
*/
package org.griphyn.vdl.karajan.lib;
-import java.util.Map;
-
import org.apache.log4j.Logger;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -9,7 +9,6 @@
import java.util.Arrays;
import java.util.List;
-import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.workflow.nodes.*;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.util.TypeUtil;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -3,7 +3,6 @@
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
-import org.griphyn.vdl.mapping.AbstractDataNode;
import org.griphyn.vdl.mapping.DSHandle;
/** Determines if a variable is 'restartable'; that is, if we restart the
Modified: trunk/src/org/griphyn/vdl/karajan/lib/Operators.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -1,6 +1,5 @@
package org.griphyn.vdl.karajan.lib;
-import org.apache.log4j.Logger;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
@@ -11,7 +10,6 @@
import org.griphyn.vdl.type.Types;
public class Operators extends FunctionsCollection {
- private static final Logger logger = Logger.getLogger(Operators.class);
public static final SwiftArg L = new SwiftArg.Positional("left");
public static final SwiftArg R = new SwiftArg.Positional("right");
Modified: trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -5,15 +5,12 @@
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.griphyn.vdl.mapping.DSHandle;
-import org.griphyn.vdl.mapping.InvalidPathException;
-import org.griphyn.vdl.mapping.Path;
import java.util.StringTokenizer;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
-import java.util.Iterator;
public class PartialCloseDataset extends VDLFunction {
public static final Logger logger = Logger.getLogger(CloseDataset.class);
Modified: trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -4,7 +4,6 @@
import java.util.Iterator;
import java.util.List;
-import org.apache.log4j.Logger;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.util.TypeUtil;
@@ -13,7 +12,6 @@
import org.griphyn.vdl.mapping.AbsFile;
public class PathUtils extends FunctionsCollection {
- private static final Logger logger = Logger.getLogger(PathUtils.class);
public static final Arg PATH = new Arg.Positional("path");
Modified: trunk/src/org/griphyn/vdl/karajan/lib/Range.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/Range.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/Range.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -24,10 +24,6 @@
public Object function(VariableStack stack) throws ExecutionException {
// TODO: deal with expression
- Object from = PA_FROM.getValue(stack);
- Object to = PA_TO.getValue(stack);
- Object step = OA_STEP.getValue(stack);
-
Type type = PA_FROM.getType(stack);
double start = PA_FROM.getDoubleValue(stack);
double stop = PA_TO.getDoubleValue(stack);
Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -5,9 +5,7 @@
import org.apache.log4j.Logger;
import org.griphyn.vdl.karajan.Pair;
-import org.griphyn.vdl.karajan.FuturePairIterator;
import org.griphyn.vdl.karajan.PairIterator;
-import org.griphyn.vdl.karajan.VDL2FutureException;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -3,10 +3,6 @@
*/
package org.griphyn.vdl.karajan.lib;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -57,7 +57,6 @@
attrs = attributesFromHost(bc, attrs);
- FQN fqn = new FQN(tr);
TransformationCatalogEntry tce = getTCE(tc, new FQN(tr), bc);
Map env = new HashMap();
Modified: trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -462,27 +462,6 @@
}
}
- private void closeDeep(VariableStack stack, DSHandle handle) throws ExecutionException,
- InvalidPathException {
- // Close the future
- synchronized(handle.getRoot()) {
- handle.closeShallow();
- getFutureWrapperMap(stack).close(handle);
- try {
- // Mark all nodes
- Iterator it = handle.getFields(Path.CHILDREN).iterator();
- while (it.hasNext()) {
- DSHandle child = (DSHandle) it.next();
- closeDeep(stack, child);
- }
- }
- catch (HandleOpenException e) {
- throw new ExecutionException("HandleOpen during closeDeep",e);
- }
- markToRoot(stack, handle);
- }
- }
-
protected void closeShallow(VariableStack stack, DSHandle handle) throws ExecutionException {
synchronized(handle.getRoot()) {
handle.closeShallow();
@@ -490,11 +469,6 @@
}
}
- private boolean isClosed(VariableStack stack, DSHandle handle) throws ExecutionException {
- assert Thread.holdsLock(handle.getRoot());
- return getFutureWrapperMap(stack).isClosed(handle);
- }
-
protected static Future addFutureListener(VariableStack stack, DSHandle handle)
throws ExecutionException {
assert Thread.holdsLock(handle.getRoot());
@@ -507,11 +481,6 @@
return getFutureWrapperMap(stack).addFutureListListener(handle, value).futureIterator(stack);
}
- private void mergeListeners(VariableStack stack, DSHandle destination, DSHandle source)
- throws ExecutionException {
- getFutureWrapperMap(stack).mergeListeners(destination, source);
- }
-
private void markAsAvailable(VariableStack stack, DSHandle handle, Object key)
throws ExecutionException {
getFutureWrapperMap(stack).markAsAvailable(handle, key);
@@ -534,7 +503,8 @@
else {
String index = p.getElement(i);
try {
- int ii = Integer.parseInt(index);
+ // check this is can parse as an integer by trying to parse and getting an exception if not
+ Integer.parseInt(index);
q = q.addLast(index, true);
}
catch (NumberFormatException e) {
Modified: trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -1,15 +1,11 @@
package org.griphyn.vdl.karajan.lib;
-import java.util.Map;
-
import org.apache.log4j.Logger;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable;
-import org.griphyn.vdl.karajan.PairIterator;
import org.griphyn.vdl.mapping.DSHandle;
-import org.griphyn.vdl.mapping.HandleOpenException;
import org.griphyn.vdl.mapping.InvalidPathException;
import org.griphyn.vdl.mapping.Path;
Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -4,7 +4,6 @@
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable;
-import org.globus.cog.karajan.workflow.futures.Future;
import org.griphyn.vdl.karajan.VDL2FutureException;
import org.griphyn.vdl.karajan.lib.VDLFunction;
import org.griphyn.vdl.mapping.RootDataNode;
Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -403,8 +403,7 @@
// non-leaf stuff is giving wierd paths anyway
try {
Object path=m.map(this.getPathFromRoot());
- logger.info("FILENAME dataset="+this.getIdentifier()+" filename="+
- m.map(this.getPathFromRoot()));
+ logger.info("FILENAME dataset="+this.getIdentifier()+" filename="+path) ;
} catch(Exception e) {
logger.info("dataset "+this.getIdentifier()+" exception while mapping path from root",e);
}
Modified: trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -5,8 +5,6 @@
import org.apache.log4j.Logger;
-import org.griphyn.vdl.mapping.Mapper;
-
/** AbstractMapper provides an implementation of the Mapper interface to be
used as a base class for writing other mappers. It provides handling
for mapper properties in a simple fashion that should be suitable for
Modified: trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -4,14 +4,12 @@
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
-import org.griphyn.vdl.type.Field;
import org.griphyn.vdl.type.NoSuchTypeException;
import org.griphyn.vdl.type.Type;
import org.griphyn.vdl.type.Types;
Modified: trunk/src/org/griphyn/vdl/mapping/MappingParam.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -73,7 +73,8 @@
if (!handle.isClosed()) {
throw new VDL2FutureException(handle);
}
- Object value = handle.getValue();
+ handle.getValue();
+ // try to get value, so that the appropriate exceptions are thrown for futures
}
/** Returns the mapper parameter as a String. Other data types will be
Modified: trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -34,7 +34,6 @@
Iterator i = params.entrySet().iterator();
while(i.hasNext()) {
Map.Entry entry = (Map.Entry) i.next();
- Object k = entry.getKey();
Object v = entry.getValue();
if(v instanceof DSHandle && !( (DSHandle)v).isClosed()) {
DSHandle dh = (DSHandle)v;
Modified: trunk/src/org/griphyn/vdl/mapping/RootDataNode.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -44,7 +44,6 @@
Iterator i = params.entrySet().iterator();
while(i.hasNext()) {
Map.Entry entry = (Map.Entry) i.next();
- Object k = entry.getKey();
Object v = entry.getValue();
if(v instanceof DSHandle && !( (DSHandle)v).isClosed()) {
DSHandle dh = (DSHandle)v;
@@ -116,7 +115,8 @@
while (i.hasNext()) {
Path p = (Path) i.next();
try {
- DSHandle field = root.getField(p);
+ // Try to get the path in order to check that the path is valid - we'll get an exception if not
+ root.getField(p);
if (logger.isInfoEnabled()) {
logger.info("Found mapped data " + root + "." + p);
}
Modified: trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -37,8 +37,6 @@
throw new IllegalArgumentException(path.toString());
}
else {
- int index = Integer.parseInt(path.getFirst());
-
// we could typecheck more elegantly here to make sure that
// we really do have an array of strings as parameter.
DSHandle dn = (DSHandle) PARAM_FILES.getRawValue(this);
Modified: trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -78,6 +78,10 @@
int ix = 0;
while (st.hasMoreTokens()) {
String column = st.nextToken();
+ // TODO PMD reports this for the
+ // following line:
+ // An operation on an Immutable object (String, BigDecimal or BigInteger) won't change the object itself
+ // This is likely a bug
column.replaceAll("\\s", "_");
cols.add(column);
colindex.put(column, new Integer(ix));
Modified: trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -31,7 +31,6 @@
sb.append("-array/");
sb.append(splitIndexByLoadFactor(index));
sb.append("/");
- String num = String.valueOf(index);
sb.append("elt-"+String.valueOf(index));
return sb.toString();
}
Modified: trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -2,7 +2,6 @@
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
Modified: trunk/src/org/griphyn/vdl/type/Types.java
===================================================================
--- trunk/src/org/griphyn/vdl/type/Types.java 2009-02-25 16:00:06 UTC (rev 2605)
+++ trunk/src/org/griphyn/vdl/type/Types.java 2009-02-25 16:09:23 UTC (rev 2606)
@@ -9,8 +9,6 @@
//TODO: check namespace references in type definitions
private static Map types = new HashMap();
- private String namespace = null;
-
public synchronized static Type getType(String name) throws NoSuchTypeException {
Type type = (Type) types.get(name);
if (type == null) {
More information about the Swift-commit
mailing list