Commit b5662777 authored by toaster's avatar toaster
Browse files

backout hints to compare

git-svn-id: https://subversion.umiacs.umd.edu/ace/trunk@136 f1b3a171-7291-4a19-a512-95ad0ad9394a
parent e166c39d
......@@ -63,10 +63,10 @@ public final class CollectionCompare2 {
private static final Logger LOG = Logger.getLogger(CollectionCompare2.class);
private List<String> parseErrors = new ArrayList<String>();
public CollectionCompare2(InputStream sourceFile, String prefix, int hint) {
public CollectionCompare2(InputStream sourceFile, String prefix) {
sourceMap = new TreeMap<String, String>();
sourceReverseMap = new TreeMap<String, String>();
LOG.trace("initializing collection compare with hint: " + hint);
LOG.trace("initializing collection compare with");
try {
parseInputStream(sourceFile, prefix);
} catch (IOException e) {
......
......@@ -26,7 +26,7 @@ public final class CompareResults {
private boolean running = true;
private String message = null;
public CompareResults(CollectionCompare2 cc2, int hint) {
public CompareResults(CollectionCompare2 cc2) {
unseenTarget = new TreeSet<String>();
//differingNames = new TreeSet<DifferingName>(hint);
unseenSupplied = new TreeSet<String>(cc2.getSourceMap().keySet());
......
......@@ -76,7 +76,6 @@ public class CompareServlet extends EntityManagerServlet {
protected void processRequest( HttpServletRequest request,
HttpServletResponse response, EntityManager em )
throws ServletException, IOException {
int hint = 0;
Collection c = null;
MonitoredItem monItem = null;
RequestDispatcher dispatcher;
......@@ -111,11 +110,6 @@ public class CompareServlet extends EntityManagerServlet {
"Collection does not exist: " + colId);
}
hint = (int)CollectionCountContext.getFileCount(c);
if (hint == -1)
hint = 10000;
}
} else if ( PARAM_ITEM_ID.equals(item.getFieldName()) ) {
String itemString = Streams.asString(item.openStream());
......@@ -161,8 +155,8 @@ public class CompareServlet extends EntityManagerServlet {
"item " + monItem + " filter " + inputFilter + " loading attached file");
CollectionCompare2 cc = new CollectionCompare2(
item.openStream(), inputFilter,hint);
CompareResults cr = new CompareResults(cc,hint);
item.openStream(), inputFilter);
CompareResults cr = new CompareResults(cc);
Thread t = new Thread(new TableCompareRunnable(cr,cc, c,
monItem), "Compare Thread " + c.getName());
t.start();
......@@ -178,8 +172,8 @@ public class CompareServlet extends EntityManagerServlet {
LOG.debug("Remote digest request " + partner.getRemoteURL());
CollectionCompare2 cc = new CollectionCompare2(
JsonGateway.getGateway().getDigestList(partner,
remoteCollection), inputFilter,hint);
CompareResults cr = new CompareResults(cc,hint);
remoteCollection), inputFilter);
CompareResults cr = new CompareResults(cc);
Thread t = new Thread(new TableCompareRunnable(cr,cc, c,
monItem), "Compare Thread " + c.getName());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment