qubole / qds-sdk-py

Python SDK for accessing Qubole Data Service
https://qubole.com
Apache License 2.0
51 stars 127 forks source link

Missing functionality in Scheduler class #130

Open rbarham opened 8 years ago

rbarham commented 8 years ago

I've noticed there are some missing features in some of the classes. For example, the qds_sdk.scheduler.Scheduler class doesn't have an edit/update or create method. I was able to pretty easily add this functionality to a class that extended "qds_sdk.scheduler.Scheduler".

class MyScheduler(Scheduler):
    def create(self):
        conn = Qubole.agent()
        return conn.post(Scheduler.rest_entity_path, self.attributes)

    def edit(self, args):
        conn = Qubole.agent()
        return conn.put(self.element_path(self.id), args)

It would be useful if this functionality exists in the SDK by default.

rohitagarwal003 commented 8 years ago

Hey @rbarham,

Please feel free to send a PR. Otherwise we also get someone to look into it. cc - @vrajat