IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33520


Ignore:
Timestamp:
Mar 14, 2012, 6:53:52 AM (14 years ago)
Author:
eugene
Message:

use new test function HostTableTestHost to see if we are on the host supporting this table

Location:
branches/eam_branches/ipp-20111122/Ohana/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/libdvo/include/dvo.h

    r33519 r33520  
    626626int HostTableWaitJobs (HostTable *table, char *file, int lineno);
    627627int HostTableWaitJobsGetIO (HostTable *table, char *file, int lineno);
     628int HostTableTestHost (SkyRegion *region, int hostID);
    628629
    629630// functions to support tiny versions of Average and Measure
  • branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c

    r33519 r33520  
    342342  return globalStatus;
    343343}
     344
     345int HostTableTestHost (SkyRegion *region, int hostID) {
     346
     347  if (!hostID) return FALSE;
     348
     349  if (region->hostFlags & DATA_USE_BCK) {
     350    if (region->backupID == hostID) return TRUE;
     351  } else {
     352    if (region->hostID == hostID) return TRUE;
     353  }
     354  return FALSE;
     355}
  • branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/avextract.c

    r33314 r33520  
    143143  interrupt = FALSE;
    144144  for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
    145     // parallel case, wrong client
    146     if (HOST_ID && (HOST_ID != skylist[0].regions[i]->hostID)) continue;
     145
     146    // does this host ID match the desired location for the table?
     147    if (!HostTableTestHost(skylist[0].regions[i], HOST_ID)) continue;
    147148
    148149    /* lock, load, unlock catalog */
  • branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c

    r33480 r33520  
    159159
    160160  for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
    161     // parallel case, wrong client
    162     if (HOST_ID && (HOST_ID != skylist[0].regions[i]->hostID)) continue;
     161
     162    // does this host ID match the desired location for the table?
     163    if (!HostTableTestHost(skylist[0].regions[i], HOST_ID)) continue;
    163164
    164165    /* lock, load, unlock catalog */
  • branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/CopyBackupToHost.c

    r33518 r33520  
    106106
    107107    valid:
     108      if (j == 0) {
     109        fprintf (stderr, "copying %s to %s\n", skylist->regions[i]->name, dstHost->pathname);
     110      }
     111
    108112      // read srcname, write to tgtname, get MD5 sum for srcname as we go:
    109113      // XXX files that fail here should be skipped (but don't give up)
  • branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/initialize_dvodist.c

    r33518 r33520  
    104104    }
    105105    // usage dvodist -out-backup (srcHost) to (dstHost)
    106     MODE = MODE_OUT_BACKUP;
     106    MODE = MODE_USE_BACKUP;
    107107    remove_argument (N, &argc, argv);
    108108    srcHostname = strcreate (argv[N]);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjectOffsets.c

    r33480 r33520  
    2323  for (i = 0; i < skylist[0].Nregions; i++) {
    2424
    25     if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
     25    // does this host ID match the desired location for the table?
     26    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    2627
    2728    // define the catalog file name
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/high_speed_catalogs.c

    r33475 r33520  
    2222  for (i = 0; i < skylist[0].Nregions; i++) {
    2323
    24     if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
     24    // does this host ID match the desired location for the table?
     25    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    2526
    2627    // set up the basic catalog info
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/load_catalogs.c

    r33515 r33520  
    2222  for (i = 0; i < skylist[0].Nregions; i++) {
    2323
    24     if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
     24    // does this host ID match the desired location for the table?
     25    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    2526
    2627    // we only allow output if we do not use a subset.  in this case,
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/relastro_objects.c

    r33480 r33520  
    3434  for (i = 0; i < skylist[0].Nregions; i++) {
    3535
    36     if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
     36    // does this host ID match the desired location for the table?
     37    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    3738
    3839    // set up the basic catalog info
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/load_catalogs.c

    r33510 r33520  
    3535    dvo_catalog_init (&catalog[i], TRUE);
    3636
    37     if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
     37    // does this host ID match the desired location for the table?
     38    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    3839
    3940    // set up the basic catalog info
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c

    r33503 r33520  
    3737  /* load data from each region file */
    3838  for (i = 0; i < skylist[0].Nregions; i++) {
    39     if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
     39
     40    // does this host ID match the desired location for the table?
     41    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    4042
    4143    gettimeofday (&start, (void *) NULL);
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c

    r33503 r33520  
    3333  for (i = 0; i < skylist[0].Nregions; i++) {
    3434
    35     if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
     35    // does this host ID match the desired location for the table?
     36    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    3637
    3738    // set up the basic catalog info
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot.c

    r33483 r33520  
    4343  for (i = 0; i < skylist[0].Nregions; i++) {
    4444
    45     if (HOST_ID && (HOST_ID != skylist->regions[i]->hostID)) continue;
    46     if (HOST_ID && !(skylist->regions[i]->hostFlags & DATA_ON_TGT)) continue;
     45    // does this host ID match the desired location for the table?
     46    if (!HostTableTestHost(skylist[0].regions[i], HOST_ID)) continue;
    4747
    4848    char localFilename[1024];
Note: See TracChangeset for help on using the changeset viewer.