Package arvados :: Module collection :: Class ResumableCollectionWriter
[hide private]
[frames] | no frames]

Class ResumableCollectionWriter

source code

builtins.object --+        
                  |        
     CollectionBase --+    
                      |    
       CollectionWriter --+
                          |
                         ResumableCollectionWriter

Deprecated, use Collection instead.

Instance Methods [hide private]
 
__init__(self, api_client=None, **kwargs)
Instantiate a CollectionWriter.
source code
 
check_dependencies(self) source code
 
dump_state(self, copy_func=lambda x: x) source code
 
_queue_file(self, source, filename=None) source code
 
write(self, data) source code

Inherited from CollectionWriter: __exit__, current_file_name, current_stream_name, data_locators, do_queued_work, finish, finish_current_file, finish_current_stream, flush_data, manifest_text, open, portable_data_hash, save_new, set_current_file_name, set_current_stream_name, start_new_file, start_new_stream, write_directory_tree, write_file

Inherited from CollectionBase: __enter__, stripped_manifest

Inherited from CollectionBase (private): _my_keep

Class Methods [hide private]
 
from_state(cls, state, *init_args, **init_kwargs) source code
Class Variables [hide private]
  STATE_PROPS = ['_current_stream_files', '_current_stream_lengt...
Method Details [hide private]

__init__(self, api_client=None, **kwargs)
(Constructor)

source code 
Instantiate a CollectionWriter.

CollectionWriter lets you build a new Arvados Collection from scratch.
Write files to it.  The CollectionWriter will upload data to Keep as
appropriate, and provide you with the Collection manifest text when
you're finished.

Arguments:
* api_client: The API client to use to look up Collections.  If not
  provided, CollectionReader will build one from available Arvados
  configuration.
* num_retries: The default number of times to retry failed
  service requests.  Default 0.  You may change this value
  after instantiation, but note those changes may not
  propagate to related objects like the Keep client.
* replication: The number of copies of each block to store.
  If this argument is None or not supplied, replication is
  the server-provided default if available, otherwise 2.

Overrides: CollectionWriter.__init__
(inherited documentation)

_queue_file(self, source, filename=None)

source code 
Overrides: CollectionWriter._queue_file

write(self, data)

source code 
Overrides: CollectionWriter.write

Class Variable Details [hide private]

STATE_PROPS

Value:
['_current_stream_files', '_current_stream_length', '_current_stream_l\
ocators', '_current_stream_name', '_current_file_name', '_current_file\
_pos', '_close_file', '_data_buffer', '_dependencies', '_finished_stre\
ams', '_queued_dirents', '_queued_trees']