apex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yogi Devendra <deven...@datatorrent.com>
Subject Re: Concrete classes in Malhar
Date Tue, 12 Jan 2016 11:42:50 GMT
Thanks for your suggestion.

Can you please create a JIRA for this on
https://issues.apache.org/jira/browse/APEXMALHAR

This will help the community to take that up sometime in future.

~ Yogi

On Tue, Jan 12, 2016 at 5:00 PM, Akshay Gore <goreakshay@gmail.com> wrote:

> Thanks Yogi. I am able to perform file write operation on HDFS.
>
> One suggestion here, Malhar library should have some concrete classes like
> hdfs file input/output operations so that it would be easy for a new Apex
> user to quickly start with.
>
> -Akshay
>
> On Tue, Jan 12, 2016 at 3:26 PM, Yogi Devendra <devendra@datatorrent.com>
> wrote:
>
>> Here is the Javadoc:
>>
>>
>> https://www.datatorrent.com/docs/apidocs/com/datatorrent/lib/io/fs/AbstractFileOutputOperator.html
>>
>> Here is the user guide:
>>
>> http://docs.datatorrent.com/operators/file_output/
>>
>> You will need to provide implementation for couple of methods:
>>
>> 1.  protected abstract String getFileName(INPUT tuple)
>>  You could simply return "output.txt"
>>
>> 2. protected abstract byte[] getBytesForTuple(INPUT tuple)
>>
>> You need to provide some way to serialize input tuple.
>> It could be as simple as return tuple.toString().getBytes()
>>
>> It would be great if you use some IDE like eclipse or intellij; it should
>> give you suggestions, auto-complete template for methods to be overridden.
>>
>> ~ Yogi
>>
>> On Tue, Jan 12, 2016 at 2:58 PM, Akshay Gore <goreakshay@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am developing the sample Apex application to explore Malhar operators.
>>> In my case, I need to write the processed data to HDFS. I did not find
>>> concrete class for file writing, instead I got AbstractFileOutput operator
>>> class which will have to implement it. Can I have references/ examples to
>>> how to implement the abstract classes in Malhar ?  If not, it would be nice
>>> to have such classes in Malhar.
>>>
>>> --
>>> Thanks,
>>> Akshay
>>>
>>
>>
>
>
> --
> Thanks,
> Akshay
>

Mime
View raw message