Skip to content

Commit

Permalink
Fix custom_class kwargs to match arg vs args, and use correct arg nam…
Browse files Browse the repository at this point in the history
…e for flux dict for custom java classes (#405)
  • Loading branch information
aldraco authored and dan-blanchard committed Nov 14, 2017
1 parent da5fc42 commit 97ea3be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions streamparse/dsl/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def fields(cls, *fields):
def custom_object(cls, java_class_name, arg_list):
"""Tuples will be assigned to tasks by the given Java class."""
java_object = JavaObject(full_class_name=java_class_name,
arg_list=[to_java_arg(arg)
for arg in arg_list])
args_list=[to_java_arg(arg)
for arg in arg_list])
return _Grouping(custom_object=java_object)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion streamparse/dsl/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def _stream_to_flux_dict(spec, global_stream, grouping):
elif key == 'custom_object':
grouping_dict['type'] = 'CUSTOM'
class_dict = {'className': val.full_class_name,
'args': to_python_arg_list(val.arg_list)}
'constructorArgs': to_python_arg_list(val.args_list)}
grouping_dict['customClass'] = class_dict
flux_dict['grouping'] = grouping_dict
return flux_dict
Expand Down

0 comments on commit 97ea3be

Please sign in to comment.