File size: 809 Bytes
2abfccb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from petrel_client.client import Client

c = Client(conf_path='../conf/petreloss.conf')


data = c.get('cluster1:s3://lili1.test2/sometest')
print (data)


c.put('s3://lili1.test2/sometest', 'sometest')

files = c.get_file_iterator('s3://lili1.test2/test3')
files1 = c.get_file_iterator('s3://lili1.test2')
files2 = c.get_file_iterator('cluster1:s3://lili1.test2/')

cluster = 'cluster1'

for path, key in files:
    k = '{0}:s3://{1}'.format(cluster, path)
    print (k)
    #c.get(k)

print ('='*20)

for path, key in files:
    k = '{0}:s3://{1}'.format(cluster, path)
    print (k)
    #c.get(k)

print ('='*20)

for path, key in files:
    k = '{0}:s3://{1}'.format(cluster, path)
    print (k)
    #c.get(k)
for path, key in files1:
    print (path, key)

for path, key in files2:
    print (path, key)