Revision 34537
Added by Mateusz Kobos over 9 years ago
modules/icm-iis-core-examples/trunk/src/test/resources/eu/dnetlib/iis/core/examples/hadoopstreaming/cloner_without_reducer_with_subworkflow/oozie_app/lib/scripts/python_cloner/cloner.py | ||
---|---|---|
1 |
#!/usr/bin/env python |
|
2 |
|
|
3 |
import sys |
|
4 |
import json |
|
5 |
import argparse |
|
6 |
|
|
7 |
def parse_params(): |
|
8 |
parser = argparse.ArgumentParser(description="Clone input.") |
|
9 |
parser.add_argument("--copies", type=int, default=1, |
|
10 |
help="Number of copies to create") |
|
11 |
args = parser.parse_args() |
|
12 |
return args |
|
13 |
|
|
14 |
params = parse_params() |
|
15 |
|
|
16 |
for line in sys.stdin: |
|
17 |
person = json.loads(line) |
|
18 |
for i in range(params.copies): |
|
19 |
print json.dumps(person) |
|
20 |
|
|
21 |
|
|
22 |
|
|
0 | 23 |
modules/icm-iis-core-examples/trunk/src/test/resources/eu/dnetlib/iis/core/examples/hadoopstreaming/cloner_without_reducer_with_subworkflow/oozie_app/my_subworkflow/lib/scripts/python_cloner2/cloner.py | ||
---|---|---|
1 |
#!/usr/bin/env python |
|
2 |
|
|
3 |
import sys |
|
4 |
import json |
|
5 |
import argparse |
|
6 |
|
|
7 |
def parse_params(): |
|
8 |
parser = argparse.ArgumentParser(description="Clone input.") |
|
9 |
parser.add_argument("--copies", type=int, default=1, |
|
10 |
help="Number of copies to create") |
|
11 |
args = parser.parse_args() |
|
12 |
return args |
|
13 |
|
|
14 |
params = parse_params() |
|
15 |
|
|
16 |
for line in sys.stdin: |
|
17 |
person = json.loads(line) |
|
18 |
for i in range(params.copies): |
|
19 |
print json.dumps(person) |
|
20 |
|
|
21 |
|
|
22 |
|
|
0 | 23 |
modules/icm-iis-core-examples/trunk/src/test/resources/eu/dnetlib/iis/core/examples/hadoopstreaming/cloner_without_reducer/oozie_app/lib/scripts/python_cloner/cloner.py | ||
---|---|---|
1 |
#!/usr/bin/env python |
|
2 |
|
|
3 |
import sys |
|
4 |
import json |
|
5 |
import argparse |
|
6 |
|
|
7 |
def parse_params(): |
|
8 |
parser = argparse.ArgumentParser(description="Clone input.") |
|
9 |
parser.add_argument("--copies", type=int, default=1, |
|
10 |
help="Number of copies to create") |
|
11 |
args = parser.parse_args() |
|
12 |
return args |
|
13 |
|
|
14 |
params = parse_params() |
|
15 |
|
|
16 |
for line in sys.stdin: |
|
17 |
person = json.loads(line) |
|
18 |
for i in range(params.copies): |
|
19 |
print json.dumps(person) |
|
20 |
|
|
21 |
|
|
22 |
|
|
0 | 23 |
Also available in: Unified diff
Adding missing files after deleting svn externals in previous commit (see #1051)