<s> import sys <EOL> import os <EOL> import time <EOL> import logging <EOL> logging . basicConfig ( level = logging . DEBUG ) <EOL> sys . path . append ( os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT>" ) ) <EOL> from pilot import PilotComputeService , PilotDataService , ComputeDataService , State <EOL> COORDINATION_URL = "<STR_LIT>" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> base_dir = "<STR_LIT>" <EOL> url_list = os . listdir ( base_dir ) <EOL> absolute_url_list = [ os . path . join ( base_dir , i ) for i in url_list ] <EOL> data_unit_description1 = { <EOL> "<STR_LIT>" : absolute_url_list , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" <EOL> } <EOL> logging . debug ( "<STR_LIT>" % str ( data_unit_description1 ) ) <EOL> remote_url_list = [ "<STR_LIT>" + os . path . join ( base_dir , i ) for i in url_list ] <EOL> data_unit_description2 = { <EOL> "<STR_LIT>" : remote_url_list , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" <EOL> } <EOL> logging . debug ( "<STR_LIT>" % str ( data_unit_description2 ) ) <EOL> pilot_data_service = PilotDataService ( coordination_url = COORDINATION_URL ) <EOL> ps1 = pilot_data_service . create_pilot ( { <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT:size>' : <NUM_LIT:100> , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" <EOL> } ) <EOL> ps2 = pilot_data_service . create_pilot ( { <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT:size>' : <NUM_LIT:100> , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" <EOL> } ) <EOL> compute_data_service = ComputeDataService ( ) <EOL> compute_data_service . add_pilot_data_service ( pilot_data_service ) <EOL> du1 = compute_data_service . submit_data_unit ( data_unit_description1 ) <EOL> du2 = compute_data_service . submit_data_unit ( data_unit_description2 ) <EOL> logging . debug ( "<STR_LIT>" ) <EOL> compute_data_service . wait ( ) <EOL> logging . debug ( "<STR_LIT>" + du1 . url ) <EOL> logging . debug ( "<STR_LIT>" ) <EOL> du1 . export ( "<STR_LIT>" ) <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" % du1 . url <EOL> print "<STR_LIT>" + sys . executable + "<STR_LIT>" % du1 . url <EOL> print "<STR_LIT>" <EOL> logging . debug ( "<STR_LIT>" ) <EOL> compute_data_service . cancel ( ) <EOL> pilot_data_service . cancel ( ) </s>
