Changeset 30587 for branches/czw_branch/20101203/ippTools
- Timestamp:
- Feb 11, 2011, 4:42:29 PM (15 years ago)
- Location:
- branches/czw_branch/20101203
- Files:
-
- 20 edited
-
. (modified) (1 prop)
-
ippTools/share/chiptool_processedimfile.sql (modified) (2 diffs)
-
ippTools/share/difftool_pendingcleanupskyfile.sql (modified) (1 diff)
-
ippTools/share/difftool_setskyfiletoupdate.sql (modified) (1 diff)
-
ippTools/share/magicdstool_setfiletoupdate.sql (modified) (1 diff)
-
ippTools/share/warptool_change_skyfile_data_state.sql (modified) (1 diff)
-
ippTools/share/warptool_scmap.sql (modified) (1 diff)
-
ippTools/share/warptool_setskyfiletoupdate.sql (modified) (1 diff)
-
ippTools/share/warptool_towarped.sql (modified) (3 diffs)
-
ippTools/src/chiptool.c (modified) (3 diffs)
-
ippTools/src/difftool.c (modified) (3 diffs)
-
ippTools/src/disttool.c (modified) (1 diff)
-
ippTools/src/disttoolConfig.c (modified) (1 diff)
-
ippTools/src/magicdstool.c (modified) (4 diffs)
-
ippTools/src/magictool.c (modified) (1 prop)
-
ippTools/src/pstamptool.c (modified) (2 diffs)
-
ippTools/src/pstamptoolConfig.c (modified) (1 diff)
-
ippTools/src/pxtools.h (modified) (1 diff)
-
ippTools/src/regtool.c (modified) (6 diffs)
-
ippTools/src/warptool.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20101203
-
branches/czw_branch/20101203/ippTools/share/chiptool_processedimfile.sql
r29199 r30587 29 29 rawImfile.magicked AS raw_magicked, 30 30 rawImfile.burntool_state, 31 magicDSRun.state AS dsRun_state, 32 IFNULL(magicDSRun.magic_ds_id, 0) AS magic_ds_id 31 IFNULL(magicDSRun.magic_ds_id, 0) AS magic_ds_id, 32 IFNULL(magicDSRun.state,0) AS dsRun_state, 33 IFNULL(magicDSFile.fault,0) AS dsFile_fault, 34 IFNULL(magicDSFile.data_state,0) AS dsFile_data_state 33 35 FROM chipRun 34 36 JOIN chipImfile … … 43 45 LEFT JOIN magicDSRun 44 46 ON stage_id = chip_id AND stage = 'chip' AND magicDSRun.re_place AND magicDSRun.state != 'drop' 47 LEFT JOIN magicDSFile ON magicDSRun.magic_ds_id = magicDSFile.magic_ds_id AND chipProcessedImfile.class_id = magicDSFile.component -
branches/czw_branch/20101203/ippTools/share/difftool_pendingcleanupskyfile.sql
r24186 r30587 9 9 USING(diff_id) 10 10 WHERE 11 ((diffRun.state = 'goto_cleaned' AND diffSkyfile.data_state = 'full')11 ((diffRun.state = 'goto_cleaned' AND (diffSkyfile.data_state = 'full' OR diffSkyfile.data_state = 'update')) 12 12 OR 13 13 (diffRun.state = 'goto_scrubbed' AND diffSkyfile.data_state != 'scrubbed') -
branches/czw_branch/20101203/ippTools/share/difftool_setskyfiletoupdate.sql
r29568 r30587 1 1 UPDATE diffRun 2 2 JOIN diffSkyfile USING(diff_id) 3 LEFT JOIN magicDSRun ON (stage_id = diff_id AND stage = 'diff')4 LEFT JOIN magicDSFile ON (magicDSRun.magic_ds_id = magicDSFile.magic_ds_id5 AND component = skycell_id)6 3 SET diffRun.state = 'update', 7 diffSkyfile.data_state = 'update' 4 diffSkyfile.data_state = 'update', 5 diffSkyfile.fault = 0 8 6 -- set hook %s 9 7 WHERE diff_id = %lld 10 8 AND (diffRun.state = 'cleaned' OR diffRun.state = 'update') 11 AND (diffSkyfile.data_state = 'cleaned' )9 AND (diffSkyfile.data_state = 'cleaned' OR diffSkyfile.data_state = 'update') -
branches/czw_branch/20101203/ippTools/share/magicdstool_setfiletoupdate.sql
r29561 r30587 7 7 WHERE magic_ds_id = %lld 8 8 AND (magicDSRun.state = 'cleaned' OR magicDSRun.state = 'update') 9 AND (magicDSFile.data_state = 'cleaned' )9 AND (magicDSFile.data_state = 'cleaned' OR magicDSFile.data_state ='update') -
branches/czw_branch/20101203/ippTools/share/warptool_change_skyfile_data_state.sql
r26567 r30587 1 1 -- handle changes in warpSkyfile.data_state. 2 2 -- Used for the modes tofullskyfile, tocleanedskyfile and topurgedskyfile 3 -- arg s are new data_state, string for magic hook, warp_id, skycell_id and current expected state for warpRun3 -- arguments are are new data_state, string for magic hook, warp_id, skycell_id 4 4 UPDATE warpSkyfile 5 5 JOIN warpRun USING(warp_id) -
branches/czw_branch/20101203/ippTools/share/warptool_scmap.sql
r29349 r30587 12 12 IFNULL(magicDSRun.magic_ds_id, 0) AS magic_ds_id, 13 13 IFNULL(magicDSRun.state, 0) AS dsRun_state, 14 IFNULL(magicDSFile.data_state, 0) AS dsFile_data_state, 14 15 IFNULL(magicDSFile.fault, 0) as dsFile_fault 15 16 FROM warpRun -
branches/czw_branch/20101203/ippTools/share/warptool_setskyfiletoupdate.sql
r29568 r30587 1 1 UPDATE warpRun 2 2 JOIN warpSkyfile USING(warp_id) 3 LEFT JOIN magicDSRun ON (stage_id = warp_id AND stage = 'warp')4 LEFT JOIN magicDSFile ON (magicDSRun.magic_ds_id = magicDSFile.magic_ds_id5 AND component = skycell_id)6 3 SET warpRun.state = 'update', 7 warpSkyfile.data_state = 'update' 4 warpSkyfile.data_state = 'update', 5 warpSkyfile.fault = 0 8 6 -- set hook %s 9 7 WHERE warp_id = %lld 10 8 AND (warpRun.state = 'cleaned' OR warpRun.state = 'update') 11 AND (warpSkyfile.data_state = 'cleaned' )9 AND (warpSkyfile.data_state = 'cleaned' OR warpSkyfile.data_state = 'update') -
branches/czw_branch/20101203/ippTools/share/warptool_towarped.sql
r29171 r30587 11 11 exp_tag, 12 12 workdir, 13 label, 13 14 magicked, 14 15 path_base, … … 23 24 warpRun.state, 24 25 warpRun.reduction, 26 warpRun.label, 25 27 camRun.cam_id, 26 28 rawExp.camera, … … 76 78 warpRun.state, 77 79 warpRun.reduction, 80 warpRun.label, 78 81 camRun.cam_id, 79 82 rawExp.camera, -
branches/czw_branch/20101203/ippTools/src/chiptool.c
r29982 r30587 838 838 PXOPT_COPY_S16(config->args, where, "-fault", "chipProcessedImfile.fault", "=="); 839 839 840 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 841 840 842 if (!psListLength(where->list) 841 843 && !psMetadataLookupBool(NULL, config->args, "-all")) { … … 874 876 } 875 877 psFree(query); 878 879 if (!fault) { 880 // If fault has not been supplied, don't revert update faults with the magic value 881 // We don't do this for new runs because then they would never complete 882 // quality should be used to drop bad components 883 psStringAppend(&query_update, " AND (chipProcessedImfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 884 } 876 885 if (!p_psDBRunQuery(config->dbh, query_update)) { 877 886 psError(PS_ERR_UNKNOWN, false, "database error"); … … 1919 1928 } 1920 1929 1930 // we do not update components with the magic fault value. They are non-updateable 1931 psStringAppend(&query, " AND (chipProcessedImfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 1932 1921 1933 if (!p_psDBRunQueryF(config->dbh, query, setHook, chip_id)) { 1922 1934 psError(PS_ERR_UNKNOWN, false, "database error"); -
branches/czw_branch/20101203/ippTools/src/difftool.c
r30118 r30587 917 917 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 918 918 919 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 920 919 921 if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) { 920 922 psFree(where); … … 950 952 psLogMsg("difftool", PS_LOG_INFO, "Deleted %" PRIu64 " rows", psDBAffectedRows(config->dbh)); 951 953 954 if (!fault) { 955 // If fault has not been supplied, don't revert update faults with the magic value 956 // We don't do this for new runs because then they would never complete 957 // quality should be used to drop bad components 958 psStringAppend(&query_updated, " AND (diffSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 959 } 952 960 if (!p_psDBRunQuery(config->dbh, query_updated)) { 953 961 psError(PS_ERR_UNKNOWN, false, "database error"); … … 3198 3206 psStringAppend(&query, " AND (diffSkyfile.skycell_id = '%s')", skycell_id); 3199 3207 } 3208 // we do not update components with the magic fault value. They are non-updateable 3209 // (But can be recovered with "difftool -revertwarped -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT) 3210 psStringAppend(&query, " AND (diffSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 3200 3211 3201 3212 if (!p_psDBRunQueryF(config->dbh, query, setHook, diff_id)) { -
branches/czw_branch/20101203/ippTools/src/disttool.c
r30586 r30587 1185 1185 PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "=="); 1186 1186 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 1187 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");1187 pxAddLabelSearchArgs(config, where, "-label", "label", "=="); 1188 1188 PXOPT_COPY_S16(config->args, where, "-fault", "rcDSFileset.fault", "=="); 1189 1189 -
branches/czw_branch/20101203/ippTools/src/disttoolConfig.c
r29067 r30587 197 197 psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-stage_id",0, "define stage_id", 0); 198 198 psMetadataAddStr(revertfilesetArgs, PS_LIST_TAIL, "-state", 0, "define state", NULL); 199 psMetadataAddStr(revertfilesetArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL);199 psMetadataAddStr(revertfilesetArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "define label", NULL); 200 200 psMetadataAddS16(revertfilesetArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); 201 201 psMetadataAddBool(revertfilesetArgs, PS_LIST_TAIL, "-all", 0, "revert all faulted runs", NULL); -
branches/czw_branch/20101203/ippTools/src/magicdstool.c
r30586 r30587 1112 1112 1113 1113 PXOPT_LOOKUP_STR(state, config->args, "-state", false, false); 1114 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 1114 1115 1115 1116 psString queryFile = NULL; 1117 bool stateIsUpdate = false; 1116 1118 if (state) { 1117 1119 if (! strcmp(state, "new") || !strcmp(state, "goto_restored")) { … … 1119 1121 } else if (!strcmp(state, "update")) { 1120 1122 queryFile = "magicdstool_revertupdated.sql"; 1123 stateIsUpdate = true; 1121 1124 } else { 1122 1125 psError(PXTOOLS_ERR_SYS, true, "%s is not a valid value for state", state); … … 1141 1144 } 1142 1145 psFree(where); 1146 1147 if (stateIsUpdate && !fault) { 1148 // If fault has not been supplied, don't revert update faults with 1149 // the magic "do not update" value 1150 // We don't do this for new runs because then they would never complete 1151 // quality should be used to drop bad components 1152 psStringAppend(&query, " AND magicDSFile.fault != %d", PXTOOL_DO_NOT_REVERT_FAULT); 1153 } 1143 1154 1144 1155 if (!p_psDBRunQuery(config->dbh, query)) { … … 1744 1755 } 1745 1756 1757 // we do not update components with the magic fault value. They are non-updateable 1758 // (But can be recovered with "magicdstool -revertdestreakedfile -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT) 1759 psStringAppend(&query, " AND (magicDSFile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 1760 1746 1761 if (!p_psDBRunQueryF(config->dbh, query, setHook, magic_ds_id)) { 1747 1762 psError(PS_ERR_UNKNOWN, false, "database error"); -
branches/czw_branch/20101203/ippTools/src/magictool.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/czw_branch/20101203/ippTools/src/pstamptool.c
r30586 r30587 571 571 PXOPT_COPY_S32(config->args, where, "-fault", "fault", "=="); 572 572 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 573 PXOPT_COPY_STR(config->args, where, "-reqType", "reqType", "=="); 574 PXOPT_COPY_STR(config->args, where, "-name", "name", "LIKE"); 573 575 PXOPT_COPY_TIME(config->args, where, "-timestamp_begin", "timestamp", ">="); 574 576 PXOPT_COPY_TIME(config->args, where, "-timestamp_end", "timestamp", "<="); … … 586 588 psStringAppend(&query, ", state = '%s'", state); 587 589 if (!strcmp(state, "goto_cleaned")) { 588 psStringAppend(&stateCheck, " AND state != 'cleaned'");590 psStringAppend(&stateCheck, " AND (state != 'cleaned' AND state != 'goto_cleaned')"); 589 591 } 590 592 } -
branches/czw_branch/20101203/ippTools/src/pstamptoolConfig.c
r30586 r30587 104 104 psMetadataAddS16(updatereqArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 105 105 psMetadataAddStr(updatereqArgs, PS_LIST_TAIL, "-state", 0, "search by state", NULL); 106 psMetadataAddStr(updatereqArgs, PS_LIST_TAIL, "-reqType", 0, "search by reqType", NULL); 107 psMetadataAddStr(updatereqArgs, PS_LIST_TAIL, "-name", 0, "search by reqType (LIKE comparsion)", NULL); 106 108 psMetadataAddStr(updatereqArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by pstampJob label (LIKE comparision)", NULL); 107 109 psMetadataAddTime(updatereqArgs, PS_LIST_TAIL, "-timestamp_begin", 0, "search by timestamp (>=)", NULL); -
branches/czw_branch/20101203/ippTools/src/pxtools.h
r28486 r30587 51 51 # define MAX_ROWS 10e9 52 52 # define PXTOOL_MODE_NONE 0x0 53 // we do not revert or update components with this fault value 54 // This is the same value as PSTAMP_GONE 55 # define PXTOOL_DO_NOT_REVERT_FAULT 26 53 56 54 57 bool pxIsValidState(const char *state); -
branches/czw_branch/20101203/ippTools/src/regtool.c
r30586 r30587 211 211 // convert regular class_id format to summitImfile.class_id format 212 212 rep = psStringCopy(class_id); 213 psFree(class_id); 213 214 214 class_id = rep; 215 215 … … 320 320 psStringSubstitute(&query,dateobs_end,"@DATEOBS_END@"); 321 321 322 //fprintf(stderr,"%s",query);322 fprintf(stderr,"%s",query); 323 323 324 324 if (!p_psDBRunQuery(config->dbh, query)) { … … 345 345 } 346 346 347 //fprintf (stderr, "found %ld rows\n", output->n);347 fprintf (stderr, "found %ld rows\n", output->n); 348 348 if (!psArrayLength(output)) { 349 349 psTrace("regtool", PS_LOG_INFO, "no rows found"); … … 370 370 char *tmp_id = psMetadataLookupStr(&status,row,"summit_class_id"); 371 371 if (!status) { 372 //fprintf (stderr, "incomplete on %s\n", psMetadataLookupStr(NULL,row,"exp_name"));372 fprintf (stderr, "incomplete on %s\n", psMetadataLookupStr(NULL,row,"exp_name")); 373 373 continue; 374 374 } … … 440 440 already_burned = false; 441 441 442 //fprintf (stderr, "missing uri: %s %s\n", psMetadataLookupStr(NULL,row,"exp_name"), this_class_id);442 fprintf (stderr, "missing uri: %s %s\n", psMetadataLookupStr(NULL,row,"exp_name"), this_class_id); 443 443 444 444 // Save this round for next round. … … 1903 1903 psFree(query); 1904 1904 query = rep; 1905 psStringSubstitute(&class_id,"ota","XY");1906 1905 psStringSubstitute(&query,class_id,"@CLASS_ID@"); 1907 1906 psStringSubstitute(&query,"ota","XY"); 1907 1908 1908 if (!date) { 1909 1909 if (!dateobs_begin || !dateobs_end) { -
branches/czw_branch/20101203/ippTools/src/warptool.c
r29903 r30587 1485 1485 PXOPT_COPY_S16(config->args, where, "-fault", "warpSkyfile.fault", "=="); 1486 1486 1487 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 1488 1487 1489 if (!psListLength(where->list) 1488 1490 && !psMetadataLookupBool(NULL, config->args, "-all")) { … … 1510 1512 } 1511 1513 psFree(where); 1514 1515 if (!fault) { 1516 // If fault has not been supplied, don't revert update faults with the magic value 1517 // We don't do this for new runs because then they would never complete 1518 // quality should be used to drop bad components 1519 psStringAppend(&query_updated, " AND warpSkyfile.fault != %d", PXTOOL_DO_NOT_REVERT_FAULT); 1520 } 1512 1521 1513 1522 if (!p_psDBRunQuery(config->dbh, query)) { … … 2003 2012 // shared code for the modes -tocleanedskyfile -tofullskyfile -topurgedskyfile 2004 2013 2005 static bool change_skyfile_data_state(pxConfig *config, psString data_state , psString run_state)2014 static bool change_skyfile_data_state(pxConfig *config, psString data_state) 2006 2015 { 2007 2016 PS_ASSERT_PTR_NON_NULL(config, false); … … 2065 2074 static bool tocleanedskyfileMode(pxConfig *config) 2066 2075 { 2067 return change_skyfile_data_state(config, "cleaned" , "goto_cleaned");2076 return change_skyfile_data_state(config, "cleaned"); 2068 2077 } 2069 2078 static bool tofullskyfileMode(pxConfig *config) 2070 2079 { 2071 return change_skyfile_data_state(config, "full" , "update");2080 return change_skyfile_data_state(config, "full"); 2072 2081 } 2073 2082 static bool topurgedskyfileMode(pxConfig *config) 2074 2083 { 2075 return change_skyfile_data_state(config, "purged" , "goto_purged");2084 return change_skyfile_data_state(config, "purged"); 2076 2085 } 2077 2086 static bool toscrubbedskyfileMode(pxConfig *config) 2078 2087 { 2079 return change_skyfile_data_state(config, "scrubbed" , "goto_scrubbed");2088 return change_skyfile_data_state(config, "scrubbed"); 2080 2089 } 2081 2090 … … 2101 2110 else { 2102 2111 if (strcmp(state,"error_cleaned") == 0) { 2103 change_skyfile_data_state(config,"error_cleaned" ,"goto_cleaned");2112 change_skyfile_data_state(config,"error_cleaned"); 2104 2113 } 2105 2114 else if (strcmp(state, "error_scrubbed") == 0) { 2106 change_skyfile_data_state(config,"error_scrubbed" ,"goto_scrubbed");2115 change_skyfile_data_state(config,"error_scrubbed"); 2107 2116 } 2108 2117 else if (strcmp(state, "error_purged") == 0) { 2109 change_skyfile_data_state(config,"error_purged" ,"goto_purged");2118 change_skyfile_data_state(config,"error_purged"); 2110 2119 } 2111 2120 else { … … 2526 2535 psStringAppend(&query, " AND (warpSkyfile.skycell_id = '%s')", skycell_id); 2527 2536 } 2537 // we do not update components with the magic fault value. They are non-updateable 2538 // (But can be recovered with "warptool -revertwarped -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT) 2539 psStringAppend(&query, " AND (warpSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT); 2528 2540 2529 2541 if (!p_psDBRunQueryF(config->dbh, query, setHook, warp_id)) {
Note:
See TracChangeset
for help on using the changeset viewer.
