Wendelin Home Wendelin

    Wendelin Hyperconvergence Tutorial - Screenshot Jupyter ERP5 Access Out-of-Core

    Wendelin Hyperconvergence Tutorial - Juypter ERP5 Data Access Out-of-Core aware
    • Last Update:2016-06-10
    • Version:001
    • Language:

    = Ju pyter PydataParis Last Checkpoint: 9 minutes ago (unsaved changes)

    File Edit



    In [10]:

    In [11]:

    View Inset Cell Kemel Help

    + % @B 4+ ¥ M B C Coke v | = Cellfoolbar

    from scipy.io.wavfile import read

    # Not out of core, as you return all data as string (So you should avoid do like this)
    datastream as_string = context.data_stream module["1"].getData()

    print "Total is %s" % len(datastream as_string)
    print type(datastrean_as_string)

    Total is 3833000
    <type 'str'>

    # Now we try with out-of-core!!
    stream = context.data_stream module["1"].data

    1=6

    for chunk in stream.iterate(): # out of core
    1 += len(chunk)

    print "Total is %s" % 1

    print type(stream)

    Total is 3833900
    <class 'Products.ERPSType.BTreeData.BTreeData’>



    [