Giter Club home page Giter Club logo

datastore-mapper's People

Contributors

captaincodeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

leobcn

datastore-mapper's Issues

Create a job from code

I try to start and control a job from code, but cannot find the appropriate functions and interfaces. Could you please provide an example?

Generally, the public interfaces are hard to find. Maybe you could add the library to go-search.org and to godoc.org. Another possibility would be to move the implementation to a sub-package.

Use separate queue for control tasks

Allow a separate queue to be used for control tasks so that they can be given priority and the pool of real workers (doing the grunt tasks) controlled better.

Add examples

Tidy up development examples to show how to consume the package and also what the outputs are.

Check lock / lease robustness

Both logic and implementation.

Why does the legacy implementation do so much extra work when it should have a lock?
Is it possible for a task to still be executing after another takes over the lease? etc...

Job control (abort) mechanism

Check on task start as part of lock: return error but with http OK status to abort any task retry
Would allow processing to halt and tasks to quickly drain

Optimize output writer

Existing rolled-up files can be skipped, single file rollups can be done as a move (or copy/delete) and rollup needs to handle the number of source files being over the cloud storage rollup limit (i.e. perform iterative rollup).

Task entry cleanup

Add options to cleanup datastore mapper entities

Date range? ID? Auto cleanup job on completion (e.g. if cron tasks running frequently)

Cloud storage output

Make it easy to export data to cloud storage with the framework managing files etc...
Utilize cloud storage file chunks to rollup slices into shard, shard into namespace, namespace into job
Makes it easy to write - slices own their own file and can just overwrite in the event of a retry
Possible limitation is how many times files chunks can be combined (a bizarre limit of cloud storage, I can only imagine to protect against some runaway fork-bomb situation)

License

please add the license file.

BTW, thank you very much for this project.

Breaks with newest google.golang.org/appengine

Interaction with google.golang.org/appengine/datastore breaks with its newest version.
Error may reside within datastore-locker. But unlikely.

Running example1 causes no output or error message.

Logging the error output from Schedule in task.go (datastore-locker) will output:
'datastore: multiple Properties with Name "active", but Multiple is false'.
The property name changes each time to a property of common.

Not sure of the root cause (or change from google.golang.org/appengine/datastore) but it is possibly due to merging the entity and common properties. (job.go line 118)

In addition to updating the code to conform to the newest version of google.golang.org/appengine/datastore. I would recommend handling errors from datastore-locker/task.go (Schedule function specifically) within the startJobHandler function (job_spec.go, line 173).

Passing parameters to "Query"

I created a job that should transform entities from one kind to another by getting the values from the request:

`func (x *transform) Query(r *http.Request) (*mapper.Query, error) {
c := appengine.NewContext(r)

err := r.ParseForm()
if err != nil {
	return nil, err
}

from := r.Form.Get("from")
to := r.Form.Get("to")

q := mapper.NewQuery(from)
q = q.NamespaceEmpty()
return q, nil

}
`

How can I pass this value ("to") to
func (x *transform) Next(c context.Context, counters mapper.Counters, key *datastore.Key) error
?

RESTful API

Allow querying and control via RESTful API

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.