Exemple #1
0
def drop_stale(stale_age=None):
    """
    Execute garbage collection out of cycle to drop stale entities
    :param stale_age: Minimum age to qualify as "stale".  Defaults to server config.  Age specified using the typesafe config duration format.
    :type stale_age: str
    """
    execute_command("_admin:/_drop_stale", None, stale_age=stale_age)
Exemple #2
0
def release():
    """
    Release the current job context (shuts down Yarn application)
    """
    print "Releasing cluster resources..."
    try:
        execute_command("_admin:/_release", None, bogus=0)
    except Exception as e:
        print "Warning: release failed %s" % e   # print as warning and swallow exception
Exemple #3
0
def _explicit_garbage_collection(age_to_delete_data = None, age_to_delete_meta_data = None):
    """
    Execute garbage collection out of cycle age ranges specified using the typesafe config duration format.
    :param age_to_delete_data: Minimum age for data deletion. Defaults to server config.
    :param age_to_delete_meta_data: Minimum age for meta data deletion. Defaults to server config.
    """
    execute_command("_admin:/_explicit_garbage_collection", None,
                    age_to_delete_data=age_to_delete_data,
                    age_to_delete_meta_data=age_to_delete_meta_data)
Exemple #4
0
def _explicit_garbage_collection(age_to_delete_data=None,
                                 age_to_delete_meta_data=None):
    """
    Execute garbage collection out of cycle age ranges specified using the typesafe config duration format.
    :param age_to_delete_data: Minimum age for data deletion. Defaults to server config.
    :param age_to_delete_meta_data: Minimum age for meta data deletion. Defaults to server config.
    """
    execute_command("_admin:/_explicit_garbage_collection",
                    None,
                    age_to_delete_data=age_to_delete_data,
                    age_to_delete_meta_data=age_to_delete_meta_data)
Exemple #5
0
 def set_name(self, value):
     arguments = {obj_term: self.uri, "new_name": value}
     execute_command(obj_term + "/rename", self, **arguments)
Exemple #6
0
 def set_name(self, value):
     arguments = {obj_term: self._id, "new_name": value}
     execute_command(obj_term + "/rename", self, **arguments)
Exemple #7
0
def finalize_dropped():
    """
    Execute garbage collection out of cycle to finalize all dropped entities (i.e. erase their data)
    """
    execute_command("_admin:/_finalize_dropped", None, bogus=0)