Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
procone.py -- OMUD
08-12-2021, 11:28 AM
Post: #11
RE: procone.py -- OMUD
(09-25-2020 01:15 AM)zhihao Wrote:  delete_one_case():
Code:
fw: file handler of one result file
newftexts: request content
insblock: content of insert block of the case in the corpus
blank_json: the value of is {"keys":[],"caseid":"___"}
delete_one_case(fw, newftexts, insblock){
  caseid = get caseid from insblock
  newcaseid = get caseid from newftexts
  if ($caseid  == $newcaseid){
    write $blank_json to $fw
  }
}

delete the logic, we reuse the old one deleteIfMatch
Quote this message in a reply
08-12-2021, 11:32 AM
Post: #12
RE: procone.py -- OMUD
(08-11-2021 06:57 PM)lingu Wrote:  
(08-10-2021 01:58 PM)zhihao Wrote:  
(09-25-2020 01:15 AM)zhihao Wrote:  
Code:
deleteIfMatch() {
    if $reqcaseid matches $caseid
        rid --insitu insert.json
((->tycajson_pfn: file of json cases
rid --insitu ((insert.json->$tycajson_pfn ))
))
RR lingu

(09-25-2020 01:15 AM)zhihao Wrote:  
Code:
create file insert.json with request template which has empty value
create file ((insert.json->$tycajson_pfn )) with request template which has empty value
RR lingu

OK.

Quote:
(09-25-2020 01:15 AM)zhihao Wrote:  
Code:
generate result file
    else
        create empty result file
}
delete logic
RR lingu

without a result file, how does the client know the status of the delete op?

It won't know and the logic is not implemented in code, deleted else part
Quote this message in a reply
08-12-2021, 11:43 AM
Post: #13
RE: procone.py -- OMUD
(11-30-2020 01:13 PM)lingu Wrote:  
(09-25-2020 01:15 AM)zhihao Wrote:  procone.py is used for generating analysis result for one case.

