IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27315 for trunk/ippTools


Ignore:
Timestamp:
Mar 17, 2010, 4:15:53 PM (16 years ago)
Author:
watersc1
Message:

Updated "split" version of lossy compression, with tasks to do compression and cleaning in parallel. This should help us recover disk space quicker.

Location:
trunk/ippTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/regtool_pendingcompressimfile.sql

    r27168 r27315  
    11SELECT rawImfile.*,rawExp.workdir,rawExp.exp_tag from rawImfile
    22       JOIN rawExp USING(exp_id)
    3        WHERE ((data_state = 'goto_compressed' AND state = 'goto_compressed')
    4            OR (data_state = 'goto_lossy' AND state = 'goto_lossy'))
     3       WHERE  1
     4-- ((data_state = 'goto_compressed' AND state = 'goto_compressed')
     5--                 OR (data_state = 'goto_lossy' AND state = 'goto_lossy'))
    56-- where hook %s
    67-- limit hook %s       
  • trunk/ippTools/src/regtool.c

    r27210 r27315  
    584584    psStringPrepend(&whereClause, "\n AND ");
    585585  }
     586  PXOPT_LOOKUP_BOOL(compress, config->args, "-compress", false);
     587  PXOPT_LOOKUP_BOOL(clean,    config->args, "-clean", false);
     588
     589  if ((compress && clean)||(!compress & !clean)) {
     590    psStringAppend(&whereClause, "\n AND ((data_state = 'goto_compressed' AND state = 'goto_compressed')\n  OR (data_state = 'goto_lossy' AND state = 'goto_lossy')) ");
     591  }
     592  else if (compress) {
     593    psStringAppend(&whereClause, "\n AND ((data_state = 'goto_compressed' AND state = 'goto_compressed')) ");
     594  }
     595  else if (clean) {
     596    psStringAppend(&whereClause, "\n AND ((data_state = 'goto_lossy' AND state = 'goto_lossy')) ");
     597  }
     598  else {
     599    psStringAppend(&whereClause, "\n AND ((data_state = 'goto_compressed' AND state = 'goto_compressed')\n  OR (data_state = 'goto_lossy' AND state = 'goto_lossy')) ");
     600  }   
    586601 
    587602  PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    588603  PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    589 
     604 
    590605  psString query = pxDataGet("regtool_pendingcompressimfile.sql");
    591606  if (!query) {
    592607    psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
    593608    return(false);
    594   }
     609  } 
    595610  psString limitString = NULL;
    596611  if (limit) {
  • trunk/ippTools/src/regtoolConfig.c

    r27176 r27315  
    381381    psMetadataAddBool(pendingcompressimfileArgs, PS_LIST_TAIL, "-simple", 0,     "use the simple output format", false);
    382382    psMetadataAddU64(pendingcompressimfileArgs, PS_LIST_TAIL, "-limit",   0,     "limit result set to N items", 0);
    383 
     383    psMetadataAddBool(pendingcompressimfileArgs, PS_LIST_TAIL, "-compress", 0,   "search only for files to compress", 0);
     384    psMetadataAddBool(pendingcompressimfileArgs, PS_LIST_TAIL, "-clean",  0,     "search only for files to clean originals", 0);
    384385   
    385386    // -finishcompressexp
Note: See TracChangeset for help on using the changeset viewer.