Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run_command_in_cluster_patch(cmd, name):
# Check command name
assert "Running Spark Application" in str(name)
print("Command is: {0}".format(cmd))
command_components = cmd.split()
# Check algorithm name from the spark command
algorithm_class_name = command_components[-3]
assert algorithm_class_name == ScalaClasses.GZIP_DECOMPRESSOR
# Check configuration file content
algorithm_config_file_name = command_components[-2]
actual_config_file_content = self.get_object_content_from_s3(algorithm_config_file_name)
print("Actual config content: {0}".format(actual_config_file_content))
algorithm_config_file_dict = json.loads(actual_config_file_content)
assert algorithm_config_file_dict == expected_param_dict
def get_scala_class(self):
return ScalaClasses.DELTA_LOAD
def get_scala_class(self):
return ScalaClasses.PARTITION_QUERY_MATERIALIZATION
def get_scala_class(self):
return ScalaClasses.ALGORITHM_TEMPLATE
def get_scala_class(self):
return ScalaClasses.FULL_LOAD
def get_scala_class(self):
return ScalaClasses.APPEND_LOAD
def get_scala_class(self):
return ScalaClasses.PARTITION_FULL_MATERIALIZATION
def get_scala_class(self):
return ScalaClasses.PARTITION_RANGE_MATERIALIZATION
def get_scala_class(self):
return ScalaClasses.FIXED_LENGTH_STRING_EXTRACTOR