Code:
在某一案例内容中搜索key{1,2,3},构建"keys": []。
Code:
main() {
    set $tycajson_pfn as a insert.json
    get $reqtype from $tycajson_pfn
    switch ($reqtype) {
        case "delete":
            deleteIfMatch()
        case "select"
            selectIfMatch()

how does 'selectIfMatch' work? Pls specify.

add to headpost
Code:
tycajson_pfn: file of json cases
reqcaseid: reqest case id
caseid: id of existing case
tycano: case number it selects
selectIfMatch() {
    if $reqcaseid matches $caseid
        return tycano
}
Quote this message in a reply
08-12-2021, 12:14 PM
Post: #14
RE: procone.py -- OMUD
(09-25-2020 01:15 AM)zhihao Wrote:  deleteIfMatch()
Code:
tycajson_pfn: file of json cases
deleteIfMatch() {
    if $reqcaseid matches $caseid
        rid --insitu $tycajson_pfn
        create file $tycajson_pfn with request template which has empty value

need to remove case in sage with auntie
---
use auntie to delete case in sage
Quote this message in a reply
08-13-2021, 07:36 PM
Post: #15
RE: procone.py -- OMUD
(09-25-2020 01:15 AM)zhihao Wrote:  deleteIfMatch()
Code:
use auntie to delete case in sage
}

find little info about auntie after I search in tab, cod://sage-src/src/auntie/auntie.cpp has some infos, looks like no remove operation

Code:
void usage() {
  printf (("\
Usage: auntie [--dryrun] [up | down | list | pushmove | register] [...] \n\
  up        starts a KissUp operation,\n              which stores (uploads) the file \n\
  down      auntie down requests a KissDown operation,\n              which provides (downloads)\n              the file in  the  name <filename> \n\
  list      auntie list lists the currently stored keys in GFAT.\n              These are similar to the filenames\n              of files in the GFAT system \n\
  pushmove  auntie [--dryrun] pushmove <filename>\n              <hostname> <id> <suffix>\n              pushes the file to EFS of the helper_portal \n\
  register  auntie [--dryrun] register <filename>\n              auntie register registers a task \n              specification file with Sage \n\
  dryrun    auntie [--dryrun] \n              If --dryrun is specified, auntie conducts a dryrun\n              and does not really upload or download the data\n"));

}

try list some files
Code:
[sage@limbo305-1 test]$ /thinker/globe/.think/run/auntie list
[sage@limbo305-1 test]$
Quote this message in a reply
08-14-2021, 12:35 AM (This post was last modified: 08-14-2021 12:55 AM by lingu.)
Post: #16
RE: procone.py -- OMUD
(08-12-2021 12:14 PM)zhihao Wrote:  
(09-25-2020 01:15 AM)zhihao Wrote:  deleteIfMatch()
Code:
tycajson_pfn: file of json cases
deleteIfMatch() {
    if $reqcaseid matches $caseid
        rid --insitu $tycajson_pfn
        create file $tycajson_pfn with request template which has empty value

need to remove case in sage with auntie
---
use auntie to delete case in sage

To remove the file from Sage, the program decrements casecnt, then runs 'coolauntie rm $tycano' and returns 105.

RR zhihao
Find all posts by this user
Quote this message in a reply
08-14-2021, 12:37 AM
Post: #17
RE: procone.py -- OMUD
(08-13-2021 07:36 PM)zhihao Wrote:  
(09-25-2020 01:15 AM)zhihao Wrote:  deleteIfMatch()
Code:
use auntie to delete case in sage
}

find little info about auntie after I search in tab, cod://sage-src/src/auntie/auntie.cpp has some infos, looks like no remove operation

Code:
void usage() {
  printf (("\
Usage: auntie [--dryrun] [up | down | list | pushmove | register] [...] \n\
  up        starts a KissUp operation,\n              which stores (uploads) the file \n\
  down      auntie down requests a KissDown operation,\n              which provides (downloads)\n              the file in  the  name <filename> \n\
  list      auntie list lists the currently stored keys in GFAT.\n              These are similar to the filenames\n              of files in the GFAT system \n\
  pushmove  auntie [--dryrun] pushmove <filename>\n              <hostname> <id> <suffix>\n              pushes the file to EFS of the helper_portal \n\
  register  auntie [--dryrun] register <filename>\n              auntie register registers a task \n              specification file with Sage \n\
  dryrun    auntie [--dryrun] \n              If --dryrun is specified, auntie conducts a dryrun\n              and does not really upload or download the data\n"));

}

try list some files
Code:
[sage@limbo305-1 test]$ /thinker/globe/.think/run/auntie list
[sage@limbo305-1 test]$

If list does not work, file a bug, write a test for it, and debug to fix the problem.
Find all posts by this user
Quote this message in a reply
08-14-2021, 01:04 PM
Post: #18
RE: procone.py -- OMUD
(08-14-2021 12:35 AM)lingu Wrote:  
(08-12-2021 12:14 PM)zhihao Wrote:  
(09-25-2020 01:15 AM)zhihao Wrote:  deleteIfMatch()
Code:
tycajson_pfn: file of json cases
deleteIfMatch() {
    if $reqcaseid matches $caseid
        rid --insitu $tycajson_pfn
        create file $tycajson_pfn with request template which has empty value

need to remove case in sage with auntie
---
use auntie to delete case in sage

To remove the file from Sage, the program decrements casecnt, then runs 'coolauntie rm $tycano' and returns 105.

RR zhihao

good to me
---
Code:
casecnt: current case count
biboext: $bibo_share/bibo-ext.pcf , records current case count

        pcf --pcf $biboext --add bibo_doc_cnt ${casecnt}+1
        coolauntie rm $tycano
        rr = 105
Quote this message in a reply
08-14-2021, 06:30 PM
Post: #19
RE: procone.py -- OMUD
(08-14-2021 12:37 AM)lingu Wrote:  
(08-13-2021 07:36 PM)zhihao Wrote:  
(09-25-2020 01:15 AM)zhihao Wrote:  deleteIfMatch()
Code:
use auntie to delete case in sage
}

find little info about auntie after I search in tab, cod://sage-src/src/auntie/auntie.cpp has some infos, looks like no remove operation

Code:
void usage() {
  printf (("\
Usage: auntie [--dryrun] [up | down | list | pushmove | register] [...] \n\
  up        starts a KissUp operation,\n              which stores (uploads) the file \n\
  down      auntie down requests a KissDown operation,\n              which provides (downloads)\n              the file in  the  name <filename> \n\
  list      auntie list lists the currently stored keys in GFAT.\n              These are similar to the filenames\n              of files in the GFAT system \n\
  pushmove  auntie [--dryrun] pushmove <filename>\n              <hostname> <id> <suffix>\n              pushes the file to EFS of the helper_portal \n\
  register  auntie [--dryrun] register <filename>\n              auntie register registers a task \n              specification file with Sage \n\
  dryrun    auntie [--dryrun] \n              If --dryrun is specified, auntie conducts a dryrun\n              and does not really upload or download the data\n"));

}

try list some files
Code:
[sage@limbo305-1 test]$ /thinker/globe/.think/run/auntie list
[sage@limbo305-1 test]$

If list does not work, file a bug, write a test for it, and debug to fix the problem.

ok, it recorded in 2016
Quote this message in a reply
Post Reply 


Forum Jump: