IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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) {
Note: See TracChangeset for help on using the changeset viewer.