Add DFU services to create a logical file (temp) and to later publish it.

Description

This superceds HPCC-20164, which outlined a single 'createandpublish' service that would have publish a blank file, with the client then overwriting it's content.

A better scheme would be to do:
1) create (not published)
2) write data
3) publish (with extra meta info)

Steps:

  • Client asks Esp 'createFile' service for file to be created

  • Service [createFile]: creates a [unattached] file - and serializes all the info. just as it would for a real [attach] file, except the name of the file is a temporary constructed name based on the request logical file name.

  • Client uses that info to write to physical parts (eventually when dafilesrv supports a secure streaming write protocol, the info will be like read, client->dafilesrv will says write to part N)

  • Client asks Esp 'publishFile' service to publish, in the request it passes enough info to identify the file in the createFile stage (probably just the temporary name it constructed). The client will also pass in extra metainfo at this stage, like # of records etc.

  • Service [publishFile]: reads the identifying name and from it works out the real name from the info passed in.

  • Service [publishFile]: recreates the IDistributedFile

  • Service [publishFile]: renames all physicals (possibly using IDistributedFile::renamePhysicalPartFiles())

  • Service [publishFile]: publishes the file (by attach()'ing it).

Create request/response should contain the following:

Publish request/response should contain the following:

Conclusion

None

Activity

Show:

Jacob Cobbett-Smith September 19, 2018 at 8:10 PM

If IGroup exists already, do I need to create an IGroup based on the Spark target file host list again?

No, you should check if a matching group already exists - and use it if it does.

Jacob Cobbett-Smith September 19, 2018 at 8:09 PM

Which API calls should be used to check that all physical parts exist?

You can call IDistributedFile::validate()

Kanghua Wang September 19, 2018 at 7:21 PM
Edited

  • create an IGroup based on the Spark target file host list.

  • Check that this IGroup doesn't already exist (possibly only check group names that follow a Spark* naming convention)

  • If it doesn't exist, publish it (to Dali) with a new unique name, otherwise use existing group name.

If IGroup exists already, do I need to create an IGroup based on the Spark target file host list again?

Kanghua Wang September 19, 2018 at 5:52 PM

>Could check here that all physical parts exist, as they should, and error out otherwise.

Which API calls should be used to check that all physical parts exist?

Jacob Cobbett-Smith September 19, 2018 at 3:52 PM

 - I've updated the description with most recent discussion of what the info the request and response fields for the create and publish service calls should contain.

 

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Compatibility

Minor

Fix versions

Labels

Created August 31, 2018 at 3:14 PM
Updated October 4, 2018 at 7:14 AM
Resolved October 4, 2018 at 7:14 AM